]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi: mt76: mt7915: set mt76 specific PS flag
authorDavid Bauer <mail@david-bauer.net>
Sun, 15 Mar 2026 16:47:15 +0000 (17:47 +0100)
committerDavid Bauer <mail@david-bauer.net>
Mon, 16 Mar 2026 20:17:33 +0000 (21:17 +0100)
mt76 tracks the PSM state of a sta internally with a wcid flag. TX to
such clients is skipped based on the presence of this flag.

This flag was not added to the PS state notify handler for MT7915 chips.
Without this flag, mt76 queues pending frames to the hardware,
accounting for airtime when a PSM notification is received while in a TX
iteration.

Set the PS flag for the STA WCID to prevent this from happening. TX gets
skipped in presence of this flag.

Link: https://patchwork.kernel.org/project/linux-wireless/patch/20260313112502.2026974-1-mail@david-bauer.net/
Signed-off-by: David Bauer <mail@david-bauer.net>
package/kernel/mt76/Makefile
package/kernel/mt76/patches/0001-wifi-mt76-mt7915-set-mt76-specific-PS-flag.patch [new file with mode: 0644]

index 5245e7868a0d80aeb1cbb1f991c5624fb2ee5d1a..bedcba427526b1c363ad635d644ec07c801574a5 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=BSD-3-Clause-Clear
 PKG_LICENSE_FILES:=
diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-set-mt76-specific-PS-flag.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-set-mt76-specific-PS-flag.patch
new file mode 100644 (file)
index 0000000..b904cdd
--- /dev/null
@@ -0,0 +1,42 @@
+From e78688a4f44478a9270813ac494fc548ed6b3be9 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail@david-bauer.net>
+Date: Fri, 13 Mar 2026 12:19:37 +0100
+Subject: [PATCH] wifi: mt76: mt7915: set mt76 specific PS flag
+
+mt76 tracks the PSM state of a sta internally with a wcid flag. TX to
+such clients is skipped based on the presence of this flag.
+
+This flag was not added to the PS state notify handler for MT7915 chips.
+Without this flag, mt76 queues pending frames to the hardware,
+accounting for airtime when a PSM notification is received while in a TX
+iteration.
+
+Set the PS flag for the STA WCID to prevent this from happening. TX gets
+skipped in presence of this flag.
+
+Link: https://patchwork.kernel.org/project/linux-wireless/patch/20260313112502.2026974-1-mail@david-bauer.net/
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ mt7915/mcu.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 6625f905..52c89d2b 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -421,6 +421,11 @@ static void mt7915_mcu_rx_ps_sync(struct mt7915_dev *dev, struct sk_buff *skb)
+       if (!sta)
+               goto out;
++      if (p->ps_bit)
++              set_bit(MT_WCID_FLAG_PS, &wcid->flags);
++      else
++              clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
++
+       ieee80211_sta_ps_transition_ni(sta, !!p->ps_bit);
+ out:
+-- 
+2.51.0
+