summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-10 15:32:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 14:42:46 +0200
commit974dfbf8fe411dff2e77d15ed8ec54777d13452c (patch)
treeae3a405ec1b2cf64203cafe46eaf02fbb2997a20 /drivers
parent23d57c152cef193c96598bb449f3f7e83c4aae2e (diff)
downloadlinux-974dfbf8fe411dff2e77d15ed8ec54777d13452c.tar.bz2
staging: wfx: remove unnecessary conditions in wfx_bss_info_changed()
wfx_bss_info_changed() update ERP and CQM related stuff. Thus, it check the flags BSS_CHANGED_ERP_* and BSS_CHANGED_CQM. It also update ERP and CQM on join and leave by checking the flag BSS_CHANGED_ASSOC. This check is useless. Mac80211 already do that job and set necessary flags as expected. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200410133239.438347-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wfx/sta.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 3512e59f0968..11d62de531e7 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -725,8 +725,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
hif_keep_alive_period(wvif, info->max_idle_period *
USEC_PER_TU / USEC_PER_MSEC);
- if (changed & BSS_CHANGED_ASSOC ||
- changed & BSS_CHANGED_ERP_CTS_PROT ||
+ if (changed & BSS_CHANGED_ERP_CTS_PROT ||
changed & BSS_CHANGED_ERP_PREAMBLE) {
u8 erp_ie[3] = { WLAN_EID_ERP_INFO, 1, 0 };
@@ -739,10 +738,10 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
hif_update_ie_beacon(wvif, erp_ie, sizeof(erp_ie));
}
- if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_ERP_SLOT)
+ if (changed & BSS_CHANGED_ERP_SLOT)
hif_slot_time(wvif, info->use_short_slot ? 9 : 20);
- if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_CQM)
+ if (changed & BSS_CHANGED_CQM)
hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold,
info->cqm_rssi_hyst);