diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index a4ca425e4f3f..4edd73cbf052 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1415,9 +1415,6 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy, | |||
1415 | struct ieee80211_vif *vif = &sdata->vif; | 1415 | struct ieee80211_vif *vif = &sdata->vif; |
1416 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | 1416 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; |
1417 | 1417 | ||
1418 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) | ||
1419 | return -EOPNOTSUPP; | ||
1420 | |||
1421 | if (rssi_thold == bss_conf->cqm_rssi_thold && | 1418 | if (rssi_thold == bss_conf->cqm_rssi_thold && |
1422 | rssi_hyst == bss_conf->cqm_rssi_hyst) | 1419 | rssi_hyst == bss_conf->cqm_rssi_hyst) |
1423 | return 0; | 1420 | return 0; |
@@ -1425,6 +1422,12 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy, | |||
1425 | bss_conf->cqm_rssi_thold = rssi_thold; | 1422 | bss_conf->cqm_rssi_thold = rssi_thold; |
1426 | bss_conf->cqm_rssi_hyst = rssi_hyst; | 1423 | bss_conf->cqm_rssi_hyst = rssi_hyst; |
1427 | 1424 | ||
1425 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) { | ||
1426 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
1427 | return -EOPNOTSUPP; | ||
1428 | return 0; | ||
1429 | } | ||
1430 | |||
1428 | /* tell the driver upon association, unless already associated */ | 1431 | /* tell the driver upon association, unless already associated */ |
1429 | if (sdata->u.mgd.associated) | 1432 | if (sdata->u.mgd.associated) |
1430 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM); | 1433 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM); |