Do not stop ongoing PNO sched_scan on association/disconnection
authorMahesh A Saptasagar <c_msapta@qti.qualcomm.com>
Tue, 30 Jun 2015 07:11:27 +0000 (12:41 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 13 Aug 2015 18:10:16 +0000 (21:10 +0300)
PNO was stopped by the wpa_supplicant during the connection attempts or
while handling disassociation indication. External entities, mainly, the
Android Wi-Fi framework, does not expects PNO to be stopped by other
modules. Hence, do not stop the sched_scan in these scenarios if it is
triggered externally for PNO.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/events.c
wpa_supplicant/wpa_supplicant.c

index 829cd3f..d95e066 100644 (file)
@@ -2377,7 +2377,8 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
                        "try to re-connect");
                wpa_s->reassociate = 0;
                wpa_s->disconnected = 1;
-               wpa_supplicant_cancel_sched_scan(wpa_s);
+               if (!wpa_s->pno)
+                       wpa_supplicant_cancel_sched_scan(wpa_s);
        }
        bssid = wpa_s->bssid;
        if (is_zero_ether_addr(bssid))
index 816d522..9a5d180 100644 (file)
@@ -2017,7 +2017,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
                        wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
                os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
        }
-       wpa_supplicant_cancel_sched_scan(wpa_s);
+       if (!wpa_s->pno)
+               wpa_supplicant_cancel_sched_scan(wpa_s);
+
        wpa_supplicant_cancel_scan(wpa_s);
 
        /* Starting new association, so clear the possibly used WPA IE from the