Prohibit PNO start during assoc process and in connect state
authorDmitry Shmidt <dimitrysh@google.com>
Wed, 6 Nov 2013 02:08:27 +0000 (18:08 -0800)
committerJouni Malinen <j@w1.fi>
Thu, 7 Nov 2013 12:01:33 +0000 (14:01 +0200)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/ctrl_iface.c

index 87d711e..ebe08b3 100644 (file)
@@ -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);