diff options
Diffstat (limited to 'drivers/net/wireless/wl1251/main.c')
-rw-r--r-- | drivers/net/wireless/wl1251/main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index 012e1a4016f..0325643b707 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c | |||
@@ -502,6 +502,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) | |||
502 | wl->psm = 0; | 502 | wl->psm = 0; |
503 | wl->tx_queue_stopped = false; | 503 | wl->tx_queue_stopped = false; |
504 | wl->power_level = WL1251_DEFAULT_POWER_LEVEL; | 504 | wl->power_level = WL1251_DEFAULT_POWER_LEVEL; |
505 | wl->rssi_thold = 0; | ||
505 | wl->channel = WL1251_DEFAULT_CHANNEL; | 506 | wl->channel = WL1251_DEFAULT_CHANNEL; |
506 | 507 | ||
507 | wl1251_debugfs_reset(wl); | 508 | wl1251_debugfs_reset(wl); |
@@ -959,6 +960,16 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
959 | if (ret < 0) | 960 | if (ret < 0) |
960 | goto out; | 961 | goto out; |
961 | 962 | ||
963 | if (changed & BSS_CHANGED_CQM) { | ||
964 | ret = wl1251_acx_low_rssi(wl, bss_conf->cqm_rssi_thold, | ||
965 | WL1251_DEFAULT_LOW_RSSI_WEIGHT, | ||
966 | WL1251_DEFAULT_LOW_RSSI_DEPTH, | ||
967 | WL1251_ACX_LOW_RSSI_TYPE_EDGE); | ||
968 | if (ret < 0) | ||
969 | goto out; | ||
970 | wl->rssi_thold = bss_conf->cqm_rssi_thold; | ||
971 | } | ||
972 | |||
962 | if (changed & BSS_CHANGED_BSSID) { | 973 | if (changed & BSS_CHANGED_BSSID) { |
963 | memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); | 974 | memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); |
964 | 975 | ||
@@ -1310,7 +1321,8 @@ int wl1251_init_ieee80211(struct wl1251 *wl) | |||
1310 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | | 1321 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | |
1311 | IEEE80211_HW_SUPPORTS_PS | | 1322 | IEEE80211_HW_SUPPORTS_PS | |
1312 | IEEE80211_HW_BEACON_FILTER | | 1323 | IEEE80211_HW_BEACON_FILTER | |
1313 | IEEE80211_HW_SUPPORTS_UAPSD; | 1324 | IEEE80211_HW_SUPPORTS_UAPSD | |
1325 | IEEE80211_HW_SUPPORTS_CQM_RSSI; | ||
1314 | 1326 | ||
1315 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 1327 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); |
1316 | wl->hw->wiphy->max_scan_ssids = 1; | 1328 | wl->hw->wiphy->max_scan_ssids = 1; |
@@ -1374,6 +1386,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) | |||
1374 | wl->psm_requested = false; | 1386 | wl->psm_requested = false; |
1375 | wl->tx_queue_stopped = false; | 1387 | wl->tx_queue_stopped = false; |
1376 | wl->power_level = WL1251_DEFAULT_POWER_LEVEL; | 1388 | wl->power_level = WL1251_DEFAULT_POWER_LEVEL; |
1389 | wl->rssi_thold = 0; | ||
1377 | wl->beacon_int = WL1251_DEFAULT_BEACON_INT; | 1390 | wl->beacon_int = WL1251_DEFAULT_BEACON_INT; |
1378 | wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD; | 1391 | wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD; |
1379 | wl->vif = NULL; | 1392 | wl->vif = NULL; |