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 b0320bb20ab89d793dc65d07719802a5a5566eed..7807fa42ed3f4fcd8fc6b066cbf89cd987e1e331 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)) {