diff mbox

[2/3] mac80211: don't defer scans in case of radar detection

Message ID 1420366399-31535-2-git-send-email-eliad@wizery.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Eliad Peller Jan. 4, 2015, 10:13 a.m. UTC
Radar detection can last indefinite time. There is no
point in deferring a scan request in this case - simply
return -EBUSY.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 net/mac80211/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index ae84267..4525623 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -505,7 +505,7 @@  static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
 
 	lockdep_assert_held(&local->mtx);
 
-	if (local->scan_req)
+	if (local->scan_req || local->radar_detect_enabled)
 		return -EBUSY;
 
 	if (!ieee80211_can_scan(local, sdata)) {