[rdkb][common][bsp][Refactor and sync wifi from openwrt]

[Description]
5d19c26 [MAC80211][Rebase Patches][Fix MT7986_dev Build Fail]
bb39a33 [MAC80211][Rebase Patches][Align mt76 patches number rules]
08b5ca8 [MAC80211][core][mt76][Add fixes for recently discovered security issues]
7de3103 [MAC80211][mt76][Add eeprom comparison before writting efuse]
d2eff50 [MAC80211][rebase patches][Filogic 880 alpha release preparation update]
4879bdc [mac80211][mt76][Fix Performance Issue with Octoscope]

[Release-log]

Change-Id: Ie4bf8c0a1ee4ca1e0d31f0c3b25df795de66a8f1
diff --git a/recipes-wifi/linux-mt76/files/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch b/recipes-wifi/linux-mt76/files/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
similarity index 75%
rename from recipes-wifi/linux-mt76/files/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch
rename to recipes-wifi/linux-mt76/files/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
index 9b631d2..dbe9096 100644
--- a/recipes-wifi/linux-mt76/files/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch
+++ b/recipes-wifi/linux-mt76/files/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
@@ -1,7 +1,8 @@
-From 3703ee49869a0efdd963d7994ec6e9d831b6d7b9 Mon Sep 17 00:00:00 2001
+From 428ade1830a5991976cbfe86b0bc57f1492febba Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 15 Mar 2023 17:41:16 +0800
-Subject: [PATCH] mt76: mt7915: fix background radar event being blocked
+Subject: [PATCH 1/2] wifi: mt76: mt7915: fix background radar event being
+ blocked
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -9,7 +10,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index d08907f..dc24a47 100644
+index d08907f5..dc24a475 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -274,7 +274,7 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb)
@@ -22,5 +23,5 @@
  
  	if ((r->band_idx && !dev->phy.mt76->band_idx) &&
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch b/recipes-wifi/linux-mt76/files/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
index 80f0706..43f4e34 100644
--- a/recipes-wifi/linux-mt76/files/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
+++ b/recipes-wifi/linux-mt76/files/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
@@ -1,7 +1,7 @@
-From 881a2a6a5237b86287ee5eeaa1914a1e85cbeab6 Mon Sep 17 00:00:00 2001
+From 907d5ff95a36361c4cf541aebc15c4796eca9251 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Thu, 23 Mar 2023 08:49:48 +0800
-Subject: [PATCH] wifi: mt76: mt7915: Update beacon size limitation for 11v
+Subject: [PATCH 2/2] wifi: mt76: mt7915: Update beacon size limitation for 11v
 
 Separate the beacon offload command into two;
 one is for beacons and the other is for inband discovery frames.
@@ -16,12 +16,12 @@
 ---
  mt7915/main.c   |  8 +++++---
  mt7915/mcu.c    | 50 +++++++++++++++++++++++++++++--------------------
- mt7915/mcu.h    | 31 +++++++++++++++---------------
+ mt7915/mcu.h    | 19 +++++++++----------
  mt7915/mt7915.h |  2 ++
- 4 files changed, 52 insertions(+), 39 deletions(-)
+ 4 files changed, 46 insertions(+), 33 deletions(-)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3bbccbd..ea1d4e6 100644
+index 3bbccbdf..ea1d4e6a 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -647,11 +647,13 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
@@ -42,7 +42,7 @@
  }
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index d08907f..dae1de8 100644
+index dc24a475..03ae3bc9 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -1953,10 +1953,9 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
@@ -163,10 +163,10 @@
  	return mt76_mcu_skb_send_msg(&phy->dev->mt76, rskb,
  				     MCU_EXT_CMD(BSS_INFO_UPDATE), true);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index b9ea297..e8c9f74 100644
+index b9ea297f..739003aa 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -495,28 +495,27 @@ enum {
+@@ -495,10 +495,15 @@ enum {
  	SER_RECOVER
  };
  
@@ -174,10 +174,6 @@
 -#define MT7915_MAX_INBAND_FRAME_SIZE	256
 -#define MT7915_MAX_BSS_OFFLOAD_SIZE	(MT7915_MAX_BEACON_SIZE +	  \
 -					 MT7915_MAX_INBAND_FRAME_SIZE +	  \
--					 MT7915_BEACON_UPDATE_SIZE)
--
--#define MT7915_BSS_UPDATE_MAX_SIZE	(sizeof(struct sta_req_hdr) +	\
--					 sizeof(struct bss_info_omac) +	\
 +#define MT7915_MAX_BEACON_SIZE		1308
 +#define MT7915_BEACON_UPDATE_SIZE	(sizeof(struct sta_req_hdr) +	\
 +					 sizeof(struct bss_info_bcn) +	\
@@ -187,17 +183,10 @@
 +					 sizeof(struct bss_info_bcn_cont))
 +#define MT7915_MAX_BSS_OFFLOAD_SIZE	(sizeof(struct mt76_connac2_mcu_txd) +	\
 +					 MT7915_MAX_BEACON_SIZE +	\
-+					 MT7915_BEACON_UPDATE_SIZE)
-+
-+#define MT7915_BSS_UPDATE_MAX_SIZE	(sizeof(struct sta_req_hdr) +	\
-+					 sizeof(struct bss_info_omac) +	\
- 					 sizeof(struct bss_info_basic) +\
- 					 sizeof(struct bss_info_rf_ch) +\
--					 sizeof(struct bss_info_ra) +	\
-+					 sizeof(struct bss_info_ra) +	\
- 					 sizeof(struct bss_info_hw_amsdu) +\
--					 sizeof(struct bss_info_he) +	\
-+					 sizeof(struct bss_info_he) +	\
+ 					 MT7915_BEACON_UPDATE_SIZE)
+ 
+ #define MT7915_BSS_UPDATE_MAX_SIZE	(sizeof(struct sta_req_hdr) +	\
+@@ -511,12 +516,6 @@ enum {
  					 sizeof(struct bss_info_bmc_rate) +\
  					 sizeof(struct bss_info_ext_bss))
  
@@ -211,7 +200,7 @@
  mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
  {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 3cbfb9b..b66938b 100644
+index 3cbfb9b6..b66938ba 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -506,6 +506,8 @@ int mt7915_mcu_add_rx_ba(struct mt7915_dev *dev,
diff --git a/recipes-wifi/linux-mt76/files/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch b/recipes-wifi/linux-mt76/files/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
similarity index 62%
rename from recipes-wifi/linux-mt76/files/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
rename to recipes-wifi/linux-mt76/files/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
index 89b423c..9116b51 100644
--- a/recipes-wifi/linux-mt76/files/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
+++ b/recipes-wifi/linux-mt76/files/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
@@ -1,127 +1,68 @@
-From 40bc4191469a25ab239596071faf7d8ad69e9fb3 Mon Sep 17 00:00:00 2001
-From: Sujuan Chen <sujuan.chen@mediatek.com>
-Date: Thu, 5 Jan 2023 16:43:57 +0800
-Subject: [PATCH 3013/3013] mt76: connac: wed: add wed rx copy skb and revert
- page_pool
+From 94b79615f51c2341c171b7c2742ac450cbe98052 Mon Sep 17 00:00:00 2001
+From: Evelyn Tsai <evelyn.tsai@mediatek.com>
+Date: Sat, 1 Apr 2023 08:18:17 +0800
+Subject: [PATCH] wifi: mt76: mt7915: build pass for Linux Kernel 5.4 fixes
 
-Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
- dma.c         | 138 ++++++++++++++++++++++++++++++++------------------
- mac80211.c    |  57 ---------------------
- mt76.h        |  22 +-------
- mt7915/main.c |  26 ++++------
- mt7915/mmio.c |  74 +++++++++++++++++++--------
- mt7921/main.c |  31 ++----------
- usb.c         |  42 +++++++--------
- 7 files changed, 179 insertions(+), 211 deletions(-)
+ debugfs.c         |  2 ++
+ dma.c             | 74 ++++++++++++++++++++++++-----------------------
+ eeprom.c          |  8 ++++-
+ mac80211.c        | 57 ------------------------------------
+ mcu.c             |  1 +
+ mt76.h            | 22 +-------------
+ mt7615/mcu.c      |  1 +
+ mt76_connac.h     |  2 --
+ mt76_connac_mcu.c | 47 +-----------------------------
+ mt76_connac_mcu.h |  4 ---
+ mt7915/main.c     | 26 +++++++----------
+ mt7915/mcu.c      |  1 +
+ mt7915/mmio.c     | 55 +++++++++++++++++++++--------------
+ mt7921/main.c     | 31 +++-----------------
+ usb.c             | 43 +++++++++++++--------------
+ 15 files changed, 122 insertions(+), 252 deletions(-)
 
+diff --git a/debugfs.c b/debugfs.c
+index 79064a4d..4a8e1864 100644
+--- a/debugfs.c
++++ b/debugfs.c
+@@ -33,8 +33,10 @@ mt76_napi_threaded_set(void *data, u64 val)
+ 	if (!mt76_is_mmio(dev))
+ 		return -EOPNOTSUPP;
+ 
++#if 0 /* disable in backport 5.15 */
+ 	if (dev->napi_dev.threaded != val)
+ 		return dev_set_threaded(&dev->napi_dev, val);
++#endif
+ 
+ 	return 0;
+ }
 diff --git a/dma.c b/dma.c
-index d1a1dae4..3adb1136 100644
+index df2ca73f..2fc70e23 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -173,7 +173,7 @@ mt76_free_pending_rxwi(struct mt76_dev *dev)
  	local_bh_disable();
- 	while ((r = __mt76_get_rxwi(dev)) != NULL) {
- 		if (r->ptr)
--			mt76_put_page_pool_buf(r->ptr, false);
-+			skb_free_frag(r->ptr);
- 		kfree(r);
+ 	while ((t = __mt76_get_rxwi(dev)) != NULL) {
+ 		if (t->ptr)
+-			mt76_put_page_pool_buf(t->ptr, false);
++			skb_free_frag(t->ptr);
+ 		kfree(t);
  	}
  	local_bh_enable();
-@@ -208,11 +208,11 @@ mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q)
- 
- static int
- mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
--		    struct mt76_queue_buf *buf, void *data)
-+		    struct mt76_queue_buf *buf, void *data,
-+		    struct mt76_rxwi_cache *rxwi)
- {
- 	struct mt76_desc *desc = &q->desc[q->head];
- 	struct mt76_queue_entry *entry = &q->entry[q->head];
--	struct mt76_rxwi_cache *rxwi = NULL;
- 	u32 buf1 = 0, ctrl;
- 	int idx = q->head;
- 	int rx_token;
-@@ -220,9 +220,11 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
- 	ctrl = FIELD_PREP(MT_DMA_CTL_SD_LEN0, buf[0].len);
- 
- 	if (mt76_queue_is_wed_rx(q)) {
--		rxwi = mt76_get_rxwi(dev);
--		if (!rxwi)
--			return -ENOMEM;
-+		if (!rxwi) {
-+			rxwi = mt76_get_rxwi(dev);
-+			if (!rxwi)
-+				return -ENOMEM;
-+		}
- 
- 		rx_token = mt76_rx_token_consume(dev, data, rxwi, buf->addr);
- 		if (rx_token < 0) {
-@@ -387,7 +389,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush)
- 
- static void *
- mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
--		 int *len, u32 *info, bool *more, bool *drop)
-+		 int *len, u32 *info, bool *more, bool *drop, bool flush)
- {
- 	struct mt76_queue_entry *e = &q->entry[idx];
- 	struct mt76_desc *desc = &q->desc[idx];
-@@ -433,15 +435,47 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
- 		if (!r)
+@@ -409,9 +409,9 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
+ 		if (!t)
  			return NULL;
  
--		dma_sync_single_for_cpu(dev->dma_dev, r->dma_addr,
+-		dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr,
 -				SKB_WITH_OVERHEAD(q->buf_size),
 -				page_pool_get_dma_dir(q->page_pool));
-+		dma_unmap_single(dev->dma_dev, r->dma_addr,
++		dma_unmap_single(dev->dma_dev, t->dma_addr,
 +				 SKB_WITH_OVERHEAD(q->buf_size),
 +				 DMA_FROM_DEVICE);
  
--		buf = r->ptr;
--		r->dma_addr = 0;
--		r->ptr = NULL;
-+		if (flush) {
-+			buf = r->ptr;
-+			r->dma_addr = 0;
-+			r->ptr = NULL;
- 
--		mt76_put_rxwi(dev, r);
-+			mt76_put_rxwi(dev, r);
-+		} else {
-+			struct mt76_queue_buf qbuf;
-+
-+			buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
-+			if (!buf)
-+				return NULL;
-+
-+			memcpy(buf, r->ptr, SKB_WITH_OVERHEAD(q->buf_size));
-+
-+			r->dma_addr = dma_map_single(dev->dma_dev, r->ptr,
-+						     SKB_WITH_OVERHEAD(q->buf_size),
-+						     DMA_FROM_DEVICE);
-+			if (unlikely(dma_mapping_error(dev->dma_dev, r->dma_addr))) {
-+				skb_free_frag(r->ptr);
-+				mt76_put_rxwi(dev, r);
-+				return NULL;
-+			}
-+
-+			qbuf.addr = r->dma_addr;
-+			qbuf.len = SKB_WITH_OVERHEAD(q->buf_size);
-+			qbuf.skip_unmap = false;
-+
-+			if (mt76_dma_add_rx_buf(dev, q, &qbuf, r->ptr, r) < 0) {
-+				dma_unmap_single(dev->dma_dev, r->dma_addr,
-+						 SKB_WITH_OVERHEAD(q->buf_size),
-+						 DMA_FROM_DEVICE);
-+				skb_free_frag(r->ptr);
-+				mt76_put_rxwi(dev, r);
-+				return NULL;
-+			}
-+		}
- 
- 		if (drop) {
- 			u32 ctrl = le32_to_cpu(READ_ONCE(desc->ctrl));
-@@ -454,9 +488,9 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
+ 		buf = t->ptr;
+ 		t->dma_addr = 0;
+@@ -430,9 +430,9 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
  	} else {
  		buf = e->buf;
  		e->buf = NULL;
@@ -134,16 +75,7 @@
  	}
  
  	return buf;
-@@ -480,7 +514,7 @@ mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
- 	q->tail = (q->tail + 1) % q->ndesc;
- 	q->queued--;
- 
--	return mt76_dma_get_buf(dev, q, idx, len, info, more, drop);
-+	return mt76_dma_get_buf(dev, q, idx, len, info, more, drop, flush);
- }
- 
- static int
-@@ -607,11 +641,12 @@ free_skb:
+@@ -584,11 +584,11 @@ free_skb:
  }
  
  static int
@@ -155,11 +87,10 @@
 -	int frames = 0;
 +	int frames = 0, offset = q->buf_offset;
 +	dma_addr_t addr;
-+	bool flags = false;
  
  	if (!q->ndesc)
  		return 0;
-@@ -619,31 +654,35 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q,
+@@ -596,25 +596,26 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q,
  	spin_lock_bh(&q->lock);
  
  	while (q->queued < q->ndesc - 1) {
@@ -189,26 +120,15 @@
 +		qbuf.addr = addr + offset;
 +		qbuf.len = len - offset;
  		qbuf.skip_unmap = false;
--		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) {
+ 		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) {
 -			mt76_put_page_pool_buf(buf, allow_direct);
-+		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf, NULL) < 0) {
 +			dma_unmap_single(dev->dma_dev, addr, len,
 +					 DMA_FROM_DEVICE);
 +			skb_free_frag(buf);
  			break;
  		}
  		frames++;
- 	}
- 
--	if (frames)
-+	flags = (q->flags & MT_QFLAG_WED) &&
-+		FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_Q_RX;
-+
-+	if (frames || flags)
- 		mt76_dma_kick_queue(dev, q);
- 
- 	spin_unlock_bh(&q->lock);
-@@ -681,7 +720,7 @@ int mt76_dma_wed_setup(struct mt76_dev *dev, struct mt76_queue *q, bool reset)
+@@ -658,7 +659,7 @@ int mt76_dma_wed_setup(struct mt76_dev *dev, struct mt76_queue *q, bool reset)
  		/* WED txfree queue needs ring to be initialized before setup */
  		q->flags = 0;
  		mt76_dma_queue_reset(dev, q);
@@ -217,7 +137,7 @@
  		q->flags = flags;
  
  		ret = mtk_wed_device_txfree_ring_setup(wed, q->regs);
-@@ -729,10 +768,6 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
+@@ -706,10 +707,6 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
  	if (!q->entry)
  		return -ENOMEM;
  
@@ -228,7 +148,7 @@
  	ret = mt76_dma_wed_setup(dev, q, false);
  	if (ret)
  		return ret;
-@@ -746,6 +781,7 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
+@@ -723,6 +720,7 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
  static void
  mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
  {
@@ -236,7 +156,7 @@
  	void *buf;
  	bool more;
  
-@@ -759,7 +795,7 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
+@@ -736,7 +734,7 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
  		if (!buf)
  			break;
  
@@ -245,23 +165,21 @@
  	} while (1);
  
  	if (q->rx_head) {
-@@ -768,6 +804,15 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
+@@ -745,6 +743,13 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
  	}
  
  	spin_unlock_bh(&q->lock);
 +
-+	if (FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) != MT76_WED_Q_RX) {
-+		if (!q->rx_page.va)
-+			return;
++	if (!q->rx_page.va)
++		return;
 +
-+		page = virt_to_page(q->rx_page.va);
-+		__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
-+		memset(&q->rx_page, 0, sizeof(q->rx_page));
-+	}
++	page = virt_to_page(q->rx_page.va);
++	__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
++	memset(&q->rx_page, 0, sizeof(q->rx_page));
  }
  
  static void
-@@ -788,7 +833,7 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
+@@ -765,7 +770,7 @@ mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
  	mt76_dma_wed_setup(dev, q, true);
  	if (q->flags != MT_WED_Q_TXFREE) {
  		mt76_dma_sync_idx(dev, q);
@@ -270,7 +188,7 @@
  	}
  }
  
-@@ -806,7 +851,7 @@ mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data,
+@@ -783,7 +788,7 @@ mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data,
  
  		skb_add_rx_frag(skb, nr_frags, page, offset, len, q->buf_size);
  	} else {
@@ -279,7 +197,13 @@
  	}
  
  	if (more)
-@@ -879,7 +924,6 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
+@@ -851,12 +856,11 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
+ 		    !(dev->drv->rx_check(dev, data, len)))
+ 			goto free_frag;
+ 
+-		skb = napi_build_skb(data, q->buf_size);
++		skb = build_skb(data, q->buf_size);
+ 		if (!skb)
  			goto free_frag;
  
  		skb_reserve(skb, q->buf_offset);
@@ -287,7 +211,7 @@
  
  		*(u32 *)skb->cb = info;
  
-@@ -895,10 +939,10 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
+@@ -872,10 +876,10 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
  		continue;
  
  free_frag:
@@ -300,7 +224,7 @@
  	return done;
  }
  
-@@ -943,7 +987,7 @@ mt76_dma_init(struct mt76_dev *dev,
+@@ -920,7 +924,7 @@ mt76_dma_init(struct mt76_dev *dev,
  
  	mt76_for_each_q_rx(dev, i) {
  		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll);
@@ -309,7 +233,7 @@
  		napi_enable(&dev->napi[i]);
  	}
  
-@@ -994,8 +1038,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
+@@ -971,8 +975,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
  
  		netif_napi_del(&dev->napi[i]);
  		mt76_dma_rx_cleanup(dev, q);
@@ -318,8 +242,29 @@
  	}
  
  	mt76_free_pending_txwi(dev);
+diff --git a/eeprom.c b/eeprom.c
+index ea54b7af..90d36c8d 100644
+--- a/eeprom.c
++++ b/eeprom.c
+@@ -106,9 +106,15 @@ void
+ mt76_eeprom_override(struct mt76_phy *phy)
+ {
+ 	struct mt76_dev *dev = phy->dev;
++#ifdef CONFIG_OF
+ 	struct device_node *np = dev->dev->of_node;
++	const u8 *mac = NULL;
+ 
+-	of_get_mac_address(np, phy->macaddr);
++	if (np)
++		mac = of_get_mac_address(np);
++	if (!IS_ERR_OR_NULL(mac))
++		ether_addr_copy(phy->macaddr, mac);
++#endif
+ 
+ 	if (!is_valid_ether_addr(phy->macaddr)) {
+ 		eth_random_addr(phy->macaddr);
 diff --git a/mac80211.c b/mac80211.c
-index 4655f814..4dc7627e 100644
+index 87902f4b..577d81a4 100644
 --- a/mac80211.c
 +++ b/mac80211.c
 @@ -4,7 +4,6 @@
@@ -330,7 +275,7 @@
  #include "mt76.h"
  
  #define CHAN2G(_idx, _freq) {			\
-@@ -573,47 +572,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
+@@ -562,47 +561,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
  }
  EXPORT_SYMBOL_GPL(mt76_unregister_phy);
  
@@ -378,7 +323,7 @@
  struct mt76_dev *
  mt76_alloc_device(struct device *pdev, unsigned int size,
  		  const struct ieee80211_ops *ops,
-@@ -1753,21 +1711,6 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
+@@ -1741,21 +1699,6 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
  }
  EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
  
@@ -400,11 +345,23 @@
  enum mt76_dfs_state mt76_phy_dfs_state(struct mt76_phy *phy)
  {
  	struct ieee80211_hw *hw = phy->hw;
+diff --git a/mcu.c b/mcu.c
+index a8cafa39..fa4b0544 100644
+--- a/mcu.c
++++ b/mcu.c
+@@ -4,6 +4,7 @@
+  */
+ 
+ #include "mt76.h"
++#include <linux/moduleparam.h>
+ 
+ struct sk_buff *
+ __mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
 diff --git a/mt76.h b/mt76.h
-index bc0c9ae7..d17650d0 100644
+index 183b0fc5..856dacbc 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -209,7 +209,7 @@ struct mt76_queue {
+@@ -202,7 +202,7 @@ struct mt76_queue {
  
  	dma_addr_t desc_dma;
  	struct sk_buff *rx_head;
@@ -413,7 +370,7 @@
  };
  
  struct mt76_mcu_ops {
-@@ -1458,7 +1458,6 @@ mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,
+@@ -1319,7 +1319,6 @@ mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,
  	return usb_bulk_msg(udev, pipe, data, len, actual_len, timeout);
  }
  
@@ -421,10 +378,10 @@
  void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
  			 struct mt76_sta_stats *stats, bool eht);
  int mt76_skb_adjust_pad(struct sk_buff *skb, int pad);
-@@ -1570,25 +1569,6 @@ void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
- struct mt76_rxwi_cache *mt76_rx_token_release(struct mt76_dev *dev, int token);
+@@ -1431,25 +1430,6 @@ void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
+ struct mt76_txwi_cache *mt76_rx_token_release(struct mt76_dev *dev, int token);
  int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
- 			  struct mt76_rxwi_cache *r, dma_addr_t phys);
+ 			  struct mt76_txwi_cache *r, dma_addr_t phys);
 -int mt76_create_page_pool(struct mt76_dev *dev, struct mt76_queue *q);
 -static inline void mt76_put_page_pool_buf(void *buf, bool allow_direct)
 -{
@@ -447,11 +404,132 @@
  
  static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
  {
+diff --git a/mt7615/mcu.c b/mt7615/mcu.c
+index eea398c7..4593b2e1 100644
+--- a/mt7615/mcu.c
++++ b/mt7615/mcu.c
+@@ -10,6 +10,7 @@
+ #include "mcu.h"
+ #include "mac.h"
+ #include "eeprom.h"
++#include <linux/moduleparam.h>
+ 
+ static bool prefer_offload_fw = true;
+ module_param(prefer_offload_fw, bool, 0644);
+diff --git a/mt76_connac.h b/mt76_connac.h
+index b339c50b..2ee9a3c8 100644
+--- a/mt76_connac.h
++++ b/mt76_connac.h
+@@ -42,7 +42,6 @@ enum {
+ 	CMD_CBW_10MHZ,
+ 	CMD_CBW_5MHZ,
+ 	CMD_CBW_8080MHZ,
+-	CMD_CBW_320MHZ,
+ 
+ 	CMD_HE_MCS_BW80 = 0,
+ 	CMD_HE_MCS_BW160,
+@@ -240,7 +239,6 @@ static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
+ 		[NL80211_CHAN_WIDTH_10] = CMD_CBW_10MHZ,
+ 		[NL80211_CHAN_WIDTH_20] = CMD_CBW_20MHZ,
+ 		[NL80211_CHAN_WIDTH_20_NOHT] = CMD_CBW_20MHZ,
+-		[NL80211_CHAN_WIDTH_320] = CMD_CBW_320MHZ,
+ 	};
+ 
+ 	if (chandef->width >= ARRAY_SIZE(width_to_bw))
+diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
+index efb9bfaa..b0dcc5a6 100644
+--- a/mt76_connac_mcu.c
++++ b/mt76_connac_mcu.c
+@@ -4,6 +4,7 @@
+ #include <linux/firmware.h>
+ #include "mt76_connac2_mac.h"
+ #include "mt76_connac_mcu.h"
++#include <linux/module.h>
+ 
+ int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
+ {
+@@ -1329,40 +1330,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
+ }
+ EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode);
+ 
+-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
+-				enum nl80211_band band)
+-{
+-	const struct ieee80211_sta_eht_cap *eht_cap;
+-	struct ieee80211_supported_band *sband;
+-	u8 mode = 0;
+-
+-	if (band == NL80211_BAND_6GHZ)
+-		mode |= PHY_MODE_AX_6G;
+-
+-	sband = phy->hw->wiphy->bands[band];
+-	eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type);
+-
+-	if (!eht_cap || !eht_cap->has_eht)
+-		return mode;
+-
+-	switch (band) {
+-	case NL80211_BAND_6GHZ:
+-		mode |= PHY_MODE_BE_6G;
+-		break;
+-	case NL80211_BAND_5GHZ:
+-		mode |= PHY_MODE_BE_5G;
+-		break;
+-	case NL80211_BAND_2GHZ:
+-		mode |= PHY_MODE_BE_24G;
+-		break;
+-	default:
+-		break;
+-	}
+-
+-	return mode;
+-}
+-EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode_ext);
+-
+ const struct ieee80211_sta_he_cap *
+ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
+ {
+@@ -1375,18 +1342,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
+ }
+ EXPORT_SYMBOL_GPL(mt76_connac_get_he_phy_cap);
+ 
+-const struct ieee80211_sta_eht_cap *
+-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
+-{
+-	enum nl80211_band band = phy->chandef.chan->band;
+-	struct ieee80211_supported_band *sband;
+-
+-	sband = phy->hw->wiphy->bands[band];
+-
+-	return ieee80211_get_eht_iftype_cap(sband, vif->type);
+-}
+-EXPORT_SYMBOL_GPL(mt76_connac_get_eht_phy_cap);
+-
+ #define DEFAULT_HE_PE_DURATION		4
+ #define DEFAULT_HE_DURATION_RTS_THRES	1023
+ static void
+diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
+index 40a99e0c..d5fb7a62 100644
+--- a/mt76_connac_mcu.h
++++ b/mt76_connac_mcu.h
+@@ -1871,12 +1871,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
+ 
+ const struct ieee80211_sta_he_cap *
+ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
+-const struct ieee80211_sta_eht_cap *
+-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
+ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
+ 			    enum nl80211_band band, struct ieee80211_sta *sta);
+-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
+-				enum nl80211_band band);
+ 
+ int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
+ 			    struct mt76_connac_sta_key_conf *sta_key_conf,
 diff --git a/mt7915/main.c b/mt7915/main.c
-index a4d1b816..21caddbe 100644
+index ea1d4e6a..e74bc12f 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1359,22 +1359,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
+@@ -1293,22 +1293,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
  			   struct ieee80211_vif *vif,
  			   u32 sset, u8 *data)
  {
@@ -480,7 +558,7 @@
  }
  
  static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
-@@ -1402,7 +1399,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1336,7 +1333,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
  	};
  	struct mib_stats *mib = &phy->mib;
  	/* See mt7915_ampdu_stat_read_phy, etc */
@@ -489,7 +567,7 @@
  
  	mutex_lock(&dev->mt76.mutex);
  
-@@ -1483,12 +1480,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1417,12 +1414,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
  		return;
  
  	ei += wi.worker_stat_count;
@@ -505,15 +583,26 @@
  }
  
  static void
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 03ae3bc9..72e55157 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -6,6 +6,7 @@
+ #include "mcu.h"
+ #include "mac.h"
+ #include "eeprom.h"
++#include <linux/moduleparam.h>
+ 
+ #define fw_name(_dev, name, ...)	({			\
+ 	char *_fw;						\
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 87cff5d4..b6adfd0b 100644
+index 6f0c0e2a..5ef43c44 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -581,9 +581,14 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
+@@ -596,9 +596,13 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
  static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
  {
  	struct mt7915_dev *dev;
-+	struct page *page;
 +	u32 length;
  	int i;
  
@@ -522,48 +611,24 @@
 +				sizeof(struct skb_shared_info));
 +
  	for (i = 0; i < dev->mt76.rx_token_size; i++) {
- 		struct mt76_rxwi_cache *r;
+ 		struct mt76_txwi_cache *t;
  
-@@ -591,50 +596,79 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
- 		if (!r || !r->ptr)
+@@ -606,7 +610,9 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+ 		if (!t || !t->ptr)
  			continue;
  
--		mt76_put_page_pool_buf(r->ptr, false);
-+		dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
+-		mt76_put_page_pool_buf(t->ptr, false);
++		dma_unmap_single(dev->mt76.dma_dev, t->dma_addr,
 +				 wed->wlan.rx_size, DMA_FROM_DEVICE);
-+		skb_free_frag(r->ptr);
- 		r->ptr = NULL;
++		__free_pages(virt_to_page(t->ptr), get_order(length));
+ 		t->ptr = NULL;
  
- 		mt76_put_rxwi(&dev->mt76, r);
- 	}
- 
- 	mt76_free_pending_rxwi(&dev->mt76);
-+
-+	mt76_for_each_q_rx(&dev->mt76, i) {
-+		struct mt76_queue *q = &dev->mt76.q_rx[i];
-+
-+		if (mt76_queue_is_wed_rx(q)) {
-+			if (!q->rx_page.va)
-+				continue;
-+
-+			page = virt_to_page(q->rx_page.va);
-+			__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
-+			memset(&q->rx_page, 0, sizeof(q->rx_page));
-+		}
-+	}
-+
-+	if (!wed->rx_buf_ring.rx_page.va)
-+		return;
-+
-+	page = virt_to_page(wed->rx_buf_ring.rx_page.va);
-+	__page_frag_cache_drain(page, wed->rx_buf_ring.rx_page.pagecnt_bias);
-+	memset(&wed->rx_buf_ring.rx_page, 0, sizeof(wed->rx_buf_ring.rx_page));
- }
- 
+ 		mt76_put_rxwi(&dev->mt76, t);
+@@ -618,38 +624,47 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
  static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
  {
  	struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
--	struct mt76_rxwi_cache *r = NULL;
+-	struct mt76_txwi_cache *t = NULL;
  	struct mt7915_dev *dev;
 -	struct mt76_queue *q;
 -	int i, len;
@@ -580,55 +645,57 @@
 -		enum dma_data_direction dir;
 -		dma_addr_t addr;
 -		u32 offset;
-+		struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
++		struct mt76_txwi_cache *t = mt76_get_rxwi(&dev->mt76);
 +		dma_addr_t phy_addr;
++		struct page *page;
  		int token;
 -		void *buf;
 +		void *ptr;
  
--		r = mt76_get_rxwi(&dev->mt76);
- 		if (!r)
+-		t = mt76_get_rxwi(&dev->mt76);
+ 		if (!t)
  			goto unmap;
  
 -		buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
 -		if (!buf)
-+		ptr = page_frag_alloc(&wed->rx_buf_ring.rx_page, length, GFP_ATOMIC);
-+		if (!ptr) {
-+			mt76_put_rxwi(&dev->mt76, r);
++		page = __dev_alloc_pages(GFP_KERNEL, get_order(length));
++		if (!page) {
++			mt76_put_rxwi(&dev->mt76, t);
  			goto unmap;
 +		}
  
 -		addr = page_pool_get_dma_addr(virt_to_head_page(buf)) + offset;
 -		dir = page_pool_get_dma_dir(q->page_pool);
 -		dma_sync_single_for_device(dev->mt76.dma_dev, addr, len, dir);
++		ptr = page_address(page);
 +		phy_addr = dma_map_single(dev->mt76.dma_dev, ptr,
-+					wed->wlan.rx_size,
-+					DMA_TO_DEVICE);
- 
--		desc->buf0 = cpu_to_le32(addr);
--		token = mt76_rx_token_consume(&dev->mt76, buf, r, addr);
++					  wed->wlan.rx_size,
++					  DMA_TO_DEVICE);
 +		if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
-+			skb_free_frag(ptr);
-+			mt76_put_rxwi(&dev->mt76, r);
++			__free_pages(page, get_order(length));
++			mt76_put_rxwi(&dev->mt76, t);
 +			goto unmap;
 +		}
+ 
+-		desc->buf0 = cpu_to_le32(addr);
+-		token = mt76_rx_token_consume(&dev->mt76, buf, t, addr);
 +		desc->buf0 = cpu_to_le32(phy_addr);
-+		token = mt76_rx_token_consume(&dev->mt76, ptr, r, phy_addr);
++		token = mt76_rx_token_consume(&dev->mt76, ptr, t, phy_addr);
  		if (token < 0) {
 -			mt76_put_page_pool_buf(buf, false);
 +			dma_unmap_single(dev->mt76.dma_dev, phy_addr,
 +					 wed->wlan.rx_size, DMA_TO_DEVICE);
-+			skb_free_frag(ptr);
-+			mt76_put_rxwi(&dev->mt76, r);
++			__free_pages(page, get_order(length));
++			mt76_put_rxwi(&dev->mt76, t);
  			goto unmap;
  		}
  
-@@ -646,8 +680,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -661,8 +676,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
  	return 0;
  
  unmap:
--	if (r)
--		mt76_put_rxwi(&dev->mt76, r);
+-	if (t)
+-		mt76_put_rxwi(&dev->mt76, t);
  	mt7915_mmio_wed_release_rx_buf(wed);
  	return -ENOMEM;
  }
@@ -699,7 +766,7 @@
  
  static u64
 diff --git a/usb.c b/usb.c
-index 5e5c7bf5..f0a50f57 100644
+index 5e5c7bf5..3e281715 100644
 --- a/usb.c
 +++ b/usb.c
 @@ -319,27 +319,29 @@ mt76u_set_endpoints(struct usb_interface *intf,
@@ -816,12 +883,13 @@
  	int i;
  
  	for (i = 0; i < q->ndesc; i++) {
-@@ -705,8 +701,12 @@ mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
+@@ -705,8 +701,13 @@ mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
  		mt76u_urb_free(q->entry[i].urb);
  		q->entry[i].urb = NULL;
  	}
 -	page_pool_destroy(q->page_pool);
 -	q->page_pool = NULL;
++
 +	if (!q->rx_page.va)
 +		return;
 +
@@ -832,5 +900,5 @@
  
  static void mt76u_free_rx(struct mt76_dev *dev)
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/100-api_update.patch b/recipes-wifi/linux-mt76/files/patches/100-api_update.patch
new file mode 100644
index 0000000..3a76f11
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/100-api_update.patch
@@ -0,0 +1,11 @@
+--- a/tx.c
++++ b/tx.c
+@@ -330,7 +330,7 @@ mt76_tx(struct mt76_phy *phy, struct iee
+ 	if ((dev->drv->drv_flags & MT_DRV_HW_MGMT_TXQ) &&
+ 	    !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
+ 	    !ieee80211_is_data(hdr->frame_control) &&
+-	    !ieee80211_is_bufferable_mmpdu(hdr->frame_control)) {
++	    !ieee80211_is_bufferable_mmpdu(skb)) {
+ 		qid = MT_TXQ_PSD;
+ 	}
+ 
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/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
similarity index 99%
rename from recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
rename to recipes-wifi/linux-mt76/files/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
index 2d2ccf9..da677f9 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/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
@@ -1,7 +1,8 @@
-From a5c56c30acb0543550bbe6f315fc2dbfdd7cdafb Mon Sep 17 00:00:00 2001
+From 5612f7494b368f5308fdff0874b560f8fbd22423 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] mt76: mt7915: add mtk internal debug tools for mt76
+Subject: [PATCH 1000/1031] wifi: mt76: mt7915: add mtk internal debug tools
+ for mt76
 
 ---
  mt76_connac_mcu.h     |    6 +
@@ -22,7 +23,7 @@
  create mode 100644 mt7915/mtk_mcu.c
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 40a99e0c..312e7b3c 100644
+index d5fb7a62..82e323c8 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1148,6 +1148,7 @@ enum {
@@ -270,7 +271,7 @@
  }
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3bbccbdf..94ecded5 100644
+index e74bc12f..3cee45ed 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -73,7 +73,11 @@ int mt7915_run(struct ieee80211_hw *hw)
@@ -286,10 +287,10 @@
  		goto out;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index dc24a475..198b623f 100644
+index 72e55157..32e9a5f8 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -199,6 +199,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
+@@ -200,6 +200,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
  	else
  		qid = MT_MCUQ_WM;
  
@@ -301,7 +302,7 @@
  	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
  }
  
-@@ -2315,7 +2320,10 @@ static int mt7915_red_set_watermark(struct mt7915_dev *dev)
+@@ -2326,7 +2331,10 @@ static int mt7915_red_set_watermark(struct mt7915_dev *dev)
  				 sizeof(req), false);
  }
  
@@ -313,7 +314,7 @@
  {
  #define RED_DISABLE		0
  #define RED_BY_WA_ENABLE	2
-@@ -3379,6 +3387,8 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
+@@ -3390,6 +3398,8 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
  		.sku_enable = enable,
  	};
  
@@ -322,7 +323,7 @@
  	return mt76_mcu_send_msg(&dev->mt76,
  				 MCU_EXT_CMD(TX_POWER_FEATURE_CTRL), &req,
  				 sizeof(req), true);
-@@ -3816,6 +3826,23 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3827,6 +3837,23 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -346,7 +347,7 @@
  int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
  {
  	struct {
-@@ -3844,3 +3871,22 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
+@@ -3855,3 +3882,22 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
  
  	return 0;
  }
@@ -370,7 +371,7 @@
 +}
 +#endif
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index b9ea297f..da863601 100644
+index 739003aa..5a73d1e6 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -278,6 +278,10 @@ enum {
@@ -385,7 +386,7 @@
  };
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 3cbfb9b6..5fcc8ace 100644
+index b66938ba..95b5bbe6 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -9,6 +9,7 @@
@@ -425,7 +426,7 @@
  };
  
  enum {
-@@ -651,4 +674,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -653,4 +676,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
@@ -5000,5 +5001,5 @@
  	return ret;
  }
 -- 
-2.39.2
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1002-mt76-mt7915-csi-implement-csi-support.patch b/recipes-wifi/linux-mt76/files/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/1002-mt76-mt7915-csi-implement-csi-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
index 125a023..c44fecc 100644
--- a/recipes-wifi/linux-mt76/files/patches/1002-mt76-mt7915-csi-implement-csi-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
@@ -1,7 +1,7 @@
-From 41752b5e4ac73781e070aabff226904ab9efb5e4 Mon Sep 17 00:00:00 2001
+From 0b2e22826ae9d91263d4127867ec3302975ae4ce Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Mon, 6 Jun 2022 20:13:02 +0800
-Subject: [PATCH 1002/1009] mt76: mt7915: csi: implement csi support
+Subject: [PATCH 1001/1031] wifi: mt76: mt7915: csi: implement csi support
 
 ---
  mt76_connac_mcu.h |   2 +
@@ -17,7 +17,7 @@
  create mode 100644 mt7915/vendor.h
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 312e7b3c..39a7f691 100644
+index 82e323c8..13214452 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1000,6 +1000,7 @@ enum {
@@ -132,10 +132,10 @@
  				   ARRAY_SIZE(mt76_rates));
  	if (ret)
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 1fecd4b1..40f77428 100644
+index 32e9a5f8..c75953aa 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -36,6 +36,10 @@ static bool sr_scene_detect = true;
+@@ -37,6 +37,10 @@ static bool sr_scene_detect = true;
  module_param(sr_scene_detect, bool, 0644);
  MODULE_PARM_DESC(sr_scene_detect, "Enable firmware scene detection algorithm");
  
@@ -146,7 +146,7 @@
  static u8
  mt7915_mcu_get_sta_nss(u16 mcs_map)
  {
-@@ -371,6 +375,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -372,6 +376,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_FW_LOG_2_HOST:
  		mt7915_mcu_rx_log_message(dev, skb);
  		break;
@@ -158,7 +158,7 @@
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
-@@ -3826,6 +3835,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3837,6 +3846,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -268,10 +268,10 @@
  int mt7915_dbg_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3, bool wait_resp)
  {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index da863601..c776417b 100644
+index 5a73d1e6..11065571 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -533,4 +533,80 @@ mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
+@@ -532,4 +532,80 @@ mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
  	return txpower;
  }
  
