public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Joshua Klinesmith <joshuaklinesmith@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: nbd@nbd.name, lorenzo@kernel.org, ryder.lee@mediatek.com,
	shayne.chen@mediatek.com, sean.wang@mediatek.com,
	Joshua Klinesmith <joshuaklinesmith@gmail.com>
Subject: [PATCH wireless] wifi: mt76: mt7915: fix WED WCID for MT7986/MT7981 wmac
Date: Tue,  7 Apr 2026 00:02:38 -0400	[thread overview]
Message-ID: <20260407040238.60629-1-joshuaklinesmith@gmail.com> (raw)

The WED forward path sets the WCID to 0x3ff for all non-MT7915 chips,
relying on firmware DA lookup. This works for MT7916 PCIe cards where
the WED firmware can resolve the station by destination address, but
fails on MT7986/MT7981 wmac where WED requires the real station WCID.

As a result, WED hardware offload is completely non-functional on
MT7986-based devices (GL-MT6000, BPI-R3, etc.) and MT7981-based
devices (AX3000T, etc.) even when WED is enabled. The CPU handles
all TX traffic without any hardware acceleration.

Add is_mt798x() to the WCID check so MT7986/MT7981 wmac passes the
real station WCID, matching the behavior of the mt7996 driver which
unconditionally uses the real WCID.

Fixes: f68d67623dec ("mt76: mt7915: add Wireless Ethernet Dispatch support")
Link: https://github.com/openwrt/mt76/issues/815
Assisted-by: Claude:claude-opus-4-6 ghidra
Signed-off-by: Joshua Klinesmith <joshuaklinesmith@gmail.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index a47b9cca3b46..116dff49c104 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -1729,7 +1729,8 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
 	path->dev = ctx->dev;
 	path->mtk_wdma.wdma_idx = wed->wdma_idx;
 	path->mtk_wdma.bss = mvif->mt76.idx;
-	path->mtk_wdma.wcid = is_mt7915(&dev->mt76) ? msta->wcid.idx : 0x3ff;
+	path->mtk_wdma.wcid = (is_mt7915(&dev->mt76) || is_mt798x(&dev->mt76)) ?
+			      msta->wcid.idx : 0x3ff;
 	path->mtk_wdma.queue = phy != &dev->phy;
 
 	ctx->dev = NULL;
-- 
2.43.0


                 reply	other threads:[~2026-04-07  4:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260407040238.60629-1-joshuaklinesmith@gmail.com \
    --to=joshuaklinesmith@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    /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