summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-04-24 16:29:51 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-04-24 16:19:06 +0200
commit51f6e0a79fffaea92d044a2b541da316bd57ffcd (patch)
tree7b9e675e24674a94c73186579251baf00fcad531 /plugins/wifi.c
parentc9589f074c062f8ada8e8981604fedc6fe2bf623 (diff)
downloadconnman-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.c10
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: