[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]
[Description]
Refactor and sync kernel/wifi from Openwrt
[Release-log]
N/A
diff --git a/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch b/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
index 9655ad6..c48737b 100644
--- a/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
@@ -1,4 +1,4 @@
-From 39b998e2093d62bb814c5f05ff648561421820b2 Mon Sep 17 00:00:00 2001
+From 3b83a541b0c997b09518d85069a2ec3fb2c08f33 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Wed, 22 Jun 2022 10:39:47 +0800
Subject: [PATCH 1001/1009] mt76: mt7915: add mtk internal debug tools for mt76
@@ -12,11 +12,11 @@
mt7915/mcu.c | 63 +
mt7915/mcu.h | 4 +
mt7915/mt7915.h | 44 +
- mt7915/mt7915_debug.h | 1350 +++++++++++++++++++
- mt7915/mtk_debugfs.c | 2926 +++++++++++++++++++++++++++++++++++++++++
+ mt7915/mt7915_debug.h | 1363 +++++++++++++++++++
+ mt7915/mtk_debugfs.c | 3003 +++++++++++++++++++++++++++++++++++++++++
mt7915/mtk_mcu.c | 51 +
tools/fwlog.c | 44 +-
- 12 files changed, 4569 insertions(+), 13 deletions(-)
+ 12 files changed, 4659 insertions(+), 13 deletions(-)
create mode 100644 mt7915/mt7915_debug.h
create mode 100644 mt7915/mtk_debugfs.c
create mode 100644 mt7915/mtk_mcu.c
@@ -434,10 +434,10 @@
#endif
diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
new file mode 100644
-index 0000000..ecdc02a
+index 0000000..ca553dc
--- /dev/null
+++ b/mt7915/mt7915_debug.h
-@@ -0,0 +1,1350 @@
+@@ -0,0 +1,1363 @@
+#ifndef __MT7915_DEBUG_H
+#define __MT7915_DEBUG_H
+
@@ -573,6 +573,8 @@
+ DBG_MIB_M0ARNG0,
+ DBG_MIB_M0DR2,
+ DBG_MIB_M0DR13,
++ DBG_WFDMA_WED_TX_CTRL,
++ DBG_WFDMA_WED_RX_CTRL,
+ __MT_DBG_REG_REV_MAX,
+};
+
@@ -617,6 +619,8 @@
+
+/* mt7915 regs with different base and offset */
+static const struct __dbg_reg mt7915_dbg_reg[] = {
++ [DBG_WFDMA_WED_TX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x300 },
++ [DBG_WFDMA_WED_RX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x400 },
+ [DBG_INT_SOURCE_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x10 },
+ [DBG_INT_MASK_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x14 },
+ [DBG_INT1_SOURCE_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x88 },
@@ -721,6 +725,8 @@
+
+/* mt7986/mt7916 regs with different base and offset */
+static const struct __dbg_reg mt7916_dbg_reg[] = {
++ [DBG_WFDMA_WED_TX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x300 },
++ [DBG_WFDMA_WED_RX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x400 },
+ [DBG_INT_SOURCE_CSR] = { MT_DBG_WFDMA0_BASE, 0x200 },
+ [DBG_INT_MASK_CSR] = { MT_DBG_WFDMA0_BASE, 0x204 },
+ [DBG_INT1_SOURCE_CSR] = { MT_DBG_WFDMA0_PCIE1_BASE, 0x200 },
@@ -890,11 +896,15 @@
+#define MT_DBG_RX_EVENT_RING_BASE __DBG_REG(dev, DBG_RX_EVENT_RING_BASE)
+#define MT_DBG_RX_STS_RING_BASE __DBG_REG(dev, DBG_RX_STS_RING_BASE)
+#define MT_DBG_RX_DATA_RING_BASE __DBG_REG(dev, DBG_RX_DATA_RING_BASE)
++#define MT_DBG_WFDMA_WED_TX_CTRL_BASE __DBG_REG(dev, DBG_WFDMA_WED_TX_CTRL)
++#define MT_DBG_WFDMA_WED_RX_CTRL_BASE __DBG_REG(dev, DBG_WFDMA_WED_RX_CTRL)
+
+#define MT_DBG_TX_RING_CTRL(n) (MT_DBG_TX_RING_BASE + (0x10 * (n)))
+#define MT_DBG_RX_DATA_RING_CTRL(n) (MT_DBG_RX_DATA_RING_BASE + (0x10 * (n)))
+#define MT_DBG_RX_EVENT_RING_CTRL(n) (MT_DBG_RX_EVENT_RING_BASE + (0x10 * (n)))
+
++#define MT_DBG_WFDMA_WED_TX_CTRL(n) (MT_DBG_WFDMA_WED_TX_CTRL_BASE + (0x10 * (n)))
++#define MT_DBG_WFDMA_WED_RX_CTRL(n) (MT_DBG_WFDMA_WED_RX_CTRL_BASE + (0x10 * (n)))
+/* WFDMA COMMON */
+#define MT_DBG_INT_SOURCE_CSR __DBG_REG(dev, DBG_INT_SOURCE_CSR)
+#define MT_DBG_INT_MASK_CSR __DBG_REG(dev, DBG_INT_MASK_CSR)
@@ -1487,6 +1497,7 @@
+ u16 max_rx_process_cnt;
+ u16 max_sw_read_idx_inc;
+ char *const ring_info;
++ bool flags;
+};
+
+const struct hif_pci_tx_ring_desc mt7915_tx_ring_layout[] = {
@@ -1545,7 +1556,8 @@
+ .hw_int_mask = MT_DBG_INT_DMA1_R1_DONE,
+ .ring_size = 1024,
+ .ring_attr = HIF_RX_EVENT,
-+ .ring_info = "event from WA band0"
++ .ring_info = "event from WA band0",
++ .flags = true
+ },
+ {
+ .hw_int_mask = MT_DBG_INT_DMA1_R2_DONE,
@@ -1617,7 +1629,8 @@
+ .hw_int_mask = MT_DBG_INT_DMA0_R2_DONE,
+ .ring_size = 1024,
+ .ring_attr = HIF_RX_EVENT,
-+ .ring_info = "STS WA band0"
++ .ring_info = "STS WA band0",
++ .flags = true
+ },
+ {
+ .hw_int_mask = MT_DBG_INT_DMA0_R3_DONE,
@@ -1790,10 +1803,10 @@
+#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
new file mode 100644
-index 0000000..53f98d1
+index 0000000..761263e
--- /dev/null
+++ b/mt7915/mtk_debugfs.c
-@@ -0,0 +1,2926 @@
+@@ -0,0 +1,3003 @@
+#include<linux/inet.h>
+#include "mt7915.h"
+#include "mt7915_debug.h"
@@ -2536,11 +2549,19 @@
+ "Name", "Base", "Cnt", "CIDX", "DIDX", "QCnt");
+ dump_dma_tx_ring_info(s, dev, "T16:FWDL", MT_DBG_TX_RING_CTRL(0));
+ dump_dma_tx_ring_info(s, dev, "T17:Cmd(H2WM)", MT_DBG_TX_RING_CTRL(1));
-+ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
-+ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
++ if (mtk_wed_device_active(&dev->mt76.mmio.wed)) {
++ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(0));
++ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(1));
++ } else {
++ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
++ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
++ }
+ dump_dma_tx_ring_info(s, dev, "T20:Cmd(H2WA)", MT_DBG_TX_RING_CTRL(4));
+ dump_dma_rx_ring_info(s, dev, "R0:Event(WM2H)", MT_DBG_RX_EVENT_RING_CTRL(0));
-+ dump_dma_rx_ring_info(s, dev, "R1:Event0(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(1));
++ if (mtk_wed_device_active(&dev->mt76.mmio.wed))
++ dump_dma_rx_ring_info(s, dev, "R1:TxDone(WA2H)", MT_DBG_WFDMA_WED_RX_CTRL(1));
++ else
++ dump_dma_rx_ring_info(s, dev, "R1:Event0(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(1));
+ dump_dma_rx_ring_info(s, dev, "R2:Event1(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(2));
+
+ seq_printf(s, "HOST_DMA1 PCIe 1 Ring Configuration\n");
@@ -2651,12 +2672,22 @@
+ "Name", "Base", "Cnt", "CIDX", "DIDX", "QCnt");
+ dump_dma_tx_ring_info(s, dev, "T16:FWDL", MT_DBG_TX_RING_CTRL(0));
+ dump_dma_tx_ring_info(s, dev, "T17:Cmd(H2WM)", MT_DBG_TX_RING_CTRL(1));
-+ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
-+ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
++
++ if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed)) {
++ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(0));
++ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(1));
++ } else {
++ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
++ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
++ }
++
+ dump_dma_tx_ring_info(s, dev, "T20:Cmd(H2WA)", MT_DBG_TX_RING_CTRL(4));
+ dump_dma_rx_ring_info(s, dev, "R0:Event(WM2H)", MT_DBG_RX_DATA_RING_CTRL(0));
+ dump_dma_rx_ring_info(s, dev, "R1:Event(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(1));
-+ dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(2));
++ if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed))
++ dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_WFDMA_WED_RX_CTRL(1));
++ else
++ dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(2));
+ dump_dma_rx_ring_info(s, dev, "R3:TxDone1(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(3));
+ dump_dma_rx_ring_info(s, dev, "R4:Data0(MAC2H)", MT_DBG_RX_DATA_RING_CTRL(0));
+ dump_dma_rx_ring_info(s, dev, "R5:Data1(MAC2H)", MT_DBG_RX_DATA_RING_CTRL(1));
@@ -2747,12 +2778,14 @@
+ struct mt7915_dev *dev = dev_get_drvdata(s->private);
+ const struct hif_pci_tx_ring_desc *tx_ring_layout;
+ const struct hif_pci_rx_ring_desc *rx_ring_layout;
++ struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
+ u32 tx_ring_num, rx_ring_num;
+ u32 tbase[5], tcnt[5];
+ u32 tcidx[5], tdidx[5];
+ u32 rbase[6], rcnt[6];
+ u32 rcidx[6], rdidx[6];
+ int idx;
++ bool flags = false;
+
+ if(is_mt7915(&dev->mt76)) {
+ tx_ring_layout = &mt7915_tx_ring_layout[0];
@@ -2767,23 +2800,80 @@
+ }
+
+ for (idx = 0; idx < tx_ring_num; idx++) {
-+ tbase[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx));
-+ tcnt[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x04);
-+ tcidx[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x08);
-+ tdidx[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x0c);
++ if (mtk_wed_device_active(wed) &&
++ (tx_ring_layout[idx].ring_attr == HIF_TX_DATA)) {
++ struct mt76_phy *phy = dev->mt76.phys[MT_BAND0];
++ struct mt76_phy *ext_phy = dev->mt76.phys[MT_BAND1];
++ struct mt76_queue *q;
++
++ tbase[idx] = tcnt[idx] = tcidx[idx] = tdidx[idx] = 0;
++
++ if (!phy)
++ continue;
++
++ if (flags && !ext_phy)
++ continue;
++
++ if (flags && ext_phy)
++ phy = ext_phy;
++
++ q = phy->q_tx[0];
++
++ if (q->wed_regs) {
++ tbase[idx] = mtk_wed_device_reg_read(wed, q->wed_regs);
++ tcnt[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x04);
++ tcidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x08);
++ tdidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x0c);
++ }
++
++ flags = true;
++ } else {
++ tbase[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx));
++ tcnt[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x04);
++ tcidx[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x08);
++ tdidx[idx] = mt76_rr(dev, MT_DBG_TX_RING_CTRL(idx) + 0x0c);}
+ }
+
+ for (idx = 0; idx < rx_ring_num; idx++) {
-+ if (idx < 2) {
-+ rbase[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx));
-+ rcnt[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x04);
-+ rcidx[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x08);
-+ rdidx[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x0c);
++ if (rx_ring_layout[idx].ring_attr == HIF_RX_DATA) {
++ if (mtk_wed_device_active(wed) && mtk_wed_get_rx_capa(wed)) {
++ struct mt76_queue *q = &dev->mt76.q_rx[MT_RXQ_MAIN];
++
++ rbase[idx] = rcnt[idx] = rcidx[idx] = rdidx[idx] = 0;
++
++ if (idx == 1)
++ q = &dev->mt76.q_rx[MT_RXQ_BAND1];
++
++ if (q->wed_regs) {
++ rbase[idx] = mtk_wed_device_reg_read(wed, q->wed_regs);
++ rcnt[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x04);
++ rcidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x08);
++ rdidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x0c);
++ }
++ } else {
++ rbase[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx));
++ rcnt[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x04);
++ rcidx[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x08);
++ rdidx[idx] = mt76_rr(dev, MT_DBG_RX_DATA_RING_CTRL(idx) + 0x0c);
++ }
+ } else {
-+ rbase[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2));
-+ rcnt[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x04);
-+ rcidx[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x08);
-+ rdidx[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x0c);
++ if (mtk_wed_device_active(wed) && rx_ring_layout[idx].flags) {
++ struct mt76_queue *q = &dev->mt76.q_rx[MT_RXQ_MAIN_WA];
++
++ if (is_mt7915(&dev->mt76))
++ q = &dev->mt76.q_rx[MT_RXQ_MCU_WA];
++
++ rbase[idx] = mtk_wed_device_reg_read(wed, q->wed_regs);
++ rcnt[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x04);
++ rcidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x08);
++ rdidx[idx] = mtk_wed_device_reg_read(wed, q->wed_regs + 0x0c);
++
++ } else {
++ rbase[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2));
++ rcnt[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x04);
++ rcidx[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x08);
++ rdidx[idx] = mt76_rr(dev, MT_DBG_RX_EVENT_RING_CTRL(idx - 2) + 0x0c);
++ }
+ }
+ }
+
@@ -4892,5 +4982,5 @@
return ret;
}
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch b/recipes-wifi/linux-mt76/files/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
index 766a685..8d02ba5 100644
--- a/recipes-wifi/linux-mt76/files/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
@@ -1,4 +1,4 @@
-From 49d393ab26f28cec6713ebf967a8f4b6e44b158d Mon Sep 17 00:00:00 2001
+From 5aa5ed9a84420d0dc9310bae0f2ddbbe0a0a0247 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Wed, 22 Jun 2022 10:45:53 +0800
Subject: [PATCH 1004/1009] mt76: mt7915: add support for muru_onoff via
@@ -65,10 +65,10 @@
+
#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 53f98d1..2719a8d 100644
+index 761263e..3bf59ee 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
-@@ -2481,6 +2481,38 @@ static int mt7915_token_txd_read(struct seq_file *s, void *data)
+@@ -2558,6 +2558,38 @@ static int mt7915_token_txd_read(struct seq_file *s, void *data)
return 0;
}
@@ -107,7 +107,7 @@
static int mt7915_amsduinfo_read(struct seq_file *s, void *data)
{
struct mt7915_dev *dev = dev_get_drvdata(s->private);
-@@ -2860,6 +2892,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -2937,6 +2969,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
mt7915_mcu_fw_log_2_host(dev, MCU_FW_LOG_WM, 0);
@@ -116,5 +116,5 @@
&fops_fw_debug_module);
debugfs_create_file("fw_debug_level", 0600, dir, dev,
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch b/recipes-wifi/linux-mt76/files/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
index 264bb50..1969783 100644
--- a/recipes-wifi/linux-mt76/files/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
@@ -1,7 +1,8 @@
-From acc136bc397c9417ca42de7642ede1c35745dae3 Mon Sep 17 00:00:00 2001
+From 2e2057e91913f8992053753b80120a84b5174607 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 15 Dec 2022 19:45:18 +0800
-Subject: [PATCH] mt76: testmode: add iBF/eBF cal and cert commands with golden
+Subject: [PATCH 1116/1131] mt76: testmode: add iBF/eBF cal and cert commands
+ with golden
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -519,10 +520,10 @@
+
#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 583bc19..a2ceb6f 100644
+index 6cb1018..f366869 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
-@@ -2831,6 +2831,36 @@ mt7915_txpower_level_set(void *data, u64 val)
+@@ -2908,6 +2908,36 @@ mt7915_txpower_level_set(void *data, u64 val)
DEFINE_DEBUGFS_ATTRIBUTE(fops_txpower_level, NULL,
mt7915_txpower_level_set, "%lld\n");
@@ -559,7 +560,7 @@
/* usage: echo 0x[arg3][arg2][arg1] > fw_wa_set */
static int
mt7915_wa_set(void *data, u64 val)
-@@ -2969,6 +2999,11 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3046,6 +3076,11 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
debugfs_create_file("txpower_level", 0400, dir, dev,
&fops_txpower_level);
diff --git a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch b/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
index 6128624..0839730 100644
--- a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
@@ -1,4 +1,4 @@
-From 413d06c543e77b9d0acf7e75819a62a068a5359e Mon Sep 17 00:00:00 2001
+From 3243e04725e87c5036b440f26c52e6e274e35bb0 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 14 Oct 2022 11:15:13 +0800
Subject: [PATCH 1129/1131] mt76: mt7915: support on off SW ACI through debugfs
@@ -23,10 +23,10 @@
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
};
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 7567666..19cc8cb 100644
+index d0f6a07..f223871 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
-@@ -2963,6 +2963,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
+@@ -3040,6 +3040,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
return 0;
}
@@ -52,7 +52,7 @@
int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
{
struct mt7915_dev *dev = phy->dev;
-@@ -3050,6 +3069,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3127,6 +3146,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
debugfs_create_devm_seqfile(dev->mt76.dev, "eeprom_mode", dir,
mt7915_show_eeprom_mode);
@@ -62,5 +62,5 @@
}
#endif
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
index 9f2bfc8..f26cd8e 100644
--- a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
@@ -1,4 +1,4 @@
-From 0f99f68ae5aaabbb8a3c8a6b2f70114fe685267a Mon Sep 17 00:00:00 2001
+From 8e8c3896353c975491cf322737c50606fb2d3611 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 10:38:53 +0800
Subject: [PATCH 3001/3013] mt76: mt7915: wed: add wed tx support
@@ -116,5 +116,5 @@
ret = dma_set_mask(wed->dev, DMA_BIT_MASK(32));
if (ret)
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
index 87102c4..f31b3ea 100644
--- a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
@@ -1,4 +1,4 @@
-From f53aeef70b53d51114ef0ffd7c05a3fca29fe57d Mon Sep 17 00:00:00 2001
+From 149dee94c0b88125fca16175d51719d64e8b913d Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Tue, 13 Dec 2022 17:51:26 +0800
Subject: [PATCH 3002/3013] mt76: mt7915: wed: add wds support when wed is
@@ -203,5 +203,5 @@
static inline void
mt76_wcid_mask_set(u32 *mask, int idx)
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3003-mt76-connac-wed-add-wed-rx-copy-skb.patch b/recipes-wifi/linux-mt76/files/patches/3003-mt76-connac-wed-add-wed-rx-copy-skb.patch
index 3d0585f..cb9011e 100644
--- a/recipes-wifi/linux-mt76/files/patches/3003-mt76-connac-wed-add-wed-rx-copy-skb.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3003-mt76-connac-wed-add-wed-rx-copy-skb.patch
@@ -1,4 +1,4 @@
-From b6c09473c12f564b96821267e66d4fc92819f83a Mon Sep 17 00:00:00 2001
+From 24574e010e78c82cca6c0aa7c9eef48cebbf3e2e Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 12:05:06 +0800
Subject: [PATCH 3003/3013] mt76: connac: wed: add wed rx copy skb
@@ -66,5 +66,5 @@
}
EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch b/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
index a0921cd..ce833f6 100644
--- a/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
@@ -1,4 +1,4 @@
-From 0e8afd49ef8b1b488e3808b7135703c58896bcdb Mon Sep 17 00:00:00 2001
+From 0aeb9b3feebcb664e84146cacdf3bd3eb3b04855 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Thu, 19 May 2022 13:44:42 +0800
Subject: [PATCH 3004/3013] mt76: mt7915: wed: add fill receive path to report
@@ -46,5 +46,5 @@
#endif
};
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-add-ser-support-when-wed-on.patch b/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-add-ser-support-when-wed-on.patch
index 0fad4b4..9dad25a 100644
--- a/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-add-ser-support-when-wed-on.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-add-ser-support-when-wed-on.patch
@@ -1,4 +1,4 @@
-From 5fbbc3d3c0923c92f6b99a6f6a84c85acd4c6f1a Mon Sep 17 00:00:00 2001
+From e5e65159cea489e2d8154cbfdc84d7d3d829ed63 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 14:07:46 +0800
Subject: [PATCH 3005/3013] mt76: mt7915: wed: add ser support when wed on
@@ -280,5 +280,5 @@
int mt7915_register_device(struct mt7915_dev *dev);
void mt7915_unregister_device(struct mt7915_dev *dev);
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-enable-red-per-band-token-drop-for-H.patch b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-enable-red-per-band-token-drop-for-H.patch
index de7a3a1..f2e9a93 100644
--- a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-enable-red-per-band-token-drop-for-H.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-enable-red-per-band-token-drop-for-H.patch
@@ -1,7 +1,8 @@
-From 2f0b6e966f10cfcdb3a325238e10966c25c1ea3b Mon Sep 17 00:00:00 2001
+From 007ab43e5052b5bc21e5c720d09b30f0b56e6e79 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 2 Sep 2022 14:40:40 +0800
-Subject: [PATCH] mt76: mt7915: wed: enable red per-band token drop for HW Path
+Subject: [PATCH 3006/3013] mt76: mt7915: wed: enable red per-band token drop
+ for HW Path
Limit the number of token used by each band. If a band uses too many token,
it may hurt the throughput of the other band. The SW path can solve this
@@ -17,7 +18,7 @@
5 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 98b00747..21ea55d1 100644
+index 98b0074..21ea55d 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
@@ -1174,13 +1174,13 @@ enum {
@@ -36,7 +37,7 @@
MCU_EXT_CMD_SET_RDD_PATTERN = 0x7d,
MCU_EXT_CMD_MWDS_SUPPORT = 0x80,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index f494d9f6..116a5cc9 100644
+index f494d9f..116a5cc 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -2376,6 +2376,7 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
@@ -122,7 +123,7 @@
int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
{
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index f2f88cc4..572cc16a 100644
+index f2f88cc..572cc16 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -285,6 +285,7 @@ enum {
@@ -134,7 +135,7 @@
MCU_WA_PARAM_RED_SHOW_STA = 0xf,
MCU_WA_PARAM_RED_TARGET_DELAY = 0x10,
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index e0761e89..b29fe7a4 100644
+index e0761e8..b29fe7a 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -759,7 +759,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
@@ -147,7 +148,7 @@
wed->wlan.tx_tbit[1] = is_mt7915(&dev->mt76) ? 5 : 31;
wed->wlan.txfree_tbit = is_mt7986(&dev->mt76) ? 2 : 1;
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 89c13dbe..2335f78f 100644
+index 89c13db..2335f78 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -56,6 +56,7 @@
diff --git a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-find-rx-token-by-physical-address.patch b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
similarity index 90%
rename from recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
rename to recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
index 41ecf07..e3f9cfb 100644
--- a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
@@ -1,7 +1,7 @@
-From 0c5b82da3de9a903de87814a8fd70956c2280c47 Mon Sep 17 00:00:00 2001
+From 7d67ffd5b29ee60e02da2bd19dfb12839393ca3c Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 14:32:35 +0800
-Subject: [PATCH 3008/3013] mt76: mt7915: wed: find rx token by physical
+Subject: [PATCH 3007/3013] mt76: mt7915: wed: find rx token by physical
address
The token id in RxDMAD may be incorrect when it is not the last frame due to
@@ -48,5 +48,5 @@
return NULL;
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-update-mt7916-trinfo-when-hw-path-en.patch b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-update-mt7916-trinfo-when-hw-path-en.patch
deleted file mode 100644
index 5d1f911..0000000
--- a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-update-mt7916-trinfo-when-hw-path-en.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From e2237042eb0282b5f3a82f2b34f4a302f408cc73 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Thu, 22 Sep 2022 09:54:53 +0800
-Subject: [PATCH 3007/3013] mt76: mt7915: wed: update mt7916 trinfo when hw
- path enable
-
----
- mt7915/mt7915_debug.h | 10 ++++++++++
- mt7915/mtk_debugfs.c | 16 +++++++++++++---
- 2 files changed, 23 insertions(+), 3 deletions(-)
-
-diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
-index ecdc02a..0a1ee80 100644
---- a/mt7915/mt7915_debug.h
-+++ b/mt7915/mt7915_debug.h
-@@ -133,6 +133,8 @@ enum dbg_reg_rev {
- DBG_MIB_M0ARNG0,
- DBG_MIB_M0DR2,
- DBG_MIB_M0DR13,
-+ DBG_WFDMA_WED_TX_CTRL,
-+ DBG_WFDMA_WED_RX_CTRL,
- __MT_DBG_REG_REV_MAX,
- };
-
-@@ -177,6 +179,8 @@ static const u32 mt7986_dbg_base[] = {
-
- /* mt7915 regs with different base and offset */
- static const struct __dbg_reg mt7915_dbg_reg[] = {
-+ [DBG_WFDMA_WED_TX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x300 },
-+ [DBG_WFDMA_WED_RX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x400 },
- [DBG_INT_SOURCE_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x10 },
- [DBG_INT_MASK_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x14 },
- [DBG_INT1_SOURCE_CSR] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x88 },
-@@ -281,6 +285,8 @@ static const struct __dbg_reg mt7915_dbg_reg[] = {
-
- /* mt7986/mt7916 regs with different base and offset */
- static const struct __dbg_reg mt7916_dbg_reg[] = {
-+ [DBG_WFDMA_WED_TX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x300 },
-+ [DBG_WFDMA_WED_RX_CTRL] = { MT_DBG_WFDMA_EXT_CSR_BASE, 0x400 },
- [DBG_INT_SOURCE_CSR] = { MT_DBG_WFDMA0_BASE, 0x200 },
- [DBG_INT_MASK_CSR] = { MT_DBG_WFDMA0_BASE, 0x204 },
- [DBG_INT1_SOURCE_CSR] = { MT_DBG_WFDMA0_PCIE1_BASE, 0x200 },
-@@ -450,11 +456,15 @@ struct bin_debug_hdr {
- #define MT_DBG_RX_EVENT_RING_BASE __DBG_REG(dev, DBG_RX_EVENT_RING_BASE)
- #define MT_DBG_RX_STS_RING_BASE __DBG_REG(dev, DBG_RX_STS_RING_BASE)
- #define MT_DBG_RX_DATA_RING_BASE __DBG_REG(dev, DBG_RX_DATA_RING_BASE)
-+#define MT_DBG_WFDMA_WED_TX_CTRL_BASE __DBG_REG(dev, DBG_WFDMA_WED_TX_CTRL)
-+#define MT_DBG_WFDMA_WED_RX_CTRL_BASE __DBG_REG(dev, DBG_WFDMA_WED_RX_CTRL)
-
- #define MT_DBG_TX_RING_CTRL(n) (MT_DBG_TX_RING_BASE + (0x10 * (n)))
- #define MT_DBG_RX_DATA_RING_CTRL(n) (MT_DBG_RX_DATA_RING_BASE + (0x10 * (n)))
- #define MT_DBG_RX_EVENT_RING_CTRL(n) (MT_DBG_RX_EVENT_RING_BASE + (0x10 * (n)))
-
-+#define MT_DBG_WFDMA_WED_TX_CTRL(n) (MT_DBG_WFDMA_WED_TX_CTRL_BASE + (0x10 * (n)))
-+#define MT_DBG_WFDMA_WED_RX_CTRL(n) (MT_DBG_WFDMA_WED_RX_CTRL_BASE + (0x10 * (n)))
- /* WFDMA COMMON */
- #define MT_DBG_INT_SOURCE_CSR __DBG_REG(dev, DBG_INT_SOURCE_CSR)
- #define MT_DBG_INT_MASK_CSR __DBG_REG(dev, DBG_INT_MASK_CSR)
-diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 19cc8cb..919cae4 100644
---- a/mt7915/mtk_debugfs.c
-+++ b/mt7915/mtk_debugfs.c
-@@ -856,12 +856,22 @@ mt7986_show_host_dma_info(struct seq_file *s, struct mt7915_dev *dev)
- "Name", "Base", "Cnt", "CIDX", "DIDX", "QCnt");
- dump_dma_tx_ring_info(s, dev, "T16:FWDL", MT_DBG_TX_RING_CTRL(0));
- dump_dma_tx_ring_info(s, dev, "T17:Cmd(H2WM)", MT_DBG_TX_RING_CTRL(1));
-- dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
-- dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
-+
-+ if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed)) {
-+ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(0));
-+ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_WFDMA_WED_TX_CTRL(1));
-+ } else {
-+ dump_dma_tx_ring_info(s, dev, "T18:TXD0(H2WA)", MT_DBG_TX_RING_CTRL(2));
-+ dump_dma_tx_ring_info(s, dev, "T19:TXD1(H2WA)", MT_DBG_TX_RING_CTRL(3));
-+ }
-+
- dump_dma_tx_ring_info(s, dev, "T20:Cmd(H2WA)", MT_DBG_TX_RING_CTRL(4));
- dump_dma_rx_ring_info(s, dev, "R0:Event(WM2H)", MT_DBG_RX_DATA_RING_CTRL(0));
- dump_dma_rx_ring_info(s, dev, "R1:Event(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(1));
-- dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(2));
-+ if (is_mt7916(&dev->mt76) && mtk_wed_device_active(&dev->mt76.mmio.wed))
-+ dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_WFDMA_WED_RX_CTRL(1));
-+ else
-+ dump_dma_rx_ring_info(s, dev, "R2:TxDone(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(2));
- dump_dma_rx_ring_info(s, dev, "R3:TxDone1(WA2H)", MT_DBG_RX_EVENT_RING_CTRL(3));
- dump_dma_rx_ring_info(s, dev, "R4:Data0(MAC2H)", MT_DBG_RX_DATA_RING_CTRL(0));
- dump_dma_rx_ring_info(s, dev, "R5:Data1(MAC2H)", MT_DBG_RX_DATA_RING_CTRL(1));
---
-2.36.1
-
diff --git a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
similarity index 92%
rename from recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
rename to recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
index 0f96e92..6841e6e 100644
--- a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
@@ -1,7 +1,7 @@
-From d8cd3a2ce0a0544d130c5ec12c4d297aae8e84b7 Mon Sep 17 00:00:00 2001
+From d2ee77eae35b28f1a1ff66a7dc7e6b3ef82bcffe Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 25 Nov 2022 14:37:58 +0800
-Subject: [PATCH 3009/3013] mt76: mt7915: wed: drop scatter and gather frame
+Subject: [PATCH 3008/3013] mt76: mt7915: wed: drop scatter and gather frame
The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.
@@ -58,5 +58,5 @@
#define __MT_WED_Q(_type, _n) (MT_QFLAG_WED | \
FIELD_PREP(MT_QFLAG_WED_TYPE, _type) | \
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
similarity index 98%
rename from recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
rename to recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
index d9691d7..6aa717b 100644
--- a/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
@@ -1,7 +1,7 @@
-From 1ee66cbba1ce67edfba21bde3c9f9ae794634ab4 Mon Sep 17 00:00:00 2001
+From 74150a20593cebc6ae65e785ae3a784c0a21e23a Mon Sep 17 00:00:00 2001
From: Lian Chen <lian.chen@mediatek.com>
Date: Mon, 7 Nov 2022 14:47:44 +0800
-Subject: [PATCH 3010/3013] mt76: mt7915: wed: HW ATF support for mt7986
+Subject: [PATCH 3009/3013] mt76: mt7915: wed: HW ATF support for mt7986
Signed-off-by: Lian Chen <lian.chen@mediatek.com>
---
@@ -16,7 +16,7 @@
mode change 100644 => 100755 mt7915/init.c
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 98b0074..239643b 100644
+index 21ea55d..86ce55d 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
@@ -1159,6 +1159,7 @@ enum {
@@ -576,10 +576,10 @@
}
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5b2ae77..029d7e3 100644
+index 116a5cc..15f20ad 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3533,6 +3533,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3529,6 +3529,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
&req, sizeof(req), false);
}
@@ -859,10 +859,10 @@
int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy);
int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len,
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 919cae4..c8df2d0 100644
+index f223871..d6ff7a5 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
-@@ -1301,7 +1301,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
+@@ -1368,7 +1368,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
};
@@ -870,7 +870,7 @@
static char* sta_ctrl_reg[] = {"ENABLE", "DISABLE", "PAUSE"};
static u32 chip_show_sta_acq_info(struct seq_file *s, struct mt7915_dev *dev, u32 *ple_stat,
u32 *sta_pause, u32 *dis_sta_map,
-@@ -1455,6 +1454,138 @@ static void chip_get_sta_pause(struct mt7915_dev *dev, u32 *sta_pause)
+@@ -1522,6 +1521,138 @@ static void chip_get_sta_pause(struct mt7915_dev *dev, u32 *sta_pause)
}
}
@@ -1010,5 +1010,5 @@
{
struct mt7915_dev *dev = dev_get_drvdata(s->private);
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch b/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
similarity index 93%
rename from recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
rename to recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
index 2e0fb38..293bb81 100644
--- a/recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
@@ -1,7 +1,7 @@
-From 7457368e57931875b9cf7e40014b2aad294ef4d1 Mon Sep 17 00:00:00 2001
+From f5d57a09b9aaa434403288bb2c07132120788891 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 2 Dec 2022 17:17:06 +0800
-Subject: [PATCH 3011/3013] mt76: mt7915: wed: add mt7916 2 pcie support when
+Subject: [PATCH 3010/3013] mt76: mt7915: wed: add mt7916 2 pcie support when
wed on
It should use bit 23 in interrupt mask for wfdma band1 data
@@ -34,7 +34,7 @@
MT7916_RXQ_MCU_WA_MAIN);
TXQ_CONFIG(0, WFDMA0, MT_INT_WED_TX_DONE_BAND0,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 029d7e3..387967d 100644
+index 15f20ad..a268734 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -2365,7 +2365,8 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
@@ -71,5 +71,5 @@
if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
return IRQ_NONE;
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch b/recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
similarity index 99%
rename from recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
rename to recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
index 0b3383a..7de420c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3011-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch
@@ -1,7 +1,7 @@
-From 4ea9663e3a1dbfef0ab30ea37a749c58b7c71e2e Mon Sep 17 00:00:00 2001
+From afd516f8fd841fc7fc46667edc57f2f10d92de46 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Wed, 21 Dec 2022 09:47:01 +0800
-Subject: [PATCH 3012/3013] mt76: mt7915: wed: add rxwi for further in chip rro
+Subject: [PATCH 3011/3013] mt76: mt7915: wed: add rxwi for further in chip rro
development
---
@@ -495,5 +495,5 @@
}
EXPORT_SYMBOL_GPL(mt76_rx_token_release);
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-wed-fix-potential-memory-leakage.patch b/recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-fix-potential-memory-leakage.patch
similarity index 94%
rename from recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-wed-fix-potential-memory-leakage.patch
rename to recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-fix-potential-memory-leakage.patch
index e7e1ce6..648cf4f 100644
--- a/recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-wed-fix-potential-memory-leakage.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3012-mt76-mt7915-wed-fix-potential-memory-leakage.patch
@@ -1,7 +1,7 @@
-From e8340bcdb520bd5b5ddf860de81402359ad556b9 Mon Sep 17 00:00:00 2001
+From 4f947075bef0a413742d8f47b869b3087e242ca8 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 16 Dec 2022 12:16:40 +0800
-Subject: [PATCH 3013/3013] mt76: mt7915: wed: fix potential memory leakage
+Subject: [PATCH 3012/3013] mt76: mt7915: wed: fix potential memory leakage
release rx queue pages in mt7915_mmio_wed_release_rx_buf.
recycle rxwi when mt76_dma_add_buf() call fails.
@@ -82,5 +82,5 @@
static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
--
-2.36.1
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/3014-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch b/recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
old mode 100755
new mode 100644
similarity index 85%
rename from recipes-wifi/linux-mt76/files/patches/3014-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
rename to recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
index 772ae62..3d58696
--- a/recipes-wifi/linux-mt76/files/patches/3014-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3013-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
@@ -1,8 +1,8 @@
-From 2d4b5900f533b412215b14125d766c84f43e5bdb Mon Sep 17 00:00:00 2001
+From 7786c799b9c6dfc3d09079e65e896467a62724c7 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Tue, 27 Dec 2022 09:45:14 +0800
-Subject: [PATCH] mt76: mt7915: add mt7915_net_setup_tc to support wifi2wifi
- offload
+Subject: [PATCH 3013/3013] mt76: mt7915: add mt7915_net_setup_tc to support
+ wifi2wifi offload
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
@@ -10,7 +10,7 @@
1 file changed, 16 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 28509d94..ad5cd002 100644
+index c87f04b..c281b47 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -1598,6 +1598,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index 6244bb0..d0594d5 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -42,14 +42,13 @@
file://3004-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch \
file://3005-mt76-mt7915-wed-add-ser-support-when-wed-on.patch \
file://3006-mt76-mt7915-wed-enable-red-per-band-token-drop-for-H.patch \
- file://3007-mt76-mt7915-wed-update-mt7916-trinfo-when-hw-path-en.patch \
- file://3008-mt76-mt7915-wed-find-rx-token-by-physical-address.patch \
- file://3009-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch \
- file://3010-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch \
- file://3011-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch \
- file://3012-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch \
- file://3013-mt76-mt7915-wed-fix-potential-memory-leakage.patch \
- file://3014-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch \
+ file://3007-mt76-mt7915-wed-find-rx-token-by-physical-address.patch \
+ file://3008-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch \
+ file://3009-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch \
+ file://3010-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch \
+ file://3011-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro-dev.patch \
+ file://3012-mt76-mt7915-wed-fix-potential-memory-leakage.patch \
+ file://3013-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch \
file://4001-mt76-revert-get_of_mac_addr.patch \
file://4002-mt76-include-header-files-for-module-param.patch \
file://4003-mt76-revert-kernel-api-for-kernel-5.4.patch \