diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-04-24 16:29:51 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-04-24 16:19:06 +0200 |
commit | 51f6e0a79fffaea92d044a2b541da316bd57ffcd (patch) | |
tree | 7b9e675e24674a94c73186579251baf00fcad531 /plugins/wifi.c | |
parent | c9589f074c062f8ada8e8981604fedc6fe2bf623 (diff) | |
download | connman-51f6e0a79fffaea92d044a2b541da316bd57ffcd.tar.gz connman-51f6e0a79fffaea92d044a2b541da316bd57ffcd.tar.bz2 connman-51f6e0a79fffaea92d044a2b541da316bd57ffcd.zip |
wifi: Autoscan should be started or stopped according to interface's state
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r-- | plugins/wifi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index 8f1ad8b9..28b3563f 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1175,10 +1175,15 @@ static void interface_state(GSupplicantInterface *interface) case G_SUPPLICANT_STATE_AUTHENTICATING: case G_SUPPLICANT_STATE_ASSOCIATING: + stop_autoscan(device); + connman_network_set_associating(network, TRUE); break; case G_SUPPLICANT_STATE_COMPLETED: + /* though it should be already stopped: */ + stop_autoscan(device); + if (handle_wps_completion(interface, network, device, wifi) == FALSE) break; @@ -1217,10 +1222,15 @@ static void interface_state(GSupplicantInterface *interface) connman_network_set_associating(network, FALSE); connman_network_set_connected(network, FALSE); + + start_autoscan(device); + break; case G_SUPPLICANT_STATE_INACTIVE: connman_network_set_associating(network, FALSE); + start_autoscan(device); + break; case G_SUPPLICANT_STATE_UNKNOWN: |