Commit ed55c9b9 authored by Felix Fietkau's avatar Felix Fietkau

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: cc726268 ("mt76: move mt76x02_bss_info_changed in mt76x02-lib module")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b3f09304
...@@ -704,9 +704,6 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw, ...@@ -704,9 +704,6 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_BSSID) if (changed & BSS_CHANGED_BSSID)
mt76x02_mac_set_bssid(dev, mvif->idx, info->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) if (changed & BSS_CHANGED_HT || changed & BSS_CHANGED_ERP_CTS_PROT)
mt76x02_mac_set_tx_protection(dev, info->use_cts_prot, mt76x02_mac_set_tx_protection(dev, info->use_cts_prot,
info->ht_operation_mode); info->ht_operation_mode);
...@@ -719,6 +716,9 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw, ...@@ -719,6 +716,9 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
dev->tbtt_count = 0; 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) if (changed & BSS_CHANGED_ERP_PREAMBLE)
mt76x02_mac_set_short_preamble(dev, info->use_short_preamble); mt76x02_mac_set_short_preamble(dev, info->use_short_preamble);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment