]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Do not reset vendor_scan_cookie after scan timeout
authorSunil Dutt <usdutt@qti.qualcomm.com>
Wed, 25 Jan 2017 11:06:19 +0000 (16:36 +0530)
committerJouni Malinen <j@w1.fi>
Sun, 29 Jan 2017 23:54:30 +0000 (01:54 +0200)
If vendor_scan_cookie is set to 0 after the scan_abort due to the scan
timeout ends in a cookie mismatch when processing the following
QCA_NL80211_VENDOR_SUBCMD_SCAN_DONE indication. This ends up considering
the scan results as being for an external scan and thus the current
ongoing scan is not removed from the radio_work. Hence, do not reset
this vendor_scan_cookie after the scan abort so that the scan completion
event gets processed properly and vendor_scan_cookie gets cleared at
that point.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211_scan.c

index 7dcfae28ee6fca96b4dff7c557b49c634b5bf422..b577531f8e687810b5c5dba8868b0e2f899bdc25 100644 (file)
@@ -156,10 +156,8 @@ void wpa_driver_nl80211_scan_timeout(void *eloop_ctx, void *timeout_ctx)
        wpa_printf(MSG_DEBUG, "nl80211: Scan timeout - try to abort it");
 #ifdef CONFIG_DRIVER_NL80211_QCA
        if (drv->vendor_scan_cookie &&
-           nl80211_abort_vendor_scan(drv, drv->vendor_scan_cookie) == 0) {
-               drv->vendor_scan_cookie = 0;
+           nl80211_abort_vendor_scan(drv, drv->vendor_scan_cookie) == 0)
                return;
-       }
 #endif /* CONFIG_DRIVER_NL80211_QCA */
        if (!drv->vendor_scan_cookie &&
            nl80211_abort_scan(drv->first_bss) == 0)