Commit 357303e2 authored by Jouni Malinen's avatar Jouni Malinen Committed by John W. Linville
Browse files

mac80211: Allow scan to be requested in AP mode

We can allow scan requests in AP mode as long as the interface has not
yet been configured to send out Beacon frames (or if beaconing has
been disabled prior to the scan request). This makes it easier to scan
for neighboring BSSes during AP initialization and makes it possible
to run a scan without setting the interface down, if needed. Without
this change, the only available option would be to set the interface
down, move into station mode, and set the interface up, prior to
requesting the scan.
Signed-off-by: default avatarJouni Malinen <>
Signed-off-by: default avatarJohn W. Linville <>
parent 955394c9
...@@ -1167,7 +1167,8 @@ static int ieee80211_scan(struct wiphy *wiphy, ...@@ -1167,7 +1167,8 @@ static int ieee80211_scan(struct wiphy *wiphy,
if (sdata->vif.type != NL80211_IFTYPE_STATION && if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_ADHOC && sdata->vif.type != NL80211_IFTYPE_ADHOC &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT) sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
(sdata->vif.type != NL80211_IFTYPE_AP || sdata->u.ap.beacon))
return ieee80211_request_scan(sdata, req); return ieee80211_request_scan(sdata, req);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment