conman:  React to mwifiex firmware resets.

When the mwifiex firmware resets, its interfaces are recreated (and
hotplug touches a file in /tmp/interfaces).  This causes
wpa_supplicant to get disconnected.  Simply calling "wifi setclient"
again is a no-op, because /bin/wifi compares the new wpa_supplicant
config to the existing one, and exits if there is no change (and
wpa_supplicant is running).  There is a --force-restart /bin/wifi
option that overrides this behavior.

In practice, after an mwifiex reset, we sometimes see conman try to
re-run "wifi setclient" only for /bin/wifi to treat it as a no-op.
This causes conman to attempt to reprovision, which delays rejoining
the WLAN.

This commit watches the files touched by hotplug with inotify, and
when they are touched, adds --force-restart to the next wifi setclient
call.

Bug: 34040473

Change-Id: I0f6e0c7606e1b2569ac75f6cf53adf15b37653d4
6 files changed