]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: Integrate MT7990 init configuration for NPU
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 22 Jan 2026 10:39:54 +0000 (11:39 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:23:00 +0000 (09:23 +0000)
Add NPU integration in MT7996 init codebase for MT7990 chipset.
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-10-2374614c0de6@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/init.c

index b0f0d3adbb04c65672dcceff0ee3d9f2117d570f..b76bd324a927e7c1bce98539d24e83a7d5bfee42 100644 (file)
@@ -607,7 +607,7 @@ static void mt7996_mac_init_basic_rates(struct mt7996_dev *dev)
 void mt7996_mac_init(struct mt7996_dev *dev)
 {
 #define HIF_TXD_V2_1   0x21
-       int i;
+       int i, rx_path_type;
 
        mt76_clear(dev, MT_MDP_DCR2, MT_MDP_DCR2_RX_TRANS_SHORT);
 
@@ -621,11 +621,16 @@ void mt7996_mac_init(struct mt7996_dev *dev)
        }
 
        /* rro module init */
-       if (dev->hif2)
+       if (dev->hif2) {
+               if (mt76_npu_device_active(&dev->mt76))
+                       rx_path_type = is_mt7996(&dev->mt76) ? 6 : 8;
+               else
+                       rx_path_type = is_mt7996(&dev->mt76) ? 2 : 7;
                mt7996_mcu_set_rro(dev, UNI_RRO_SET_PLATFORM_TYPE,
-                                  is_mt7996(&dev->mt76) ? 2 : 7);
-       else
+                                  rx_path_type);
+       } else {
                mt7996_mcu_set_rro(dev, UNI_RRO_SET_PLATFORM_TYPE, 0);
+       }
 
        if (mt7996_has_hwrro(dev)) {
                u16 timeout;