diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-04-16 11:44:53 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:57:16 -0400 |
commit | 357303e2b61272b191f2e5d782d94fdd8f50fd71 (patch) | |
tree | 38b88eaf22ab511adc1d9b30396189007ab22623 | |
parent | 955394c98c9cb79bdb3e6b479695af3a90ea0623 (diff) |
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: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/cfg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index e677b751d468..520efa8a0791 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1167,7 +1167,8 @@ static int ieee80211_scan(struct wiphy *wiphy, | |||
1167 | 1167 | ||
1168 | if (sdata->vif.type != NL80211_IFTYPE_STATION && | 1168 | if (sdata->vif.type != NL80211_IFTYPE_STATION && |
1169 | sdata->vif.type != NL80211_IFTYPE_ADHOC && | 1169 | sdata->vif.type != NL80211_IFTYPE_ADHOC && |
1170 | sdata->vif.type != NL80211_IFTYPE_MESH_POINT) | 1170 | sdata->vif.type != NL80211_IFTYPE_MESH_POINT && |
1171 | (sdata->vif.type != NL80211_IFTYPE_AP || sdata->u.ap.beacon)) | ||
1171 | return -EOPNOTSUPP; | 1172 | return -EOPNOTSUPP; |
1172 | 1173 | ||
1173 | return ieee80211_request_scan(sdata, req); | 1174 | return ieee80211_request_scan(sdata, req); |