mac80211: reject software RSSI CQM with beacon filtering
authorJohannes Berg <johannes.berg@intel.com>
Fri, 28 Aug 2015 08:44:20 +0000 (10:44 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 4 Sep 2015 13:23:22 +0000 (15:23 +0200)
When beacon filtering is enabled the mac80211 software implementation
for RSSI CQM cannot work as beacons will not be available. Rather than
accepting such a configuration without proper effect, reject it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c

index 685ec13ed7c2b0a2dcdcf82d7388d1c44d041a26..17b1fe961c5d67b958346dee07e265448408cc71 100644 (file)
@@ -2468,6 +2468,10 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
            rssi_hyst == bss_conf->cqm_rssi_hyst)
                return 0;
 
+       if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER &&
+           !(sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI))
+               return -EOPNOTSUPP;
+
        bss_conf->cqm_rssi_thold = rssi_thold;
        bss_conf->cqm_rssi_hyst = rssi_hyst;