[PATCH 24/65] staging: wfx: drop wvif->cqm_rssi_thold

Jérôme Pouiller
2020-01-15T12:18:22Z

Current code keeps a copy of bss_conf->cqm_rssi_thold in wfx_vif. There
is no sane reason for that.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
drivers/staging/wfx/sta.c | 6 ++----
drivers/staging/wfx/wfx.h | 1 -
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index dede6323bb17..021daa9f7a33 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -377,7 +377,7 @@ static void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi)
int cqm_evt;

rcpi_rssi = raw_rcpi_rssi / 2 - 110;
- if (rcpi_rssi <= wvif->cqm_rssi_thold)
+ if (rcpi_rssi <= wvif->vif->bss_conf.cqm_rssi_thold)
cqm_evt = NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW;
else
cqm_evt = NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH;
@@ -922,11 +922,9 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_ERP_SLOT)
hif_slot_time(wvif, info->use_short_slot ? 9 : 20);

- if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_CQM) {
- wvif->cqm_rssi_thold = info->cqm_rssi_thold;
+ if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_CQM)
hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold,
info->cqm_rssi_hyst);
- }

if (changed & BSS_CHANGED_TXPOWER)
hif_set_output_power(wvif, info->txpower);
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index 84cb3a83e5d9..1b487d96eca2 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -105,7 +105,6 @@ struct wfx_vif {
struct work_struct update_filtering_work;

u32 erp_info;
- int cqm_rssi_thold;
bool setbssparams_done;
unsigned long uapsd_mask;
struct ieee80211_tx_queue_params edca_params[IEEE80211_NUM_ACS];
--
2.25.0