summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-10 15:32:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 14:42:47 +0200
commit7b063f3bfbcd76b50b894ba16ed38a065ca33e07 (patch)
tree994a72bdb336db41a8df5a34226960433508f110 /drivers
parent974dfbf8fe411dff2e77d15ed8ec54777d13452c (diff)
downloadlinux-7b063f3bfbcd76b50b894ba16ed38a065ca33e07.tar.bz2
staging: wfx: avoid duplicate updating of beacon template
When ERP changes, mac80211 call wfx_bss_info_changed() with BSS_CHANGED_ERP_* and with BSS_CHANGED_BEACON. The driver already update beacon template because of BSS_CHANGED_BEACON. It is not necessary to also update beacon template because of BSS_CHANGED_ERP_*. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200410133239.438347-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wfx/sta.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 11d62de531e7..75f1c515751b 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -725,18 +725,8 @@ 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_ERP_CTS_PROT ||
- changed & BSS_CHANGED_ERP_PREAMBLE) {
- u8 erp_ie[3] = { WLAN_EID_ERP_INFO, 1, 0 };
-
+ if (changed & BSS_CHANGED_ERP_CTS_PROT)
hif_erp_use_protection(wvif, info->use_cts_prot);
- if (info->use_cts_prot)
- erp_ie[2] |= WLAN_ERP_USE_PROTECTION;
- if (info->use_short_preamble)
- erp_ie[2] |= WLAN_ERP_BARKER_PREAMBLE;
- if (wvif->vif->type != NL80211_IFTYPE_STATION)
- hif_update_ie_beacon(wvif, erp_ie, sizeof(erp_ie));
- }
if (changed & BSS_CHANGED_ERP_SLOT)
hif_slot_time(wvif, info->use_short_slot ? 9 : 20);