[PATCH 12/19] staging: wfx: remove unnecessary conditions in wfx_bss_info_changed()
From: Jerome Pouiller
Date: Fri Apr 10 2020 - 09:34:27 EST
From: JÃrÃme Pouiller <jerome.pouiller@xxxxxxxxxx>
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@xxxxxxxxxx>
---
drivers/staging/wfx/sta.c | 7 +++----
1 file 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);
--
2.25.1