Merge "[connman]: Fixed Scan Issue" into tizen accepted/tizen/3.0/ivi/20161011.043852 accepted/tizen/3.0/mobile/20161015.032812 accepted/tizen/3.0/tv/20161016.004154 accepted/tizen/3.0/wearable/20161015.082011 accepted/tizen/common/20161006.153612 accepted/tizen/ivi/20161006.080215 accepted/tizen/mobile/20161006.080107 accepted/tizen/tv/20161006.080141 accepted/tizen/wearable/20161006.080157 submit/tizen/20161006.010203 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
authorcheoleun moon <chleun.moon@samsung.com>
Thu, 6 Oct 2016 01:01:29 +0000 (18:01 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 6 Oct 2016 01:01:29 +0000 (18:01 -0700)
1  2 
plugins/wifi.c

diff --combined plugins/wifi.c
@@@ -131,6 -131,7 +131,7 @@@ struct wifi_data 
  #if defined TIZEN_EXT
        int assoc_retry_count;
        struct connman_network *scan_pending_network;
+       bool allow_full_scan;
  #endif
  };
  
@@@ -144,6 -145,7 +145,7 @@@ static gboolean found_with_first_scan 
  static gboolean is_wifi_notifier_registered = false;
  #endif
  
  static GList *iface_list = NULL;
  
  static GList *pending_wifi_device = NULL;
@@@ -1319,6 -1321,11 +1321,11 @@@ static void scan_callback(int result, G
                connman_device_unref(device);
  
  #if defined TIZEN_EXT
+       if (wifi && wifi->allow_full_scan) {
+               DBG("Trigger Full Channel Scan");
+               throw_wifi_scan(device, scan_callback);
+               wifi->allow_full_scan = FALSE;
+       }
        if (wifi && wifi->scan_pending_network && result != -EIO) {
                network_connect(wifi->scan_pending_network);
                wifi->scan_pending_network = NULL;
@@@ -1928,6 -1935,13 +1935,13 @@@ static int wifi_scan(enum connman_servi
  
        connman_device_ref(device);
  
+ #if defined TIZEN_EXT
+       /*To allow the Full Scan after ssid based scan, set the flag here
+      It is required because Tizen does not use the ConnMan specific
+      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;
+ #endif
        reset_autoscan(device);
  
        ret = g_supplicant_interface_scan(wifi->interface, scan_params,
@@@ -2976,7 -2990,12 +2990,7 @@@ static void network_added(GSupplicantNe
  #endif
  
        if (wifi->hidden && ssid) {
 -#if defined TIZEN_EXT
 -              if (network_security(wifi->hidden->security) ==
 -                      network_security(security) &&
 -#else
                if (!g_strcmp0(wifi->hidden->security, security) &&
 -#endif
                                wifi->hidden->ssid_len == ssid_len &&
                                !memcmp(wifi->hidden->ssid, ssid, ssid_len)) {
                        connman_network_connect_hidden(network,