aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-11-06 02:08:27 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-07 12:01:33 (GMT)
commite40634e6549ec483153a44dbc708d40dd91c2d7f (patch)
treeeee966136ad5cc20f5db5d8dc1f3bc3dcd717f8a /wpa_supplicant/ctrl_iface.c
parent3526ff0fadfbc0efddde53a5060a7e02b92f856a (diff)
downloadhostap-e40634e6549ec483153a44dbc708d40dd91c2d7f.zip
hostap-e40634e6549ec483153a44dbc708d40dd91c2d7f.tar.gz
hostap-e40634e6549ec483153a44dbc708d40dd91c2d7f.tar.bz2
Prohibit PNO start during assoc process and in connect state
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 87d711e..ebe08b3 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -58,6 +58,12 @@ static int pno_start(struct wpa_supplicant *wpa_s)
if (wpa_s->pno)
return 0;
+ if ((wpa_s->wpa_state > WPA_SCANNING) &&
+ (wpa_s->wpa_state <= WPA_COMPLETED)) {
+ wpa_printf(MSG_ERROR, "PNO: In assoc process");
+ return -EAGAIN;
+ }
+
if (wpa_s->wpa_state == WPA_SCANNING) {
wpa_supplicant_cancel_sched_scan(wpa_s);
wpa_supplicant_cancel_scan(wpa_s);