summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-02-24 11:37:18 +0100
committerFelix Fietkau <nbd@nbd.name>2019-02-26 10:28:18 +0100
commited55c9b9c13e3c30ed644a6ace02fd9fd6b70a45 (patch)
tree8169e5e3db9e12bded54373bf466451f195d602c /drivers/net/wireless/mediatek/mt76/mt76x02_util.c
parentb3f09304bab1a775a5fda7b4bd43798118c71567 (diff)
downloadlinux-stable-ed55c9b9c13e3c30ed644a6ace02fd9fd6b70a45.tar.gz
linux-stable-ed55c9b9c13e3c30ed644a6ace02fd9fd6b70a45.tar.bz2
linux-stable-ed55c9b9c13e3c30ed644a6ace02fd9fd6b70a45.zip
mt76: mt76x02: fix beacon timer issue
When mt76x0 and mt76x2 beacon code was unified, it changed the order in which beacon enable and beacon interval are configured. Configuring beacon enable before beacon interval can in some cases cause problems with the beacon timer, leading to clients not waking up properly from powersave mode. Fix this by changing the order back to interval first, then enable. Fixes: cc726268e4dce ("mt76: move mt76x02_bss_info_changed in mt76x02-lib module") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_util.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x02_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 7b9b1956111b..2e899d30e00d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -704,9 +704,6 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_BSSID)
mt76x02_mac_set_bssid(dev, mvif->idx, info->bssid);
- if (changed & BSS_CHANGED_BEACON_ENABLED)
- mt76x02_mac_set_beacon_enable(dev, vif, info->enable_beacon);
-
if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT)
mt76x02_mac_set_tx_protection(dev, info->use_cts_prot,
info->ht_operation_mode);
@@ -719,6 +716,9 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
dev->tbtt_count = 0;
}
+ if (changed & BSS_CHANGED_BEACON_ENABLED)
+ mt76x02_mac_set_beacon_enable(dev, vif, info->enable_beacon);
+
if (changed & BSS_CHANGED_ERP_PREAMBLE)
mt76x02_mac_set_short_preamble(dev, info->use_short_preamble);