Fix PNO restart flow
authorAvraham Stern <avraham.stern@intel.com>
Mon, 5 Sep 2016 14:33:03 +0000 (17:33 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 2 Oct 2016 16:49:42 +0000 (19:49 +0300)
commit5ac8f8623d8dc1a47626e22a3b5a1b8e147718d2
treef31e0b8090ead3a709ce2436b5af69df68a00f09
parent14f34a73031e2878101be473d8416f7c09d37833
Fix PNO restart flow

PNO is sometimes restarted due to changes in scan parameters
(e.g., selected network changed or MAC randomization being
 enabled/disabled). Restart is done by stopping PNO and immediately
starting it again. This may result in the SCHED_SCAN_STOPPED event being
received after the request for new PNO, which will make wpa_supplicant
believe PNO is not active although it is actually is. As a result, the
next request to start PNO will fail because PNO is active and should be
stopped first.

Fix this by deferring the request to start PNO until the
SCHED_SCAN_STOPPED event is received in case sched_scan is being
stopped.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
wpa_supplicant/scan.c