aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-15 19:21:35 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-15 19:21:35 (GMT)
commit9e30180a30bb388cda65d8deec9dbbb990072447 (patch)
tree8c1777c1325a96d2bb5e717602ee3d82b79f40ce
parentfab94f16e6588d8f0b5b09d7b822ad7ad0d87331 (diff)
downloadhostap-9e30180a30bb388cda65d8deec9dbbb990072447.zip
hostap-9e30180a30bb388cda65d8deec9dbbb990072447.tar.gz
hostap-9e30180a30bb388cda65d8deec9dbbb990072447.tar.bz2
nl80211: Allow scanning in wpa_supplicant AP mode
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>
-rw-r--r--src/drivers/driver_nl80211_scan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index 413d6f7..04f6bb8 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -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;