]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: Fix wdma_idx for MT7996 device if NPU is enabled
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 22 Jan 2026 10:39:49 +0000 (11:39 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:23:00 +0000 (09:23 +0000)
This is a preliminary patch to enable NPU offload for MT7996 (Eagle)
chipset.

Tested-by: Kang Yang <kang.yang@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260122-mt76-npu-eagle-offload-v2-5-2374614c0de6@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/main.c

index 493c47c59d57272c19d1f80175c8d0f30125069e..c0fae7aec1aecadd377b53c990ef1f9ecdce70de 100644 (file)
@@ -2291,6 +2291,10 @@ mt7996_net_fill_forward_path(struct ieee80211_hw *hw,
                path->mtk_wdma.wdma_idx = wed->wdma_idx;
        else
 #endif
+       if (is_mt7996(&dev->mt76) && mt76_npu_device_active(&dev->mt76) &&
+           msta_link->wcid.phy_idx == MT_BAND2)
+               path->mtk_wdma.wdma_idx = 1;
+       else
                path->mtk_wdma.wdma_idx = link->mt76.band_idx;
        path->mtk_wdma.bss = link->mt76.idx;
        path->mtk_wdma.queue = 0;