---
plugins/wifi.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 912e1ee..ea7686c 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -58,6 +58,7 @@
#define MAXIMUM_RETRIES 4
#define BGSCAN_DEFAULT "simple:30:-45:300"
+#define AUTOSCAN_DEFAULT "exponential:2:3600"
struct connman_technology *wifi_technology = NULL;
@@ -209,6 +210,14 @@ static void wifi_remove(struct connman_device *device)
g_free(wifi);
}
+static void interface_autoscan_callback(int result,
+ GSupplicantInterface *interface,
+ void *user_data)
+{
+ if (result < 0)
+ DBG("Could not enable Autoscan");
+}
+
static void interface_create_callback(int result,
GSupplicantInterface *interface,
void *user_data)
@@ -236,6 +245,10 @@ static void interface_create_callback(int result,
}
connman_device_set_powered(wifi->device, TRUE);
+
+ if (g_supplicant_interface_autoscan(interface, AUTOSCAN_DEFAULT,
+ interface_autoscan_callback, wifi) < 0)
+ DBG("Could not enable Autoscan");
}
static int wifi_enable(struct connman_device *device)
--
1.7.8.5
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman