aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorRaja Mani <rmani@qti.qualcomm.com>2014-01-18 14:46:24 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-21 14:19:49 (GMT)
commitdd271857a5b501cd88143efe8ca0f0dce4519a91 (patch)
tree3b7c3fcc7c1616a7d12779e8d3b74e23950f812b /wpa_supplicant
parenta2d63657603b8f0714274f34bea45cb5d0c0a7b9 (diff)
downloadhostap-dd271857a5b501cd88143efe8ca0f0dce4519a91.zip
hostap-dd271857a5b501cd88143efe8ca0f0dce4519a91.tar.gz
hostap-dd271857a5b501cd88143efe8ca0f0dce4519a91.tar.bz2
Skip normal scan when PNO is already in progress
Scan request failures are observed in wpa_supplicant debug log when Android framework starts PNO scan in driver via ctrl interface command 'set pno 1' and wpa_supplicant also tries to issue a scan request after PNO has started in the driver. Some drivers may reject a normal scan request when PNO is already in progress. wpa_supplicant should consider PNO status before issuing start scan request to the driver. Otherwise, wpa_supplicant will get failures from driver for the scan request and it will end up rescheduling scan request in periodic interval and get a start scan request failure for each attempt. In order to avoid unnecessary scan attempt when PNO scan is already running, PNO status is checked before issuing scan request to driver. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/events.c1
-rw-r--r--wpa_supplicant/scan.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 2121bf0..6e6b011 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3236,6 +3236,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->driver_gtk_rekey.replay_ctr);
break;
case EVENT_SCHED_SCAN_STOPPED:
+ wpa_s->pno = 0;
wpa_s->sched_scanning = 0;
wpa_supplicant_notify_scanning(wpa_s, 0);
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index da827bd..ed8fa30 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -521,6 +521,11 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
size_t max_ssids;
enum wpa_states prev_state;
+ if (wpa_s->pno) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - PNO is in progress");
+ return;
+ }
+
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) {
wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - interface disabled");
return;