summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2017-01-04 15:12:34 (GMT)
committerSeonah Moon <seonah1.moon@samsung.com>2017-01-09 04:30:55 (GMT)
commit2d1017da45f832ff4e4e151153fa5e1e19780224 (patch)
treee444c7cad040ca97681e72a8de3f3b97145ac84b
parent97d882d9b7a5bb5e47e4391ce8731cffe152c81d (diff)
downloadconnman-tizen_3.0.m2.zip
connman-tizen_3.0.m2.tar.gz
connman-tizen_3.0.m2.tar.bz2
The scan done event for SSID based scan was blocked to prevent Double Scan Indication Event but It can cause abnormal wifi deactivation because the scanning flag may not be cleared correctly. So the existing solution is removed and applied other solution. Change-Id: I720faece9cb423e65f23292d4c48cd562e4f2f70
-rwxr-xr-xinclude/technology.h4
-rwxr-xr-xplugins/wifi.c12
-rwxr-xr-xsrc/technology.c13
3 files changed, 20 insertions, 9 deletions
diff --git a/include/technology.h b/include/technology.h
index 8efe9e7..12bb64c 100755
--- a/include/technology.h
+++ b/include/technology.h
@@ -71,6 +71,10 @@ struct connman_technology_driver {
int connman_technology_driver_register(struct connman_technology_driver *driver);
void connman_technology_driver_unregister(struct connman_technology_driver *driver);
+#if defined TIZEN_EXT
+void connman_technology_set_allow_scandone_signal(bool flag);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 76a1d7a..562c9b7 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1183,11 +1183,8 @@ static int throw_wifi_scan(struct connman_device *device,
if (wifi->tethering)
return -EBUSY;
-#if defined TIZEN_EXT
- if (connman_device_get_scanning(device) && !wifi->allow_full_scan)
-#else
+
if (connman_device_get_scanning(device))
-#endif
return -EALREADY;
connman_device_ref(device);
@@ -1301,11 +1298,8 @@ static void scan_callback(int result, GSupplicantInterface *interface,
}
scanning = connman_device_get_scanning(device);
-#if defined TIZEN_EXT
- if (scanning && wifi && !wifi->allow_full_scan)
-#else
+
if (scanning)
-#endif
connman_device_set_scanning(device,
CONNMAN_SERVICE_TYPE_WIFI, false);
@@ -1330,6 +1324,7 @@ static void scan_callback(int result, GSupplicantInterface *interface,
DBG("Trigger Full Channel Scan");
throw_wifi_scan(device, scan_callback);
wifi->allow_full_scan = FALSE;
+ connman_technology_set_allow_scandone_signal(TRUE);
}
if (wifi && wifi->scan_pending_network && result != -EIO) {
network_connect(wifi->scan_pending_network);
@@ -1946,6 +1941,7 @@ static int wifi_scan(enum connman_service_type type,
backgroung Scan feature.Tizen has added the BG Scan feature in net-config
To sync with up ConnMan, we need to issue the Full Scan after SSID specific scan.*/
wifi->allow_full_scan = TRUE;
+ connman_technology_set_allow_scandone_signal(FALSE);
#endif
reset_autoscan(device);
diff --git a/src/technology.c b/src/technology.c
index d5d4a40..4e9cd9e 100755
--- a/src/technology.c
+++ b/src/technology.c
@@ -43,6 +43,10 @@ static GHashTable *rfkill_list;
static bool global_offlinemode;
+#if defined TIZEN_EXT
+static bool allow_scandone_signal = TRUE;
+#endif
+
struct connman_rfkill {
unsigned int index;
enum connman_service_type type;
@@ -1036,6 +1040,13 @@ void __connman_technology_scan_started(struct connman_device *device)
DBG("device %p", device);
}
+#if defined TIZEN_EXT
+void connman_technology_set_allow_scandone_signal(bool flag)
+{
+ allow_scandone_signal = flag;
+}
+#endif
+
void __connman_technology_scan_stopped(struct connman_device *device,
enum connman_service_type type)
{
@@ -1064,7 +1075,7 @@ void __connman_technology_scan_stopped(struct connman_device *device,
}
#if defined TIZEN_EXT
- if (count == 0) {
+ if (count == 0 && allow_scandone_signal) {
DBusMessage *signal;
signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,