@@ -353,7 +353,7 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 5fcc8ace..e0133b13 100644
+index 95b5bbe6..a4cdc8df 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -294,6 +294,20 @@ struct mt7915_phy {
@@ -377,7 +377,7 @@
  };
  
  struct mt7915_dev {
-@@ -674,6 +688,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -676,6 +690,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
@@ -915,5 +915,5 @@
 +
 +#endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1003-mt76-mt7915-air-monitor-support.patch b/recipes-wifi/linux-mt76/files/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/1003-mt76-mt7915-air-monitor-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
index b3388ce..73302a3 100644
--- a/recipes-wifi/linux-mt76/files/patches/1003-mt76-mt7915-air-monitor-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
@@ -1,7 +1,7 @@
-From f6b5a16ecd5e9cc986a3dde75a84a447aa729449 Mon Sep 17 00:00:00 2001
+From 2264f143bd4e5552dd1110298065bca1b0a3dd29 Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Tue, 11 Jan 2022 12:03:23 +0800
-Subject: [PATCH 1003/1009] mt76: mt7915: air monitor support
+Subject: [PATCH 1002/1031] wifi: mt76: mt7915: air monitor support
 
 ---
  mt76_connac_mcu.h |   2 +
@@ -13,7 +13,7 @@
  6 files changed, 440 insertions(+)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 39a7f691..d35f9e92 100644
+index 13214452..411911c0 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1194,6 +1194,8 @@ enum {
@@ -41,10 +41,10 @@
  		status->flag |= RX_FLAG_8023;
  		mt7915_wed_check_ppe(dev, &dev->mt76.q_rx[q], msta, skb,
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 94ecded5..3ded65de 100644
+index 3cee45ed..a81a8744 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -702,6 +702,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -704,6 +704,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	if (ret)
  		return ret;
  
@@ -55,7 +55,7 @@
  }
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e0133b13..df0d7a1e 100644
+index a4cdc8df..eec37f78 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -250,6 +250,35 @@ struct mt7915_hif {
@@ -103,7 +103,7 @@
  #endif
  };
  
-@@ -692,6 +723,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -694,6 +725,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  void mt7915_vendor_register(struct mt7915_phy *phy);
  int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
  			u8 cfg, u8 v1, u32 v2, u8 *mac_addr);
@@ -545,5 +545,5 @@
 +
  #endif
 -- 
-2.18.0
+2.39.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/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
similarity index 87%
rename from recipes-wifi/linux-mt76/files/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
rename to recipes-wifi/linux-mt76/files/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
index b2739d3..589318f 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/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
@@ -1,8 +1,7 @@
-From 7a1f0d570d96e8e23b771976da052e94def589b9 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
- debugfs
+From 315b4371b0f879d202dbe342353121432f2b0c9e Mon Sep 17 00:00:00 2001
+From: Evelyn Tsai <evelyn.tsai@mediatek.com>
+Date: Tue, 4 Apr 2023 02:23:57 +0800
+Subject: [PATCH 1003/1031] wifi: mt76: mt7915: add support for muru_onoff via
 
 ---
  mt7915/init.c        |  2 ++
@@ -26,10 +25,10 @@
  
  static void
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 40f77428..b507f14f 100644
+index c75953aa..d23a2925 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -864,6 +864,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -865,6 +865,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
  			struct ieee80211_sta *sta, struct ieee80211_vif *vif)
  {
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
@@ -37,7 +36,7 @@
  	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
  	struct sta_rec_muru *muru;
  	struct tlv *tlv;
-@@ -876,13 +877,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -877,13 +878,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
  
  	muru = (struct sta_rec_muru *)tlv;
  
@@ -45,7 +44,7 @@
 -			       mvif->cap.vht_mu_ebfer ||
 -			       mvif->cap.vht_mu_ebfee;
 +	muru->cfg.mimo_dl_en = (mvif->cap.he_mu_ebfer ||
-+			        mvif->cap.vht_mu_ebfer ||
++				mvif->cap.vht_mu_ebfer ||
 +			        mvif->cap.vht_mu_ebfee) &&
 +			       !!(phy->muru_onoff & MUMIMO_DL);
  	if (!is_mt7915(&dev->mt76))
@@ -60,10 +59,10 @@
  		muru->mimo_dl.vht_mu_bfee =
  			!!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index c776417b..275a0ece 100644
+index 11065571..da2b0d48 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -609,4 +609,10 @@ struct csi_data {
+@@ -608,4 +608,10 @@ struct csi_data {
  };
  #endif
  
@@ -75,7 +74,7 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index df0d7a1e..e94970ba 100644
+index eec37f78..2c34dd97 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -307,6 +307,8 @@ struct mt7915_phy {
@@ -139,5 +138,5 @@
  			    &fops_fw_debug_module);
  	debugfs_create_file("fw_debug_level", 0600, dir, dev,
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1005-mt76-mt7915-certification-patches.patch b/recipes-wifi/linux-mt76/files/patches/1004-wifi-mt76-mt7915-certification-patches.patch
similarity index 98%
rename from recipes-wifi/linux-mt76/files/patches/1005-mt76-mt7915-certification-patches.patch
rename to recipes-wifi/linux-mt76/files/patches/1004-wifi-mt76-mt7915-certification-patches.patch
index 4b249f1..4c56a2d 100644
--- a/recipes-wifi/linux-mt76/files/patches/1005-mt76-mt7915-certification-patches.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1004-wifi-mt76-mt7915-certification-patches.patch
@@ -1,7 +1,7 @@
-From a3b277ab5965fc3ea056d9d4f2f9a9dedd4fef51 Mon Sep 17 00:00:00 2001
+From 31d3ccdfc356a844f6345e4fa5f6c88f946e2f08 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 6 Jun 2022 20:15:51 +0800
-Subject: [PATCH 1005/1009] mt76: mt7915: certification patches
+Subject: [PATCH 1004/1031] wifi: mt76: mt7915: certification patches
 
 ---
  mt76_connac_mcu.h    |   1 +
@@ -16,7 +16,7 @@
  9 files changed, 954 insertions(+), 5 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index d35f9e92..68e9c7e1 100644
+index 411911c0..ba16e57c 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1196,6 +1196,7 @@ enum {
@@ -76,10 +76,10 @@
  			       IEEE80211_RC_NSS_CHANGED |
  			       IEEE80211_RC_BW_CHANGED))
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3ded65de..f0cbfbef 100644
+index a81a8744..f63cea4a 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -678,6 +678,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -680,6 +680,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
  	bool ext_phy = mvif->phy != &dev->phy;
@@ -89,7 +89,7 @@
  	int ret, idx;
  
  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
-@@ -705,7 +708,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -707,7 +710,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  #ifdef CONFIG_MTK_VENDOR
  	mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
  #endif
@@ -107,10 +107,10 @@
  
  void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index b507f14f..057ea6ee 100644
+index d23a2925..24e60a1a 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3941,6 +3941,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -3952,6 +3952,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
  
  	return 0;
  }
@@ -584,7 +584,7 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 275a0ece..714bc44d 100644
+index da2b0d48..59e5295f 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -416,10 +416,14 @@ enum {
@@ -613,7 +613,7 @@
  enum {
  	TX_POWER_LIMIT_ENABLE,
  	TX_POWER_LIMIT_TABLE = 0x4,
-@@ -614,5 +621,203 @@ struct csi_data {
+@@ -613,5 +620,203 @@ struct csi_data {
  #define OFDMA_UL                       BIT(1)
  #define MUMIMO_DL                      BIT(2)
  #define MUMIMO_UL                      BIT(3)
@@ -818,10 +818,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e94970ba..8b292c3c 100644
+index 2c34dd97..055cbb5f 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -722,6 +722,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -724,6 +724,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
  #ifdef CONFIG_MTK_VENDOR
@@ -1132,5 +1132,5 @@
  
  enum mtk_vendor_attr_csi_ctrl {
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch b/recipes-wifi/linux-mt76/files/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
similarity index 76%
rename from recipes-wifi/linux-mt76/files/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
rename to recipes-wifi/linux-mt76/files/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
index bb91417..4122e2a 100644
--- a/recipes-wifi/linux-mt76/files/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
@@ -1,7 +1,8 @@
-From 659402f6dcf3e66e5e39065fa5ccda91deecfefa Mon Sep 17 00:00:00 2001
+From 7a89d53c23b06703c41f79cbda552738d65a7c3a Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Thu, 23 Mar 2023 09:55:50 +0800
-Subject: [PATCH] mt76: mt7915: add support for runtime set in-band discovery
+Subject: [PATCH 1005/1031] wifi: mt76: mt7915: add support for runtime set
+ in-band discovery
 
 Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 ---
@@ -9,10 +10,10 @@
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5aa103b..8ff5440 100644
+index 24e60a1a..873273ff 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2007,8 +2007,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -2008,8 +2008,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
  	bcn = (struct bss_info_bcn *)tlv;
  	bcn->enable = true;
  
@@ -22,7 +23,7 @@
  		interval = vif->bss_conf.fils_discovery.max_interval;
  		skb = ieee80211_get_fils_discovery_tmpl(hw, vif);
  	} else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP &&
-@@ -2042,7 +2041,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -2043,7 +2042,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
  	discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
  	discov->tx_interval = interval;
  	discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
diff --git a/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/recipes-wifi/linux-mt76/files/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
similarity index 90%
rename from recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
rename to recipes-wifi/linux-mt76/files/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
index 39d4df8..48f30c6 100644
--- a/recipes-wifi/linux-mt76/files/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
@@ -1,7 +1,8 @@
-From b789f416faea7dc90e4c83119274c773d417069c Mon Sep 17 00:00:00 2001
-From: MeiChia Chiu <meichia.chiu@mediatek.com>
-Date: Wed, 22 Jun 2022 10:53:43 +0800
-Subject: [PATCH 1007/1009] mt76: mt7915: add mt76 vendor muru onoff command
+From 797cb878960bbe11e8fbbfacb7653d26341a6983 Mon Sep 17 00:00:00 2001
+From: Evelyn Tsai <evelyn.tsai@mediatek.com>
+Date: Tue, 4 Apr 2023 02:27:44 +0800
+Subject: [PATCH 1006/1031] wifi: mt76: mt7915: add mt76 vendor muru onoff
+ command
 
 ---
  mt7915/mcu.c    |  7 +++++++
@@ -11,10 +12,10 @@
  4 files changed, 63 insertions(+)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 03c94349..70349a75 100644
+index 873273ff..b2118afa 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3960,6 +3960,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
+@@ -3971,6 +3971,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
  		if (val == 0)
  			phy->muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
  		break;
@@ -29,7 +30,7 @@
  }
  
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 714bc44d..ac4e6c8b 100644
+index 59e5295f..201d9bc6 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -423,6 +423,7 @@ enum {
@@ -139,5 +140,5 @@
  	MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch b/recipes-wifi/linux-mt76/files/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
similarity index 88%
rename from recipes-wifi/linux-mt76/files/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch
rename to recipes-wifi/linux-mt76/files/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
index a48e596..7b786c4 100644
--- a/recipes-wifi/linux-mt76/files/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
@@ -1,7 +1,7 @@
-From d88b52321783cfb7cb51bc383d13ed270ccced43 Mon Sep 17 00:00:00 2001
+From 471364942440db1fc344b8592e0cb21bc8df2b82 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Thu, 14 Apr 2022 15:18:02 +0800
-Subject: [PATCH 1008/1009] mt76: mt7915: drop undefined action frame
+Subject: [PATCH 1007/1031] wifi: mt76: mt7915: drop undefined action frame
 
 ---
  mt7915/mac.c | 6 ++++++
@@ -32,5 +32,5 @@
  	if (id < 0)
  		return id;
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch b/recipes-wifi/linux-mt76/files/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
similarity index 87%
rename from recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch
rename to recipes-wifi/linux-mt76/files/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
index d88e542..5de2263 100644
--- a/recipes-wifi/linux-mt76/files/patches/1009-mt76-mt7915-add-fw_version-dump.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
@@ -1,7 +1,7 @@
-From 9f848ad3fee22fb9de2dce18ddc2a0f54a519b68 Mon Sep 17 00:00:00 2001
+From dc39156305177d08dc19deecf98155262fe82059 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Wed, 17 Aug 2022 13:40:24 +0800
-Subject: [PATCH] mt76: mt7915: add fw_version dump
+Subject: [PATCH 1008/1031] wifi: mt76: mt7915: add fw_version dump
 
 ---
  mt76.h               |  4 ++++
@@ -10,7 +10,7 @@
  3 files changed, 32 insertions(+)
 
 diff --git a/mt76.h b/mt76.h
-index 183b0fc5..55751e8f 100644
+index 856dacbc..bc96f4e7 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -844,6 +844,10 @@ struct mt76_dev {
@@ -25,10 +25,10 @@
  
  struct mt76_power_limits {
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index efb9bfaa..2fefac68 100644
+index b0dcc5a6..856b2897 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
-@@ -3014,6 +3014,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
+@@ -2969,6 +2969,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
  		 sizeof(dev->hw->wiphy->fw_version),
  		 "%.10s-%.15s", hdr->fw_ver, hdr->build_date);
  
@@ -38,7 +38,7 @@
  	release_firmware(fw);
  
  	if (!fw_wa)
-@@ -3039,6 +3042,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
+@@ -2994,6 +2997,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
  		goto out;
  	}
  
@@ -48,7 +48,7 @@
  	snprintf(dev->hw->wiphy->fw_version,
  		 sizeof(dev->hw->wiphy->fw_version),
  		 "%.10s-%.15s", hdr->fw_ver, hdr->build_date);
-@@ -3109,6 +3115,9 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
+@@ -3064,6 +3070,9 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
  	dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
  		 be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
  
@@ -96,5 +96,5 @@
  }
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1111-mt76-testmode-rework-testmode-init-registers.patch b/recipes-wifi/linux-mt76/files/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/1111-mt76-testmode-rework-testmode-init-registers.patch
rename to recipes-wifi/linux-mt76/files/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
index d8bcf4c..5959b36 100644
--- a/recipes-wifi/linux-mt76/files/patches/1111-mt76-testmode-rework-testmode-init-registers.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
@@ -1,7 +1,8 @@
-From 67a19923b1e9f0491531d7f641725310b5152f87 Mon Sep 17 00:00:00 2001
+From 54ecb0535d80feaa70a57bf3fd46e65deb2b4042 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Mon, 6 Jun 2022 19:46:26 +0800
-Subject: [PATCH 1111/1132] mt76: testmode: rework testmode init registers
+Subject: [PATCH 1009/1031] wifi: mt76: testmode: rework testmode init
+ registers
 
 ---
  mac80211.c        |   3 +-
@@ -17,10 +18,10 @@
  10 files changed, 164 insertions(+), 35 deletions(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 87902f4b..ad5d6f8b 100644
+index 577d81a4..c3fa85d9 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -826,7 +826,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
+@@ -784,7 +784,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
  	}
  
  #ifdef CONFIG_NL80211_TESTMODE
@@ -31,7 +32,7 @@
  		if (status->flag & RX_FLAG_FAILED_FCS_CRC)
  			phy->test.rx_stats.fcs_error[q]++;
 diff --git a/mt76.h b/mt76.h
-index 55751e8f..ca664489 100644
+index bc96f4e7..024c5ed2 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -644,6 +644,8 @@ struct mt76_testmode_ops {
@@ -61,7 +62,7 @@
  };
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 68e9c7e1..8ba8ebfe 100644
+index ba16e57c..aa6d2dac 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1190,6 +1190,7 @@ enum {
@@ -73,7 +74,7 @@
  	MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
  	MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index ac4e6c8b..3c16d214 100644
+index 201d9bc6..99d733b4 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -9,6 +9,7 @@
@@ -85,7 +86,7 @@
  	MCU_ATE_CLEAN_TXQUEUE = 0x1c,
  };
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 6f0c0e2a..dbafb5ff 100644
+index 5ef43c44..9451bf5d 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -120,6 +120,7 @@ static const u32 mt7986_reg[] = {
@@ -474,5 +475,5 @@
  	/* keep last */
  	NUM_MT76_TM_STATS_ATTRS,
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1112-mt76-testmode-additional-supports.patch b/recipes-wifi/linux-mt76/files/patches/1010-wifi-mt76-testmode-additional-supports.patch
similarity index 98%
rename from recipes-wifi/linux-mt76/files/patches/1112-mt76-testmode-additional-supports.patch
rename to recipes-wifi/linux-mt76/files/patches/1010-wifi-mt76-testmode-additional-supports.patch
index 743b087..b30867b 100644
--- a/recipes-wifi/linux-mt76/files/patches/1112-mt76-testmode-additional-supports.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1010-wifi-mt76-testmode-additional-supports.patch
@@ -1,7 +1,7 @@
-From 6a285836d16bb46349603858116df5305787e774 Mon Sep 17 00:00:00 2001
+From 007557d45c5a57b9444d575344ba566d55d751c7 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Thu, 21 Apr 2022 15:43:19 +0800
-Subject: [PATCH 1112/1132] mt76: testmode: additional supports
+Subject: [PATCH 1010/1031] wifi: mt76: testmode: additional supports
 
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -28,7 +28,7 @@
  19 files changed, 1975 insertions(+), 151 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index df2ca73..fe65e0f 100644
+index 2fc70e23..f6d540b9 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -568,8 +568,7 @@ free:
@@ -42,10 +42,10 @@
  #endif
  
 diff --git a/mac80211.c b/mac80211.c
-index ad5d6f8..9107c0c 100644
+index c3fa85d9..f6fa7887 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -56,6 +56,13 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
+@@ -55,6 +55,13 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
  	CHAN5G(60, 5300),
  	CHAN5G(64, 5320),
  
@@ -59,7 +59,7 @@
  	CHAN5G(100, 5500),
  	CHAN5G(104, 5520),
  	CHAN5G(108, 5540),
-@@ -76,6 +83,11 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
+@@ -75,6 +82,11 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
  	CHAN5G(165, 5825),
  	CHAN5G(169, 5845),
  	CHAN5G(173, 5865),
@@ -72,7 +72,7 @@
  
  static const struct ieee80211_channel mt76_channels_6ghz[] = {
 diff --git a/mt76.h b/mt76.h
-index ca66448..898726e 100644
+index 024c5ed2..f1fda51e 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -642,6 +642,21 @@ struct mt76_testmode_ops {
@@ -234,10 +234,10 @@
  static inline void mt76_testmode_reset(struct mt76_phy *phy, bool disable)
  {
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 2fefac6..b6c2ccf 100644
+index 856b2897..56493774 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
-@@ -394,6 +394,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
+@@ -395,6 +395,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
  	switch (vif->type) {
  	case NL80211_IFTYPE_MESH_POINT:
  	case NL80211_IFTYPE_AP:
@@ -245,7 +245,7 @@
  		if (vif->p2p)
  			conn_type = CONNECTION_P2P_GC;
  		else
-@@ -575,6 +576,9 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
+@@ -576,6 +577,9 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
  	rx->rca2 = 1;
  	rx->rv = 1;
  
@@ -256,7 +256,7 @@
  		return;
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 8ba8ebf..4a63a24 100644
+index aa6d2dac..9641a080 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -996,6 +996,7 @@ enum {
@@ -276,7 +276,7 @@
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
  };
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 1177e4e..f40d09c 100644
+index 1177e4e7..f40d09c3 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -695,7 +695,7 @@ static void mt7915_init_work(struct work_struct *work)
@@ -289,7 +289,7 @@
  	mt7915_init_txpower(dev, &dev->mphy.sband_2g.sband);
  	mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband);
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index de2bdba..1460a32 100644
+index de2bdba5..1460a32b 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -627,16 +627,38 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
@@ -371,7 +371,7 @@
  		goto out;
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index f0cbfbe..651887c 100644
+index f63cea4a..05e7d51f 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -238,7 +238,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
@@ -384,10 +384,10 @@
  		mvif->mt76.wmm_idx += 2;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 7b7916c..ec695c7 100644
+index b2118afa..05935509 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -383,6 +383,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -384,6 +384,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
@@ -399,7 +399,7 @@
  	default:
  		break;
  	}
-@@ -414,6 +419,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -415,6 +420,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	    rxd->ext_eid == MCU_EXT_EVENT_ASSERT_DUMP ||
  	    rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC ||
  	    rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY ||
@@ -407,7 +407,7 @@
  	    !rxd->seq)
  		mt7915_mcu_rx_unsolicited_event(dev, skb);
  	else
-@@ -2850,14 +2856,14 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
+@@ -2861,14 +2867,14 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
  	return 0;
  }
  
@@ -425,7 +425,7 @@
  
  	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EFUSE_BUFFER_MODE),
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 3c16d21..0a99cb3 100644
+index 99d733b4..dd6a44d4 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -8,10 +8,15 @@
@@ -457,7 +457,7 @@
  	MT_BF_TYPE_UPDATE = 20,
  	MT_BF_MODULE_UPDATE = 25
  };
-@@ -718,10 +729,19 @@ struct mt7915_muru {
+@@ -717,10 +728,19 @@ struct mt7915_muru {
  #define MURU_OFDMA_SCH_TYPE_UL          BIT(1)
  
  /* Common Config */
@@ -482,7 +482,7 @@
  
  enum {
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index dbafb5f..bb752a8 100644
+index 9451bf5d..22dcd18f 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -134,6 +134,7 @@ static const u32 mt7915_offs[] = {
@@ -502,7 +502,7 @@
  	[AGG_PCR0]		= 0x040,
  	[AGG_ACR0]		= 0x054,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 8b292c3..9d9c5fc 100644
+index 055cbb5f..bc7314b7 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -323,6 +323,9 @@ struct mt7915_phy {
@@ -530,7 +530,7 @@
  #ifdef MTK_DEBUG
  	u16 wlan_idx;
  	struct {
-@@ -592,7 +603,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -594,7 +605,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
  				   struct ieee80211_vif *vif,
  				   struct ieee80211_sta *sta,
  				   void *data, u32 field);
@@ -539,7 +539,7 @@
  int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset);
  int mt7915_mcu_get_eeprom_free_block(struct mt7915_dev *dev, u8 *block_num);
  int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
-@@ -630,6 +641,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -632,6 +643,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
  int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
  void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
  void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -548,7 +548,7 @@
  static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
  {
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index d6a05f1..e876848 100644
+index d6a05f13..e8768488 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
 @@ -62,6 +62,7 @@ enum offs_rev {
@@ -569,7 +569,7 @@
  							  (_n) * 4))
  #define MT_AGG_PCR0(_band, _n)		MT_WF_AGG(_band, (__OFFS(AGG_PCR0) +	\
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 4693919..9317a8e 100644
+index 46939191..9317a8e0 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -9,6 +9,9 @@
@@ -1920,7 +1920,7 @@
 +	.set_eeprom = mt7915_tm_set_eeprom,
  };
 diff --git a/mt7915/testmode.h b/mt7915/testmode.h
-index a1c54c8..01b08e9 100644
+index a1c54c89..01b08e9e 100644
 --- a/mt7915/testmode.h
 +++ b/mt7915/testmode.h
 @@ -4,6 +4,8 @@
@@ -2235,7 +2235,7 @@
 +
  #endif
 diff --git a/testmode.c b/testmode.c
-index 1d0d5d3..fd3b9b2 100644
+index 1d0d5d30..fd3b9b20 100644
 --- a/testmode.c
 +++ b/testmode.c
 @@ -27,28 +27,16 @@ const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS] = {
@@ -2706,7 +2706,7 @@
  		a = nla_nest_start(msg, MT76_TM_ATTR_TX_POWER);
  		if (!a)
 diff --git a/testmode.h b/testmode.h
-index 8961326..57949f2 100644
+index 89613266..57949f2b 100644
 --- a/testmode.h
 +++ b/testmode.h
 @@ -6,6 +6,8 @@
@@ -2811,7 +2811,7 @@
 +
  #endif
 diff --git a/tools/fields.c b/tools/fields.c
-index e3f6908..7e564a3 100644
+index e3f69089..7e564a3b 100644
 --- a/tools/fields.c
 +++ b/tools/fields.c
 @@ -10,6 +10,7 @@ static const char * const testmode_state[] = {
@@ -2952,7 +2952,7 @@
  };
  
 diff --git a/tx.c b/tx.c
-index 1f309d0..6d55566 100644
+index 1f309d05..6d55566f 100644
 --- a/tx.c
 +++ b/tx.c
 @@ -250,8 +250,7 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
@@ -2966,5 +2966,5 @@
  			wake_up(&dev->tx_wait);
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1113-mt76-testmode-add-pre-cal-support.patch b/recipes-wifi/linux-mt76/files/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
similarity index 96%
rename from recipes-wifi/linux-mt76/files/patches/1113-mt76-testmode-add-pre-cal-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
index 137b15a..82a210f 100644
--- a/recipes-wifi/linux-mt76/files/patches/1113-mt76-testmode-add-pre-cal-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
@@ -1,7 +1,7 @@
-From 52d97d39f652d9b7441bbbe52de72b25796df4a0 Mon Sep 17 00:00:00 2001
+From 7961aef8b9e3269eec058384b42b28461e8a2875 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Wed, 31 Aug 2022 20:06:52 +0800
-Subject: [PATCH 1113/1116] mt76: testmode: add pre-cal support
+Subject: [PATCH 1011/1031] wifi: mt76: testmode: add pre-cal support
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Change-Id: Ibfbbc3443de994eeb4daa5e364b0a90f5d7d3bcd
@@ -20,7 +20,7 @@
  11 files changed, 562 insertions(+), 13 deletions(-)
 
 diff --git a/eeprom.c b/eeprom.c
-index 0a88048..cb6ff17 100644
+index 90d36c8d..aa889258 100644
 --- a/eeprom.c
 +++ b/eeprom.c
 @@ -89,8 +89,10 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
@@ -37,10 +37,10 @@
  
  out_put_node:
 diff --git a/mt76.h b/mt76.h
-index cde5226..e22f82c 100644
+index f1fda51e..3da237d0 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -642,6 +642,7 @@ struct mt76_testmode_ops {
+@@ -643,6 +643,7 @@ struct mt76_testmode_ops {
  			  enum mt76_testmode_state new_state);
  	int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
  	int (*set_eeprom)(struct mt76_phy *phy, u32 offset, u8 *val, u8 action);
@@ -49,10 +49,10 @@
  
  struct mt76_testmode_entry_data {
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index f616bce..89411ba 100644
+index 9641a080..22d6a915 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -995,6 +995,7 @@ enum {
+@@ -992,6 +992,7 @@ enum {
  
  /* ext event table */
  enum {
@@ -61,7 +61,7 @@
  	MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
  	MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
 diff --git a/mt7915/eeprom.h b/mt7915/eeprom.h
-index f3e5681..88aaa16 100644
+index f3e56817..88aaa16a 100644
 --- a/mt7915/eeprom.h
 +++ b/mt7915/eeprom.h
 @@ -39,10 +39,18 @@ enum mt7915_eeprom_field {
@@ -114,10 +114,10 @@
  
  #endif
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 0e5ed14..4922e73 100644
+index 05935509..7a906e0e 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -387,6 +387,9 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -388,6 +388,9 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_BF_STATUS_READ:
  		mt7915_tm_txbf_status_read(dev, skb);
  		break;
@@ -127,7 +127,7 @@
  #endif
  	default:
  		break;
-@@ -2951,7 +2954,7 @@ int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
+@@ -2964,7 +2967,7 @@ int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
  	u8 idx = 0, *cal = dev->cal, *eep = dev->mt76.eeprom.data;
  	u32 total = MT_EE_CAL_GROUP_SIZE;
  
@@ -136,7 +136,7 @@
  		return 0;
  
  	/*
-@@ -3031,11 +3034,29 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
+@@ -3044,11 +3047,29 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
  {
  	struct mt7915_dev *dev = phy->dev;
  	struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
@@ -169,7 +169,7 @@
  
  	idx = mt7915_dpd_freq_idx(center_freq, chandef->width);
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 9d9c5fc..d6fe9e7 100644
+index bc7314b7..5c08417d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -409,6 +409,10 @@ struct mt7915_dev {
@@ -183,7 +183,7 @@
  
  	struct {
  		u8 debug_wm;
-@@ -642,6 +646,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
+@@ -644,6 +648,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
  void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
  void mt7915_mcu_exit(struct mt7915_dev *dev);
  int mt7915_tm_txbf_status_read(struct mt7915_dev *dev, struct sk_buff *skb);
@@ -192,7 +192,7 @@
  static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
  {
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 9317a8e..a7c185f 100644
+index 9317a8e0..a7c185fc 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -5,6 +5,7 @@
@@ -667,7 +667,7 @@
 +	.dump_precal = mt7915_tm_dump_precal,
  };
 diff --git a/mt7915/testmode.h b/mt7915/testmode.h
-index 01b08e9..d500987 100644
+index 01b08e9e..d500987d 100644
 --- a/mt7915/testmode.h
 +++ b/mt7915/testmode.h
 @@ -81,6 +81,11 @@ struct tm_tx_cont {
@@ -735,10 +735,10 @@
  	TAM_ARB_OP_MODE_NORMAL = 1,
  	TAM_ARB_OP_MODE_TEST,
 diff --git a/testmode.c b/testmode.c
-index 7a9ed54..42da6f0 100644
+index fd3b9b20..b5a919a9 100644
 --- a/testmode.c
 +++ b/testmode.c
-@@ -763,6 +763,18 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
+@@ -766,6 +766,18 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
  
  	mutex_lock(&dev->mutex);
  
@@ -757,7 +757,7 @@
  	if (tb[MT76_TM_ATTR_STATS]) {
  		err = -EINVAL;
  
-@@ -796,7 +808,8 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
+@@ -799,7 +811,8 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
  
  	if (dev->test_mtd.name &&
  	    (nla_put_string(msg, MT76_TM_ATTR_MTD_PART, dev->test_mtd.name) ||
@@ -768,7 +768,7 @@
  
  	if (nla_put_u32(msg, MT76_TM_ATTR_TX_COUNT, td->tx_count) ||
 diff --git a/testmode.h b/testmode.h
-index 57949f2..34936e5 100644
+index 57949f2b..34936e5f 100644
 --- a/testmode.h
 +++ b/testmode.h
 @@ -19,6 +19,7 @@
@@ -824,7 +824,7 @@
  
  	/* keep last */
 diff --git a/tools/fields.c b/tools/fields.c
-index 6e36ab2..1be1ffd 100644
+index 7e564a3b..3ca5cd1f 100644
 --- a/tools/fields.c
 +++ b/tools/fields.c
 @@ -11,6 +11,14 @@ static const char * const testmode_state[] = {
@@ -843,5 +843,5 @@
  
  static const char * const testmode_tx_mode[] = {
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch b/recipes-wifi/linux-mt76/files/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
index ff74c33..07456d0 100644
--- a/recipes-wifi/linux-mt76/files/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
@@ -1,7 +1,7 @@
-From 074ca69eba297963caa63b79a20d2cdf962045d2 Mon Sep 17 00:00:00 2001
+From c4279397b03b60504535d91f7d2a1c0a7c947f0d Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Mon, 12 Sep 2022 18:16:54 +0800
-Subject: [PATCH 1114/1116] mt76: testmode: add iBF command mode support
+Subject: [PATCH 1012/1031] wifi: mt76: testmode: add iBF command mode support
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Change-Id: I7eea1d6412563f889e5774e787e58ce9eba001bd
@@ -13,7 +13,7 @@
  4 files changed, 85 insertions(+), 7 deletions(-)
 
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index a7c185f..668f483 100644
+index a7c185fc..668f4837 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -701,6 +701,7 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
@@ -105,10 +105,10 @@
  		mt7915_tm_set_tx_len(phy, tx_time);
  
 diff --git a/testmode.c b/testmode.c
-index 42da6f0..b605a4b 100644
+index b5a919a9..f1982ac2 100644
 --- a/testmode.c
 +++ b/testmode.c
-@@ -530,6 +530,42 @@ out:
+@@ -533,6 +533,42 @@ out:
  	return err;
  }
  
@@ -151,7 +151,7 @@
  int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  		      void *data, int len)
  {
-@@ -668,6 +704,11 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -671,6 +707,11 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  		    0, MT76_TM_TXBF_ACT_MAX))
  			goto out;
  
@@ -164,7 +164,7 @@
  		nla_for_each_nested(cur, tb[MT76_TM_ATTR_TXBF_PARAM], rem) {
  			if (nla_len(cur) != 2 ||
 diff --git a/testmode.h b/testmode.h
-index 34936e5..bbfb313 100644
+index 34936e5f..bbfb313f 100644
 --- a/testmode.h
 +++ b/testmode.h
 @@ -281,8 +281,10 @@ enum mt76_testmode_txbf_act {
@@ -179,7 +179,7 @@
  
  	/* keep last */
 diff --git a/tools/fields.c b/tools/fields.c
-index 1be1ffd..47fc69f 100644
+index 3ca5cd1f..6bf4c046 100644
 --- a/tools/fields.c
 +++ b/tools/fields.c
 @@ -32,6 +32,20 @@ static const char * const testmode_tx_mode[] = {
@@ -239,5 +239,5 @@
  
  const struct tm_field msg_field = {
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch b/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
index 1128a92..9cf8439 100644
--- a/recipes-wifi/linux-mt76/files/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
@@ -1,7 +1,7 @@
-From 34ccd9ebdfd36f8e6e7b554446eaeb022141307d Mon Sep 17 00:00:00 2001
+From e893fd394224728ed846e699dd85a0f694128351 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 27 Oct 2022 17:42:07 +0800
-Subject: [PATCH 1115/1116] mt76: testmode: add ZWDFS test mode support
+Subject: [PATCH 1013/1031] wifi: mt76: testmode: add ZWDFS test mode support
 
 Change-Id: I14d104b7158a35acf6b0595357d07fb87f5a9d94
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -19,10 +19,10 @@
  10 files changed, 452 insertions(+), 1 deletion(-)
 
 diff --git a/mt76.h b/mt76.h
-index e22f82c..d5f5054 100644
+index 3da237d0..882388e6 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -725,6 +725,15 @@ struct mt76_testmode_data {
+@@ -726,6 +726,15 @@ struct mt76_testmode_data {
  		u64 fcs_error[__MT_RXQ_MAX];
  		u64 len_mismatch;
  	} rx_stats;
@@ -39,10 +39,10 @@
  
  struct mt76_vif {
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 89411ba..5cef308 100644
+index 22d6a915..adfe677c 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -1195,6 +1195,7 @@ enum {
+@@ -1192,6 +1192,7 @@ enum {
  	MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
  	MCU_EXT_CMD_SET_RDD_TH = 0x9d,
  	MCU_EXT_CMD_MURU_CTRL = 0x9f,
@@ -50,7 +50,7 @@
  	MCU_EXT_CMD_RX_STAT = 0xa4,
  	MCU_EXT_CMD_SET_SPR = 0xa8,
  	MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
-@@ -1205,6 +1206,7 @@ enum {
+@@ -1202,6 +1203,7 @@ enum {
  	MCU_EXT_CMD_RX_STAT_USER_CTRL = 0xb3,
  	MCU_EXT_CMD_CERT_CFG = 0xb7,
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
@@ -59,10 +59,10 @@
  
  enum {
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 4922e73..cce622d 100644
+index 7a906e0e..9314c409 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2686,6 +2686,7 @@ mt7915_mcu_background_chain_ctrl(struct mt7915_phy *phy,
+@@ -2699,6 +2699,7 @@ mt7915_mcu_background_chain_ctrl(struct mt7915_phy *phy,
  		req.monitor_chan = chandef->chan->hw_value;
  		req.monitor_central_chan =
  			ieee80211_frequency_to_channel(chandef->center_freq1);
@@ -70,7 +70,7 @@
  		req.band_idx = phy->mt76->band_idx;
  		req.scan_mode = 2;
  		break;
-@@ -4504,3 +4505,68 @@ int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable)
+@@ -4517,3 +4518,68 @@ int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable)
  	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MEC_CTRL), &req, sizeof(req), true);
  }
  #endif
@@ -140,10 +140,10 @@
 +	return 0;
 +}
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 1671d56..d780415 100644
+index dd6a44d4..8649c82e 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -629,6 +629,52 @@ struct csi_data {
+@@ -628,6 +628,52 @@ struct csi_data {
  };
  #endif
  
@@ -197,7 +197,7 @@
  #define OFDMA_DL                       BIT(0)
  #define OFDMA_UL                       BIT(1)
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index d6fe9e7..e99b586 100644
+index 5c08417d..c5e29dc2 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -311,6 +311,7 @@ struct mt7915_phy {
@@ -208,7 +208,7 @@
  
  #ifdef CONFIG_NL80211_TESTMODE
  	struct {
-@@ -760,6 +761,9 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
+@@ -762,6 +763,9 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
  				  struct ieee80211_sta *sta);
  #endif
  
@@ -219,7 +219,7 @@
  int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir);
  int mt7915_dbg_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3, bool wait_resp);
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index e876848..f4b5709 100644
+index e8768488..f4b57099 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
 @@ -1194,6 +1194,8 @@ enum offs_rev {
@@ -232,7 +232,7 @@
  #define MT_WF_PHY_BASE			0x83080000
  #define MT_WF_PHY(ofs)			(MT_WF_PHY_BASE + (ofs))
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 668f483..23dcabd 100644
+index 668f4837..23dcabd1 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -13,6 +13,12 @@ enum {
@@ -503,7 +503,7 @@
  
  static int
 diff --git a/testmode.c b/testmode.c
-index b605a4b..58280a4 100644
+index f1982ac2..503d714b 100644
 --- a/testmode.c
 +++ b/testmode.c
 @@ -24,6 +24,13 @@ const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS] = {
@@ -520,7 +520,7 @@
  };
  EXPORT_SYMBOL_GPL(mt76_tm_policy);
  
-@@ -402,6 +409,7 @@ mt76_testmode_init_defaults(struct mt76_phy *phy)
+@@ -405,6 +412,7 @@ mt76_testmode_init_defaults(struct mt76_phy *phy)
  	td->tx_count = 1;
  	td->tx_rate_mode = MT76_TM_TX_MODE_OFDM;
  	td->tx_rate_nss = 1;
@@ -528,7 +528,7 @@
  
  	memcpy(td->addr[0], phy->macaddr, ETH_ALEN);
  	memcpy(td->addr[1], phy->macaddr, ETH_ALEN);
-@@ -607,6 +615,9 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -610,6 +618,9 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  	if (tb[MT76_TM_ATTR_TX_RATE_IDX])
  		td->tx_rate_idx = nla_get_u8(tb[MT76_TM_ATTR_TX_RATE_IDX]);
  
@@ -538,7 +538,7 @@
  	if (mt76_tm_get_u8(tb[MT76_TM_ATTR_TX_RATE_MODE], &td->tx_rate_mode,
  			   0, MT76_TM_TX_MODE_MAX) ||
  	    mt76_tm_get_u8(tb[MT76_TM_ATTR_TX_RATE_NSS], &td->tx_rate_nss,
-@@ -623,7 +634,16 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -626,7 +637,16 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			   &td->tx_power_control, 0, 1) ||
  	    mt76_tm_get_u8(tb[MT76_TM_ATTR_AID], &td->aid, 0, 16) ||
  	    mt76_tm_get_u8(tb[MT76_TM_ATTR_RU_ALLOC], &td->ru_alloc, 0, 0xff) ||
@@ -556,7 +556,7 @@
  		goto out;
  
  	if (tb[MT76_TM_ATTR_TX_LENGTH]) {
-@@ -857,6 +877,9 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
+@@ -860,6 +880,9 @@ int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg,
  	    nla_put_u8(msg, MT76_TM_ATTR_TX_RATE_MODE, td->tx_rate_mode) ||
  	    nla_put_u8(msg, MT76_TM_ATTR_TX_RATE_SGI, td->tx_rate_sgi) ||
  	    nla_put_u8(msg, MT76_TM_ATTR_TX_RATE_STBC, td->tx_rate_stbc) ||
@@ -567,7 +567,7 @@
  	     nla_put_u8(msg, MT76_TM_ATTR_TX_LTF, td->tx_ltf)) ||
  	    (mt76_testmode_param_present(td, MT76_TM_ATTR_TX_ANTENNA) &&
 diff --git a/testmode.h b/testmode.h
-index bbfb313..e03fa6d 100644
+index bbfb313f..e03fa6df 100644
 --- a/testmode.h
 +++ b/testmode.h
 @@ -63,6 +63,20 @@
@@ -635,7 +635,7 @@
 +
  #endif
 diff --git a/tools/fields.c b/tools/fields.c
-index 47fc69f..6f07eed 100644
+index 6bf4c046..fc01043e 100644
 --- a/tools/fields.c
 +++ b/tools/fields.c
 @@ -46,6 +46,14 @@ static const char * const testmode_txbf_act[] = {
@@ -682,5 +682,5 @@
  
  const struct tm_field msg_field = {
 -- 
-2.18.0
+2.39.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/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
rename to recipes-wifi/linux-mt76/files/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
index fb5bb23..24cf95c 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/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
@@ -1,8 +1,8 @@
-From a00620522ddc62d8070077e4d4a1ec18a8402bf9 Mon Sep 17 00:00:00 2001
+From 3281e4d7beb86f30a350c2aceacd5d4d4b0021e1 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 1116/1116] mt76: testmode: add iBF/eBF cal and cert commands
- with golden
+Subject: [PATCH 1014/1031] wifi: mt76: testmode: add iBF/eBF cal and cert
+ commands with golden
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -25,10 +25,10 @@
  16 files changed, 856 insertions(+), 324 deletions(-)
 
 diff --git a/mt76.h b/mt76.h
-index d5f5054..6ab689a 100644
+index 882388e6..d7ffe29d 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -687,6 +687,7 @@ struct mt76_testmode_data {
+@@ -688,6 +688,7 @@ struct mt76_testmode_data {
  
  	struct list_head tm_entry_list;
  	struct mt76_wcid *cur_entry;
@@ -36,7 +36,7 @@
  	u8 entry_num;
  	union {
  		struct mt76_testmode_entry_data ed;
-@@ -715,6 +716,9 @@ struct mt76_testmode_data {
+@@ -716,6 +717,9 @@ struct mt76_testmode_data {
  
  	u8 txbf_act;
  	u16 txbf_param[8];
@@ -47,10 +47,10 @@
  	u32 tx_pending;
  	u32 tx_queued;
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index b6c2ccf..6f5c81c 100644
+index 56493774..d4060136 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
-@@ -2802,6 +2802,7 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
+@@ -2757,6 +2757,7 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
  	u32 type = vif->p2p ? NETWORK_P2P : NETWORK_INFRA;
  	struct bss_info_basic *bss;
  	struct tlv *tlv;
@@ -58,7 +58,7 @@
  
  	tlv = mt76_connac_mcu_add_tlv(skb, BSS_INFO_BASIC, sizeof(*bss));
  	bss = (struct bss_info_basic *)tlv;
-@@ -2861,6 +2862,8 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
+@@ -2816,6 +2817,8 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
  		bss->dtim_period = vif->bss_conf.dtim_period;
  		bss->phy_mode = mt76_connac_get_phy_mode(phy, vif,
  							 chandef->chan->band, NULL);
@@ -68,7 +68,7 @@
  		memcpy(bss->bssid, phy->macaddr, ETH_ALEN);
  	}
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 1460a32..35b8584 100644
+index 1460a32b..35b85843 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -752,8 +752,10 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
@@ -84,7 +84,7 @@
  	txwi[6] |= cpu_to_le32(val);
  #endif
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 651887c..21ad3b0 100644
+index 05e7d51f..1a2b2171 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -205,46 +205,37 @@ static void mt7915_init_bitrate_mask(struct ieee80211_vif *vif)
@@ -175,10 +175,10 @@
  
  	return ret;
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index cce622d..d8a1b00 100644
+index 9314c409..69d3fe4f 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -193,6 +193,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
+@@ -194,6 +194,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
  	int ret;
  
  	ret = mt76_connac2_mcu_fill_message(mdev, skb, cmd, wait_seq);
@@ -186,7 +186,7 @@
  	if (ret)
  		return ret;
  
-@@ -383,10 +384,12 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -384,10 +385,12 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
@@ -201,7 +201,7 @@
  	case MCU_EXT_EVENT_RF_TEST:
  		mt7915_tm_rf_test_event(dev, skb);
  		break;
-@@ -673,11 +676,22 @@ int mt7915_mcu_add_bss_info(struct mt7915_phy *phy,
+@@ -674,11 +677,22 @@ int mt7915_mcu_add_bss_info(struct mt7915_phy *phy,
  	if (enable)
  		mt76_connac_mcu_bss_omac_tlv(skb, vif);
  
@@ -227,7 +227,7 @@
  
  	if (enable) {
  		mt7915_mcu_bss_rfch_tlv(skb, vif, phy);
-@@ -3453,6 +3467,7 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3466,6 +3480,7 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
  
  int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
  {
@@ -235,7 +235,7 @@
  	struct {
  		u8 action;
  		union {
-@@ -3479,7 +3494,6 @@ int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
+@@ -3492,7 +3507,6 @@ int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
  		.action = action,
  	};
  
@@ -243,7 +243,7 @@
  	switch (action) {
  	case MT_BF_SOUNDING_ON:
  		req.snd.snd_mode = MT_BF_PROCESSING;
-@@ -4397,6 +4411,9 @@ int mt7915_mcu_set_txbf_sound_info(struct mt7915_phy *phy, u8 action,
+@@ -4410,6 +4424,9 @@ int mt7915_mcu_set_txbf_sound_info(struct mt7915_phy *phy, u8 action,
  		req.he_opt = v2;
  		req.glo_opt = v3;
  		break;
@@ -254,7 +254,7 @@
  		return -EINVAL;
  	}
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index d780415..5c5c92f 100644
+index 8649c82e..108499f6 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -476,10 +476,12 @@ enum {
@@ -448,7 +448,7 @@
  	MURU_SET_ARB_OP_MODE = 14,
  	MURU_SET_PLATFORM_TYPE = 25,
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 9a666d0..95ded13 100644
+index 22dcd18f..fa99df1e 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -133,6 +133,7 @@ static const u32 mt7915_offs[] = {
@@ -468,7 +468,7 @@
  	[AGG_AALCR0]		= 0x028,
  	[AGG_AWSCR0]		= 0x030,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e99b586..bb9c374 100644
+index c5e29dc2..a33a4207 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -325,7 +325,6 @@ struct mt7915_phy {
@@ -496,7 +496,7 @@
  void mt7915_init_txpower(struct mt7915_dev *dev,
  			 struct ieee80211_supported_band *sband);
  void mt7915_reset(struct mt7915_dev *dev);
-@@ -646,8 +646,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -648,8 +648,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
  int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
  void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
  void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -508,7 +508,7 @@
  
  static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
  {
-@@ -784,4 +786,10 @@ enum {
+@@ -786,4 +788,10 @@ enum {
  
  #endif
  
@@ -520,7 +520,7 @@
 +
  #endif
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 05dc7d5..a130f56 100644
+index f222efe7..74c3e91b 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -2908,6 +2908,36 @@ mt7915_txpower_level_set(void *data, u64 val)
@@ -573,7 +573,7 @@
  
  	debugfs_create_devm_seqfile(dev->mt76.dev, "fw_version", dir,
 diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
-index 143dae2..906c872 100644
+index 143dae26..906c8725 100644
 --- a/mt7915/mtk_mcu.c
 +++ b/mt7915/mtk_mcu.c
 @@ -1,9 +1,10 @@
@@ -836,7 +836,7 @@
 +}
 +#endif
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index f4b5709..007fd4d 100644
+index f4b57099..007fd4d2 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
 @@ -61,6 +61,7 @@ enum offs_rev {
@@ -858,7 +858,7 @@
  #define MT_WF_RMAC_BASE(_band)		((_band) ? 0x820f5000 : 0x820e5000)
  #define MT_WF_RMAC(_band, ofs)		(MT_WF_RMAC_BASE(_band) + (ofs))
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 23dcabd..ad1865e 100644
+index 23dcabd1..ad1865e3 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -53,6 +53,8 @@ struct reg_band {
@@ -1701,7 +1701,7 @@
  	rateval =  mode << 6 | rate_idx;
  	tx_cont->rateval = cpu_to_le16(rateval);
 diff --git a/mt7915/testmode.h b/mt7915/testmode.h
-index d500987..1982369 100644
+index d500987d..19823694 100644
 --- a/mt7915/testmode.h
 +++ b/mt7915/testmode.h
 @@ -311,137 +311,7 @@ struct mt7915_tm_muru {
@@ -1845,10 +1845,10 @@
  
  #endif
 diff --git a/testmode.c b/testmode.c
-index 58280a4..a6b0c16 100644
+index 503d714b..91638083 100644
 --- a/testmode.c
 +++ b/testmode.c
-@@ -191,6 +191,7 @@ mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len,
+@@ -194,6 +194,7 @@ mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len,
  
  	hdr = __skb_put_zero(head, sizeof(*hdr));
  	hdr->frame_control = cpu_to_le16(fc);
@@ -1857,7 +1857,7 @@
  	memcpy(hdr->addr2, addr[1], ETH_ALEN);
  	memcpy(hdr->addr3, addr[2], ETH_ALEN);
 diff --git a/testmode.h b/testmode.h
-index e03fa6d..0e96173 100644
+index e03fa6df..0e96173b 100644
 --- a/testmode.h
 +++ b/testmode.h
 @@ -299,7 +299,10 @@ enum mt76_testmode_cfg {
@@ -1885,7 +1885,7 @@
  	/* keep last */
  	NUM_MT76_TM_TXBF_ACT,
 diff --git a/tools/fields.c b/tools/fields.c
-index 6f07eed..7211ec5 100644
+index fc01043e..7caacb94 100644
 --- a/tools/fields.c
 +++ b/tools/fields.c
 @@ -33,7 +33,10 @@ static const char * const testmode_tx_mode[] = {
@@ -1913,5 +1913,5 @@
  
  static const char * const testmode_offchan_bw[] = {
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch b/recipes-wifi/linux-mt76/files/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
similarity index 69%
rename from recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
rename to recipes-wifi/linux-mt76/files/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
index 43a0ae7..9533220 100644
--- a/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
@@ -1,17 +1,18 @@
-From 55254f381217a874a2bb20c288107bb3d2f3811d Mon Sep 17 00:00:00 2001
+From 33bb85855b5fc8e7d608c1a094c9279cdc383097 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Sun, 24 Apr 2022 10:07:00 +0800
-Subject: [PATCH 1117/1132] mt76: mt7915: init rssi in WTBL when add station
+Subject: [PATCH 1015/1031] wifi: mt76: mt7915: init rssi in WTBL when add
+ station
 
 ---
  mt7915/main.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 21ad3b07..d1135d9f 100644
+index 1a2b2171..7440e964 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -692,6 +692,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -694,6 +694,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
  #endif
  	int ret, idx;
@@ -19,7 +20,7 @@
  
  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
  	if (idx < 0)
-@@ -715,6 +716,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -717,6 +718,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	if (ret)
  		return ret;
  
@@ -30,5 +31,5 @@
  	mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch b/recipes-wifi/linux-mt76/files/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
similarity index 67%
rename from recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
rename to recipes-wifi/linux-mt76/files/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
index df0677d..9ecf43c 100644
--- a/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
@@ -1,7 +1,7 @@
-From 8ede062234d043820c188e0d25e68a9f71cb0e28 Mon Sep 17 00:00:00 2001
+From 190ce15abcef8fbc19f9b7e87cdfd7fcf3e6ef8a Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 6 May 2022 15:58:42 +0800
-Subject: [PATCH 1118/1132] mt76: connac: airtime fairness feature off in
+Subject: [PATCH 1016/1031] wifi: mt76: connac: airtime fairness feature off in
  mac80211
 
 ---
@@ -9,10 +9,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 9107c0c1..e2122c78 100644
+index f6fa7887..1654cc9b 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -437,7 +437,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
+@@ -436,7 +436,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
  			WIPHY_FLAG_AP_UAPSD;
  
  	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
@@ -21,5 +21,5 @@
  
  	wiphy->available_antennas_tx = phy->antenna_mask;
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch b/recipes-wifi/linux-mt76/files/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
similarity index 92%
rename from recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
rename to recipes-wifi/linux-mt76/files/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
index 026f079..9ee66c4 100644
--- a/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
@@ -1,7 +1,8 @@
-From 166c44f4a9dfde91ac01c1cd04f79a3b9c8fe23e Mon Sep 17 00:00:00 2001
+From d5eca1de0851802bc9fc9ceab56a3ad63dea3847 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Fri, 20 May 2022 19:19:25 +0800
-Subject: [PATCH 1119/1132] mt76: mt7915: add mt7986 and mt7916 pre-calibration
+Subject: [PATCH 1017/1031] wifi: mt76: mt7915: add mt7986 and mt7916
+ pre-calibration
 
 Add pre-calibration for mt7986 and mt7916. It has different data size
 with mt7915. Group cal needs 54k and 94k for 2G + 5G and 2G + 6G,
@@ -62,10 +63,10 @@
  	MT_EE_RATE_DELTA_5G =	0x29d,
  	MT_EE_TX0_POWER_2G =	0x2fc,
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e5cb9317..7da5bdfb 100644
+index 69d3fe4f..5a220a3d 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2969,7 +2969,8 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
+@@ -2980,7 +2980,8 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
  int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
  {
  	u8 idx = 0, *cal = dev->cal, *eep = dev->mt76.eeprom.data;
@@ -75,7 +76,7 @@
  
  	if (!(eep[offs] & MT_EE_WIFI_CAL_GROUP))
  		return 0;
-@@ -3007,9 +3008,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
+@@ -3018,9 +3019,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
  	return -1;
  }
  
@@ -87,7 +88,7 @@
  		5180, 5200, 5220, 5240,
  		5260, 5280, 5300, 5320,
  		5500, 5520, 5540, 5560,
-@@ -3017,34 +3018,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
+@@ -3028,34 +3029,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
  		5660, 5680, 5700, 5745,
  		5765, 5785, 5805, 5825
  	};
@@ -167,7 +168,7 @@
  }
  
  int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
-@@ -3076,24 +3112,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
+@@ -3087,24 +3123,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
  	if (!(eep[offs] & dpd_mask))
  		return 0;
  
@@ -198,5 +199,5 @@
  
  	return 0;
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch b/recipes-wifi/linux-mt76/files/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
rename to recipes-wifi/linux-mt76/files/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
index de77b3a..68efb36 100644
--- a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
@@ -1,7 +1,8 @@
-From d181881aaeb24db4a51c75ac607eaeacc252e050 Mon Sep 17 00:00:00 2001
+From e5873b14845d0ea7aab338758c3a589d5f09b8cc Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <Yi-Chia.Hsieh@mediatek.com>
 Date: Tue, 12 Jul 2022 10:04:35 -0700
-Subject: [PATCH 1120/1132] mt76: mt7915: add phy capability vendor command
+Subject: [PATCH 1018/1031] wifi: mt76: mt7915: add phy capability vendor
+ command
 
 ---
  mt7915/mt7915.h |  1 +
@@ -10,7 +11,7 @@
  3 files changed, 78 insertions(+)
 
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index bb9c374f..f6b7241d 100644
+index a33a4207..c6991939 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -11,6 +11,7 @@
@@ -140,5 +141,5 @@
 +
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch b/recipes-wifi/linux-mt76/files/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
rename to recipes-wifi/linux-mt76/files/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
index fc68b4d..d34a2ce 100644
--- a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
@@ -1,7 +1,7 @@
-From 0519381004e17ba76e11bda6d806bc5a4aedd013 Mon Sep 17 00:00:00 2001
+From 1d7627ad4e35467c396d62b300ebca46defc5baf Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Fri, 24 Jun 2022 11:15:45 +0800
-Subject: [PATCH 1121/1132] mt76: mt7915: add vendor subcmd EDCCA ctrl
+Subject: [PATCH 1019/1031] wifi: mt76: mt7915: add vendor subcmd EDCCA ctrl
  enable/threshold/compensation
 
 Change-Id: I06a3f94d5e444be894200e2b6588d76ed38d09d0
@@ -16,7 +16,7 @@
  7 files changed, 265 insertions(+), 1 deletion(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index f4a329e8..e04500f5 100644
+index adfe677c..1460aa8d 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1202,6 +1202,7 @@ enum {
@@ -28,7 +28,7 @@
  	MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
  };
 diff --git a/mt7915/main.c b/mt7915/main.c
-index d1135d9f..0d01d880 100644
+index 7440e964..904b3c6b 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -479,6 +479,9 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
@@ -42,10 +42,10 @@
  		ret = mt7915_set_channel(phy);
  		if (ret)
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 7da5bdfb..28b2a624 100644
+index 5a220a3d..528d6208 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4625,3 +4625,76 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
+@@ -4636,3 +4636,76 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
  
  	return 0;
  }
@@ -123,10 +123,10 @@
 +	return 0;
 +}
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 7d1dc500..7558726c 100644
+index 108499f6..608e5b00 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -1058,6 +1058,27 @@ enum {
+@@ -1057,6 +1057,27 @@ enum {
     MURU_DL_INIT,
     MURU_UL_INIT,
  };
@@ -155,10 +155,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index f6b7241d..582887d4 100644
+index c6991939..a82b251d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -763,7 +763,8 @@ void mt7915_vendor_amnt_fill_rx(struct mt7915_phy *phy, struct sk_buff *skb);
+@@ -765,7 +765,8 @@ void mt7915_vendor_amnt_fill_rx(struct mt7915_phy *phy, struct sk_buff *skb);
  int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
  				  struct ieee80211_sta *sta);
  #endif
@@ -377,5 +377,5 @@
  
  enum mtk_capi_control_changed {
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch b/recipes-wifi/linux-mt76/files/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
rename to recipes-wifi/linux-mt76/files/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
index c9c4ad9..385c3e5 100644
--- a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
@@ -1,7 +1,7 @@
-From 5650267fdb5d7e237e58908b5f11c9bd12170c3a Mon Sep 17 00:00:00 2001
+From 164fc7279d4b7fbae847e3c19073d8a8090a412f Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 7 Jul 2022 11:09:59 +0800
-Subject: [PATCH 1122/1132] mt76: mt7915: implement bin file mode
+Subject: [PATCH 1020/1031] wifi: mt76: mt7915: implement bin file mode
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
@@ -15,7 +15,7 @@
  6 files changed, 110 insertions(+), 6 deletions(-)
 
 diff --git a/eeprom.c b/eeprom.c
-index 263e5089..1ba84cab 100644
+index aa889258..412740f0 100644
 --- a/eeprom.c
 +++ b/eeprom.c
 @@ -104,6 +104,26 @@ out_put_node:
@@ -46,7 +46,7 @@
  mt76_eeprom_override(struct mt76_phy *phy)
  {
 diff --git a/mt76.h b/mt76.h
-index 4cbe3670..675c12a4 100644
+index d7ffe29d..68b54579 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -901,9 +901,11 @@ struct mt76_dev {
@@ -169,7 +169,7 @@
  mt7915_get_channel_group_5g(int channel, bool is_7976)
  {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 582887d4..03a27ff3 100644
+index a82b251d..eb8ce4cd 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -42,9 +42,9 @@
@@ -194,7 +194,7 @@
  	bool muru_debug;
  	bool ibf;
  
-@@ -776,6 +778,7 @@ void mt7915_dump_tmac_info(u8 *tmac_info);
+@@ -778,6 +780,7 @@ void mt7915_dump_tmac_info(u8 *tmac_info);
  int mt7915_mcu_set_txpower_level(struct mt7915_phy *phy, u8 drop_level);
  void mt7915_packet_log_to_host(struct mt7915_dev *dev, const void *data, int len, int type, int des_len);
  int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable);
@@ -203,7 +203,7 @@
  #define PKT_BIN_DEBUG_MAGIC	0xc8763123
  enum {
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index a130f564..1f347efe 100644
+index 74c3e91b..cfb80c67 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -3,6 +3,7 @@
@@ -269,5 +269,5 @@
  }
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch b/recipes-wifi/linux-mt76/files/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
similarity index 82%
rename from recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch
rename to recipes-wifi/linux-mt76/files/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
index 8c0393c..49f3a6e 100644
--- a/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
@@ -1,7 +1,7 @@
-From 76dcae6805d85864d5ebea700fcc488f80fbd75d Mon Sep 17 00:00:00 2001
+From 591f1fce08d6edd050a73ace8e551777ad740607 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 12 Jul 2022 13:56:07 +0800
-Subject: [PATCH 1123/1132] mt76: mt7915: initialize wcid
+Subject: [PATCH 1021/1031] wifi: mt76: mt7915: initialize wcid
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -22,5 +22,5 @@
  
  			idx = FIELD_GET(MT_TX_FREE_WLAN_ID, info);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
similarity index 93%
rename from recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
index bac5e25..212ae79 100644
--- a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
@@ -1,7 +1,7 @@
-From 0dbdca6f8f719929258c851bccd3dacbe78c4ad5 Mon Sep 17 00:00:00 2001
+From 19691ea09fd206de6dd3b5d30082942568a94c33 Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Thu, 11 Aug 2022 18:09:45 -0700
-Subject: [PATCH 1124/1132] mt76: mt7915: Add mu dump support
+Subject: [PATCH 1022/1031] wifi: mt76: mt7915: Add mu dump support
 
 Change-Id: I521214f3feb6f0d528a9f550255050ffd1ec96d2
 ---
@@ -71,5 +71,5 @@
  	/* keep last */
  	NUM_MTK_VENDOR_ATTRS_MU_CTRL,
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch b/recipes-wifi/linux-mt76/files/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
similarity index 93%
rename from recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
rename to recipes-wifi/linux-mt76/files/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
index 066ae83..f152529 100644
--- a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
@@ -1,8 +1,8 @@
-From 305cf303e1ab242784019ff78a2b534f7c9df707 Mon Sep 17 00:00:00 2001
+From 7b64021bdd295c6643418a4a213637e81076a140 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Fri, 28 Oct 2022 10:15:56 +0800
-Subject: [PATCH 1125/1132] mt76: mt7915: add vendor subcmd three wire (PTA)
- ctrl
+Subject: [PATCH 1023/1031] wifi: mt76: mt7915: add vendor subcmd three wire
+ (PTA) ctrl
 
 Change-Id: Ic1044698f294455594a0c6254f55326fdab90580
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -16,7 +16,7 @@
  6 files changed, 111 insertions(+), 29 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index e04500f5..1ff517f0 100644
+index 1460aa8d..5c7086d9 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1201,7 +1201,7 @@ enum {
@@ -29,10 +29,10 @@
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
  	MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 28b2a624..baf74440 100644
+index 528d6208..1479afd5 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4324,37 +4324,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
+@@ -4335,37 +4335,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
  			&req, sizeof(req), false);
  }
  
@@ -94,10 +94,10 @@
  
  void mt7915_mcu_set_bypass_smthint(struct mt7915_phy *phy, u8 val)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 7558726c..0aee6948 100644
+index 608e5b00..9f9436cd 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -847,6 +847,35 @@ struct mt7915_mcu_rdd_ipi_scan {
+@@ -846,6 +846,35 @@ struct mt7915_mcu_rdd_ipi_scan {
  	u8 tx_assert_time;						/* unit: us */
  } __packed;
  
@@ -134,10 +134,10 @@
  #define OFDMA_DL                       BIT(0)
  #define OFDMA_UL                       BIT(1)
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 03a27ff3..fbe68ef9 100644
+index eb8ce4cd..84bc906e 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -757,6 +757,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
+@@ -759,6 +759,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
  void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable);
  int mt7915_mcu_set_mu_edca(struct mt7915_phy *phy, u8 val);
  void mt7915_mcu_set_cert(struct mt7915_phy *phy, u8 type);
@@ -268,5 +268,5 @@
  	CAPI_RFEATURE_CHANGED		= BIT(16),
  	CAPI_WIRELESS_CHANGED		= BIT(17),
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch b/recipes-wifi/linux-mt76/files/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
similarity index 96%
rename from recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
rename to recipes-wifi/linux-mt76/files/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
index 72672ac..e2b2206 100644
--- a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
@@ -1,7 +1,7 @@
-From 2557e2878455ac38e0458a34d8e9fa4c0fcabe7e Mon Sep 17 00:00:00 2001
+From 20a1dbdfe4d19e29748048c864a5946d0c9108b3 Mon Sep 17 00:00:00 2001
 From: mtk27835 <shurong.wen@mediatek.com>
 Date: Wed, 7 Sep 2022 14:01:29 -0700
-Subject: [PATCH 1126/1132] mt76: mt7915: add ibf control vendor cmd
+Subject: [PATCH 1024/1031] wifi: mt76: mt7915: add ibf control vendor cmd
 
 Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
 ---
@@ -141,5 +141,5 @@
 +
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch b/recipes-wifi/linux-mt76/files/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
similarity index 89%
rename from recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
rename to recipes-wifi/linux-mt76/files/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
index 1669e0c..b980f2e 100644
--- a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
@@ -1,8 +1,8 @@
-From 8f2a166a0af3f1c6b1f77335685beb56b9d908f3 Mon Sep 17 00:00:00 2001
+From b072c7894a7a495178996224ba3c0d939faf77d2 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 13 Oct 2022 13:22:05 +0800
-Subject: [PATCH 1127/1132] mt76: mt7915: add E3 re-bonding for low yield rate
- issue
+Subject: [PATCH 1025/1031] wifi: mt76: mt7915: add E3 re-bonding for low yield
+ rate issue
 
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
@@ -64,10 +64,10 @@
  	if (ret)
  		return ret;
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index baf74440..9d934748 100644
+index 1479afd5..eced0325 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2888,7 +2888,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
+@@ -2899,7 +2899,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
  				 &req, sizeof(req), true);
  }
  
@@ -76,7 +76,7 @@
  {
  	struct mt7915_mcu_eeprom_info req = {
  		.addr = cpu_to_le32(round_down(offset,
-@@ -2906,8 +2906,15 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
+@@ -2917,8 +2917,15 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
  		return ret;
  
  	res = (struct mt7915_mcu_eeprom_info *)skb->data;
@@ -95,7 +95,7 @@
  
  	return 0;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index fbe68ef9..332f63b5 100644
+index 84bc906e..5999134d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -558,6 +558,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
@@ -106,7 +106,7 @@
  int mt7915_eeprom_init(struct mt7915_dev *dev);
  void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
  				struct mt7915_phy *phy);
-@@ -612,7 +613,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -614,7 +615,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
  				   struct ieee80211_sta *sta,
  				   void *data, u32 field);
  int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode);
@@ -116,5 +116,5 @@
  int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
  		       bool hdr_trans);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch b/recipes-wifi/linux-mt76/files/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
similarity index 88%
rename from recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
rename to recipes-wifi/linux-mt76/files/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
index 998228b..131dadf 100644
--- a/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
@@ -1,7 +1,8 @@
-From 19ed70a278de504a58054906f9b25b4f5c3cf3d0 Mon Sep 17 00:00:00 2001
+From 6aed176146e98144952b72a5f62fc299dbc968ad 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 1128/1132] mt76: mt7915: support on off SW ACI through debugfs
+Subject: [PATCH 1026/1031] wifi: mt76: mt7915: support on off SW ACI through
+ debugfs
 
 Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Change-Id: I8a9c277c41d1ba76f9737d8af6f42e5e8f00ba64
@@ -11,7 +12,7 @@
  2 files changed, 22 insertions(+)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 1ff517f0..1a13cee0 100644
+index 5c7086d9..b3ac14d1 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1203,6 +1203,7 @@ enum {
@@ -23,7 +24,7 @@
  	MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
  };
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 1f347efe..224d9960 100644
+index cfb80c67..6f74caff 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -3040,6 +3040,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
@@ -62,5 +63,5 @@
  }
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch b/recipes-wifi/linux-mt76/files/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
similarity index 91%
rename from recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
rename to recipes-wifi/linux-mt76/files/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
index 213e390..7266a69 100644
--- a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
@@ -1,7 +1,8 @@
-From 82351f298ec49641998232fb648606996b3c5a37 Mon Sep 17 00:00:00 2001
+From a238368ceaa2abad2229a180173f54bdb2976d5f Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Mon, 5 Dec 2022 18:21:51 +0800
-Subject: [PATCH 1129/1132] mt76: mt7915: add bf backoff limit table support
+Subject: [PATCH 1027/1031] wifi: mt76: mt7915: add bf backoff limit table
+ support
 
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
 ---
@@ -14,10 +15,10 @@
  6 files changed, 203 insertions(+), 37 deletions(-)
 
 diff --git a/eeprom.c b/eeprom.c
-index 1ba84cab..6e6d84e3 100644
+index 412740f0..b2df0f44 100644
 --- a/eeprom.c
 +++ b/eeprom.c
-@@ -311,7 +311,8 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
+@@ -317,7 +317,8 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
  	if (!mcs_rates)
  		mcs_rates = 10;
  
@@ -27,7 +28,7 @@
  
  	if (!IS_ENABLED(CONFIG_OF))
  		return target_power;
-@@ -364,6 +365,28 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
+@@ -370,6 +371,28 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
  				     ARRAY_SIZE(dest->ru), val, len,
  				     target_power, txs_delta, &max_power);
  
@@ -57,7 +58,7 @@
  }
  EXPORT_SYMBOL_GPL(mt76_get_rate_power_limits);
 diff --git a/mt76.h b/mt76.h
-index 675c12a4..dbb120cc 100644
+index 68b54579..99a853a9 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -913,6 +913,14 @@ struct mt76_power_limits {
@@ -76,10 +77,10 @@
  
  struct mt76_ethtool_worker_info {
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index f1f3f2f3..3ef2148b 100644
+index eb149104..129a15c0 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
-@@ -1024,7 +1024,7 @@ mt7915_rate_txpower_get(struct file *file, char __user *user_buf,
+@@ -1027,7 +1027,7 @@ mt7915_rate_txpower_get(struct file *file, char __user *user_buf,
  	if (!buf)
  		return -ENOMEM;
  
@@ -88,7 +89,7 @@
  	if (ret)
  		goto out;
  
-@@ -1134,7 +1134,7 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf,
+@@ -1137,7 +1137,7 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf,
  
  	mutex_lock(&dev->mt76.mutex);
  	ret = mt7915_mcu_get_txpower_sku(phy, req.txpower_sku,
@@ -97,7 +98,7 @@
  	if (ret)
  		goto out;
  
-@@ -1176,7 +1176,7 @@ out:
+@@ -1179,7 +1179,7 @@ out:
  	return ret ? ret : count;
  }
  
@@ -106,7 +107,7 @@
  	.write = mt7915_rate_txpower_set,
  	.read = mt7915_rate_txpower_get,
  	.open = simple_open,
-@@ -1184,6 +1184,69 @@ static const struct file_operations mt7915_rate_txpower_fops = {
+@@ -1187,6 +1187,69 @@ static const struct file_operations mt7915_rate_txpower_fops = {
  	.llseek = default_llseek,
  };
  
@@ -176,7 +177,7 @@
  static int
  mt7915_twt_stats(struct seq_file *s, void *data)
  {
-@@ -1270,7 +1333,9 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1273,7 +1336,9 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
  	debugfs_create_file("implicit_txbf", 0600, dir, dev,
  			    &fops_implicit_txbf);
  	debugfs_create_file("txpower_sku", 0400, dir, phy,
@@ -188,10 +189,10 @@
  				    mt7915_twt_stats);
  	debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9d934748..5e74ed6e 100644
+index eced0325..28e29011 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3333,7 +3333,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3344,7 +3344,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
  	int ret;
  	s8 txpower_sku[MT7915_SKU_RATE_NUM];
  
@@ -201,7 +202,7 @@
  	if (ret)
  		return ret;
  
-@@ -3375,51 +3376,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3386,51 +3387,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
  
  int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy)
  {
@@ -325,7 +326,7 @@
  	struct mt7915_dev *dev = phy->dev;
  	struct {
  		u8 format_id;
-@@ -3428,10 +3476,9 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3439,10 +3487,9 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
  		u8 _rsv;
  	} __packed req = {
  		.format_id = TX_POWER_LIMIT_INFO,
@@ -337,7 +338,7 @@
  	struct sk_buff *skb;
  	int ret, i;
  
-@@ -3441,9 +3488,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3452,9 +3499,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
  	if (ret)
  		return ret;
  
@@ -356,7 +357,7 @@
  
  	dev_kfree_skb(skb);
  
-@@ -3485,9 +3538,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
+@@ -3496,9 +3549,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
  		.band_idx = phy->mt76->band_idx,
  		.sku_enable = enable,
  	};
@@ -376,7 +377,7 @@
  				 MCU_EXT_CMD(TX_POWER_FEATURE_CTRL), &req,
  				 sizeof(req), true);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 0aee6948..a07bb9ac 100644
+index 9f9436cd..10284065 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -447,12 +447,18 @@ enum {
@@ -399,7 +400,7 @@
  	SPR_ENABLE = 0x1,
  	SPR_ENABLE_SD = 0x3,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 332f63b5..20b0496f 100644
+index 5999134d..4a5208e2 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -65,6 +65,7 @@
@@ -410,7 +411,7 @@
  
  #define MT7915_MAX_TWT_AGRT		16
  #define MT7915_MAX_STA_TWT_AGRT		8
-@@ -622,7 +623,8 @@ int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
+@@ -624,7 +625,8 @@ int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
  int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band);
  int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable);
  int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy);
@@ -421,5 +422,5 @@
  int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
  				 struct ieee80211_vif *vif,
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch b/recipes-wifi/linux-mt76/files/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
similarity index 94%
rename from recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
rename to recipes-wifi/linux-mt76/files/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
index be8c506..b1318a5 100644
--- a/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
@@ -1,7 +1,7 @@
-From dc16e6198fe467ca6db8701ba98f5dbdfecc1211 Mon Sep 17 00:00:00 2001
+From 77a3962b35278cb07dd1069b6ddf4a44fdc3f3dc Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Wed, 14 Dec 2022 00:44:07 -0800
-Subject: [PATCH 1130/1132] mt76: mt7915: amsdu set and get control
+Subject: [PATCH 1028/1031] wifi: mt76: mt7915: amsdu set and get control
 
 ---
  mt7915/mac.c    | 10 ++++++++++
@@ -32,10 +32,10 @@
  void mt7915_capi_sta_rc_work(void *data, struct ieee80211_sta *sta)
  {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 20b0496f..c14d13ae 100644
+index 4a5208e2..36593a2e 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -748,6 +748,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -750,6 +750,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
  #ifdef CONFIG_MTK_VENDOR
@@ -139,5 +139,5 @@
  	MTK_VENDOR_ATTR_MU_CTRL_UNSPEC,
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch b/recipes-wifi/linux-mt76/files/patches/1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
similarity index 70%
rename from recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
rename to recipes-wifi/linux-mt76/files/patches/1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
index 6da2c9f..15a5e69 100644
--- a/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
@@ -1,7 +1,7 @@
-From 60271e19265ab37376b428decece440458156aa2 Mon Sep 17 00:00:00 2001
+From a16941cad469c407b78367128cd0c27f9edbdf4e Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Thu, 12 Jan 2023 15:15:42 +0800
-Subject: [PATCH 1131/1132] wifi: mt76: mt7915: add support for he ldpc control
+Subject: [PATCH 1029/1031] wifi: mt76: mt7915: add support for he ldpc control
  from hostapd
 
 ---
@@ -9,10 +9,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5e74ed6e..dffd1761 100644
+index 28e29011..e6bb9d17 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -1983,6 +1983,7 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -1984,6 +1984,7 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
  		he = (void *)(ie + 3);
  
  		vc->he_ldpc =
@@ -21,5 +21,5 @@
  		vc->he_su_ebfer =
  			HE_PHY(CAP3_SU_BEAMFORMER, he->phy_cap_info[3]) &&
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
similarity index 87%
rename from recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
rename to recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
index dea4ae5..d797807 100644
--- a/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
@@ -1,8 +1,8 @@
-From 81f9124f106441a6ac2f9c43efb9de9f5cc60cb4 Mon Sep 17 00:00:00 2001
+From d2fc39b64b0e0c22bcd8665e0d4ea4bea298024f Mon Sep 17 00:00:00 2001
 From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
 Date: Tue, 24 Jan 2023 14:32:08 +0800
-Subject: [PATCH 1132/1132] mt76: mt7915: Add vendor command attribute for RTS
- BW signaling.
+Subject: [PATCH 1030/1031] wifi: mt76: mt7915: Add vendor command attribute
+ for RTS BW signaling.
 
 Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
 ---
@@ -13,10 +13,10 @@
  4 files changed, 20 insertions(+)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index dffd1761..e07197d0 100644
+index e6bb9d17..911c2642 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4410,6 +4410,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
+@@ -4421,6 +4421,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
  		req.cert.length = cpu_to_le16(tlv_len);
  		req.cert.cert_program = type;
  		break;
@@ -30,10 +30,10 @@
  		tlv_len = sizeof(struct three_wire_cfg);
  		req.three_wire.tag = cpu_to_le16(cfg_info);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index a07bb9ac..8cbd37ca 100644
+index 10284065..db7a239c 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -867,6 +867,13 @@ struct three_wire_cfg {
+@@ -866,6 +866,13 @@ struct three_wire_cfg {
  	u8 rsv[3];
  } __packed;
  
@@ -47,7 +47,7 @@
  struct cfg_basic_info {
  	u8 dbdc_idx;
  	u8 rsv[3];
-@@ -874,11 +881,13 @@ struct cfg_basic_info {
+@@ -873,11 +880,13 @@ struct cfg_basic_info {
  	union {
  		struct cert_cfg cert;
  		struct three_wire_cfg three_wire;
@@ -96,5 +96,5 @@
  	MTK_VENDOR_ATTR_WIRELESS_CTRL_MU_EDCA, /* reserve */
  	/* keep last */
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch b/recipes-wifi/linux-mt76/files/patches/1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
similarity index 84%
rename from recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
rename to recipes-wifi/linux-mt76/files/patches/1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
index 9718b76..750042c 100644
--- a/recipes-wifi/linux-mt76/files/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
@@ -1,7 +1,8 @@
-From 1ecc90eee785504c9671985cabd6631ff1640f64 Mon Sep 17 00:00:00 2001
+From e46917c20feeb88fe69f51198cd6810a06e9b1b9 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
 Date: Thu, 26 Jan 2023 08:50:47 +0800
-Subject: [PATCH] mt76: mt7915: add vendor cmd to get available color bitmap
+Subject: [PATCH 1031/1031] wifi: mt76: mt7915: add vendor cmd to get available
+ color bitmap
 
 Add a vendor cmd to notify user space available color bitmap.
 The OBSS BSS color bitmap is maintained in mac80211, so mt76 will make use of that.
@@ -13,10 +14,10 @@
  2 files changed, 48 insertions(+)
 
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index a1f526c..5cbe856 100644
+index 3b7ac098..b021bd5d 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
-@@ -97,6 +97,11 @@ ibf_ctrl_policy[NUM_MTK_VENDOR_ATTRS_IBF_CTRL] = {
+@@ -98,6 +98,11 @@ ibf_ctrl_policy[NUM_MTK_VENDOR_ATTRS_IBF_CTRL] = {
  	[MTK_VENDOR_ATTR_IBF_CTRL_ENABLE] = { .type = NLA_U8 },
  };
  
@@ -28,7 +29,7 @@
  struct csi_null_tone {
  	u8 start;
  	u8 end;
-@@ -1272,6 +1277,27 @@ mt7915_vendor_ibf_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+@@ -1275,6 +1280,27 @@ mt7915_vendor_ibf_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
  	return 1;
  }
  
@@ -56,7 +57,7 @@
  
  static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  	{
-@@ -1378,6 +1404,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1381,6 +1407,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  		.dumpit = mt7915_vendor_ibf_ctrl_dump,
  		.policy = ibf_ctrl_policy,
  		.maxattr = MTK_VENDOR_ATTR_IBF_CTRL_MAX,
@@ -75,7 +76,7 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index cbff910..dda1447 100644
+index 6001ce4a..358a16f2 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -14,6 +14,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -86,7 +87,7 @@
  };
  
  
-@@ -257,4 +258,14 @@ enum mtk_vendor_attr_ibf_dump {
+@@ -258,4 +259,14 @@ enum mtk_vendor_attr_ibf_dump {
  		NUM_MTK_VENDOR_ATTRS_IBF_DUMP - 1
  };
  
diff --git a/recipes-wifi/linux-mt76/files/patches/110-wifi-mt76-ignore-key-disable-commands.patch b/recipes-wifi/linux-mt76/files/patches/110-wifi-mt76-ignore-key-disable-commands.patch
new file mode 100644
index 0000000..78b70d7
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/110-wifi-mt76-ignore-key-disable-commands.patch
@@ -0,0 +1,326 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Wed, 22 Mar 2023 10:17:49 +0100
+Subject: [PATCH] wifi: mt76: ignore key disable commands
+
+This helps avoid cleartext leakage of already queued or powersave buffered
+packets, when a reassoc triggers the key deletion.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/mt7603/main.c
++++ b/mt7603/main.c
+@@ -512,15 +512,15 @@ mt7603_set_key(struct ieee80211_hw *hw,
+ 	    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
+ 		return -EOPNOTSUPP;
+ 
+-	if (cmd == SET_KEY) {
+-		key->hw_key_idx = wcid->idx;
+-		wcid->hw_key_idx = idx;
+-	} else {
++	if (cmd != SET_KEY) {
+ 		if (idx == wcid->hw_key_idx)
+ 			wcid->hw_key_idx = -1;
+ 
+-		key = NULL;
++		return 0;
+ 	}
++
++	key->hw_key_idx = wcid->idx;
++	wcid->hw_key_idx = idx;
+ 	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 
+ 	return mt7603_wtbl_set_key(dev, wcid->idx, key);
+--- a/mt7615/mac.c
++++ b/mt7615/mac.c
+@@ -1193,8 +1193,7 @@ EXPORT_SYMBOL_GPL(mt7615_mac_enable_rtsc
+ static int
+ mt7615_mac_wtbl_update_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
+ 			   struct ieee80211_key_conf *key,
+-			   enum mt76_cipher_type cipher, u16 cipher_mask,
+-			   enum set_key_cmd cmd)
++			   enum mt76_cipher_type cipher, u16 cipher_mask)
+ {
+ 	u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx) + 30 * 4;
+ 	u8 data[32] = {};
+@@ -1203,27 +1202,18 @@ mt7615_mac_wtbl_update_key(struct mt7615
+ 		return -EINVAL;
+ 
+ 	mt76_rr_copy(dev, addr, data, sizeof(data));
+-	if (cmd == SET_KEY) {
+-		if (cipher == MT_CIPHER_TKIP) {
+-			/* Rx/Tx MIC keys are swapped */
+-			memcpy(data, key->key, 16);
+-			memcpy(data + 16, key->key + 24, 8);
+-			memcpy(data + 24, key->key + 16, 8);
+-		} else {
+-			if (cipher_mask == BIT(cipher))
+-				memcpy(data, key->key, key->keylen);
+-			else if (cipher != MT_CIPHER_BIP_CMAC_128)
+-				memcpy(data, key->key, 16);
+-			if (cipher == MT_CIPHER_BIP_CMAC_128)
+-				memcpy(data + 16, key->key, 16);
+-		}
++	if (cipher == MT_CIPHER_TKIP) {
++		/* Rx/Tx MIC keys are swapped */
++		memcpy(data, key->key, 16);
++		memcpy(data + 16, key->key + 24, 8);
++		memcpy(data + 24, key->key + 16, 8);
+ 	} else {
++		if (cipher_mask == BIT(cipher))
++			memcpy(data, key->key, key->keylen);
++		else if (cipher != MT_CIPHER_BIP_CMAC_128)
++			memcpy(data, key->key, 16);
+ 		if (cipher == MT_CIPHER_BIP_CMAC_128)
+-			memset(data + 16, 0, 16);
+-		else if (cipher_mask)
+-			memset(data, 0, 16);
+-		if (!cipher_mask)
+-			memset(data, 0, sizeof(data));
++			memcpy(data + 16, key->key, 16);
+ 	}
+ 
+ 	mt76_wr_copy(dev, addr, data, sizeof(data));
+@@ -1234,7 +1224,7 @@ mt7615_mac_wtbl_update_key(struct mt7615
+ static int
+ mt7615_mac_wtbl_update_pk(struct mt7615_dev *dev, struct mt76_wcid *wcid,
+ 			  enum mt76_cipher_type cipher, u16 cipher_mask,
+-			  int keyidx, enum set_key_cmd cmd)
++			  int keyidx)
+ {
+ 	u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx), w0, w1;
+ 
+@@ -1253,9 +1243,7 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
+ 	else
+ 		w0 &= ~MT_WTBL_W0_RX_IK_VALID;
+ 
+-	if (cmd == SET_KEY &&
+-	    (cipher != MT_CIPHER_BIP_CMAC_128 ||
+-	     cipher_mask == BIT(cipher))) {
++	if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) {
+ 		w0 &= ~MT_WTBL_W0_KEY_IDX;
+ 		w0 |= FIELD_PREP(MT_WTBL_W0_KEY_IDX, keyidx);
+ 	}
+@@ -1272,19 +1260,10 @@ mt7615_mac_wtbl_update_pk(struct mt7615_
+ 
+ static void
+ mt7615_mac_wtbl_update_cipher(struct mt7615_dev *dev, struct mt76_wcid *wcid,
+-			      enum mt76_cipher_type cipher, u16 cipher_mask,
+-			      enum set_key_cmd cmd)
++			      enum mt76_cipher_type cipher, u16 cipher_mask)
+ {
+ 	u32 addr = mt7615_mac_wtbl_addr(dev, wcid->idx);
+ 
+-	if (!cipher_mask) {
+-		mt76_clear(dev, addr + 2 * 4, MT_WTBL_W2_KEY_TYPE);
+-		return;
+-	}
+-
+-	if (cmd != SET_KEY)
+-		return;
+-
+ 	if (cipher == MT_CIPHER_BIP_CMAC_128 &&
+ 	    cipher_mask & ~BIT(MT_CIPHER_BIP_CMAC_128))
+ 		return;
+@@ -1295,8 +1274,7 @@ mt7615_mac_wtbl_update_cipher(struct mt7
+ 
+ int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
+ 			      struct mt76_wcid *wcid,
+-			      struct ieee80211_key_conf *key,
+-			      enum set_key_cmd cmd)
++			      struct ieee80211_key_conf *key)
+ {
+ 	enum mt76_cipher_type cipher;
+ 	u16 cipher_mask = wcid->cipher;
+@@ -1306,19 +1284,14 @@ int __mt7615_mac_wtbl_set_key(struct mt7
+ 	if (cipher == MT_CIPHER_NONE)
+ 		return -EOPNOTSUPP;
+ 
+-	if (cmd == SET_KEY)
+-		cipher_mask |= BIT(cipher);
+-	else
+-		cipher_mask &= ~BIT(cipher);
+-
+-	mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask, cmd);
+-	err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask,
+-					 cmd);
++	cipher_mask |= BIT(cipher);
++	mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, cipher_mask);
++	err = mt7615_mac_wtbl_update_key(dev, wcid, key, cipher, cipher_mask);
+ 	if (err < 0)
+ 		return err;
+ 
+ 	err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, cipher_mask,
+-					key->keyidx, cmd);
++					key->keyidx);
+ 	if (err < 0)
+ 		return err;
+ 
+@@ -1329,13 +1302,12 @@ int __mt7615_mac_wtbl_set_key(struct mt7
+ 
+ int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
+ 			    struct mt76_wcid *wcid,
+-			    struct ieee80211_key_conf *key,
+-			    enum set_key_cmd cmd)
++			    struct ieee80211_key_conf *key)
+ {
+ 	int err;
+ 
+ 	spin_lock_bh(&dev->mt76.lock);
+-	err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
++	err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
+ 	spin_unlock_bh(&dev->mt76.lock);
+ 
+ 	return err;
+--- a/mt7615/main.c
++++ b/mt7615/main.c
+@@ -391,18 +391,17 @@ static int mt7615_set_key(struct ieee802
+ 
+ 	if (cmd == SET_KEY)
+ 		*wcid_keyidx = idx;
+-	else if (idx == *wcid_keyidx)
+-		*wcid_keyidx = -1;
+-	else
++	else {
++		if (idx == *wcid_keyidx)
++			*wcid_keyidx = -1;
+ 		goto out;
++	}
+ 
+-	mt76_wcid_key_setup(&dev->mt76, wcid,
+-			    cmd == SET_KEY ? key : NULL);
+-
++	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 	if (mt76_is_mmio(&dev->mt76))
+-		err = mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
++		err = mt7615_mac_wtbl_set_key(dev, wcid, key);
+ 	else
+-		err = __mt7615_mac_wtbl_set_key(dev, wcid, key, cmd);
++		err = __mt7615_mac_wtbl_set_key(dev, wcid, key);
+ 
+ out:
+ 	mt7615_mutex_release(dev);
+--- a/mt7615/mt7615.h
++++ b/mt7615/mt7615.h
+@@ -491,11 +491,9 @@ int mt7615_mac_write_txwi(struct mt7615_
+ void mt7615_mac_set_timing(struct mt7615_phy *phy);
+ int __mt7615_mac_wtbl_set_key(struct mt7615_dev *dev,
+ 			      struct mt76_wcid *wcid,
+-			      struct ieee80211_key_conf *key,
+-			      enum set_key_cmd cmd);
++			      struct ieee80211_key_conf *key);
+ int mt7615_mac_wtbl_set_key(struct mt7615_dev *dev, struct mt76_wcid *wcid,
+-			    struct ieee80211_key_conf *key,
+-			    enum set_key_cmd cmd);
++			    struct ieee80211_key_conf *key);
+ void mt7615_mac_reset_work(struct work_struct *work);
+ u32 mt7615_mac_get_sta_tid_sn(struct mt7615_dev *dev, int wcid, u8 tid);
+ 
+--- a/mt76x02_util.c
++++ b/mt76x02_util.c
+@@ -454,20 +454,20 @@ int mt76x02_set_key(struct ieee80211_hw
+ 	msta = sta ? (struct mt76x02_sta *)sta->drv_priv : NULL;
+ 	wcid = msta ? &msta->wcid : &mvif->group_wcid;
+ 
+-	if (cmd == SET_KEY) {
+-		key->hw_key_idx = wcid->idx;
+-		wcid->hw_key_idx = idx;
+-		if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
+-			key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
+-			wcid->sw_iv = true;
+-		}
+-	} else {
++	if (cmd != SET_KEY) {
+ 		if (idx == wcid->hw_key_idx) {
+ 			wcid->hw_key_idx = -1;
+ 			wcid->sw_iv = false;
+ 		}
+ 
+-		key = NULL;
++		return 0;
++	}
++
++	key->hw_key_idx = wcid->idx;
++	wcid->hw_key_idx = idx;
++	if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
++		key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
++		wcid->sw_iv = true;
+ 	}
+ 	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -410,16 +410,15 @@ static int mt7915_set_key(struct ieee802
+ 		mt7915_mcu_add_bss_info(phy, vif, true);
+ 	}
+ 
+-	if (cmd == SET_KEY)
++	if (cmd == SET_KEY) {
+ 		*wcid_keyidx = idx;
+-	else if (idx == *wcid_keyidx)
+-		*wcid_keyidx = -1;
+-	else
++	} else {
++		if (idx == *wcid_keyidx)
++			*wcid_keyidx = -1;
+ 		goto out;
++	}
+ 
+-	mt76_wcid_key_setup(&dev->mt76, wcid,
+-			    cmd == SET_KEY ? key : NULL);
+-
++	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 	err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
+ 				      key, MCU_EXT_CMD(STA_REC_UPDATE),
+ 				      &msta->wcid, cmd);
+--- a/mt7921/main.c
++++ b/mt7921/main.c
+@@ -569,16 +569,15 @@ static int mt7921_set_key(struct ieee802
+ 
+ 	mt7921_mutex_acquire(dev);
+ 
+-	if (cmd == SET_KEY)
++	if (cmd == SET_KEY) {
+ 		*wcid_keyidx = idx;
+-	else if (idx == *wcid_keyidx)
+-		*wcid_keyidx = -1;
+-	else
++	} else {
++		if (idx == *wcid_keyidx)
++			*wcid_keyidx = -1;
+ 		goto out;
++	}
+ 
+-	mt76_wcid_key_setup(&dev->mt76, wcid,
+-			    cmd == SET_KEY ? key : NULL);
+-
++	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 	err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
+ 				      key, MCU_UNI_CMD(STA_REC_UPDATE),
+ 				      &msta->wcid, cmd);
+--- a/mt7996/main.c
++++ b/mt7996/main.c
+@@ -351,16 +351,15 @@ static int mt7996_set_key(struct ieee802
+ 		mt7996_mcu_add_bss_info(phy, vif, true);
+ 	}
+ 
+-	if (cmd == SET_KEY)
++	if (cmd == SET_KEY) {
+ 		*wcid_keyidx = idx;
+-	else if (idx == *wcid_keyidx)
+-		*wcid_keyidx = -1;
+-	else
++	} else {
++		if (idx == *wcid_keyidx)
++			*wcid_keyidx = -1;
+ 		goto out;
++	}
+ 
+-	mt76_wcid_key_setup(&dev->mt76, wcid,
+-			    cmd == SET_KEY ? key : NULL);
+-
++	mt76_wcid_key_setup(&dev->mt76, wcid, key);
+ 	err = mt7996_mcu_add_key(&dev->mt76, vif, &msta->bip,
+ 				 key, MCU_WMWA_UNI_CMD(STA_REC_UPDATE),
+ 				 &msta->wcid, cmd);
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/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
similarity index 88%
rename from recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
rename to recipes-wifi/linux-mt76/files/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
index 27f30fe..a8f2c16 100644
--- a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
@@ -1,7 +1,7 @@
-From 8d299b6aeba33d46ff1abd15a3f37cc0dd649487 Mon Sep 17 00:00:00 2001
+From d2052bff04466c395c70cd230db235d6a5eca433 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] mt76: mt7915: wed: add wed tx support
+Subject: [PATCH 3000/3012] wifi: mt76: mt7915: wed: add wed tx support
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -13,10 +13,10 @@
  5 files changed, 14 insertions(+), 9 deletions(-)
 
 diff --git a/mt76_connac.h b/mt76_connac.h
-index b339c50b..323203df 100644
+index 2ee9a3c8..5a0a3ce1 100644
 --- a/mt76_connac.h
 +++ b/mt76_connac.h
-@@ -117,6 +117,7 @@ struct mt76_connac_sta_key_conf {
+@@ -116,6 +116,7 @@ struct mt76_connac_sta_key_conf {
  };
  
  #define MT_TXP_MAX_BUF_NUM		6
@@ -66,10 +66,10 @@
  
  static void
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 0d01d880..020a6d2d 100644
+index 904b3c6b..feac6add 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1537,14 +1537,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1533,14 +1533,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
  	if (!mtk_wed_device_active(wed))
  		return -ENODEV;
  
@@ -87,7 +87,7 @@
  
  	ctx->dev = NULL;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 568b5feb..890af388 100644
+index fa99df1e..0e79faf2 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -13,7 +13,7 @@
@@ -108,7 +108,7 @@
  	spin_unlock_bh(&dev->mt76.token_lock);
  
  	/* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than
-@@ -825,6 +825,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -838,6 +838,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  
  	*irq = wed->irq;
  	dev->mt76.dma_dev = wed->dev;
@@ -117,7 +117,7 @@
  	ret = dma_set_mask(wed->dev, DMA_BIT_MASK(32));
  	if (ret)
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index c14d13ae..fd31ee9f 100644
+index 36593a2e..244d2480 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -55,7 +55,7 @@
@@ -130,5 +130,5 @@
  
  #define MT7915_CFEND_RATE_DEFAULT	0x49	/* OFDM 24M */
 -- 
-2.18.0
+2.39.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/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
similarity index 89%
rename from recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
rename to recipes-wifi/linux-mt76/files/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
index 46a68b5..be7e2cd 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/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
@@ -1,8 +1,8 @@
-From e7caf441138764cd701c00bf8c3bd6b7747ed323 Mon Sep 17 00:00:00 2001
+From d25cc90d0eb7e956f87b023e968241c850add309 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
- enabled
+Subject: [PATCH 3001/3012] wifi: mt76: mt7915: wed: add wds support when wed
+ is enabled
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -15,7 +15,7 @@
  6 files changed, 82 insertions(+), 10 deletions(-)
 
 diff --git a/mt76.h b/mt76.h
-index dbb120cc..d8438953 100644
+index 99a853a9..1af5edfe 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -60,6 +60,12 @@ enum mt76_wed_type {
@@ -32,10 +32,10 @@
  	u32 (*rr)(struct mt76_dev *dev, u32 offset);
  	void (*wr)(struct mt76_dev *dev, u32 offset, u32 val);
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 020a6d2d..b9c17b9b 100644
+index feac6add..922957f6 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -696,8 +696,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -698,8 +698,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  #endif
  	int ret, idx;
  	u32 addr;
@@ -52,7 +52,7 @@
  	if (idx < 0)
  		return -ENOSPC;
  
-@@ -1167,6 +1174,13 @@ static void mt7915_sta_set_4addr(struct ieee80211_hw *hw,
+@@ -1169,6 +1176,13 @@ static void mt7915_sta_set_4addr(struct ieee80211_hw *hw,
  	else
  		clear_bit(MT_WCID_FLAG_4ADDR, &msta->wcid.flags);
  
@@ -66,7 +66,7 @@
  	mt76_connac_mcu_wtbl_update_hdr_trans(&dev->mt76, vif, sta);
  }
  
-@@ -1544,8 +1558,12 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1540,8 +1554,12 @@ 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;
@@ -81,10 +81,10 @@
  	ctx->dev = NULL;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e07197d0..6b90f338 100644
+index 911c2642..0340c3ff 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2416,10 +2416,18 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
+@@ -2427,10 +2427,18 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
  	if (ret)
  		return ret;
  
@@ -108,7 +108,7 @@
  	ret = mt7915_mcu_set_mwds(dev, 1);
  	if (ret)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 8cbd37ca..0f845075 100644
+index db7a239c..d455ecfd 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -284,6 +284,7 @@ enum {
@@ -206,5 +206,5 @@
  static inline void
  mt76_wcid_mask_set(u32 *mask, int idx)
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch b/recipes-wifi/linux-mt76/files/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
similarity index 75%
rename from recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
rename to recipes-wifi/linux-mt76/files/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
index 5d3affc..582bbed 100644
--- a/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
@@ -1,8 +1,8 @@
-From 3cdc91efeb0dcb344b79c832373a62c09c4ceee9 Mon Sep 17 00:00:00 2001
+From 1f2dde1362491043417d50ade6825e1918bc7f4e 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 3003/3013] mt76: mt7915: wed: add fill receive path to report
- wed idx
+Subject: [PATCH 3002/3012] wifi: mt76: mt7915: wed: add fill receive path to
+ report wed idx
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -10,10 +10,10 @@
  1 file changed, 19 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index b9c17b9b..7d25a93f 100644
+index 922957f6..b68992de 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1569,6 +1569,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1565,6 +1565,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
  
  	return 0;
  }
@@ -38,7 +38,7 @@
  #endif
  
  const struct ieee80211_ops mt7915_ops = {
-@@ -1621,5 +1639,6 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1617,5 +1635,6 @@ const struct ieee80211_ops mt7915_ops = {
  	.set_radar_background = mt7915_set_radar_background,
  #ifdef CONFIG_NET_MEDIATEK_SOC_WED
  	.net_fill_forward_path = mt7915_net_fill_forward_path,
@@ -46,5 +46,5 @@
  #endif
  };
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch b/recipes-wifi/linux-mt76/files/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
similarity index 87%
rename from recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
rename to recipes-wifi/linux-mt76/files/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
index a958a8f..e256ddb 100644
--- a/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
@@ -1,7 +1,7 @@
-From b454d9a320895e76b3211a3c176dbf3ab24c1a8a Mon Sep 17 00:00:00 2001
+From 1487e48ac5cd6fe469db05c8ee621c2c490ec34d 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 3004/3013] mt76: mt7915: wed: find rx token by physical
+Subject: [PATCH 3003/3012] wifi: 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
@@ -13,7 +13,7 @@
  1 file changed, 24 insertions(+), 1 deletion(-)
 
 diff --git a/dma.c b/dma.c
-index fe65e0f3..14553b24 100644
+index f6d540b9..c776882e 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -403,9 +403,32 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
@@ -51,5 +51,5 @@
  			return NULL;
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch b/recipes-wifi/linux-mt76/files/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
rename to recipes-wifi/linux-mt76/files/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
index c163906..fb36f94 100644
--- a/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
@@ -1,7 +1,7 @@
-From c040b9a6ac177c22283388bff0b7a8c72271b45c Mon Sep 17 00:00:00 2001
+From 3ad394a6fd091a21355a5d629ec4c99df49d5742 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 3005/3013] mt76: mt7915: wed: HW ATF support for mt7986
+Subject: [PATCH 3004/3012] wifi: mt76: mt7915: wed: HW ATF support for mt7986
 
 Signed-off-by: Lian Chen <lian.chen@mediatek.com>
 ---
@@ -15,7 +15,7 @@
  7 files changed, 826 insertions(+), 1 deletion(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 1a13cee0..ad6f845b 100644
+index b3ac14d1..8e559efb 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1161,6 +1161,7 @@ enum {
@@ -35,7 +35,7 @@
  	MCU_EXT_CMD_EFUSE_FREE_BLOCK = 0x4f,
  	MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 3ef2148b..b178036c 100644
+index 129a15c0..079629a3 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -12,6 +12,10 @@
@@ -456,7 +456,7 @@
  static int
  mt7915_radar_trigger(void *data, u64 val)
  {
-@@ -1339,6 +1743,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1342,6 +1746,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
  	debugfs_create_devm_seqfile(dev->mt76.dev, "twt_stats", dir,
  				    mt7915_twt_stats);
  	debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
@@ -526,7 +526,7 @@
  
  int mt7915_txbf_init(struct mt7915_dev *dev)
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 7d25a93f..c549a183 100644
+index b68992de..8428087e 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -209,6 +209,7 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
@@ -547,7 +547,7 @@
  	return ret;
  }
  
-@@ -691,6 +695,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -693,6 +697,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
  	bool ext_phy = mvif->phy != &dev->phy;
@@ -555,7 +555,7 @@
  #ifdef CONFIG_MTK_VENDOR
  	struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
  #endif
-@@ -740,6 +745,16 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -742,6 +747,16 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	if (phy->muru_onoff & MUMIMO_DL_CERT)
  		mt7915_mcu_set_mimo(phy, 0);
  #endif
@@ -573,10 +573,10 @@
  }
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 6b90f338..da10895c 100644
+index 0340c3ff..6ac24cfc 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3581,6 +3581,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3592,6 +3592,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
  				 &req, sizeof(req), false);
  }
  
@@ -749,7 +749,7 @@
  {
  #define MT_BF_PROCESSING	4
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index c14d13ae..0fbc1047 100644
+index 244d2480..1dfecdb0 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -127,6 +127,58 @@ struct mt7915_twt_flow {
@@ -844,7 +844,7 @@
  static inline struct mt7915_phy *
  mt7915_hw_phy(struct ieee80211_hw *hw)
  {
-@@ -621,6 +685,10 @@ int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
+@@ -623,6 +687,10 @@ int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
  int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
  			      u8 en);
  int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band);
@@ -856,7 +856,7 @@
  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 224d9960..2dc4cb87 100644
+index 6f74caff..aabe40dc 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -1368,7 +1368,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
@@ -1007,5 +1007,5 @@
  {
  	struct mt7915_dev *dev = dev_get_drvdata(s->private);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch b/recipes-wifi/linux-mt76/files/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
similarity index 82%
rename from recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
rename to recipes-wifi/linux-mt76/files/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
index bcb5b02..fcb5ac7 100644
--- a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
@@ -1,7 +1,8 @@
-From 96b429c7da1a06920985887fbe522750b915dfa0 Mon Sep 17 00:00:00 2001
+From 472114dde2855aeb5ac5a7367aab991ad95caba1 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Fri, 6 Jan 2023 18:18:50 +0800
-Subject: [PATCH] mt76: mt7915: wed: add rxwi for further in chip rro
+Subject: [PATCH 3005/3012] wifi: mt76: mt7915: wed: add rxwi for further in
+ chip rro
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -9,13 +10,13 @@
  mac80211.c      |  2 +-
  mt76.h          | 24 ++++++++-----
  mt7915/dma.c    |  2 --
- mt7915/mmio.c   | 27 +++++++-------
+ mt7915/mmio.c   | 29 +++++++--------
  mt7915/mt7915.h |  1 +
  tx.c            | 16 ++++-----
- 7 files changed, 86 insertions(+), 79 deletions(-)
+ 7 files changed, 87 insertions(+), 80 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index 14553b24..d1a1dae4 100644
+index c776882e..dfe69829 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -59,17 +59,17 @@ mt76_alloc_txwi(struct mt76_dev *dev)
@@ -118,11 +119,11 @@
  	local_bh_disable();
 -	while ((t = __mt76_get_rxwi(dev)) != NULL) {
 -		if (t->ptr)
--			mt76_put_page_pool_buf(t->ptr, false);
+-			skb_free_frag(t->ptr);
 -		kfree(t);
 +	while ((r = __mt76_get_rxwi(dev)) != NULL) {
 +		if (r->ptr)
-+			mt76_put_page_pool_buf(r->ptr, false);
++			skb_free_frag(r->ptr);
 +		kfree(r);
  	}
  	local_bh_enable();
@@ -207,10 +208,10 @@
 +		if (!r)
  			return NULL;
  
--		dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr,
-+		dma_sync_single_for_cpu(dev->dma_dev, r->dma_addr,
- 				SKB_WITH_OVERHEAD(q->buf_size),
- 				page_pool_get_dma_dir(q->page_pool));
+-		dma_unmap_single(dev->dma_dev, t->dma_addr,
++		dma_unmap_single(dev->dma_dev, r->dma_addr,
+ 				 SKB_WITH_OVERHEAD(q->buf_size),
+ 				 DMA_FROM_DEVICE);
  
 -		buf = t->ptr;
 -		t->dma_addr = 0;
@@ -243,10 +244,10 @@
  unmap:
  	for (n--; n > 0; n--)
 diff --git a/mac80211.c b/mac80211.c
-index e2122c78..4655f814 100644
+index 1654cc9b..4dc7627e 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -644,7 +644,6 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
+@@ -602,7 +602,6 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
  	spin_lock_init(&dev->lock);
  	spin_lock_init(&dev->cc_lock);
  	spin_lock_init(&dev->status_lock);
@@ -254,7 +255,7 @@
  	mutex_init(&dev->mutex);
  	init_waitqueue_head(&dev->tx_wait);
  
-@@ -675,6 +674,7 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
+@@ -633,6 +632,7 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
  	INIT_LIST_HEAD(&dev->txwi_cache);
  	INIT_LIST_HEAD(&dev->rxwi_cache);
  	dev->token_size = dev->drv->token_size;
@@ -263,7 +264,7 @@
  	for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++)
  		skb_queue_head_init(&dev->rx_skb[i]);
 diff --git a/mt76.h b/mt76.h
-index d8438953..7919cda8 100644
+index 1af5edfe..d7b0f1bb 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -165,6 +165,7 @@ struct mt76_queue_entry {
@@ -321,7 +322,7 @@
  void mt76_free_pending_rxwi(struct mt76_dev *dev);
  void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
  		      struct napi_struct *napi);
-@@ -1560,9 +1566,9 @@ struct mt76_txwi_cache *
+@@ -1559,9 +1565,9 @@ struct mt76_txwi_cache *
  mt76_token_release(struct mt76_dev *dev, int token, bool *wake);
  int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi);
  void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
@@ -330,8 +331,8 @@
  int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
 -			  struct mt76_txwi_cache *r, dma_addr_t phys);
 +			  struct mt76_rxwi_cache *r, dma_addr_t phys);
- int mt76_create_page_pool(struct mt76_dev *dev, struct mt76_queue *q);
- static inline void mt76_put_page_pool_buf(void *buf, bool allow_direct)
+ 
+ static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
  {
 diff --git a/mt7915/dma.c b/mt7915/dma.c
 index 43a5456d..6d9b2d15 100644
@@ -354,12 +355,12 @@
  
  		/* rx data queue for band1 */
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 890af388..6dec9d60 100644
+index 0e79faf2..fc9aadb1 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -606,16 +606,16 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -610,18 +610,18 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+ 				sizeof(struct skb_shared_info));
  
- 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
  	for (i = 0; i < dev->mt76.rx_token_size; i++) {
 -		struct mt76_txwi_cache *t;
 +		struct mt76_rxwi_cache *r;
@@ -370,9 +371,12 @@
 +		if (!r || !r->ptr)
  			continue;
  
--		mt76_put_page_pool_buf(t->ptr, false);
+-		dma_unmap_single(dev->mt76.dma_dev, t->dma_addr,
++		dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
+ 				 wed->wlan.rx_size, DMA_FROM_DEVICE);
+-		__free_pages(virt_to_page(t->ptr), get_order(length));
 -		t->ptr = NULL;
-+		mt76_put_page_pool_buf(r->ptr, false);
++		__free_pages(virt_to_page(r->ptr), get_order(length));
 +		r->ptr = NULL;
  
 -		mt76_put_rxwi(&dev->mt76, t);
@@ -380,47 +384,50 @@
  	}
  
  	mt76_free_pending_rxwi(&dev->mt76);
-@@ -624,7 +624,7 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
- static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
- {
- 	struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
--	struct mt76_txwi_cache *t = NULL;
-+	struct mt76_rxwi_cache *r = NULL;
- 	struct mt7915_dev *dev;
- 	struct mt76_queue *q;
- 	int i, len;
-@@ -640,8 +640,8 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -639,18 +639,18 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+ 				sizeof(struct skb_shared_info));
+ 
+ 	for (i = 0; i < size; i++) {
+-		struct mt76_txwi_cache *t = mt76_get_rxwi(&dev->mt76);
++		struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
+ 		dma_addr_t phy_addr;
+ 		struct page *page;
  		int token;
- 		void *buf;
+ 		void *ptr;
  
--		t = mt76_get_rxwi(&dev->mt76);
 -		if (!t)
-+		r = mt76_get_rxwi(&dev->mt76);
 +		if (!r)
  			goto unmap;
  
- 		buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
-@@ -653,7 +653,7 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
- 		dma_sync_single_for_device(dev->mt76.dma_dev, addr, len, dir);
+ 		page = __dev_alloc_pages(GFP_KERNEL, get_order(length));
+ 		if (!page) {
+-			mt76_put_rxwi(&dev->mt76, t);
++			mt76_put_rxwi(&dev->mt76, r);
+ 			goto unmap;
+ 		}
  
- 		desc->buf0 = cpu_to_le32(addr);
--		token = mt76_rx_token_consume(&dev->mt76, buf, t, addr);
-+		token = mt76_rx_token_consume(&dev->mt76, buf, r, addr);
+@@ -660,17 +660,17 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+ 					  DMA_TO_DEVICE);
+ 		if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
+ 			__free_pages(page, get_order(length));
+-			mt76_put_rxwi(&dev->mt76, t);
++			mt76_put_rxwi(&dev->mt76, r);
+ 			goto unmap;
+ 		}
+ 
+ 		desc->buf0 = cpu_to_le32(phy_addr);
+-		token = mt76_rx_token_consume(&dev->mt76, ptr, t, phy_addr);
++		token = mt76_rx_token_consume(&dev->mt76, ptr, r, phy_addr);
  		if (token < 0) {
- 			mt76_put_page_pool_buf(buf, false);
+ 			dma_unmap_single(dev->mt76.dma_dev, phy_addr,
+ 					 wed->wlan.rx_size, DMA_TO_DEVICE);
+ 			__free_pages(page, get_order(length));
+-			mt76_put_rxwi(&dev->mt76, t);
++			mt76_put_rxwi(&dev->mt76, r);
  			goto unmap;
-@@ -667,8 +667,8 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
- 	return 0;
+ 		}
  
- unmap:
--	if (t)
--		mt76_put_rxwi(&dev->mt76, t);
-+	if (r)
-+		mt76_put_rxwi(&dev->mt76, r);
- 	mt7915_mmio_wed_release_rx_buf(wed);
- 	return -ENOMEM;
- }
-@@ -818,7 +818,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -831,7 +831,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  	wed->wlan.reset = mt7915_mmio_wed_reset;
  	wed->wlan.reset_complete = mt7915_mmio_wed_reset_complete;
  
@@ -429,7 +436,7 @@
  
  	if (mtk_wed_device_attach(wed))
  		return 0;
-@@ -1024,6 +1024,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -1037,6 +1037,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
  				SURVEY_INFO_TIME_RX |
  				SURVEY_INFO_TIME_BSS_RX,
  		.token_size = MT7915_TOKEN_SIZE,
@@ -438,7 +445,7 @@
  		.tx_complete_skb = mt76_connac_tx_complete_skb,
  		.rx_skb = mt7915_queue_rx_skb,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 1d906b78..f635ae2d 100644
+index 1dfecdb0..918046f2 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -57,6 +57,7 @@
@@ -495,5 +502,5 @@
  }
  EXPORT_SYMBOL_GPL(mt76_rx_token_release);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch b/recipes-wifi/linux-mt76/files/patches/3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch
similarity index 75%
rename from recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
rename to recipes-wifi/linux-mt76/files/patches/3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch
index f5f46f4..c0ba682 100644
--- a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch
@@ -1,8 +1,8 @@
-From 1b23af3704c18c7c111992940fc94d2cdef3b830 Mon Sep 17 00:00:00 2001
+From d2535a1a708551da741f38fdd9b50babfbcb4ff5 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: wed: add mt7915_net_setup_tc to support
- wifi2wifi offload
+Subject: [PATCH 3006/3012] wifi: mt76: mt7915: wed: add mt7915_net_setup_tc to
+ support wifi2wifi offload
 
 Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
@@ -10,10 +10,10 @@
  1 file changed, 18 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 7e7f6073..146e3643 100644
+index 8428087e..6aecf2c8 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1604,6 +1604,23 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
+@@ -1598,6 +1598,23 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
  	return 0;
  }
  
@@ -37,7 +37,7 @@
  #endif
  
  const struct ieee80211_ops mt7915_ops = {
-@@ -1657,5 +1674,6 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1651,5 +1668,6 @@ const struct ieee80211_ops mt7915_ops = {
  #ifdef CONFIG_NET_MEDIATEK_SOC_WED
  	.net_fill_forward_path = mt7915_net_fill_forward_path,
  	.net_fill_receive_path = mt7915_net_fill_receive_path,
@@ -45,5 +45,5 @@
  #endif
  };
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch b/recipes-wifi/linux-mt76/files/patches/3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
similarity index 90%
rename from recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
rename to recipes-wifi/linux-mt76/files/patches/3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
index 9f30456..924f3ca 100644
--- a/recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
@@ -1,7 +1,7 @@
-From 101ab7022c500ad4adacb5faf90bef25d897c70a Mon Sep 17 00:00:00 2001
+From e43e191c57cf50239170bf766315b75c8a6b0e6f Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Wed, 18 Jan 2023 16:37:22 +0800
-Subject: [PATCH 3008/3013] wifi: mt76: mt7915: add wa command to get tx msdu
+Subject: [PATCH 3007/3012] wifi: mt76: mt7915: add wa command to get tx msdu
  count
 
 ---
@@ -16,7 +16,7 @@
  8 files changed, 78 insertions(+), 11 deletions(-)
 
 diff --git a/mt76.h b/mt76.h
-index 7919cda8..08945d66 100644
+index d7b0f1bb..f95a73cf 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -284,7 +284,7 @@ struct mt76_sta_stats {
@@ -68,7 +68,7 @@
  			le32_get_bits(txs_data[6], MT_TXS6_MPDU_FAIL_CNT);
  		stats->tx_retries +=
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index ad6f845b..7afd9d09 100644
+index 8e559efb..dd7ee32f 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1000,6 +1000,7 @@ enum {
@@ -80,10 +80,10 @@
  	MCU_EXT_EVENT_MURU_CTRL = 0x9f,
  	MCU_EXT_EVENT_CSI_REPORT = 0xc2,
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 22d293e9..eba0caa6 100644
+index 6aecf2c8..4c9090a4 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1101,9 +1101,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
  
@@ -93,7 +93,7 @@
  		sinfo->tx_failed = msta->wcid.stats.tx_failed;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
  
-@@ -1119,6 +1116,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1121,6 +1118,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		}
  	}
  
@@ -106,10 +106,10 @@
  	sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index da10895c..076480ba 100644
+index 6ac24cfc..8e340f5b 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -168,7 +168,9 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
+@@ -169,7 +169,9 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
  	}
  
  	rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
@@ -120,7 +120,7 @@
  		return -EAGAIN;
  
  	if (cmd == MCU_CMD(PATCH_SEM_CONTROL)) {
-@@ -420,13 +422,14 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -421,13 +423,14 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	struct mt76_connac2_mcu_rxd *rxd;
  
  	rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
@@ -137,7 +137,7 @@
  		mt7915_mcu_rx_unsolicited_event(dev, skb);
  	else
  		mt76_mcu_rx_event(&dev->mt76, skb);
-@@ -4087,6 +4090,53 @@ out:
+@@ -4098,6 +4101,53 @@ out:
  	return ret;
  }
  
@@ -192,7 +192,7 @@
  				struct cfg80211_he_bss_color *he_bss_color)
  {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 0f845075..d761fa59 100644
+index d455ecfd..768c7d74 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -292,6 +292,17 @@ enum {
@@ -214,10 +214,10 @@
  	MCU_MMPS_STATIC,
  	MCU_MMPS_DYNAMIC,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index dd6b673b..6536285c 100644
+index 918046f2..80d6a43c 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -713,6 +713,7 @@ int mt7915_mcu_set_thermal_throttling(struct mt7915_phy *phy, u8 state);
+@@ -715,6 +715,7 @@ int mt7915_mcu_set_thermal_throttling(struct mt7915_phy *phy, u8 state);
  int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
  int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
  			   struct ieee80211_sta *sta, struct rate_info *rate);
@@ -226,5 +226,5 @@
  				     struct cfg80211_chan_def *chandef);
  int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch b/recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
similarity index 91%
rename from recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
rename to recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
index f1d5c88..f5a9398 100644
--- a/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
@@ -1,7 +1,7 @@
-From 8fa8a22a16c04d8f18e27af2c02b960f0c02c91b Mon Sep 17 00:00:00 2001
+From eb824d2b3b30afc97387d9f94e6e5b075cc9c843 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Wed, 11 Jan 2023 10:56:27 +0800
-Subject: [PATCH 3009/3013] wifi: mt76: get tx count and tx failed from mcu
+Subject: [PATCH 3008/3012] wifi: mt76: get tx count and tx failed from mcu
  command
 
 ---
@@ -15,7 +15,7 @@
  7 files changed, 138 insertions(+), 5 deletions(-)
 
 diff --git a/mt76.h b/mt76.h
-index 08945d66..bc0c9ae7 100644
+index f95a73cf..d17650d0 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -285,6 +285,7 @@ struct mt76_sta_stats {
@@ -40,7 +40,7 @@
  			le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_CNT);
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 7afd9d09..287cffcc 100644
+index dd7ee32f..b80a1011 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1160,6 +1160,7 @@ enum {
@@ -52,10 +52,10 @@
  	MCU_EXT_CMD_SET_DRR_CTRL = 0x36,
  	MCU_EXT_CMD_SET_FEATURE_CTRL = 0x38,
 diff --git a/mt7915/main.c b/mt7915/main.c
-index eba0caa6..94b1ca61 100644
+index 4c9090a4..e7c3bc04 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1101,9 +1101,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
  
@@ -65,7 +65,7 @@
  		sinfo->tx_retries = msta->wcid.stats.tx_retries;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
  
-@@ -1121,6 +1118,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1123,6 +1120,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
  	}
  
@@ -78,10 +78,10 @@
  	sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 076480ba..e1c08178 100644
+index 8e340f5b..58b884ca 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4137,6 +4137,114 @@ out:
+@@ -4148,6 +4148,114 @@ out:
  	return ret;
  }
  
@@ -197,10 +197,10 @@
  				struct cfg80211_he_bss_color *he_bss_color)
  {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index d761fa59..41d5ea19 100644
+index 768c7d74..ce02bd9b 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -1018,6 +1018,28 @@ struct mt7915_muru {
+@@ -1017,6 +1017,28 @@ struct mt7915_muru {
  /* DL&UL User config */
  #define MURU_USER_CNT                   BIT(4)
  
@@ -230,10 +230,10 @@
     CAPI_SU,
     CAPI_MU,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 6536285c..5366b7bb 100644
+index 80d6a43c..66dd79f3 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -714,6 +714,7 @@ int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
+@@ -716,6 +716,7 @@ int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
  int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
  			   struct ieee80211_sta *sta, struct rate_info *rate);
  int mt7915_mcu_get_tx_stat_wa(struct mt7915_dev *dev, u16 wcid);
@@ -242,5 +242,5 @@
  				     struct cfg80211_chan_def *chandef);
  int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch b/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
similarity index 95%
rename from recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
rename to recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
index d7af854..3c7f79e 100644
--- a/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
@@ -1,7 +1,7 @@
-From 5c346af2c8a9352b9303d1e7f9e6f424417dfc98 Mon Sep 17 00:00:00 2001
+From d56efe65c502267ef5b1a79ded88f872c71e6968 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Wed, 18 Jan 2023 11:50:38 +0800
-Subject: [PATCH 3010/3013] wifi: mt76: mt7915: enable PPDU-TxS to host when
+Subject: [PATCH 3009/3012] wifi: mt76: mt7915: enable PPDU-TxS to host when
  wed enable
 
 Calculate tx bytes and tx retries from PPDU-TxS
@@ -43,7 +43,7 @@
  
  static void
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 6dec9d60..87cff5d4 100644
+index fc9aadb1..65ee2afa 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -551,7 +551,6 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
@@ -118,5 +118,5 @@
  			     IEEE80211_TX_CTL_RATE_CTRL_PROBE)))
  		return MT_PACKET_ID_NO_SKB;
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch b/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
similarity index 91%
rename from recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
rename to recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
index 6904bea..7019e23 100644
--- a/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
@@ -1,7 +1,7 @@
-From 47c0c3360a84cb4f8d5500ef1190a1eea394e2e8 Mon Sep 17 00:00:00 2001
+From 938c5fde676b5904488193aef069582df4d176f0 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Tue, 17 Jan 2023 21:15:00 +0800
-Subject: [PATCH 3011/3013] wifi: mt76: mt7915: get tx retries from tx free
+Subject: [PATCH 3010/3012] wifi: mt76: mt7915: get tx retries from tx free
  done event for sw path
 
 ---
@@ -74,10 +74,10 @@
  
  /* will support this field in further revision */
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 94b1ca61..a4d1b816 100644
+index e7c3bc04..cef6249c 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1101,9 +1101,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
  
@@ -87,7 +87,7 @@
  		if (mtk_wed_get_rx_capa(&phy->dev->mt76.mmio.wed)) {
  			sinfo->rx_bytes = msta->wcid.stats.rx_bytes;
  			sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES64);
-@@ -1113,6 +1110,9 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1115,6 +1112,9 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  		}
  	}
  
@@ -98,5 +98,5 @@
  		sinfo->tx_packets = msta->wcid.stats.tx_packets;
  		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch b/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
similarity index 93%
rename from recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
rename to recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
index c852b73..cf041b5 100644
--- a/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
@@ -1,7 +1,7 @@
-From 655d403531165600ea621dc7889165a091971331 Mon Sep 17 00:00:00 2001
+From 361f956209a86d1aa94c24c5cacfe25016e3a14d Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Mon, 30 Jan 2023 11:36:32 +0800
-Subject: [PATCH 3012/3013] wifi: mt76: update debugfs knob for reset counter
+Subject: [PATCH 3011/3012] wifi: mt76: update debugfs knob for reset counter
  and get tx packet error rate
 
 ---
@@ -9,7 +9,7 @@
  1 file changed, 62 insertions(+)
 
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 2dc4cb87..87a7ca98 100644
+index aabe40dc..20331cf1 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -3190,6 +3190,66 @@ mt7915_sw_aci_set(void *data, u64 val)
@@ -89,5 +89,5 @@
  }
  #endif
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch b/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
new file mode 100644
index 0000000..44c5df9
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
@@ -0,0 +1,250 @@
+From 4e691afbbc58b616a8d8516a10138021bcf9186a Mon Sep 17 00:00:00 2001
+From: Sujuan Chen <sujuan.chen@mediatek.com>
+Date: Thu, 5 Jan 2023 16:43:57 +0800
+Subject: [PATCH 3012/3012] wifi: mt76: connac: wed: add wed rx copy skb
+
+Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
+---
+ dma.c         | 76 +++++++++++++++++++++++++++++++++++++++------------
+ mt7915/mmio.c | 35 ++++++++++++++++++------
+ 2 files changed, 85 insertions(+), 26 deletions(-)
+
+diff --git a/dma.c b/dma.c
+index dfe69829..1fc4bd2d 100644
+--- a/dma.c
++++ b/dma.c
+@@ -208,11 +208,11 @@ mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q)
+ 
+ static int
+ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
+-		    struct mt76_queue_buf *buf, void *data)
++		    struct mt76_queue_buf *buf, void *data,
++		    struct mt76_rxwi_cache *rxwi)
+ {
+ 	struct mt76_desc *desc = &q->desc[q->head];
+ 	struct mt76_queue_entry *entry = &q->entry[q->head];
+-	struct mt76_rxwi_cache *rxwi = NULL;
+ 	u32 buf1 = 0, ctrl;
+ 	int idx = q->head;
+ 	int rx_token;
+@@ -220,9 +220,11 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
+ 	ctrl = FIELD_PREP(MT_DMA_CTL_SD_LEN0, buf[0].len);
+ 
+ 	if (mt76_queue_is_wed_rx(q)) {
+-		rxwi = mt76_get_rxwi(dev);
+-		if (!rxwi)
+-			return -ENOMEM;
++		if (!rxwi) {
++			rxwi = mt76_get_rxwi(dev);
++			if (!rxwi)
++				return -ENOMEM;
++		}
+ 
+ 		rx_token = mt76_rx_token_consume(dev, data, rxwi, buf->addr);
+ 		if (rx_token < 0) {
+@@ -387,7 +389,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush)
+ 
+ static void *
+ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
+-		 int *len, u32 *info, bool *more, bool *drop)
++		 int *len, u32 *info, bool *more, bool *drop, bool flush)
+ {
+ 	struct mt76_queue_entry *e = &q->entry[idx];
+ 	struct mt76_desc *desc = &q->desc[idx];
+@@ -437,11 +439,43 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
+ 				 SKB_WITH_OVERHEAD(q->buf_size),
+ 				 DMA_FROM_DEVICE);
+ 
+-		buf = r->ptr;
+-		r->dma_addr = 0;
+-		r->ptr = NULL;
++		if (flush) {
++			buf = r->ptr;
++			r->dma_addr = 0;
++			r->ptr = NULL;
+ 
+-		mt76_put_rxwi(dev, r);
++			mt76_put_rxwi(dev, r);
++		} else {
++			struct mt76_queue_buf qbuf;
++
++			buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
++			if (!buf)
++				return NULL;
++
++			memcpy(buf, r->ptr, SKB_WITH_OVERHEAD(q->buf_size));
++
++			r->dma_addr = dma_map_single(dev->dma_dev, r->ptr,
++						     SKB_WITH_OVERHEAD(q->buf_size),
++						     DMA_FROM_DEVICE);
++			if (unlikely(dma_mapping_error(dev->dma_dev, r->dma_addr))) {
++				skb_free_frag(r->ptr);
++				mt76_put_rxwi(dev, r);
++				return NULL;
++			}
++
++			qbuf.addr = r->dma_addr;
++			qbuf.len = SKB_WITH_OVERHEAD(q->buf_size);
++			qbuf.skip_unmap = false;
++
++			if (mt76_dma_add_rx_buf(dev, q, &qbuf, r->ptr, r) < 0) {
++				dma_unmap_single(dev->dma_dev, r->dma_addr,
++						 SKB_WITH_OVERHEAD(q->buf_size),
++						 DMA_FROM_DEVICE);
++				skb_free_frag(r->ptr);
++				mt76_put_rxwi(dev, r);
++				return NULL;
++			}
++		}
+ 
+ 		if (drop) {
+ 			u32 ctrl = le32_to_cpu(READ_ONCE(desc->ctrl));
+@@ -480,7 +514,7 @@ mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
+ 	q->tail = (q->tail + 1) % q->ndesc;
+ 	q->queued--;
+ 
+-	return mt76_dma_get_buf(dev, q, idx, len, info, more, drop);
++	return mt76_dma_get_buf(dev, q, idx, len, info, more, drop, flush);
+ }
+ 
+ static int
+@@ -612,6 +646,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
+ 	int len = SKB_WITH_OVERHEAD(q->buf_size);
+ 	int frames = 0, offset = q->buf_offset;
+ 	dma_addr_t addr;
++	bool flags = false;
+ 
+ 	if (!q->ndesc)
+ 		return 0;
+@@ -635,7 +670,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
+ 		qbuf.addr = addr + offset;
+ 		qbuf.len = len - offset;
+ 		qbuf.skip_unmap = false;
+-		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) {
++		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf, NULL) < 0) {
+ 			dma_unmap_single(dev->dma_dev, addr, len,
+ 					 DMA_FROM_DEVICE);
+ 			skb_free_frag(buf);
+@@ -644,7 +679,10 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
+ 		frames++;
+ 	}
+ 
+-	if (frames)
++	flags = (q->flags & MT_QFLAG_WED) &&
++		FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_Q_RX;
++
++	if (frames || flags)
+ 		mt76_dma_kick_queue(dev, q);
+ 
+ 	spin_unlock_bh(&q->lock);
+@@ -767,12 +805,14 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
+ 
+ 	spin_unlock_bh(&q->lock);
+ 
+-	if (!q->rx_page.va)
+-		return;
++	if (FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) != MT76_WED_Q_RX) {
++		if (!q->rx_page.va)
++			return;
+ 
+-	page = virt_to_page(q->rx_page.va);
+-	__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
+-	memset(&q->rx_page, 0, sizeof(q->rx_page));
++		page = virt_to_page(q->rx_page.va);
++		__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
++		memset(&q->rx_page, 0, sizeof(q->rx_page));
++	}
+ }
+ 
+ static void
+diff --git a/mt7915/mmio.c b/mt7915/mmio.c
+index 65ee2afa..614bb407 100644
+--- a/mt7915/mmio.c
++++ b/mt7915/mmio.c
+@@ -581,6 +581,7 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
+ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+ {
+ 	struct mt7915_dev *dev;
++	struct page *page;
+ 	u32 length;
+ 	int i;
+ 
+@@ -597,13 +598,33 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+ 
+ 		dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
+ 				 wed->wlan.rx_size, DMA_FROM_DEVICE);
+-		__free_pages(virt_to_page(r->ptr), get_order(length));
++		skb_free_frag(r->ptr);
+ 		r->ptr = NULL;
+ 
+ 		mt76_put_rxwi(&dev->mt76, r);
+ 	}
+ 
+ 	mt76_free_pending_rxwi(&dev->mt76);
++
++	mt76_for_each_q_rx(&dev->mt76, i) {
++		struct mt76_queue *q = &dev->mt76.q_rx[i];
++
++		if (mt76_queue_is_wed_rx(q)) {
++			if (!q->rx_page.va)
++				continue;
++
++			page = virt_to_page(q->rx_page.va);
++			__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
++			memset(&q->rx_page, 0, sizeof(q->rx_page));
++		}
++	}
++
++	if (!wed->rx_buf_ring.rx_page.va)
++		return;
++
++	page = virt_to_page(wed->rx_buf_ring.rx_page.va);
++	__page_frag_cache_drain(page, wed->rx_buf_ring.rx_page.pagecnt_bias);
++	memset(&wed->rx_buf_ring.rx_page, 0, sizeof(wed->rx_buf_ring.rx_page));
+ }
+ 
+ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -620,35 +641,33 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+ 	for (i = 0; i < size; i++) {
+ 		struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
+ 		dma_addr_t phy_addr;
+-		struct page *page;
+ 		int token;
+ 		void *ptr;
+ 
+ 		if (!r)
+ 			goto unmap;
+ 
+-		page = __dev_alloc_pages(GFP_KERNEL, get_order(length));
+-		if (!page) {
++		ptr = page_frag_alloc(&wed->rx_buf_ring.rx_page, length, GFP_ATOMIC);
++		if (!ptr) {
+ 			mt76_put_rxwi(&dev->mt76, r);
+ 			goto unmap;
+ 		}
+ 
+-		ptr = page_address(page);
+ 		phy_addr = dma_map_single(dev->mt76.dma_dev, ptr,
+ 					  wed->wlan.rx_size,
+ 					  DMA_TO_DEVICE);
++		
+ 		if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
+-			__free_pages(page, get_order(length));
++			skb_free_frag(ptr);
+ 			mt76_put_rxwi(&dev->mt76, r);
+ 			goto unmap;
+ 		}
+-
+ 		desc->buf0 = cpu_to_le32(phy_addr);
+ 		token = mt76_rx_token_consume(&dev->mt76, ptr, r, phy_addr);
+ 		if (token < 0) {
+ 			dma_unmap_single(dev->mt76.dma_dev, phy_addr,
+ 					 wed->wlan.rx_size, DMA_TO_DEVICE);
+-			__free_pages(page, get_order(length));
++			skb_free_frag(ptr);
+ 			mt76_put_rxwi(&dev->mt76, r);
+ 			goto unmap;
+ 		}
+-- 
+2.39.0
+
diff --git a/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch b/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch
deleted file mode 100644
index 7a0aa12..0000000
--- a/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 5b3d131191690db907ee5c0ba43a80cb0f23b3bc Mon Sep 17 00:00:00 2001
-From: Shayne Chen <shayne.chen@mediatek.com>
-Date: Tue, 13 Dec 2022 10:51:46 +0800
-Subject: [PATCH 4001/4005] mt76: revert get_of_mac_addr
-
----
- eeprom.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/eeprom.c b/eeprom.c
-index 6e6d84e3..b2df0f44 100644
---- a/eeprom.c
-+++ b/eeprom.c
-@@ -128,9 +128,15 @@ void
- mt76_eeprom_override(struct mt76_phy *phy)
- {
- 	struct mt76_dev *dev = phy->dev;
-+#ifdef CONFIG_OF
- 	struct device_node *np = dev->dev->of_node;
-+	const u8 *mac = NULL;
- 
--	of_get_mac_address(np, phy->macaddr);
-+	if (np)
-+		mac = of_get_mac_address(np);
-+	if (!IS_ERR_OR_NULL(mac))
-+		ether_addr_copy(phy->macaddr, mac);
-+#endif
- 
- 	if (!is_valid_ether_addr(phy->macaddr)) {
- 		eth_random_addr(phy->macaddr);
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch b/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch
deleted file mode 100644
index e7661df..0000000
--- a/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 227f29f577dda88bda5c6213a655e89ff3b9203c Mon Sep 17 00:00:00 2001
-From: Shayne Chen <shayne.chen@mediatek.com>
-Date: Tue, 13 Dec 2022 10:38:13 +0800
-Subject: [PATCH 4002/4005] mt76: include header files for module param
-
----
- mcu.c             | 1 +
- mt7615/mcu.c      | 1 +
- mt76_connac_mcu.c | 1 +
- mt7915/mcu.c      | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/mcu.c b/mcu.c
-index a8cafa39..fa4b0544 100644
---- a/mcu.c
-+++ b/mcu.c
-@@ -4,6 +4,7 @@
-  */
- 
- #include "mt76.h"
-+#include <linux/moduleparam.h>
- 
- struct sk_buff *
- __mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
-diff --git a/mt7615/mcu.c b/mt7615/mcu.c
-index eea398c7..4593b2e1 100644
---- a/mt7615/mcu.c
-+++ b/mt7615/mcu.c
-@@ -10,6 +10,7 @@
- #include "mcu.h"
- #include "mac.h"
- #include "eeprom.h"
-+#include <linux/moduleparam.h>
- 
- static bool prefer_offload_fw = true;
- module_param(prefer_offload_fw, bool, 0644);
-diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 6f5c81ce..1baa4a03 100644
---- a/mt76_connac_mcu.c
-+++ b/mt76_connac_mcu.c
-@@ -4,6 +4,7 @@
- #include <linux/firmware.h>
- #include "mt76_connac2_mac.h"
- #include "mt76_connac_mcu.h"
-+#include <linux/module.h>
- 
- int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
- {
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e1c08178..37291865 100644
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -6,6 +6,7 @@
- #include "mcu.h"
- #include "mac.h"
- #include "eeprom.h"
-+#include <linux/moduleparam.h>
- 
- #define fw_name(_dev, name, ...)	({			\
- 	char *_fw;						\
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch b/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
deleted file mode 100644
index a75825e..0000000
--- a/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From be0397f77f21cfbc5f865d89d9c4dcdc87f06233 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Fri, 30 Dec 2022 11:11:59 +0800
-Subject: [PATCH 4003/4005] mt76: revert kernel api for kernel 5.4
-
----
- debugfs.c | 2 ++
- dma.c     | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/debugfs.c b/debugfs.c
-index 79064a4d..4a8e1864 100644
---- a/debugfs.c
-+++ b/debugfs.c
-@@ -33,8 +33,10 @@ mt76_napi_threaded_set(void *data, u64 val)
- 	if (!mt76_is_mmio(dev))
- 		return -EOPNOTSUPP;
- 
-+#if 0 /* disable in backport 5.15 */
- 	if (dev->napi_dev.threaded != val)
- 		return dev_set_threaded(&dev->napi_dev, val);
-+#endif
- 
- 	return 0;
- }
-diff --git a/dma.c b/dma.c
-index 3adb1136..1fc4bd2d 100644
---- a/dma.c
-+++ b/dma.c
-@@ -919,7 +919,7 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
- 		    !(dev->drv->rx_check(dev, data, len)))
- 			goto free_frag;
- 
--		skb = napi_build_skb(data, q->buf_size);
-+		skb = build_skb(data, q->buf_size);
- 		if (!skb)
- 			goto free_frag;
- 
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch b/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch
deleted file mode 100644
index 479accf..0000000
--- a/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 21286ba6a27ae54885687c0f82a48e52cef638aa Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Fri, 3 Feb 2023 17:09:55 +0800
-Subject: [PATCH 4005/4005] wifi: mt76: revert EHT definitions
-
-Revert the following patches
-* 68b17a24 wifi: mt76: connac: add helpers for EHT capability
-* b375845a wifi: mt76: connac: add CMD_CBW_320MHZ
-
-This reverts commit b375845abc105904242d3c6d9da15c7a1ec5ffc4.
----
- mt76_connac.h     |  2 --
- mt76_connac_mcu.c | 46 ----------------------------------------------
- mt76_connac_mcu.h |  4 ----
- 3 files changed, 52 deletions(-)
-
-diff --git a/mt76_connac.h b/mt76_connac.h
-index 323203df..5a0a3ce1 100644
---- a/mt76_connac.h
-+++ b/mt76_connac.h
-@@ -42,7 +42,6 @@ enum {
- 	CMD_CBW_10MHZ,
- 	CMD_CBW_5MHZ,
- 	CMD_CBW_8080MHZ,
--	CMD_CBW_320MHZ,
- 
- 	CMD_HE_MCS_BW80 = 0,
- 	CMD_HE_MCS_BW160,
-@@ -241,7 +240,6 @@ static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
- 		[NL80211_CHAN_WIDTH_10] = CMD_CBW_10MHZ,
- 		[NL80211_CHAN_WIDTH_20] = CMD_CBW_20MHZ,
- 		[NL80211_CHAN_WIDTH_20_NOHT] = CMD_CBW_20MHZ,
--		[NL80211_CHAN_WIDTH_320] = CMD_CBW_320MHZ,
- 	};
- 
- 	if (chandef->width >= ARRAY_SIZE(width_to_bw))
-diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index d7d85291..703ca736 100644
---- a/mt76_connac_mcu.c
-+++ b/mt76_connac_mcu.c
-@@ -1334,40 +1334,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
- }
- EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode);
- 
--u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
--				enum nl80211_band band)
--{
--	const struct ieee80211_sta_eht_cap *eht_cap;
--	struct ieee80211_supported_band *sband;
--	u8 mode = 0;
--
--	if (band == NL80211_BAND_6GHZ)
--		mode |= PHY_MODE_AX_6G;
--
--	sband = phy->hw->wiphy->bands[band];
--	eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type);
--
--	if (!eht_cap || !eht_cap->has_eht)
--		return mode;
--
--	switch (band) {
--	case NL80211_BAND_6GHZ:
--		mode |= PHY_MODE_BE_6G;
--		break;
--	case NL80211_BAND_5GHZ:
--		mode |= PHY_MODE_BE_5G;
--		break;
--	case NL80211_BAND_2GHZ:
--		mode |= PHY_MODE_BE_24G;
--		break;
--	default:
--		break;
--	}
--
--	return mode;
--}
--EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode_ext);
--
- const struct ieee80211_sta_he_cap *
- mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
- {
-@@ -1380,18 +1346,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
- }
- EXPORT_SYMBOL_GPL(mt76_connac_get_he_phy_cap);
- 
--const struct ieee80211_sta_eht_cap *
--mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
--{
--	enum nl80211_band band = phy->chandef.chan->band;
--	struct ieee80211_supported_band *sband;
--
--	sband = phy->hw->wiphy->bands[band];
--
--	return ieee80211_get_eht_iftype_cap(sband, vif->type);
--}
--EXPORT_SYMBOL_GPL(mt76_connac_get_eht_phy_cap);
--
- #define DEFAULT_HE_PE_DURATION		4
- #define DEFAULT_HE_DURATION_RTS_THRES	1023
- static void
-diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 287cffcc..b80a1011 100644
---- a/mt76_connac_mcu.h
-+++ b/mt76_connac_mcu.h
-@@ -1894,12 +1894,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
- 
- const struct ieee80211_sta_he_cap *
- mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
--const struct ieee80211_sta_eht_cap *
--mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
- u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
- 			    enum nl80211_band band, struct ieee80211_sta *sta);
--u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
--				enum nl80211_band band);
- 
- int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
- 			    struct mt76_connac_sta_key_conf *sta_key_conf,
--- 
-2.18.0
-
diff --git a/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch b/recipes-wifi/linux-mt76/files/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
similarity index 97%
rename from recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
rename to recipes-wifi/linux-mt76/files/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
index 652fa50..062c919 100644
--- a/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
+++ b/recipes-wifi/linux-mt76/files/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
@@ -1,7 +1,7 @@
-From 1a40927274d316173f1aa460083eea54e2804a0a Mon Sep 17 00:00:00 2001
-From: Shayne Chen <shayne.chen@mediatek.com>
-Date: Fri, 30 Dec 2022 11:12:07 +0800
-Subject: [PATCH 4004/4005] mt76: revert for backports-5.15 wireless stack
+From e4ba75a653450e5b5c48119cf46cf66849e9698d Mon Sep 17 00:00:00 2001
+From: Evelyn Tsai <evelyn.tsai@mediatek.com>
+Date: Wed, 5 Apr 2023 08:29:19 +0800
+Subject: [PATCH] mt76: revert for backports-5.15 wireless stack
 
 ---
  dma.c             |   2 +-
@@ -143,7 +143,7 @@
  		.bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int),
  	};
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 1baa4a03..d7d85291 100644
+index d4060136..703ca736 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
 @@ -197,7 +197,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif)
@@ -446,7 +446,7 @@
  	} else {
  		struct ieee80211_supported_band *sband;
  
-@@ -1662,7 +1662,6 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
+@@ -1616,7 +1616,6 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
  	for (i = 0; i < sreq->n_ssids; i++) {
  		if (!sreq->ssids[i].ssid_len)
  			continue;
@@ -454,7 +454,7 @@
  		req->ssids[i].ssid_len = cpu_to_le32(sreq->ssids[i].ssid_len);
  		memcpy(req->ssids[i].ssid, sreq->ssids[i].ssid,
  		       sreq->ssids[i].ssid_len);
-@@ -1795,7 +1794,6 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
+@@ -1749,7 +1748,6 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
  		memcpy(req->ssids[i].ssid, ssid->ssid, ssid->ssid_len);
  		req->ssids[i].ssid_len = cpu_to_le32(ssid->ssid_len);
  	}
@@ -462,7 +462,7 @@
  	req->match_num = sreq->n_match_sets;
  	for (i = 0; i < req->match_num; i++) {
  		match = &sreq->match_sets[i];
-@@ -2282,10 +2280,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
+@@ -2236,10 +2234,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
  				      struct mt76_vif *vif,
  				      struct ieee80211_bss_conf *info)
  {
@@ -474,7 +474,7 @@
  			   IEEE80211_BSS_ARP_ADDR_LIST_LEN);
  	struct {
  		struct {
-@@ -2313,7 +2309,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
+@@ -2267,7 +2263,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
  
  	skb_put_data(skb, &req_hdr, sizeof(req_hdr));
  	for (i = 0; i < len; i++)
@@ -509,10 +509,10 @@
  		if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
  			ba_size = 0;
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index b178036c..cecc3ef5 100644
+index 079629a3..dcd773c7 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
-@@ -1905,8 +1905,8 @@ static ssize_t mt7915_sta_fixed_rate_set(struct file *file,
+@@ -1911,8 +1911,8 @@ static ssize_t mt7915_sta_fixed_rate_set(struct file *file,
  
  	phy.ldpc = (phy.bw || phy.ldpc) * GENMASK(2, 0);
  	for (i = 0; i <= phy.bw; i++) {
@@ -566,7 +566,7 @@
  
  	tid = le32_get_bits(txwi[1], MT_TXD1_TID);
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 21caddbe..fd62a659 100644
+index cef6249c..3f495cbb 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -523,7 +523,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
@@ -596,7 +596,7 @@
  
  	if (changed & BSS_CHANGED_ERP_CTS_PROT)
  		mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot);
-@@ -1225,10 +1225,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw,
+@@ -1227,10 +1227,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw,
  {
  	struct mt7915_phy *phy = mt7915_hw_phy(hw);
  	struct mt7915_dev *dev = mt7915_hw_dev(hw);
@@ -610,7 +610,7 @@
  
  	mutex_lock(&dev->mt76.mutex);
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 37291865..4f1bd1cd 100644
+index 58b884ca..93e102f6 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -64,7 +64,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
@@ -1099,7 +1099,7 @@
  			cont->bcc_ofs = cpu_to_le16(offset - 3);
  	}
  
-@@ -2097,7 +2097,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -2112,7 +2112,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  	if (!en)
  		goto out;
  
@@ -1108,7 +1108,7 @@
  	if (!skb)
  		return -EINVAL;
  
-@@ -3358,17 +3358,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3368,17 +3368,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
  	if (txpower) {
  		u32 offs, len, i;
  
@@ -1130,7 +1130,7 @@
  					len = sku_len[SKU_HE_RU242] * 4;
  				}
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index e4af5e1c..19dfb354 100644
+index ad1865e3..393bc186 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -397,12 +397,12 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
@@ -1179,5 +1179,5 @@
  
  		hw = mt76_tx_status_get_hw(dev, skb);
 -- 
-2.18.0
+2.39.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index b5504fa..8f9eeda 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -1,55 +1,54 @@
 #patch patches (come from openwrt/lede/target/linux/mediatek)
 SRC_URI_append = " \
-    file://0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch \
+    file://0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch \
     file://0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch \
-    file://1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch \
-    file://1002-mt76-mt7915-csi-implement-csi-support.patch \
-    file://1003-mt76-mt7915-air-monitor-support.patch \
-    file://1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch \
-    file://1005-mt76-mt7915-certification-patches.patch \
-    file://1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch \
-    file://1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch \
-    file://1008-mt76-mt7915-drop-undefined-action-frame.patch \
-    file://1009-mt76-mt7915-add-fw_version-dump.patch \
-    file://1111-mt76-testmode-rework-testmode-init-registers.patch \
-    file://1112-mt76-testmode-additional-supports.patch \
-    file://1113-mt76-testmode-add-pre-cal-support.patch \
-    file://1114-mt76-testmode-add-iBF-command-mode-support.patch \
-    file://1115-mt76-testmode-add-ZWDFS-test-mode-support.patch \
-    file://1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch \
-    file://1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch \
-    file://1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch \
-    file://1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch \
-    file://1120-mt76-mt7915-add-phy-capability-vendor-command.patch \
-    file://1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch \
-    file://1122-mt76-mt7915-implement-bin-file-mode.patch \
-    file://1123-mt76-mt7915-initialize-wcid.patch \
-    file://1124-mt76-mt7915-Add-mu-dump-support.patch \
-    file://1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch \
-    file://1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch \
-    file://1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch \
-    file://1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch \
-    file://1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch \
-    file://1130-mt76-mt7915-amsdu-set-and-get-control.patch \
-    file://1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch \
-    file://1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch \
-    file://1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch \
-    file://3001-mt76-mt7915-wed-add-wed-tx-support.patch \
-    file://3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch \
-    file://3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch \
-    file://3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch \
-    file://3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch \
-    file://3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch \
-    file://3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch \
-    file://3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch \
-    file://3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch \
-    file://3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch \
-    file://3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch \
-    file://3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch \
-    file://3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.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 \
-    file://4004-mt76-revert-for-backports-5.15-wireless-stack.patch \
-    file://4005-wifi-mt76-revert-EHT-definitions.patch \
+    file://0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch \
+    file://100-api_update.patch \
+    file://1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch \
+    file://1001-wifi-mt76-mt7915-csi-implement-csi-support.patch \
+    file://1002-wifi-mt76-mt7915-air-monitor-support.patch \
+    file://1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch \
+    file://1004-wifi-mt76-mt7915-certification-patches.patch \
+    file://1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch \
+    file://1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch \
+    file://1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch \
+    file://1008-wifi-mt76-mt7915-add-fw_version-dump.patch \
+    file://1009-wifi-mt76-testmode-rework-testmode-init-registers.patch \
+    file://1010-wifi-mt76-testmode-additional-supports.patch \
+    file://1011-wifi-mt76-testmode-add-pre-cal-support.patch \
+    file://1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch \
+    file://1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch \
+    file://1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch \
+    file://1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch \
+    file://1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch \
+    file://1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch \
+    file://1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch \
+    file://1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch \
+    file://1020-wifi-mt76-mt7915-implement-bin-file-mode.patch \
+    file://1021-wifi-mt76-mt7915-initialize-wcid.patch \
+    file://1022-wifi-mt76-mt7915-Add-mu-dump-support.patch \
+    file://1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch \
+    file://1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch \
+    file://1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch \
+    file://1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch \
+    file://1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch \
+    file://1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch \
+    file://1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch \
+    file://1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch \
+    file://1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch \
+    file://110-wifi-mt76-ignore-key-disable-commands.patch \
+    file://3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch \
+    file://3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch \
+    file://3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch \
+    file://3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch \
+    file://3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch \
+    file://3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch \
+    file://3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch \
+    file://3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch \
+    file://3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch \
+    file://3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch \
+    file://3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch \
+    file://3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch \
+    file://3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch \
+    file://9999-mt76-revert-for-backports-5.15-wireless-stack.patch \
     "