]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Allow scanning in wpa_supplicant AP mode
authorJouni Malinen <j@w1.fi>
Sun, 15 Mar 2020 19:21:35 +0000 (21:21 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 15 Mar 2020 19:21:35 +0000 (21:21 +0200)
If the driver supports this, request cfg80211 to allow the explicitly
requested scan to go through in AP mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211_scan.c

index 413d6f75777b75c72da3dc38542e668f25ef4585..04f6bb8790ca6a87e48a94540c85bc8c5f13d937 100644 (file)
@@ -236,6 +236,11 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
        params->filter_ssids = NULL;
        drv->num_filter_ssids = params->num_filter_ssids;
 
+       if (!drv->hostapd && is_ap_interface(drv->nlmode)) {
+               wpa_printf(MSG_DEBUG, "nl80211: Add NL80211_SCAN_FLAG_AP");
+               scan_flags |= NL80211_SCAN_FLAG_AP;
+       }
+
        if (params->only_new_results) {
                wpa_printf(MSG_DEBUG, "nl80211: Add NL80211_SCAN_FLAG_FLUSH");
                scan_flags |= NL80211_SCAN_FLAG_FLUSH;