--- wpa-2.1.orig/src/drivers/driver_nl80211.c 2014-02-04 12:23:35.000000000 +0100 +++ wpa-2.1/src/drivers/driver_nl80211.c 2015-11-08 17:04:34.943953601 +0100 @@ -2881,6 +2881,16 @@ static void do_process_drv_event(struct case NL80211_CMD_TRIGGER_SCAN: wpa_dbg(drv->ctx, MSG_DEBUG, "nl80211: Scan trigger"); drv->scan_state = SCAN_STARTED; + if (drv->scan_for_auth) { + /* + * Cannot indicate EVENT_SCAN_STARTED here since we skip + * EVENT_SCAN_RESULTS in scan_for_auth case and the + * upper layer implementation could get confused about + * scanning state. + */ + wpa_printf(MSG_DEBUG, "nl80211: Do not indicate scan-start event due to internal scan_for_auth"); + break; + } wpa_supplicant_event(drv->ctx, EVENT_SCAN_STARTED, NULL); break; case NL80211_CMD_START_SCHED_SCAN: