mac80211: don't defer scans in case of radar detection
authorEliad Peller <eliad@wizery.com>
Wed, 7 Jan 2015 15:50:11 +0000 (17:50 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 Jan 2015 08:37:07 +0000 (09:37 +0100)
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/scan.c

index b0320bb..7807fa4 100644 (file)
@@ -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 || ieee80211_is_radar_required(local))
                return -EBUSY;
 
        if (!ieee80211_can_scan(local, sdata)) {