Linux wireless drivers development
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 3/8] mt76: mt76x02: fix beacon timer issue
Date: Tue, 26 Feb 2019 10:29:40 +0100	[thread overview]
Message-ID: <20190226092945.54738-3-nbd@nbd.name> (raw)
In-Reply-To: <20190226092945.54738-1-nbd@nbd.name>

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>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +++---
 1 file 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);
 
-- 
2.17.0


  parent reply	other threads:[~2019-02-26  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  9:29 [PATCH 1/8] mt76: mt76x02: fix TSF sync mode Felix Fietkau
2019-02-26  9:29 ` [PATCH 2/8] mt76: mt76x02: fix beacon timer drift adjustment Felix Fietkau
2019-02-26  9:29 ` Felix Fietkau [this message]
2019-02-26  9:29 ` [PATCH 4/8] mt76: mt76x02: only reset beacon drift counter when enabling beacons Felix Fietkau
2019-02-26  9:29 ` [PATCH 5/8] mt76: mt76x02: issue watchdog reset on MCU request timeout Felix Fietkau
2019-02-26  9:29 ` [PATCH 6/8] mt76: mt76x02: fix ED/CCA enabling/disabling Felix Fietkau
2019-02-26  9:29 ` [PATCH 7/8] mt76: mt76x2: unify mt76x2[u]_mac_resume Felix Fietkau
2019-02-26  9:29 ` [PATCH 8/8] mt76: mt76x02: set MT_TXOP_HLDR_TX40M_BLK_EN for mt76x2 Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190226092945.54738-3-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox