[][MAC80211][Rebase Patches][Align mt76 patches number rules]

[Description]
Fix patch number rule

0001-0899: Staging upstream patches, prepare to upstream
0900-0999: For backport5.15 or backport6.x build fixes
1000-1999: Internal dev (vendor/Test/DebugTool), no plan to upstream short-term
3000-3999: WED Patches

[Release-log]
N/A

Change-Id: Ie7d4a73262db774e8b49960c9fa2ff62eff72015
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7334531
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
similarity index 75%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
index 9b631d2..dbe9096 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-fix-background-radar-event-being-blocked.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
index 80f0706..43f4e34 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7996-for-build-pass.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7996-for-build-pass.patch
new file mode 100644
index 0000000..cb45df5
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7996-for-build-pass.patch
@@ -0,0 +1,2017 @@
+From 2a3d2190a9728a80563463420a329a732ac38a8e 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: mt7996: for build pass
+
+---
+ debugfs.c         |   2 +
+ dma.c             |  76 +++++++++++----------
+ eeprom.c          |   8 ++-
+ mac80211.c        |  61 +----------------
+ mcu.c             |   1 +
+ mt76.h            |  22 +-----
+ mt7615/dma.c      |   4 +-
+ mt7615/main.c     |   6 +-
+ mt7615/mcu.c      |   9 +--
+ mt76_connac.h     |   2 -
+ mt76_connac_mcu.c | 155 +++++++++++++++---------------------------
+ mt76_connac_mcu.h |   4 --
+ mt76x02_mac.c     |   6 +-
+ mt7915/debugfs.c  |   4 +-
+ mt7915/dma.c      |   4 +-
+ mt7915/init.c     |   3 +-
+ mt7915/mac.c      |   2 +-
+ mt7915/main.c     |  36 +++++-----
+ mt7915/mcu.c      | 167 +++++++++++++++++++++++-----------------------
+ mt7915/mmio.c     |  55 +++++++++------
+ mt7921/main.c     |  31 ++-------
+ tx.c              |  11 +--
+ usb.c             |  43 ++++++------
+ 23 files changed, 286 insertions(+), 426 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 df2ca73f..d4829376 100644
+--- a/dma.c
++++ b/dma.c
+@@ -173,7 +173,7 @@ mt76_free_pending_rxwi(struct mt76_dev *dev)
+ 	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);
+ 	}
+ 	local_bh_enable();
+@@ -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, t->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,
++				 SKB_WITH_OVERHEAD(q->buf_size),
++				 DMA_FROM_DEVICE);
+ 
+ 		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;
+-		dma_sync_single_for_cpu(dev->dma_dev, e->dma_addr[0],
+-				SKB_WITH_OVERHEAD(q->buf_size),
+-				page_pool_get_dma_dir(q->page_pool));
++		dma_unmap_single(dev->dma_dev, e->dma_addr[0],
++				 SKB_WITH_OVERHEAD(q->buf_size),
++				 DMA_FROM_DEVICE);
+ 	}
+ 
+ 	return buf;
+@@ -584,11 +584,11 @@ free_skb:
+ }
+ 
+ static int
+-mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q,
+-		 bool allow_direct)
++mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
+ {
+ 	int len = SKB_WITH_OVERHEAD(q->buf_size);
+-	int frames = 0;
++	int frames = 0, offset = q->buf_offset;
++	dma_addr_t addr;
+ 
+ 	if (!q->ndesc)
+ 		return 0;
+@@ -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) {
+-		enum dma_data_direction dir;
+ 		struct mt76_queue_buf qbuf;
+-		dma_addr_t addr;
+-		int offset;
+-		void *buf;
++		void *buf = NULL;
+ 
+-		buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
++		buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
+ 		if (!buf)
+ 			break;
+ 
+-		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->dma_dev, addr, len, dir);
++		addr = dma_map_single(dev->dma_dev, buf, len, DMA_FROM_DEVICE);
++		if (unlikely(dma_mapping_error(dev->dma_dev, addr))) {
++			skb_free_frag(buf);
++			break;
++		}
+ 
+-		qbuf.addr = addr + q->buf_offset;
+-		qbuf.len = len - q->buf_offset;
++		qbuf.addr = addr + offset;
++		qbuf.len = len - offset;
+ 		qbuf.skip_unmap = false;
+ 		if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) {
+-			mt76_put_page_pool_buf(buf, allow_direct);
++			dma_unmap_single(dev->dma_dev, addr, len,
++					 DMA_FROM_DEVICE);
++			skb_free_frag(buf);
+ 			break;
+ 		}
+ 		frames++;
+@@ -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);
+-		mt76_dma_rx_fill(dev, q, false);
++		mt76_dma_rx_fill(dev, q);
+ 		q->flags = flags;
+ 
+ 		ret = mtk_wed_device_txfree_ring_setup(wed, q->regs);
+@@ -706,10 +707,6 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
+ 	if (!q->entry)
+ 		return -ENOMEM;
+ 
+-	ret = mt76_create_page_pool(dev, q);
+-	if (ret)
+-		return ret;
+-
+ 	ret = mt76_dma_wed_setup(dev, q, false);
+ 	if (ret)
+ 		return ret;
+@@ -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)
+ {
++	struct page *page;
+ 	void *buf;
+ 	bool more;
+ 
+@@ -736,7 +734,7 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
+ 		if (!buf)
+ 			break;
+ 
+-		mt76_put_page_pool_buf(buf, false);
++		skb_free_frag(buf);
+ 	} while (1);
+ 
+ 	if (q->rx_head) {
+@@ -745,6 +743,13 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
+ 	}
+ 
+ 	spin_unlock_bh(&q->lock);
++
++	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));
+ }
+ 
+ static void
+@@ -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);
+-		mt76_dma_rx_fill(dev, q, false);
++		mt76_dma_rx_fill(dev, q);
+ 	}
+ }
+ 
+@@ -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 {
+-		mt76_put_page_pool_buf(data, true);
++		skb_free_frag(data);
+ 	}
+ 
+ 	if (more)
+@@ -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);
+-		skb_mark_for_recycle(skb);
+ 
+ 		*(u32 *)skb->cb = info;
+ 
+@@ -872,10 +876,10 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
+ 		continue;
+ 
+ free_frag:
+-		mt76_put_page_pool_buf(data, true);
++		skb_free_frag(data);
+ 	}
+ 
+-	mt76_dma_rx_fill(dev, q, true);
++	mt76_dma_rx_fill(dev, q);
+ 	return done;
+ }
+ 
+@@ -919,8 +923,8 @@ mt76_dma_init(struct mt76_dev *dev,
+ 	init_completion(&dev->mmio.wed_reset_complete);
+ 
+ 	mt76_for_each_q_rx(dev, i) {
+-		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll);
+-		mt76_dma_rx_fill(dev, &dev->q_rx[i], false);
++		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll, 64);
++		mt76_dma_rx_fill(dev, &dev->q_rx[i]);
+ 		napi_enable(&dev->napi[i]);
+ 	}
+ 
+@@ -971,8 +975,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
+ 
+ 		netif_napi_del(&dev->napi[i]);
+ 		mt76_dma_rx_cleanup(dev, q);
+-
+-		page_pool_destroy(q->page_pool);
+ 	}
+ 
+ 	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 87902f4b..46e35668 100644
+--- a/mac80211.c
++++ b/mac80211.c
+@@ -4,7 +4,6 @@
+  */
+ #include <linux/sched.h>
+ #include <linux/of.h>
+-#include <net/page_pool.h>
+ #include "mt76.h"
+ 
+ #define CHAN2G(_idx, _freq) {			\
+@@ -562,47 +561,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
+ }
+ EXPORT_SYMBOL_GPL(mt76_unregister_phy);
+ 
+-int mt76_create_page_pool(struct mt76_dev *dev, struct mt76_queue *q)
+-{
+-	struct page_pool_params pp_params = {
+-		.order = 0,
+-		.flags = PP_FLAG_PAGE_FRAG,
+-		.nid = NUMA_NO_NODE,
+-		.dev = dev->dma_dev,
+-	};
+-	int idx = q - dev->q_rx;
+-
+-	switch (idx) {
+-	case MT_RXQ_MAIN:
+-	case MT_RXQ_BAND1:
+-	case MT_RXQ_BAND2:
+-		pp_params.pool_size = 256;
+-		break;
+-	default:
+-		pp_params.pool_size = 16;
+-		break;
+-	}
+-
+-	if (mt76_is_mmio(dev)) {
+-		/* rely on page_pool for DMA mapping */
+-		pp_params.flags |= PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
+-		pp_params.dma_dir = DMA_FROM_DEVICE;
+-		pp_params.max_len = PAGE_SIZE;
+-		pp_params.offset = 0;
+-	}
+-
+-	q->page_pool = page_pool_create(&pp_params);
+-	if (IS_ERR(q->page_pool)) {
+-		int err = PTR_ERR(q->page_pool);
+-
+-		q->page_pool = NULL;
+-		return err;
+-	}
+-
+-	return 0;
+-}
+-EXPORT_SYMBOL_GPL(mt76_create_page_pool);
+-
+ struct mt76_dev *
+ mt76_alloc_device(struct device *pdev, unsigned int size,
+ 		  const struct ieee80211_ops *ops,
+@@ -1547,7 +1505,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power);
+ static void
+ __mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ {
+-	if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
++	if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
+ 		ieee80211_csa_finish(vif);
+ }
+ 
+@@ -1569,7 +1527,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ {
+ 	struct mt76_dev *dev = priv;
+ 
+-	if (!vif->bss_conf.csa_active)
++	if (!vif->csa_active)
+ 		return;
+ 
+ 	dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
+@@ -1741,21 +1699,6 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
+ }
+ EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
+ 
+-void mt76_ethtool_page_pool_stats(struct mt76_dev *dev, u64 *data, int *index)
+-{
+-#ifdef CONFIG_PAGE_POOL_STATS
+-	struct page_pool_stats stats = {};
+-	int i;
+-
+-	mt76_for_each_q_rx(dev, i)
+-		page_pool_get_stats(dev->q_rx[i].page_pool, &stats);
+-
+-	page_pool_ethtool_stats_get(data, &stats);
+-	*index += page_pool_ethtool_stats_get_count();
+-#endif
+-}
+-EXPORT_SYMBOL_GPL(mt76_ethtool_page_pool_stats);
+-
+ 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 183b0fc5..856dacbc 100644
+--- a/mt76.h
++++ b/mt76.h
+@@ -202,7 +202,7 @@ struct mt76_queue {
+ 
+ 	dma_addr_t desc_dma;
+ 	struct sk_buff *rx_head;
+-	struct page_pool *page_pool;
++	struct page_frag_cache rx_page;
+ };
+ 
+ struct mt76_mcu_ops {
+@@ -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);
+ }
+ 
+-void mt76_ethtool_page_pool_stats(struct mt76_dev *dev, u64 *data, int *index);
+ 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);
+@@ -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_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)
+-{
+-	struct page *page = virt_to_head_page(buf);
+-
+-	page_pool_put_full_page(page->pp, page, allow_direct);
+-}
+-
+-static inline void *
+-mt76_get_page_pool_buf(struct mt76_queue *q, u32 *offset, u32 size)
+-{
+-	struct page *page;
+-
+-	page = page_pool_dev_alloc_frag(q->page_pool, offset, size);
+-	if (!page)
+-		return NULL;
+-
+-	return page_address(page) + *offset;
+-}
+ 
+ static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
+ {
+diff --git a/mt7615/dma.c b/mt7615/dma.c
+index f1914431..ec729dbe 100644
+--- a/mt7615/dma.c
++++ b/mt7615/dma.c
+@@ -281,8 +281,8 @@ int mt7615_dma_init(struct mt7615_dev *dev)
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
+-			  mt7615_poll_tx);
++	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
++			  mt7615_poll_tx, NAPI_POLL_WEIGHT);
+ 	napi_enable(&dev->mt76.tx_napi);
+ 
+ 	mt76_poll(dev, MT_WPDMA_GLO_CFG,
+diff --git a/mt7615/main.c b/mt7615/main.c
+index ab4c1b44..8fb5b256 100644
+--- a/mt7615/main.c
++++ b/mt7615/main.c
+@@ -474,7 +474,7 @@ static int mt7615_config(struct ieee80211_hw *hw, u32 changed)
+ 
+ static int
+ mt7615_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+-	       unsigned int link_id, u16 queue,
++	       u16 queue,
+ 	       const struct ieee80211_tx_queue_params *params)
+ {
+ 	struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+@@ -556,7 +556,7 @@ static void mt7615_configure_filter(struct ieee80211_hw *hw,
+ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
+ 				    struct ieee80211_vif *vif,
+ 				    struct ieee80211_bss_conf *info,
+-				    u64 changed)
++				    u32 changed)
+ {
+ 	struct mt7615_dev *dev = mt7615_hw_dev(hw);
+ 	struct mt7615_phy *phy = mt7615_hw_phy(hw);
+@@ -599,7 +599,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
+ 	}
+ 
+ 	if (changed & BSS_CHANGED_ASSOC)
+-		mt7615_mac_set_beacon_filter(phy, vif, vif->cfg.assoc);
++		mt7615_mac_set_beacon_filter(phy, vif, info->assoc);
+ 
+ 	mt7615_mutex_release(dev);
+ }
+diff --git a/mt7615/mcu.c b/mt7615/mcu.c
+index eea398c7..39e81d26 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);
+@@ -352,7 +353,7 @@ out:
+ static void
+ mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ {
+-	if (vif->bss_conf.csa_active)
++	if (vif->csa_active)
+ 		ieee80211_csa_finish(vif);
+ }
+ 
+@@ -698,7 +699,7 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
+ 	if (!enable)
+ 		goto out;
+ 
+-	skb = ieee80211_beacon_get_template(hw, vif, &offs, 0);
++	skb = ieee80211_beacon_get_template(hw, vif, &offs);
+ 	if (!skb)
+ 		return -EINVAL;
+ 
+@@ -1073,7 +1074,7 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
+ 	if (!enable)
+ 		goto out;
+ 
+-	skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs, 0);
++	skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs);
+ 	if (!skb)
+ 		return -EINVAL;
+ 
+@@ -2524,7 +2525,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
+ 		u8 pad;
+ 	} req = {
+ 		.bss_idx = mvif->mt76.idx,
+-		.aid = cpu_to_le16(vif->cfg.aid),
++		.aid = cpu_to_le16(vif->bss_conf.aid),
+ 		.dtim_period = vif->bss_conf.dtim_period,
+ 		.bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int),
+ 	};
+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..fd14221a 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)
+ {
+@@ -196,7 +197,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif)
+ 			      */
+ 	} req = {
+ 		.bss_idx = mvif->idx,
+-		.ps_state = vif->cfg.ps ? 2 : 0,
++		.ps_state = vif->bss_conf.ps ? 2 : 0,
+ 	};
+ 
+ 	if (vif->type != NL80211_IFTYPE_STATION)
+@@ -407,7 +408,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
+ 		else
+ 			conn_type = CONNECTION_INFRA_AP;
+ 		basic->conn_type = cpu_to_le32(conn_type);
+-		basic->aid = cpu_to_le16(vif->cfg.aid);
++		basic->aid = cpu_to_le16(vif->bss_conf.aid);
+ 		break;
+ 	case NL80211_IFTYPE_ADHOC:
+ 		basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
+@@ -551,7 +552,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
+ 
+ 	if (sta) {
+ 		if (vif->type == NL80211_IFTYPE_STATION)
+-			generic->partial_aid = cpu_to_le16(vif->cfg.aid);
++			generic->partial_aid = cpu_to_le16(vif->bss_conf.aid);
+ 		else
+ 			generic->partial_aid = cpu_to_le16(sta->aid);
+ 		memcpy(generic->peer_addr, sta->addr, ETH_ALEN);
+@@ -597,14 +598,14 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+ 	    vif->type != NL80211_IFTYPE_STATION)
+ 		return;
+ 
+-	if (!sta->deflink.agg.max_amsdu_len)
++	if (!sta->max_amsdu_len)
+ 		return;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
+ 	amsdu = (struct sta_rec_amsdu *)tlv;
+ 	amsdu->max_amsdu_num = 8;
+ 	amsdu->amsdu_en = true;
+-	amsdu->max_mpdu_size = sta->deflink.agg.max_amsdu_len >=
++	amsdu->max_mpdu_size = sta->max_amsdu_len >=
+ 			       IEEE80211_MAX_MPDU_LEN_VHT_7991;
+ 
+ 	wcid->amsdu = true;
+@@ -615,7 +616,7 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+ static void
+ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+ {
+-	struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
++	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
+ 	struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem;
+ 	struct sta_rec_he *he;
+ 	struct tlv *tlv;
+@@ -703,7 +704,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+ 
+ 	he->he_cap = cpu_to_le32(cap);
+ 
+-	switch (sta->deflink.bandwidth) {
++	switch (sta->bandwidth) {
+ 	case IEEE80211_STA_RX_BW_160:
+ 		if (elem->phy_cap_info[0] &
+ 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
+@@ -748,7 +749,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+ static void
+ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
+ {
+-	struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
++	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
+ 	struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem;
+ 	struct sta_rec_he_v2 *he;
+ 	struct tlv *tlv;
+@@ -759,7 +760,7 @@ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
+ 	memcpy(he->he_phy_cap, elem->phy_cap_info, sizeof(he->he_phy_cap));
+ 	memcpy(he->he_mac_cap, elem->mac_cap_info, sizeof(he->he_mac_cap));
+ 
+-	switch (sta->deflink.bandwidth) {
++	switch (sta->bandwidth) {
+ 	case IEEE80211_STA_RX_BW_160:
+ 		if (elem->phy_cap_info[0] &
+ 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
+@@ -775,7 +776,7 @@ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
+ 		break;
+ 	}
+ 
+-	he->pkt_ext = IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US;
++	he->pkt_ext = IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US;
+ }
+ 
+ static u8
+@@ -788,9 +789,9 @@ mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
+ 	u8 mode = 0;
+ 
+ 	if (sta) {
+-		ht_cap = &sta->deflink.ht_cap;
+-		vht_cap = &sta->deflink.vht_cap;
+-		he_cap = &sta->deflink.he_cap;
++		ht_cap = &sta->ht_cap;
++		vht_cap = &sta->vht_cap;
++		he_cap = &sta->he_cap;
+ 	} else {
+ 		struct ieee80211_supported_band *sband;
+ 
+@@ -839,25 +840,25 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
+ 	u16 supp_rates;
+ 
+ 	/* starec ht */
+-	if (sta->deflink.ht_cap.ht_supported) {
++	if (sta->ht_cap.ht_supported) {
+ 		struct sta_rec_ht *ht;
+ 
+ 		tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht));
+ 		ht = (struct sta_rec_ht *)tlv;
+-		ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap);
++		ht->ht_cap = cpu_to_le16(sta->ht_cap.cap);
+ 	}
+ 
+ 	/* starec vht */
+-	if (sta->deflink.vht_cap.vht_supported) {
++	if (sta->vht_cap.vht_supported) {
+ 		struct sta_rec_vht *vht;
+ 		int len;
+ 
+ 		len = is_mt7921(dev) ? sizeof(*vht) : sizeof(*vht) - 4;
+ 		tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, len);
+ 		vht = (struct sta_rec_vht *)tlv;
+-		vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
+-		vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map;
+-		vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map;
++		vht->vht_cap = cpu_to_le32(sta->vht_cap.cap);
++		vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map;
++		vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map;
+ 	}
+ 
+ 	/* starec uapsd */
+@@ -866,11 +867,11 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
+ 	if (!is_mt7921(dev))
+ 		return;
+ 
+-	if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)
++	if (sta->ht_cap.ht_supported || sta->he_cap.has_he)
+ 		mt76_connac_mcu_sta_amsdu_tlv(skb, sta, vif);
+ 
+ 	/* starec he */
+-	if (sta->deflink.he_cap.has_he) {
++	if (sta->he_cap.has_he) {
+ 		mt76_connac_mcu_sta_he_tlv(skb, sta);
+ 		mt76_connac_mcu_sta_he_tlv_v2(skb, sta);
+ 		if (band == NL80211_BAND_6GHZ &&
+@@ -880,7 +881,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
+ 			tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE_6G,
+ 						      sizeof(*he_6g_capa));
+ 			he_6g_capa = (struct sta_rec_he_6g_capa *)tlv;
+-			he_6g_capa->capa = sta->deflink.he_6ghz_capa.capa;
++			he_6g_capa->capa = sta->he_6ghz_capa.capa;
+ 		}
+ 	}
+ 
+@@ -890,14 +891,14 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
+ 	phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates);
+ 	phy->rcpi = rcpi;
+ 	phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR,
+-				sta->deflink.ht_cap.ampdu_factor) |
++				sta->ht_cap.ampdu_factor) |
+ 		     FIELD_PREP(IEEE80211_HT_AMPDU_PARM_DENSITY,
+-				sta->deflink.ht_cap.ampdu_density);
++				sta->ht_cap.ampdu_density);
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra_info));
+ 	ra_info = (struct sta_rec_ra_info *)tlv;
+ 
+-	supp_rates = sta->deflink.supp_rates[band];
++	supp_rates = sta->supp_rates[band];
+ 	if (band == NL80211_BAND_2GHZ)
+ 		supp_rates = FIELD_PREP(RA_LEGACY_OFDM, supp_rates >> 4) |
+ 			     FIELD_PREP(RA_LEGACY_CCK, supp_rates & 0xf);
+@@ -906,18 +907,18 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
+ 
+ 	ra_info->legacy = cpu_to_le16(supp_rates);
+ 
+-	if (sta->deflink.ht_cap.ht_supported)
++	if (sta->ht_cap.ht_supported)
+ 		memcpy(ra_info->rx_mcs_bitmask,
+-		       sta->deflink.ht_cap.mcs.rx_mask,
++		       sta->ht_cap.mcs.rx_mask,
+ 		       HT_MCS_MASK_NUM);
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_STATE, sizeof(*state));
+ 	state = (struct sta_rec_state *)tlv;
+ 	state->state = sta_state;
+ 
+-	if (sta->deflink.vht_cap.vht_supported) {
+-		state->vht_opmode = sta->deflink.bandwidth;
+-		state->vht_opmode |= (sta->deflink.rx_nss - 1) <<
++	if (sta->vht_cap.vht_supported) {
++		state->vht_opmode = sta->bandwidth;
++		state->vht_opmode |= (sta->rx_nss - 1) <<
+ 			IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT;
+ 	}
+ }
+@@ -933,7 +934,7 @@ void mt76_connac_mcu_wtbl_smps_tlv(struct sk_buff *skb,
+ 	tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_SMPS, sizeof(*smps),
+ 					     wtbl_tlv, sta_wtbl);
+ 	smps = (struct wtbl_smps *)tlv;
+-	smps->smps = (sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC);
++	smps->smps = (sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
+ }
+ EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_smps_tlv);
+ 
+@@ -945,27 +946,27 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
+ 	struct tlv *tlv;
+ 	u32 flags = 0;
+ 
+-	if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_6ghz_capa.capa) {
++	if (sta->ht_cap.ht_supported || sta->he_6ghz_capa.capa) {
+ 		tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht),
+ 						     wtbl_tlv, sta_wtbl);
+ 		ht = (struct wtbl_ht *)tlv;
+ 		ht->ldpc = ht_ldpc &&
+-			   !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING);
++			   !!(sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING);
+ 
+-		if (sta->deflink.ht_cap.ht_supported) {
+-			ht->af = sta->deflink.ht_cap.ampdu_factor;
+-			ht->mm = sta->deflink.ht_cap.ampdu_density;
++		if (sta->ht_cap.ht_supported) {
++			ht->af = sta->ht_cap.ampdu_factor;
++			ht->mm = sta->ht_cap.ampdu_density;
+ 		} else {
+-			ht->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
++			ht->af = le16_get_bits(sta->he_6ghz_capa.capa,
+ 					       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
+-			ht->mm = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
++			ht->mm = le16_get_bits(sta->he_6ghz_capa.capa,
+ 					       IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START);
+ 		}
+ 
+ 		ht->ht = true;
+ 	}
+ 
+-	if (sta->deflink.vht_cap.vht_supported || sta->deflink.he_6ghz_capa.capa) {
++	if (sta->vht_cap.vht_supported || sta->he_6ghz_capa.capa) {
+ 		struct wtbl_vht *vht;
+ 		u8 af;
+ 
+@@ -974,18 +975,18 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
+ 						     sta_wtbl);
+ 		vht = (struct wtbl_vht *)tlv;
+ 		vht->ldpc = vht_ldpc &&
+-			    !!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC);
++			    !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC);
+ 		vht->vht = true;
+ 
+ 		af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
+-			       sta->deflink.vht_cap.cap);
++			       sta->vht_cap.cap);
+ 		if (ht)
+ 			ht->af = max(ht->af, af);
+ 	}
+ 
+ 	mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_tlv);
+ 
+-	if (is_connac_v1(dev) && sta->deflink.ht_cap.ht_supported) {
++	if (is_connac_v1(dev) && sta->ht_cap.ht_supported) {
+ 		/* sgi */
+ 		u32 msk = MT_WTBL_W5_SHORT_GI_20 | MT_WTBL_W5_SHORT_GI_40 |
+ 			  MT_WTBL_W5_SHORT_GI_80 | MT_WTBL_W5_SHORT_GI_160;
+@@ -995,15 +996,15 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
+ 						     sizeof(*raw), wtbl_tlv,
+ 						     sta_wtbl);
+ 
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
+ 			flags |= MT_WTBL_W5_SHORT_GI_20;
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
+ 			flags |= MT_WTBL_W5_SHORT_GI_40;
+ 
+-		if (sta->deflink.vht_cap.vht_supported) {
+-			if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
++		if (sta->vht_cap.vht_supported) {
++			if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
+ 				flags |= MT_WTBL_W5_SHORT_GI_80;
+-			if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
++			if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
+ 				flags |= MT_WTBL_W5_SHORT_GI_160;
+ 		}
+ 		raw = (struct wtbl_raw *)tlv;
+@@ -1289,9 +1290,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
+ 		return 0x38;
+ 
+ 	if (sta) {
+-		ht_cap = &sta->deflink.ht_cap;
+-		vht_cap = &sta->deflink.vht_cap;
+-		he_cap = &sta->deflink.he_cap;
++		ht_cap = &sta->ht_cap;
++		vht_cap = &sta->vht_cap;
++		he_cap = &sta->he_cap;
+ 	} else {
+ 		struct ieee80211_supported_band *sband;
+ 
+@@ -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
+@@ -1657,7 +1612,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;
+-
+ 		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);
+@@ -1790,7 +1744,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);
+ 	}
+-
+ 	req->match_num = sreq->n_match_sets;
+ 	for (i = 0; i < req->match_num; i++) {
+ 		match = &sreq->match_sets[i];
+@@ -2277,10 +2230,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
+ 				      struct mt76_vif *vif,
+ 				      struct ieee80211_bss_conf *info)
+ {
+-	struct ieee80211_vif *mvif = container_of(info, struct ieee80211_vif,
+-						  bss_conf);
+ 	struct sk_buff *skb;
+-	int i, len = min_t(int, mvif->cfg.arp_addr_cnt,
++	int i, len = min_t(int, info->arp_addr_cnt,
+ 			   IEEE80211_BSS_ARP_ADDR_LIST_LEN);
+ 	struct {
+ 		struct {
+@@ -2308,7 +2259,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++)
+-		skb_put_data(skb, &mvif->cfg.arp_addr_list[i], sizeof(__be32));
++		skb_put_data(skb, &info->arp_addr_list[i], sizeof(__be32));
+ 
+ 	return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true);
+ }
+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/mt76x02_mac.c b/mt76x02_mac.c
+index d3f74473..87ea3db1 100644
+--- a/mt76x02_mac.c
++++ b/mt76x02_mac.c
+@@ -404,7 +404,7 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi,
+ 		txwi->rate |= cpu_to_le16(MT_RXWI_RATE_LDPC);
+ 	if ((info->flags & IEEE80211_TX_CTL_STBC) && nss == 1)
+ 		txwi->rate |= cpu_to_le16(MT_RXWI_RATE_STBC);
+-	if (nss > 1 && sta && sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC)
++	if (nss > 1 && sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC)
+ 		txwi_flags |= MT_TXWI_FLAGS_MMPS;
+ 	if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
+ 		txwi->ack_ctl |= MT_TXWI_ACK_CTL_REQ;
+@@ -412,9 +412,9 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi,
+ 		txwi->ack_ctl |= MT_TXWI_ACK_CTL_NSEQ;
+ 	if ((info->flags & IEEE80211_TX_CTL_AMPDU) && sta) {
+ 		u8 ba_size = IEEE80211_MIN_AMPDU_BUF;
+-		u8 ampdu_density = sta->deflink.ht_cap.ampdu_density;
++		u8 ampdu_density = sta->ht_cap.ampdu_density;
+ 
+-		ba_size <<= sta->deflink.ht_cap.ampdu_factor;
++		ba_size <<= sta->ht_cap.ampdu_factor;
+ 		ba_size = min_t(int, 63, ba_size - 1);
+ 		if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
+ 			ba_size = 0;
+diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
+index 5a46813a..6cb7c16b 100644
+--- a/mt7915/debugfs.c
++++ b/mt7915/debugfs.c
+@@ -1364,8 +1364,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++) {
+-		phy.sgi |= gi << (i << sta->deflink.he_cap.has_he);
+-		phy.he_ltf |= he_ltf << (i << sta->deflink.he_cap.has_he);
++		phy.sgi |= gi << (i << sta->he_cap.has_he);
++		phy.he_ltf |= he_ltf << (i << sta->he_cap.has_he);
+ 	}
+ 	field = RATE_PARAM_FIXED;
+ 
+diff --git a/mt7915/dma.c b/mt7915/dma.c
+index 43a5456d..d64f492a 100644
+--- a/mt7915/dma.c
++++ b/mt7915/dma.c
+@@ -556,8 +556,8 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
+-			  mt7915_poll_tx);
++	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
++			  mt7915_poll_tx, NAPI_POLL_WEIGHT);
+ 	napi_enable(&dev->mt76.tx_napi);
+ 
+ 	mt7915_dma_enable(dev);
+diff --git a/mt7915/init.c b/mt7915/init.c
+index b88c3827..1216416b 100644
+--- a/mt7915/init.c
++++ b/mt7915/init.c
+@@ -1107,8 +1107,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+ 			mt7915_gen_ppe_thresh(he_cap->ppe_thres, nss);
+ 		} else {
+ 			he_cap_elem->phy_cap_info[9] |=
+-				u8_encode_bits(IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US,
+-					       IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK);
++				IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US;
+ 		}
+ 
+ 		if (band == NL80211_BAND_6GHZ) {
+diff --git a/mt7915/mac.c b/mt7915/mac.c
+index 97ca55d2..c060e5ec 100644
+--- a/mt7915/mac.c
++++ b/mt7915/mac.c
+@@ -852,7 +852,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
+ 	u16 fc, tid;
+ 	u32 val;
+ 
+-	if (!sta || !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
++	if (!sta || !(sta->ht_cap.ht_supported || sta->he_cap.has_he))
+ 		return;
+ 
+ 	tid = le32_get_bits(txwi[1], MT_TXD1_TID);
+diff --git a/mt7915/main.c b/mt7915/main.c
+index ea1d4e6a..c673b1bf 100644
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -502,7 +502,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
+ 
+ static int
+ mt7915_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+-	       unsigned int link_id, u16 queue,
++	       u16 queue,
+ 	       const struct ieee80211_tx_queue_params *params)
+ {
+ 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
+@@ -597,7 +597,7 @@ mt7915_update_bss_color(struct ieee80211_hw *hw,
+ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
+ 				    struct ieee80211_vif *vif,
+ 				    struct ieee80211_bss_conf *info,
+-				    u64 changed)
++				    u32 changed)
+ {
+ 	struct mt7915_phy *phy = mt7915_hw_phy(hw);
+ 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
+@@ -617,7 +617,7 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
+ 	}
+ 
+ 	if (changed & BSS_CHANGED_ASSOC)
+-		mt7915_mcu_add_bss_info(phy, vif, vif->cfg.assoc);
++		mt7915_mcu_add_bss_info(phy, vif, info->assoc);
+ 
+ 	if (changed & BSS_CHANGED_ERP_CTS_PROT)
+ 		mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot);
+@@ -1159,10 +1159,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);
+-	s16 txpower = sta->deflink.txpwr.power;
++	s16 txpower = sta->txpwr.power;
+ 	int ret;
+ 
+-	if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC)
++	if (sta->txpwr.type == NL80211_TX_POWER_AUTOMATIC)
+ 		txpower = 0;
+ 
+ 	mutex_lock(&dev->mt76.mutex);
+@@ -1293,22 +1293,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
+ 			   struct ieee80211_vif *vif,
+ 			   u32 sset, u8 *data)
+ {
+-	if (sset != ETH_SS_STATS)
+-		return;
+-
+-	memcpy(data, *mt7915_gstrings_stats, sizeof(mt7915_gstrings_stats));
+-	data += sizeof(mt7915_gstrings_stats);
+-	page_pool_ethtool_stats_get_strings(data);
++	if (sset == ETH_SS_STATS)
++		memcpy(data, *mt7915_gstrings_stats,
++		       sizeof(mt7915_gstrings_stats));
+ }
+ 
+ static
+ int mt7915_get_et_sset_count(struct ieee80211_hw *hw,
+ 			     struct ieee80211_vif *vif, int sset)
+ {
+-	if (sset != ETH_SS_STATS)
+-		return 0;
++	if (sset == ETH_SS_STATS)
++		return MT7915_SSTATS_LEN;
+ 
+-	return MT7915_SSTATS_LEN + page_pool_ethtool_stats_get_count();
++	return 0;
+ }
+ 
+ static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
+@@ -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 */
+-	int i, ei = 0, stats_size;
++	int i, ei = 0;
+ 
+ 	mutex_lock(&dev->mt76.mutex);
+ 
+@@ -1417,12 +1414,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+ 		return;
+ 
+ 	ei += wi.worker_stat_count;
+-
+-	mt76_ethtool_page_pool_stats(&dev->mt76, &data[ei], &ei);
+-
+-	stats_size = MT7915_SSTATS_LEN + page_pool_ethtool_stats_get_count();
+-	if (ei != stats_size)
+-		dev_err(dev->mt76.dev, "ei: %d size: %d", ei, stats_size);
++	if (ei != MT7915_SSTATS_LEN)
++		dev_err(dev->mt76.dev, "ei: %d  MT7915_SSTATS_LEN: %d",
++			ei, (int)MT7915_SSTATS_LEN);
+ }
+ 
+ static void
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 03ae3bc9..4b183a74 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;						\
+@@ -59,7 +60,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
+ 	struct mt7915_dev *dev = msta->vif->phy->dev;
+ 	enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band;
+ 	const u16 *mask = msta->vif->bitrate_mask.control[band].he_mcs;
+-	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
++	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
+ 
+ 	for (nss = 0; nss < max_nss; nss++) {
+ 		int mcs;
+@@ -99,7 +100,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
+ 
+ 		/* only support 2ss on 160MHz for mt7915 */
+ 		if (is_mt7915(&dev->mt76) && nss > 1 &&
+-		    sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
++		    sta->bandwidth == IEEE80211_STA_RX_BW_160)
+ 			break;
+ 	}
+ 
+@@ -112,8 +113,8 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs,
+ {
+ 	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
+ 	struct mt7915_dev *dev = msta->vif->phy->dev;
+-	u16 mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map);
+-	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
++	u16 mcs_map = le16_to_cpu(sta->vht_cap.vht_mcs.rx_mcs_map);
++	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
+ 	u16 mcs;
+ 
+ 	for (nss = 0; nss < max_nss; nss++, mcs_map >>= 2) {
+@@ -135,7 +136,7 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs,
+ 
+ 		/* only support 2ss on 160MHz for mt7915 */
+ 		if (is_mt7915(&dev->mt76) && nss > 1 &&
+-		    sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
++		    sta->bandwidth == IEEE80211_STA_RX_BW_160)
+ 			break;
+ 	}
+ }
+@@ -144,10 +145,10 @@ static void
+ mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs,
+ 			  const u8 *mask)
+ {
+-	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
++	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
+ 
+ 	for (nss = 0; nss < max_nss; nss++)
+-		ht_mcs[nss] = sta->deflink.ht_cap.mcs.rx_mask[nss] & mask[nss];
++		ht_mcs[nss] = sta->ht_cap.mcs.rx_mask[nss] & mask[nss];
+ }
+ 
+ static int
+@@ -220,7 +221,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
+ static void
+ mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ {
+-	if (vif->bss_conf.csa_active)
++	if (vif->csa_active)
+ 		ieee80211_csa_finish(vif);
+ }
+ 
+@@ -321,7 +322,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
+ static void
+ mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ {
+-	if (!vif->bss_conf.color_change_active)
++	if (!vif->color_change_active)
+ 		return;
+ 
+ 	ieee80211_color_change_finish(vif);
+@@ -707,13 +708,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+ 		      struct ieee80211_vif *vif)
+ {
+ 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
+-	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
++	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
+ 	struct ieee80211_he_mcs_nss_supp mcs_map;
+ 	struct sta_rec_he *he;
+ 	struct tlv *tlv;
+ 	u32 cap = 0;
+ 
+-	if (!sta->deflink.he_cap.has_he)
++	if (!sta->he_cap.has_he)
+ 		return;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he));
+@@ -799,8 +800,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+ 
+ 	he->he_cap = cpu_to_le32(cap);
+ 
+-	mcs_map = sta->deflink.he_cap.he_mcs_nss_supp;
+-	switch (sta->deflink.bandwidth) {
++	mcs_map = sta->he_cap.he_mcs_nss_supp;
++	switch (sta->bandwidth) {
+ 	case IEEE80211_STA_RX_BW_160:
+ 		if (elem->phy_cap_info[0] &
+ 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
+@@ -850,7 +851,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;
+-	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
++	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
+ 	struct sta_rec_muru *muru;
+ 	struct tlv *tlv;
+ 
+@@ -869,11 +870,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 		muru->cfg.mimo_ul_en = true;
+ 	muru->cfg.ofdma_dl_en = true;
+ 
+-	if (sta->deflink.vht_cap.vht_supported)
++	if (sta->vht_cap.vht_supported)
+ 		muru->mimo_dl.vht_mu_bfee =
+-			!!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
++			!!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
+ 
+-	if (!sta->deflink.he_cap.has_he)
++	if (!sta->he_cap.has_he)
+ 		return;
+ 
+ 	muru->mimo_dl.partial_bw_dl_mimo =
+@@ -907,13 +908,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+ 	struct sta_rec_ht *ht;
+ 	struct tlv *tlv;
+ 
+-	if (!sta->deflink.ht_cap.ht_supported)
++	if (!sta->ht_cap.ht_supported)
+ 		return;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht));
+ 
+ 	ht = (struct sta_rec_ht *)tlv;
+-	ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap);
++	ht->ht_cap = cpu_to_le16(sta->ht_cap.cap);
+ }
+ 
+ static void
+@@ -922,15 +923,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+ 	struct sta_rec_vht *vht;
+ 	struct tlv *tlv;
+ 
+-	if (!sta->deflink.vht_cap.vht_supported)
++	if (!sta->vht_cap.vht_supported)
+ 		return;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, sizeof(*vht));
+ 
+ 	vht = (struct sta_rec_vht *)tlv;
+-	vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
+-	vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map;
+-	vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map;
++	vht->vht_cap = cpu_to_le32(sta->vht_cap.cap);
++	vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map;
++	vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map;
+ }
+ 
+ static void
+@@ -945,7 +946,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	    vif->type != NL80211_IFTYPE_AP)
+ 		return;
+ 
+-	if (!sta->deflink.agg.max_amsdu_len)
++	if (!sta->max_amsdu_len)
+ 	    return;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
+@@ -954,7 +955,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	amsdu->amsdu_en = true;
+ 	msta->wcid.amsdu = true;
+ 
+-	switch (sta->deflink.agg.max_amsdu_len) {
++	switch (sta->max_amsdu_len) {
+ 	case IEEE80211_MAX_MPDU_LEN_VHT_11454:
+ 		if (!is_mt7915(&dev->mt76)) {
+ 			amsdu->max_mpdu_size =
+@@ -1017,8 +1018,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+ 	if (!bfee && tx_ant < 2)
+ 		return false;
+ 
+-	if (sta->deflink.he_cap.has_he) {
+-		struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem;
++	if (sta->he_cap.has_he) {
++		struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem;
+ 
+ 		if (bfee)
+ 			return mvif->cap.he_su_ebfee &&
+@@ -1028,8 +1029,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+ 			       HE_PHY(CAP4_SU_BEAMFORMEE, pe->phy_cap_info[4]);
+ 	}
+ 
+-	if (sta->deflink.vht_cap.vht_supported) {
+-		u32 cap = sta->deflink.vht_cap.cap;
++	if (sta->vht_cap.vht_supported) {
++		u32 cap = sta->vht_cap.cap;
+ 
+ 		if (bfee)
+ 			return mvif->cap.vht_su_ebfee &&
+@@ -1055,7 +1056,7 @@ static void
+ mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
+ 		       struct sta_rec_bf *bf)
+ {
+-	struct ieee80211_mcs_info *mcs = &sta->deflink.ht_cap.mcs;
++	struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
+ 	u8 n = 0;
+ 
+ 	bf->tx_mode = MT_PHY_TYPE_HT;
+@@ -1080,7 +1081,7 @@ static void
+ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
+ 			struct sta_rec_bf *bf, bool explicit)
+ {
+-	struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap;
++	struct ieee80211_sta_vht_cap *pc = &sta->vht_cap;
+ 	struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap;
+ 	u16 mcs_map = le16_to_cpu(pc->vht_mcs.rx_mcs_map);
+ 	u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map);
+@@ -1101,14 +1102,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
+ 		bf->ncol = min_t(u8, nss_mcs, bf->nrow);
+ 		bf->ibf_ncol = bf->ncol;
+ 
+-		if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
++		if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
+ 			bf->nrow = 1;
+ 	} else {
+ 		bf->nrow = tx_ant;
+ 		bf->ncol = min_t(u8, nss_mcs, bf->nrow);
+ 		bf->ibf_ncol = nss_mcs;
+ 
+-		if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
++		if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
+ 			bf->ibf_nrow = 1;
+ 	}
+ }
+@@ -1117,7 +1118,7 @@ static void
+ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
+ 		       struct mt7915_phy *phy, struct sta_rec_bf *bf)
+ {
+-	struct ieee80211_sta_he_cap *pc = &sta->deflink.he_cap;
++	struct ieee80211_sta_he_cap *pc = &sta->he_cap;
+ 	struct ieee80211_he_cap_elem *pe = &pc->he_cap_elem;
+ 	const struct ieee80211_sta_he_cap *vc =
+ 		mt76_connac_get_he_phy_cap(phy->mt76, vif);
+@@ -1142,7 +1143,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
+ 	bf->ncol = min_t(u8, nss_mcs, bf->nrow);
+ 	bf->ibf_ncol = bf->ncol;
+ 
+-	if (sta->deflink.bandwidth != IEEE80211_STA_RX_BW_160)
++	if (sta->bandwidth != IEEE80211_STA_RX_BW_160)
+ 		return;
+ 
+ 	/* go over for 160MHz and 80p80 */
+@@ -1190,7 +1191,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	};
+ 	bool ebf;
+ 
+-	if (!(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
++	if (!(sta->ht_cap.ht_supported || sta->he_cap.has_he))
+ 		return;
+ 
+ 	ebf = mt7915_is_ebf_supported(phy, vif, sta, false);
+@@ -1204,21 +1205,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	 * vht: support eBF and iBF
+ 	 * ht: iBF only, since mac80211 lacks of eBF support
+ 	 */
+-	if (sta->deflink.he_cap.has_he && ebf)
++	if (sta->he_cap.has_he && ebf)
+ 		mt7915_mcu_sta_bfer_he(sta, vif, phy, bf);
+-	else if (sta->deflink.vht_cap.vht_supported)
++	else if (sta->vht_cap.vht_supported)
+ 		mt7915_mcu_sta_bfer_vht(sta, phy, bf, ebf);
+-	else if (sta->deflink.ht_cap.ht_supported)
++	else if (sta->ht_cap.ht_supported)
+ 		mt7915_mcu_sta_bfer_ht(sta, phy, bf);
+ 	else
+ 		return;
+ 
+ 	bf->bf_cap = ebf ? ebf : dev->ibf << 1;
+-	bf->bw = sta->deflink.bandwidth;
+-	bf->ibf_dbw = sta->deflink.bandwidth;
++	bf->bw = sta->bandwidth;
++	bf->ibf_dbw = sta->bandwidth;
+ 	bf->ibf_nrow = tx_ant;
+ 
+-	if (!ebf && sta->deflink.bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol)
++	if (!ebf && sta->bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol)
+ 		bf->ibf_timeout = 0x48;
+ 	else
+ 		bf->ibf_timeout = 0x18;
+@@ -1228,7 +1229,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	else
+ 		bf->mem_20m = matrix[bf->nrow][bf->ncol];
+ 
+-	switch (sta->deflink.bandwidth) {
++	switch (sta->bandwidth) {
+ 	case IEEE80211_STA_RX_BW_160:
+ 	case IEEE80211_STA_RX_BW_80:
+ 		bf->mem_total = bf->mem_20m * 2;
+@@ -1253,7 +1254,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	struct tlv *tlv;
+ 	u8 nrow = 0;
+ 
+-	if (!(sta->deflink.vht_cap.vht_supported || sta->deflink.he_cap.has_he))
++	if (!(sta->vht_cap.vht_supported || sta->he_cap.has_he))
+ 		return;
+ 
+ 	if (!mt7915_is_ebf_supported(phy, vif, sta, true))
+@@ -1262,13 +1263,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_BFEE, sizeof(*bfee));
+ 	bfee = (struct sta_rec_bfee *)tlv;
+ 
+-	if (sta->deflink.he_cap.has_he) {
+-		struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem;
++	if (sta->he_cap.has_he) {
++		struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem;
+ 
+ 		nrow = HE_PHY(CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK,
+ 			      pe->phy_cap_info[5]);
+-	} else if (sta->deflink.vht_cap.vht_supported) {
+-		struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap;
++	} else if (sta->vht_cap.vht_supported) {
++		struct ieee80211_sta_vht_cap *pc = &sta->vht_cap;
+ 
+ 		nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
+ 				 pc->cap);
+@@ -1324,7 +1325,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+ 			ra->phy = *phy;
+ 		break;
+ 	case RATE_PARAM_MMPS_UPDATE:
+-		ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode);
++		ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode);
+ 		break;
+ 	case RATE_PARAM_SPE_UPDATE:
+ 		ra->spe_idx = *(u8 *)data;
+@@ -1399,7 +1400,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+ 	do {									\
+ 		u8 i, gi = mask->control[band]._gi;				\
+ 		gi = (_he) ? gi : gi == NL80211_TXRATE_FORCE_SGI;		\
+-		for (i = 0; i <= sta->deflink.bandwidth; i++) {			\
++		for (i = 0; i <= sta->bandwidth; i++) {				\
+ 			phy.sgi |= gi << (i << (_he));				\
+ 			phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\
+ 		}								\
+@@ -1413,11 +1414,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+ 		}								\
+ 	} while (0)
+ 
+-	if (sta->deflink.he_cap.has_he) {
++	if (sta->he_cap.has_he) {
+ 		__sta_phy_bitrate_mask_check(he_mcs, he_gi, 0, 1);
+-	} else if (sta->deflink.vht_cap.vht_supported) {
++	} else if (sta->vht_cap.vht_supported) {
+ 		__sta_phy_bitrate_mask_check(vht_mcs, gi, 0, 0);
+-	} else if (sta->deflink.ht_cap.ht_supported) {
++	} else if (sta->ht_cap.ht_supported) {
+ 		__sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0);
+ 	} else {
+ 		nrates = hweight32(mask->control[band].legacy);
+@@ -1451,7 +1452,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+ 		 * actual txrate hardware sends out.
+ 		 */
+ 		addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 7);
+-		if (sta->deflink.he_cap.has_he)
++		if (sta->he_cap.has_he)
+ 			mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi);
+ 		else
+ 			mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi);
+@@ -1484,7 +1485,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+ 	enum nl80211_band band = chandef->chan->band;
+ 	struct sta_rec_ra *ra;
+ 	struct tlv *tlv;
+-	u32 supp_rate = sta->deflink.supp_rates[band];
++	u32 supp_rate = sta->supp_rates[band];
+ 	u32 cap = sta->wme ? STA_CAP_WMM : 0;
+ 
+ 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra));
+@@ -1494,9 +1495,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+ 	ra->auto_rate = true;
+ 	ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta);
+ 	ra->channel = chandef->chan->hw_value;
+-	ra->bw = sta->deflink.bandwidth;
+-	ra->phy.bw = sta->deflink.bandwidth;
+-	ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode);
++	ra->bw = sta->bandwidth;
++	ra->phy.bw = sta->bandwidth;
++	ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode);
+ 
+ 	if (supp_rate) {
+ 		supp_rate &= mask->control[band].legacy;
+@@ -1516,22 +1517,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+ 		}
+ 	}
+ 
+-	if (sta->deflink.ht_cap.ht_supported) {
++	if (sta->ht_cap.ht_supported) {
+ 		ra->supp_mode |= MODE_HT;
+-		ra->af = sta->deflink.ht_cap.ampdu_factor;
+-		ra->ht_gf = !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD);
++		ra->af = sta->ht_cap.ampdu_factor;
++		ra->ht_gf = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD);
+ 
+ 		cap |= STA_CAP_HT;
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
+ 			cap |= STA_CAP_SGI_20;
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
+ 			cap |= STA_CAP_SGI_40;
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)
+ 			cap |= STA_CAP_TX_STBC;
+-		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
++		if (sta->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
+ 			cap |= STA_CAP_RX_STBC;
+ 		if (mvif->cap.ht_ldpc &&
+-		    (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING))
++		    (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING))
+ 			cap |= STA_CAP_LDPC;
+ 
+ 		mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs,
+@@ -1539,37 +1540,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+ 		ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs;
+ 	}
+ 
+-	if (sta->deflink.vht_cap.vht_supported) {
++	if (sta->vht_cap.vht_supported) {
+ 		u8 af;
+ 
+ 		ra->supp_mode |= MODE_VHT;
+ 		af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
+-			       sta->deflink.vht_cap.cap);
++			       sta->vht_cap.cap);
+ 		ra->af = max_t(u8, ra->af, af);
+ 
+ 		cap |= STA_CAP_VHT;
+-		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
++		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
+ 			cap |= STA_CAP_VHT_SGI_80;
+-		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
++		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
+ 			cap |= STA_CAP_VHT_SGI_160;
+-		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC)
++		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC)
+ 			cap |= STA_CAP_VHT_TX_STBC;
+-		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1)
++		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1)
+ 			cap |= STA_CAP_VHT_RX_STBC;
+ 		if (mvif->cap.vht_ldpc &&
+-		    (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC))
++		    (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC))
+ 			cap |= STA_CAP_VHT_LDPC;
+ 
+ 		mt7915_mcu_set_sta_vht_mcs(sta, ra->supp_vht_mcs,
+ 					   mask->control[band].vht_mcs);
+ 	}
+ 
+-	if (sta->deflink.he_cap.has_he) {
++	if (sta->he_cap.has_he) {
+ 		ra->supp_mode |= MODE_HE;
+ 		cap |= STA_CAP_HE;
+ 
+-		if (sta->deflink.he_6ghz_capa.capa)
+-			ra->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
++		if (sta->he_6ghz_capa.capa)
++			ra->af = le16_get_bits(sta->he_6ghz_capa.capa,
+ 					       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
+ 	}
+ 
+@@ -1778,7 +1779,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
+ 	if (!offs->cntdwn_counter_offs[0])
+ 		return;
+ 
+-	sub_tag = vif->bss_conf.csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
++	sub_tag = vif->csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
+ 	tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info),
+ 					   &bcn->sub_ntlv, &bcn->len);
+ 	info = (struct bss_info_bcn_cntdwn *)tlv;
+@@ -1863,9 +1864,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+ 	if (offs->cntdwn_counter_offs[0]) {
+ 		u16 offset = offs->cntdwn_counter_offs[0];
+ 
+-		if (vif->bss_conf.csa_active)
++		if (vif->csa_active)
+ 			cont->csa_ofs = cpu_to_le16(offset - 4);
+-		if (vif->bss_conf.color_change_active)
++		if (vif->color_change_active)
+ 			cont->bcc_ofs = cpu_to_le16(offset - 3);
+ 	}
+ 
+@@ -2065,7 +2066,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 	if (!en)
+ 		goto out;
+ 
+-	skb = ieee80211_beacon_get_template(hw, vif, &offs, 0);
++	skb = ieee80211_beacon_get_template(hw, vif, &offs);
+ 	if (!skb)
+ 		return -EINVAL;
+ 
+@@ -3247,17 +3248,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+ 	if (txpower) {
+ 		u32 offs, len, i;
+ 
+-		if (sta->deflink.ht_cap.ht_supported) {
++		if (sta->ht_cap.ht_supported) {
+ 			const u8 *sku_len = mt7915_sku_group_len;
+ 
+ 			offs = sku_len[SKU_CCK] + sku_len[SKU_OFDM];
+ 			len = sku_len[SKU_HT_BW20] + sku_len[SKU_HT_BW40];
+ 
+-			if (sta->deflink.vht_cap.vht_supported) {
++			if (sta->vht_cap.vht_supported) {
+ 				offs += len;
+ 				len = sku_len[SKU_VHT_BW20] * 4;
+ 
+-				if (sta->deflink.he_cap.has_he) {
++				if (sta->he_cap.has_he) {
+ 					offs += len + sku_len[SKU_HE_RU26] * 3;
+ 					len = sku_len[SKU_HE_RU242] * 4;
+ 				}
+diff --git a/mt7915/mmio.c b/mt7915/mmio.c
+index 6f0c0e2a..5ef43c44 100644
+--- a/mt7915/mmio.c
++++ b/mt7915/mmio.c
+@@ -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;
++	u32 length;
+ 	int i;
+ 
+ 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
++	length = SKB_DATA_ALIGN(NET_SKB_PAD + wed->wlan.rx_size +
++				sizeof(struct skb_shared_info));
++
+ 	for (i = 0; i < dev->mt76.rx_token_size; i++) {
+ 		struct mt76_txwi_cache *t;
+ 
+@@ -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(t->ptr, false);
++		dma_unmap_single(dev->mt76.dma_dev, t->dma_addr,
++				 wed->wlan.rx_size, DMA_FROM_DEVICE);
++		__free_pages(virt_to_page(t->ptr), get_order(length));
+ 		t->ptr = NULL;
+ 
+ 		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_txwi_cache *t = NULL;
+ 	struct mt7915_dev *dev;
+-	struct mt76_queue *q;
+-	int i, len;
++	u32 length;
++	int i;
+ 
+ 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
+-	q = &dev->mt76.q_rx[MT_RXQ_MAIN];
+-	len = SKB_WITH_OVERHEAD(q->buf_size);
++	length = SKB_DATA_ALIGN(NET_SKB_PAD + wed->wlan.rx_size +
++				sizeof(struct skb_shared_info));
+ 
+ 	for (i = 0; i < size; i++) {
+-		enum dma_data_direction dir;
+-		dma_addr_t addr;
+-		u32 offset;
++		struct mt76_txwi_cache *t = 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)
+ 			goto unmap;
+ 
+-		buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
+-		if (!buf)
++		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);
++		if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
++			__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, 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);
++			__free_pages(page, get_order(length));
++			mt76_put_rxwi(&dev->mt76, t);
+ 			goto unmap;
+ 		}
+ 
+@@ -661,8 +676,6 @@ 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);
+ 	mt7915_mmio_wed_release_rx_buf(wed);
+ 	return -ENOMEM;
+ }
+diff --git a/mt7921/main.c b/mt7921/main.c
+index a72964e7..4c400223 100644
+--- a/mt7921/main.c
++++ b/mt7921/main.c
+@@ -1090,34 +1090,17 @@ static void
+ mt7921_get_et_strings(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 		      u32 sset, u8 *data)
+ {
+-	struct mt7921_dev *dev = mt7921_hw_dev(hw);
+-
+ 	if (sset != ETH_SS_STATS)
+ 		return;
+ 
+ 	memcpy(data, *mt7921_gstrings_stats, sizeof(mt7921_gstrings_stats));
+-
+-	if (mt76_is_sdio(&dev->mt76))
+-		return;
+-
+-	data += sizeof(mt7921_gstrings_stats);
+-	page_pool_ethtool_stats_get_strings(data);
+ }
+ 
+ static int
+ mt7921_get_et_sset_count(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 			 int sset)
+ {
+-	struct mt7921_dev *dev = mt7921_hw_dev(hw);
+-
+-	if (sset != ETH_SS_STATS)
+-		return 0;
+-
+-	if (mt76_is_sdio(&dev->mt76))
+-		return ARRAY_SIZE(mt7921_gstrings_stats);
+-
+-	return ARRAY_SIZE(mt7921_gstrings_stats) +
+-	       page_pool_ethtool_stats_get_count();
++	return sset == ETH_SS_STATS ? ARRAY_SIZE(mt7921_gstrings_stats) : 0;
+ }
+ 
+ static void
+@@ -1137,7 +1120,6 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 			 struct ethtool_stats *stats, u64 *data)
+ {
+ 	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
+-	int stats_size = ARRAY_SIZE(mt7921_gstrings_stats);
+ 	struct mt7921_phy *phy = mt7921_hw_phy(hw);
+ 	struct mt7921_dev *dev = phy->dev;
+ 	struct mib_stats *mib = &phy->mib;
+@@ -1193,14 +1175,9 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 		return;
+ 
+ 	ei += wi.worker_stat_count;
+-
+-	if (!mt76_is_sdio(&dev->mt76)) {
+-		mt76_ethtool_page_pool_stats(&dev->mt76, &data[ei], &ei);
+-		stats_size += page_pool_ethtool_stats_get_count();
+-	}
+-
+-	if (ei != stats_size)
+-		dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %d", ei, stats_size);
++	if (ei != ARRAY_SIZE(mt7921_gstrings_stats))
++		dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %zu",
++			ei, ARRAY_SIZE(mt7921_gstrings_stats));
+ }
+ 
+ static u64
+diff --git a/tx.c b/tx.c
+index 1f309d05..6cda23fa 100644
+--- a/tx.c
++++ b/tx.c
+@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
+ 			.skb = skb,
+ 			.info = IEEE80211_SKB_CB(skb),
+ 		};
+-		struct ieee80211_rate_status rs = {};
+ 		struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
+ 		struct mt76_wcid *wcid;
+ 
+ 		wcid = rcu_dereference(dev->wcid[cb->wcid]);
+ 		if (wcid) {
+ 			status.sta = wcid_to_sta(wcid);
+-			if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
+-				rs.rate_idx = wcid->rate;
+-				status.rates = &rs;
+-				status.n_rates = 1;
+-			} else {
+-				status.n_rates = 0;
+-			}
++
++			if (status.sta)
++				status.rate = &wcid->rate;
+ 		}
+ 
+ 		hw = mt76_tx_status_get_hw(dev, skb);
+diff --git a/usb.c b/usb.c
+index 5e5c7bf5..3e281715 100644
+--- a/usb.c
++++ b/usb.c
+@@ -319,27 +319,29 @@ mt76u_set_endpoints(struct usb_interface *intf,
+ 
+ static int
+ mt76u_fill_rx_sg(struct mt76_dev *dev, struct mt76_queue *q, struct urb *urb,
+-		 int nsgs)
++		 int nsgs, gfp_t gfp)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < nsgs; i++) {
++		struct page *page;
+ 		void *data;
+ 		int offset;
+ 
+-		data = mt76_get_page_pool_buf(q, &offset, q->buf_size);
++		data = page_frag_alloc(&q->rx_page, q->buf_size, gfp);
+ 		if (!data)
+ 			break;
+ 
+-		sg_set_page(&urb->sg[i], virt_to_head_page(data), q->buf_size,
+-			    offset);
++		page = virt_to_head_page(data);
++		offset = data - page_address(page);
++		sg_set_page(&urb->sg[i], page, q->buf_size, offset);
+ 	}
+ 
+ 	if (i < nsgs) {
+ 		int j;
+ 
+ 		for (j = nsgs; j < urb->num_sgs; j++)
+-			mt76_put_page_pool_buf(sg_virt(&urb->sg[j]), false);
++			skb_free_frag(sg_virt(&urb->sg[j]));
+ 		urb->num_sgs = i;
+ 	}
+ 
+@@ -352,16 +354,15 @@ mt76u_fill_rx_sg(struct mt76_dev *dev, struct mt76_queue *q, struct urb *urb,
+ 
+ static int
+ mt76u_refill_rx(struct mt76_dev *dev, struct mt76_queue *q,
+-		struct urb *urb, int nsgs)
++		struct urb *urb, int nsgs, gfp_t gfp)
+ {
+ 	enum mt76_rxq_id qid = q - &dev->q_rx[MT_RXQ_MAIN];
+-	int offset;
+ 
+ 	if (qid == MT_RXQ_MAIN && dev->usb.sg_en)
+-		return mt76u_fill_rx_sg(dev, q, urb, nsgs);
++		return mt76u_fill_rx_sg(dev, q, urb, nsgs, gfp);
+ 
+ 	urb->transfer_buffer_length = q->buf_size;
+-	urb->transfer_buffer = mt76_get_page_pool_buf(q, &offset, q->buf_size);
++	urb->transfer_buffer = page_frag_alloc(&q->rx_page, q->buf_size, gfp);
+ 
+ 	return urb->transfer_buffer ? 0 : -ENOMEM;
+ }
+@@ -399,7 +400,7 @@ mt76u_rx_urb_alloc(struct mt76_dev *dev, struct mt76_queue *q,
+ 	if (err)
+ 		return err;
+ 
+-	return mt76u_refill_rx(dev, q, e->urb, sg_size);
++	return mt76u_refill_rx(dev, q, e->urb, sg_size, GFP_KERNEL);
+ }
+ 
+ static void mt76u_urb_free(struct urb *urb)
+@@ -407,10 +408,10 @@ static void mt76u_urb_free(struct urb *urb)
+ 	int i;
+ 
+ 	for (i = 0; i < urb->num_sgs; i++)
+-		mt76_put_page_pool_buf(sg_virt(&urb->sg[i]), false);
++		skb_free_frag(sg_virt(&urb->sg[i]));
+ 
+ 	if (urb->transfer_buffer)
+-		mt76_put_page_pool_buf(urb->transfer_buffer, false);
++		skb_free_frag(urb->transfer_buffer);
+ 
+ 	usb_free_urb(urb);
+ }
+@@ -546,8 +547,6 @@ mt76u_process_rx_entry(struct mt76_dev *dev, struct urb *urb,
+ 		len -= data_len;
+ 		nsgs++;
+ 	}
+-
+-	skb_mark_for_recycle(skb);
+ 	dev->drv->rx_skb(dev, MT_RXQ_MAIN, skb, NULL);
+ 
+ 	return nsgs;
+@@ -613,7 +612,7 @@ mt76u_process_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
+ 
+ 		count = mt76u_process_rx_entry(dev, urb, q->buf_size);
+ 		if (count > 0) {
+-			err = mt76u_refill_rx(dev, q, urb, count);
++			err = mt76u_refill_rx(dev, q, urb, count, GFP_ATOMIC);
+ 			if (err < 0)
+ 				break;
+ 		}
+@@ -664,10 +663,6 @@ mt76u_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid)
+ 	struct mt76_queue *q = &dev->q_rx[qid];
+ 	int i, err;
+ 
+-	err = mt76_create_page_pool(dev, q);
+-	if (err)
+-		return err;
+-
+ 	spin_lock_init(&q->lock);
+ 	q->entry = devm_kcalloc(dev->dev,
+ 				MT_NUM_RX_ENTRIES, sizeof(*q->entry),
+@@ -696,6 +691,7 @@ EXPORT_SYMBOL_GPL(mt76u_alloc_mcu_queue);
+ static void
+ mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
+ {
++	struct page *page;
+ 	int i;
+ 
+ 	for (i = 0; i < q->ndesc; i++) {
+@@ -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;
++
++	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 mt76u_free_rx(struct mt76_dev *dev)
+-- 
+2.39.0
+
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
similarity index 99%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
index 2d2ccf9..c72e011 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 a77590f3ac0a751d4042eac5ea5969a372501a4a 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 {
@@ -59,7 +60,7 @@
  mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
  mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 5a46813a..eb149104 100644
+index 6cb7c16b..b0c13cde 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -8,6 +8,9 @@
@@ -231,7 +232,7 @@
  
  	if (dev->relay_fwlog)
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 97ca55d2..1ba4096d 100644
+index c060e5ec..5bac45a3 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -299,6 +299,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
@@ -270,7 +271,7 @@
  }
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3bbccbdf..94ecded5 100644
+index c673b1bf..0777663e 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 4b183a74..8aba0218 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/autobuild_mac80211_release/package/kernel/mt76/patches/1002-mt76-mt7915-csi-implement-csi-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1002-mt76-mt7915-csi-implement-csi-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
index 125a023..147c6be 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1002-mt76-mt7915-csi-implement-csi-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
@@ -1,7 +1,7 @@
-From 41752b5e4ac73781e070aabff226904ab9efb5e4 Mon Sep 17 00:00:00 2001
+From aa47976c9e64658e7867ea5a068558e6d64d5592 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 {
@@ -54,7 +54,7 @@
  mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
  mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
 diff --git a/mt7915/init.c b/mt7915/init.c
-index b88c3827..c27469e4 100644
+index 1216416b..443333c2 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -664,6 +664,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
@@ -70,7 +70,7 @@
  	ret = mt76_register_phy(mphy, true, mt76_rates,
  				ARRAY_SIZE(mt76_rates));
  	if (ret)
-@@ -1165,6 +1171,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
+@@ -1164,6 +1170,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
  	}
  }
  
@@ -96,7 +96,7 @@
  static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  {
  	struct mt7915_phy *phy = mt7915_ext_phy(dev);
-@@ -1173,6 +1198,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
+@@ -1172,6 +1197,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  	if (!phy)
  		return;
  
@@ -107,7 +107,7 @@
  	mt7915_unregister_thermal(phy);
  	mt76_unregister_phy(mphy);
  	ieee80211_free_hw(mphy->hw);
-@@ -1185,6 +1214,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
+@@ -1184,6 +1213,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
  	mt7915_dma_cleanup(dev);
  	tasklet_disable(&dev->irq_tasklet);
  
@@ -118,7 +118,7 @@
  	if (is_mt7986(&dev->mt76))
  		mt7986_wmac_disable(dev);
  }
-@@ -1225,6 +1258,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1224,6 +1257,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
  	dev->mt76.test_ops = &mt7915_testmode_ops;
  #endif
  
@@ -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 8aba0218..0ab8bb77 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/autobuild_mac80211_release/package/kernel/mt76/patches/1003-mt76-mt7915-air-monitor-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1003-mt76-mt7915-air-monitor-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
index b3388ce..74ddddf 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1003-mt76-mt7915-air-monitor-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
@@ -1,7 +1,7 @@
-From f6b5a16ecd5e9cc986a3dde75a84a447aa729449 Mon Sep 17 00:00:00 2001
+From 496377bfa726689b334d0c73da0f09089c1698ff 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 {
@@ -26,7 +26,7 @@
  };
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 1ba4096d..547519cc 100644
+index 5bac45a3..ad5895de 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -547,6 +547,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
@@ -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 0777663e..3d9635f4 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/autobuild_mac80211_release/package/kernel/mt76/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
similarity index 82%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
index b2739d3..4d9f14f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 718ff1e174a015cfc5e72545288c6fa5d4532de8 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 ++
@@ -13,7 +12,7 @@
  5 files changed, 52 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index c27469e4..1177e4e7 100644
+index 443333c2..a7bd227e 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -445,6 +445,8 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
@@ -26,18 +25,18 @@
  
  static void
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 40f77428..b507f14f 100644
+index 0ab8bb77..77868b88 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;
 +	struct mt7915_phy *phy = mvif->phy;
- 	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
+ 	struct ieee80211_he_cap_elem *elem = &sta->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))
@@ -56,14 +55,14 @@
 +	muru->cfg.ofdma_dl_en = !!(phy->muru_onoff & OFDMA_DL);
 +	muru->cfg.ofdma_ul_en = !!(phy->muru_onoff & OFDMA_UL);
 +
- 	if (sta->deflink.vht_cap.vht_supported)
+ 	if (sta->vht_cap.vht_supported)
  		muru->mimo_dl.vht_mu_bfee =
- 			!!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
+ 			!!(sta->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/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch
index 4b249f1..3a8d00d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch
@@ -1,7 +1,7 @@
-From a3b277ab5965fc3ea056d9d4f2f9a9dedd4fef51 Mon Sep 17 00:00:00 2001
+From 5fc08b7ad3947d772901e96586bdb0ccb1e87c11 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 {
@@ -28,7 +28,7 @@
  };
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 547519cc..599d328d 100644
+index ad5895de..4ee98226 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -8,6 +8,7 @@
@@ -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 3d9635f4..36a56f1f 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 77868b88..2ffcaea5 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/autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
similarity index 76%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
index bb91417..95d57a3 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 94fe329390eca3337fac1f3f79418141e234c72c 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 2ffcaea5..955e39c8 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/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
index 39d4df8..aa23ed0 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 dabe8e30d9327b621c363c1f7cf02f761507104a 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 955e39c8..0b56dc45 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/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
similarity index 85%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
index a48e596..ee7fab3 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-drop-undefined-action-frame.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
@@ -1,14 +1,14 @@
-From d88b52321783cfb7cb51bc383d13ed270ccced43 Mon Sep 17 00:00:00 2001
+From add5897de0df1253311453001202dae1c122e74e 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 ++++++
  1 file changed, 6 insertions(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 599d328d..de2bdba5 100644
+index 4ee98226..68a952a7 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -760,6 +760,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
@@ -32,5 +32,5 @@
  	if (id < 0)
  		return id;
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-fw_version-dump.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-fw_version-dump.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
index d88e542..9d6192b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-fw_version-dump.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-mt7915-add-fw_version-dump.patch
@@ -1,7 +1,7 @@
-From 9f848ad3fee22fb9de2dce18ddc2a0f54a519b68 Mon Sep 17 00:00:00 2001
+From c10fda3cdad3cac6455f28a25a67c1c12c2ec2ee 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 fd14221a..7d4765dd 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,
+@@ -2965,6 +2965,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,
+@@ -2990,6 +2993,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)
+@@ -3060,6 +3066,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/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-rework-testmode-init-registers.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-rework-testmode-init-registers.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
index d8bcf4c..a230422 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-rework-testmode-init-registers.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
@@ -1,7 +1,8 @@
-From 67a19923b1e9f0491531d7f641725310b5152f87 Mon Sep 17 00:00:00 2001
+From c6794ba93f7c6304e3bdd4eb8d40b0fb53d948f9 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 46e35668..968f5d87 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/autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-testmode-additional-supports.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-testmode-additional-supports.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch
index e2dcba6..8220c74 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-testmode-additional-supports.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch
@@ -1,7 +1,7 @@
-From 219040e9aa5a584809fce08c86d6a6279cf7fe8a Mon Sep 17 00:00:00 2001
+From 1d1f7b2dfed0ca3851dd81f9ce210703d60b86bc 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/1133] 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>
@@ -11,25 +11,24 @@
  mt76.h            |  108 ++++-
  mt76_connac_mcu.c |    4 +
  mt76_connac_mcu.h |    2 +
- mt7915/eeprom.c   |    2 +-
  mt7915/init.c     |    2 +-
  mt7915/mac.c      |   39 +-
  mt7915/main.c     |    2 +-
- mt7915/mcu.c      |   19 +-
+ mt7915/mcu.c      |   10 +-
  mt7915/mcu.h      |   28 +-
  mt7915/mmio.c     |    2 +
- mt7915/mt7915.h   |   16 +-
+ mt7915/mt7915.h   |   14 +-
  mt7915/regs.h     |    3 +
- mt7915/testmode.c | 1184 ++++++++++++++++++++++++++++++++++++++++++---
+ mt7915/testmode.c | 1177 ++++++++++++++++++++++++++++++++++++++++++---
  mt7915/testmode.h |  278 +++++++++++
  testmode.c        |  280 +++++++++--
  testmode.h        |   75 +++
  tools/fields.c    |   84 +++-
  tx.c              |    3 +-
- 20 files changed, 1990 insertions(+), 156 deletions(-)
+ 19 files changed, 1975 insertions(+), 151 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index df2ca73..fe65e0f 100644
+index d4829376..bf89b532 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -568,8 +568,7 @@ free:
@@ -43,10 +42,10 @@
  #endif
  
 diff --git a/mac80211.c b/mac80211.c
-index ad5d6f8..9107c0c 100644
+index 968f5d87..d30fd6cf 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),
  
@@ -60,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),
@@ -73,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 {
@@ -235,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 7d4765dd..99851dc0 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:
@@ -246,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;
  
@@ -257,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,21 +275,8 @@
  	MCU_EXT_CMD_CERT_CFG = 0xb7,
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
  };
-diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
-index a796289..f1b1471 100644
---- a/mt7915/eeprom.c
-+++ b/mt7915/eeprom.c
-@@ -126,7 +126,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
- 		/* read eeprom data from efuse */
- 		block_num = DIV_ROUND_UP(eeprom_size, eeprom_blk_size);
- 		for (i = 0; i < block_num; i++) {
--			ret = mt7915_mcu_get_eeprom(dev, i * eeprom_blk_size);
-+			ret = mt7915_mcu_get_eeprom(dev, i * eeprom_blk_size, NULL);
- 			if (ret < 0)
- 				return ret;
- 		}
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 1177e4e..f40d09c 100644
+index a7bd227e..6a864a55 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -695,7 +695,7 @@ static void mt7915_init_work(struct work_struct *work)
@@ -303,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 68a952a7..0830b2f4 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -627,16 +627,38 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
@@ -385,7 +371,7 @@
  		goto out;
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3a9f343..8789444 100644
+index 36a56f1f..a27dbc47 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -238,7 +238,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
@@ -398,10 +384,10 @@
  		mvif->mt76.wmm_idx += 2;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index b0cdd4a..6f9acd8 100644
+index 0b56dc45..3312c466 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;
@@ -413,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 ||
@@ -421,7 +407,7 @@
  	    !rxd->seq)
  		mt7915_mcu_rx_unsolicited_event(dev, skb);
  	else
-@@ -2860,21 +2866,21 @@ 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;
  }
  
@@ -438,38 +424,8 @@
  		return mt7915_mcu_set_eeprom_flash(dev);
  
  	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EFUSE_BUFFER_MODE),
- 				 &req, sizeof(req), true);
- }
- 
--int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
-+int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset, u8 *read_buf)
- {
- 	struct mt7915_mcu_eeprom_info req = {
- 		.addr = cpu_to_le32(round_down(offset,
-@@ -2883,7 +2889,7 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
- 	struct mt7915_mcu_eeprom_info *res;
- 	struct sk_buff *skb;
- 	int ret;
--	u8 *buf;
-+	u8 *buf = read_buf;
- 
- 	ret = mt76_mcu_send_and_get_msg(&dev->mt76,
- 					MCU_EXT_QUERY(EFUSE_ACCESS),
-@@ -2892,8 +2898,11 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
- 		return ret;
- 
- 	res = (struct mt7915_mcu_eeprom_info *)skb->data;
--	buf = dev->mt76.eeprom.data + le32_to_cpu(res->addr);
-+
-+	if (!buf)
-+		buf = dev->mt76.eeprom.data + le32_to_cpu(res->addr);
- 	memcpy(buf, res->data, MT7915_EEPROM_BLOCK_SIZE);
-+
- 	dev_kfree_skb(skb);
- 
- 	return 0;
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 99d733b..dd6a44d 100644
+index 99d733b4..dd6a44d4 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -8,10 +8,15 @@
@@ -526,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[] = {
@@ -546,7 +502,7 @@
  	[AGG_PCR0]		= 0x040,
  	[AGG_ACR0]		= 0x054,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 055cbb5..416606a 100644
+index 055cbb5f..bc7314b7 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -323,6 +323,9 @@ struct mt7915_phy {
@@ -574,17 +530,15 @@
  #ifdef MTK_DEBUG
  	u16 wlan_idx;
  	struct {
-@@ -594,8 +605,8 @@ 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);
 -int mt7915_mcu_set_eeprom(struct mt7915_dev *dev);
--int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset);
 +int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode);
-+int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset, u8 *read_buf);
+ 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,
- 		       bool hdr_trans);
 @@ -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);
@@ -594,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 {
@@ -615,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..1ed2ea8 100644
+index 46939191..14feb648 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -9,6 +9,9 @@
@@ -840,12 +794,12 @@
 +	}
 +
 +	if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
-+		memcpy(&sta->deflink.ht_cap, &sband->ht_cap, sizeof(sta->deflink.ht_cap));
++		memcpy(&sta->ht_cap, &sband->ht_cap, sizeof(sta->ht_cap));
 +	if (td->tx_rate_mode >= MT76_TM_TX_MODE_VHT)
-+		memcpy(&sta->deflink.vht_cap, &sband->vht_cap, sizeof(sta->deflink.vht_cap));
++		memcpy(&sta->vht_cap, &sband->vht_cap, sizeof(sta->vht_cap));
 +	if (td->tx_rate_mode >= MT76_TM_TX_MODE_HE_SU)
-+		memcpy(&sta->deflink.he_cap, &sdata[NL80211_IFTYPE_STATION].he_cap,
-+		       sizeof(sta->deflink.he_cap));
++		memcpy(&sta->he_cap, &sdata[NL80211_IFTYPE_STATION].he_cap,
++		       sizeof(sta->he_cap));
 +	sta->aid = aid;
 +	sta->wme = 1;
 +
@@ -1896,7 +1850,7 @@
  	void *rx, *rssi;
  	int i;
  
-@@ -852,11 +1822,75 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
+@@ -852,11 +1822,68 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
  
  	nla_nest_end(msg, rx);
  
@@ -1910,7 +1864,7 @@
 +mt7915_tm_write_back_to_efuse(struct mt7915_dev *dev)
 +{
 +	struct mt7915_mcu_eeprom_info req = {};
-+	u8 read_buf[MT76_TM_EEPROM_BLOCK_SIZE], *eeprom = dev->mt76.eeprom.data;
++	u8 *eeprom = dev->mt76.eeprom.data;
 +	int i, ret = -EINVAL;
 +
 +	/* prevent from damaging chip id in efuse */
@@ -1919,14 +1873,7 @@
 +
 +	for (i = 0; i < mt7915_eeprom_size(dev); i += MT76_TM_EEPROM_BLOCK_SIZE) {
 +		req.addr = cpu_to_le32(i);
-+		memcpy(req.data, eeprom + i, MT76_TM_EEPROM_BLOCK_SIZE);
-+
-+		ret = mt7915_mcu_get_eeprom(dev, i, read_buf);
-+		if (ret < 0)
-+			return ret;
-+
-+		if (!memcmp(req.data, read_buf, MT76_TM_EEPROM_BLOCK_SIZE))
-+			continue;
++		memcpy(&req.data, eeprom + i, MT76_TM_EEPROM_BLOCK_SIZE);
 +
 +		ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EFUSE_ACCESS),
 +					&req, sizeof(req), true);
@@ -1973,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 @@
@@ -2288,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] = {
@@ -2759,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 @@
@@ -2864,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[] = {
@@ -3005,10 +2952,10 @@
  };
  
 diff --git a/tx.c b/tx.c
-index 1f309d0..6d55566 100644
+index 6cda23fa..91c8dd8d 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 *
+@@ -245,8 +245,7 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
  	if (mt76_is_testmode_skb(dev, skb, &hw)) {
  		struct mt76_phy *phy = hw->priv;
  
@@ -3019,5 +2966,5 @@
  			wake_up(&dev->tx_wait);
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-testmode-add-pre-cal-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-testmode-add-pre-cal-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
index 137b15a..560802d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-testmode-add-pre-cal-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
@@ -1,7 +1,7 @@
-From 52d97d39f652d9b7441bbbe52de72b25796df4a0 Mon Sep 17 00:00:00 2001
+From 4c16ba9ae068d3f828b547dc23cef450505c281e 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 3312c466..8c61bc7e 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 14feb648..e03f788d 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/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
index ff74c33..faa21fb 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-testmode-add-iBF-command-mode-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 3bfab4b2c939b6e2c240fdd3420a02b214d66ce4 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 e03f788d..9126766d 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/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
index 1128a92..5b217e8 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-testmode-add-ZWDFS-test-mode-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 0eec0427cc0902586e9a031acf6f41fe7fe7536e 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 8c61bc7e..c8ce849c 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 9126766d..7f648174 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/autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
index fb5bb23..3e72631 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-testmode-add-iBF-eBF-cal-and-cert-commands-with.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 ad133784fd5f1e7380f8a34960068f9f4a7d26e5 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 99851dc0..703ca736 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,
+@@ -2753,6 +2753,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,
+@@ -2812,6 +2813,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 0830b2f4..5fc7141f 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 a27dbc47..6d9b47d9 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 c8ce849c..dd296dbf 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 7f648174..393bc186 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -53,6 +53,8 @@ struct reg_band {
@@ -963,7 +963,7 @@
 +		memcpy(sta->addr, td->addr[0], ETH_ALEN);
  
  	if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
- 		memcpy(&sta->deflink.ht_cap, &sband->ht_cap, sizeof(sta->deflink.ht_cap));
+ 		memcpy(&sta->ht_cap, &sband->ht_cap, sizeof(sta->ht_cap));
 @@ -382,6 +419,14 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
  	list_add_tail(&msta->wcid.list, &td->tm_entry_list);
  	td->entry_num++;
@@ -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/autobuild_mac80211_release/package/kernel/mt76/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
similarity index 69%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
index 43a0ae7..da11106 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 35b1e6ec61a80639e2ebe877d55b884d01038512 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 6d9b47d9..c8bdbda2 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/autobuild_mac80211_release/package/kernel/mt76/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
similarity index 67%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
index df0677d..cd71ade 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 254bf607ffe865362b3a59f0992320f0756debec 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 d30fd6cf..7bfb7a24 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/autobuild_mac80211_release/package/kernel/mt76/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
similarity index 92%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
index 026f079..c400cef 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 31706b71cfe7e06aa48b46525cdb0aeba7eaa38c 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 dd296dbf..3af76426 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/autobuild_mac80211_release/package/kernel/mt76/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
index de77b3a..ef79a0b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 07bd44738cc8eca1843bb9b1b3ad661f98210bfc 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/autobuild_mac80211_release/package/kernel/mt76/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
index fc68b4d..aef784a 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 7c82dbed75d8c585133dff08c589c31700ebad02 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 c8bdbda2..219cfe7f 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 3af76426..9f2142a5 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/autobuild_mac80211_release/package/kernel/mt76/patches/1122-mt76-mt7915-implement-bin-file-mode.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
index c9c4ad9..cb12f4a 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
@@ -1,7 +1,7 @@
-From 5650267fdb5d7e237e58908b5f11c9bd12170c3a Mon Sep 17 00:00:00 2001
+From 29409faea4a9c150e733ea3bbdbbf7b24790ddb4 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/autobuild_mac80211_release/package/kernel/mt76/patches/1123-mt76-mt7915-initialize-wcid.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
similarity index 78%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1123-mt76-mt7915-initialize-wcid.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
index 8c0393c..25173a2 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1123-mt76-mt7915-initialize-wcid.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
@@ -1,7 +1,7 @@
-From 76dcae6805d85864d5ebea700fcc488f80fbd75d Mon Sep 17 00:00:00 2001
+From c107e821383469a19794b6fd42df69e543af41bc 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>
 ---
@@ -9,7 +9,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 35b85843..623bf2d4 100644
+index 5fc7141f..8ee963a2 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -1031,7 +1031,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
@@ -22,5 +22,5 @@
  
  			idx = FIELD_GET(MT_TX_FREE_WLAN_ID, info);
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-mu-dump-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
similarity index 93%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
index bac5e25..8ffcc20 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-mu-dump-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
@@ -1,7 +1,7 @@
-From 0dbdca6f8f719929258c851bccd3dacbe78c4ad5 Mon Sep 17 00:00:00 2001
+From a43697fd8fb9003cdbb0c2c6baad0f7e57eb3327 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/autobuild_mac80211_release/package/kernel/mt76/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
similarity index 93%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
index 066ae83..9841ca9 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 0be94b5a3f5416816a99a2651b8f5c070662c83e 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 9f2142a5..39fb429e 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/autobuild_mac80211_release/package/kernel/mt76/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
index 72672ac..334aa83 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 651e8453a8e62f8995ab44d302445bed26b28099 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/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
new file mode 100644
index 0000000..f2e7454
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
@@ -0,0 +1,120 @@
+From b9a8f98184e2aef688648b82dc09e3bf24da5458 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 1025/1031] wifi: mt76: mt7915: add E3 re-bonding for low yield
+ rate issue
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ mt7915/eeprom.c | 27 ++++++++++++++++++++++++++-
+ mt7915/mcu.c    | 13 ++++++++++---
+ mt7915/mt7915.h |  3 ++-
+ 3 files changed, 38 insertions(+), 5 deletions(-)
+
+diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
+index 54803e8e..849275e1 100644
+--- a/mt7915/eeprom.c
++++ b/mt7915/eeprom.c
+@@ -132,7 +132,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
+ 		/* read eeprom data from efuse */
+ 		block_num = DIV_ROUND_UP(eeprom_size, eeprom_blk_size);
+ 		for (i = 0; i < block_num; i++) {
+-			ret = mt7915_mcu_get_eeprom(dev, i * eeprom_blk_size);
++			ret = mt7915_mcu_get_eeprom(dev, i * eeprom_blk_size, NULL);
+ 			if (ret < 0)
+ 				return ret;
+ 		}
+@@ -239,6 +239,29 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
+ 	dev->chainshift = hweight8(dev->mphy.chainmask);
+ }
+ 
++void mt7915_eeprom_rebonding(struct mt7915_dev *dev)
++{
++#define MT7976_ADIE_MASK			BIT(1)
++#define MT7986_ADIE1_EFFUSE_OFFSET		0x1000
++#define MT7986_ADIE1_MT7976C_OFFSET		0x270
++#define MT7986_ADIE1_E3_OFFSET			0x271
++	u32 adie_offset, sku = mt7915_check_adie(dev, true);
++	u8 read_buf, *eeprom = dev->mt76.eeprom.data;
++
++	if (!(sku & MT7976_ADIE_MASK))
++		return;
++
++	adie_offset = (sku == MT7976_DUAL_ADIE) ? MT7986_ADIE1_EFFUSE_OFFSET : 0;
++
++	/* 7976 A-Die, To identify MT7976C */
++	mt7915_mcu_get_eeprom(dev, MT7986_ADIE1_MT7976C_OFFSET + adie_offset, &read_buf);
++	eeprom[MT7986_ADIE1_MT7976C_OFFSET] = read_buf;
++
++	/* E3 re-binding */
++	mt7915_mcu_get_eeprom(dev, MT7986_ADIE1_E3_OFFSET + adie_offset, &read_buf);
++	eeprom[MT7986_ADIE1_E3_OFFSET] = read_buf;
++}
++
+ int mt7915_eeprom_init(struct mt7915_dev *dev)
+ {
+ 	int ret;
+@@ -275,6 +298,8 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
+ 			return ret;
+ 	}
+ 
++	mt7915_eeprom_rebonding(dev);
++
+ 	ret = mt7915_eeprom_load_precal(dev);
+ 	if (ret)
+ 		return ret;
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 39fb429e..b2160552 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -2899,7 +2899,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
+ 				 &req, sizeof(req), true);
+ }
+ 
+-int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
++int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset, u8 *read_buf)
+ {
+ 	struct mt7915_mcu_eeprom_info req = {
+ 		.addr = cpu_to_le32(round_down(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;
+-	buf = dev->mt76.eeprom.data + le32_to_cpu(res->addr);
+-	memcpy(buf, res->data, MT7915_EEPROM_BLOCK_SIZE);
++
++	if (read_buf) {
++		u32 offs = offset % MT7915_EEPROM_BLOCK_SIZE;
++		*read_buf = res->data[offs];
++	} else {
++		buf = dev->mt76.eeprom.data + le32_to_cpu(res->addr);
++		memcpy(buf, res->data, MT7915_EEPROM_BLOCK_SIZE);
++	}
++
+ 	dev_kfree_skb(skb);
+ 
+ 	return 0;
+diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
+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);
+ 
+ int mt7915_register_device(struct mt7915_dev *dev);
+ void mt7915_unregister_device(struct mt7915_dev *dev);
++void mt7915_eeprom_rebonding(struct mt7915_dev *dev);
+ int mt7915_eeprom_init(struct mt7915_dev *dev);
+ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
+ 				struct mt7915_phy *phy);
+@@ -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);
+-int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset);
++int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset, u8 *read_buf);
+ 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,
+ 		       bool hdr_trans);
+-- 
+2.39.0
+
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
similarity index 88%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
index 998228b..c444d9d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 8d63ae9f2b91931d5d949950aad2e549b0a31fe8 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/autobuild_mac80211_release/package/kernel/mt76/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
index 213e390..605fbe9 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 66ffa91c016b6d533e33853a3768f3161d0a94eb 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 b0c13cde..8228e8da 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 b2160552..49163fd9 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/autobuild_mac80211_release/package/kernel/mt76/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
similarity index 94%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
index be8c506..5a6859e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 82a351b38b8ac3269dbb9e3adc45638f783cdaa5 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 ++++++++++
@@ -11,7 +11,7 @@
  4 files changed, 54 insertions(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 623bf2d4..6fe5cac6 100644
+index 8ee963a2..be5046d4 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -2055,6 +2055,16 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
@@ -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/autobuild_mac80211_release/package/kernel/mt76/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
similarity index 70%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
index 6da2c9f..122a29c 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 92ddafe3c3067d5bf7358b449430ab467cea61b2 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 49163fd9..d8991f88 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/autobuild_mac80211_release/package/kernel/mt76/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
index dea4ae5..1034c78 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 97b5146b14301c58c66c4603ac5c192741c28b4c 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 d8991f88..520cc413 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/autobuild_mac80211_release/package/kernel/mt76/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
similarity index 84%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
index 9718b76..d1b0a30 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1134-mt76-mt7915-add-vendor-cmd-to-get-available-color-bi.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 ae7498534b6eefa0bf3c99947cabdd2d60467344 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/autobuild_mac80211_release/package/kernel/mt76/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
deleted file mode 100644
index f6b88f9..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 6256e5a3577ddf726a30774b2366e7ccf098031a Mon Sep 17 00:00:00 2001
-From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Date: Thu, 30 Mar 2023 15:12:37 +0800
-Subject: [PATCH 1127/1133] mt76: mt7915: add E3 re-bonding for low yield rate
- issue
-
----
- mt7915/eeprom.c | 28 ++++++++++++++++++++++++++++
- mt7915/mt7915.h |  1 +
- 2 files changed, 29 insertions(+)
-
-diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
-index 612be3f..c6d8ca1 100644
---- a/mt7915/eeprom.c
-+++ b/mt7915/eeprom.c
-@@ -239,6 +239,32 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
- 	dev->chainshift = hweight8(dev->mphy.chainmask);
- }
- 
-+void mt7915_eeprom_rebonding(struct mt7915_dev *dev)
-+{
-+#define MT7976_ADIE_MASK			BIT(1)
-+#define MT7986_ADIE1_EFFUSE_OFFSET		0x1000
-+#define MT7986_ADIE1_MT7976C_OFFSET		0x270
-+#define MT7986_ADIE1_E3_OFFSET			0x271
-+	u32 adie_offset, offset, sku = mt7915_check_adie(dev, true);
-+	u8 read_buf[MT7915_EEPROM_BLOCK_SIZE], *eeprom = dev->mt76.eeprom.data;
-+
-+
-+	if (!(sku & MT7976_ADIE_MASK))
-+		return;
-+
-+	adie_offset = (sku == MT7976_DUAL_ADIE) ? MT7986_ADIE1_EFFUSE_OFFSET : 0;
-+
-+	/* 7976 A-Die, To identify MT7976C */
-+	offset = MT7986_ADIE1_MT7976C_OFFSET + adie_offset;
-+	mt7915_mcu_get_eeprom(dev, offset, read_buf);
-+	eeprom[MT7986_ADIE1_MT7976C_OFFSET] = read_buf[offset % MT7915_EEPROM_BLOCK_SIZE];
-+
-+	/* E3 re-binding */
-+	offset = MT7986_ADIE1_E3_OFFSET + adie_offset;
-+	mt7915_mcu_get_eeprom(dev, offset, read_buf);
-+	eeprom[MT7986_ADIE1_E3_OFFSET] = read_buf[offset % MT7915_EEPROM_BLOCK_SIZE];
-+}
-+
- int mt7915_eeprom_init(struct mt7915_dev *dev)
- {
- 	int ret;
-@@ -275,6 +301,8 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
- 			return ret;
- 	}
- 
-+	mt7915_eeprom_rebonding(dev);
-+
- 	ret = mt7915_eeprom_load_precal(dev);
- 	if (ret)
- 		return ret;
-diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 73bc030..5999134 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);
- 
- int mt7915_register_device(struct mt7915_dev *dev);
- void mt7915_unregister_device(struct mt7915_dev *dev);
-+void mt7915_eeprom_rebonding(struct mt7915_dev *dev);
- int mt7915_eeprom_init(struct mt7915_dev *dev);
- void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
- 				struct mt7915_phy *phy);
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
index 27f30fe..da02055 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 fc8d0eb488b6ef7d7bd1097335b50d5afaac2798 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
@@ -25,7 +25,7 @@
  struct mt76_connac_fw_txp {
  	__le16 flags;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 6fe5cac6..175498b1 100644
+index be5046d4..c2e3048c 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -890,9 +890,9 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id)
@@ -66,10 +66,10 @@
  
  static void
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 0d01d880..020a6d2d 100644
+index 219cfe7f..d8cc5404 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/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
similarity index 89%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
index 46a68b5..a4d586b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 bff651165a1ef24390c19d4fe77a00d4e3a07449 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 d8cc5404..e9b493b8 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 520cc413..75532899 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/autobuild_mac80211_release/package/kernel/mt76/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
similarity index 75%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
index 5d3affc..fc7f896 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 a503c2e9f7556131bf6dd91a90af58dce9c5de2c 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 e9b493b8..16a038f3 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/autobuild_mac80211_release/package/kernel/mt76/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
index a958a8f..69b18cf 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 e4fd59767d875e2293e7f6a32ff7699a9ded7c41 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 bf89b532..b2046b43 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/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
index c163906..48a43ec 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 2c6f1b27e23009602228e158865e17256dae9ce8 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 8228e8da..dcd773c7 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);
@@ -465,7 +465,7 @@
  	if (!dev->dbdc_support || phy->mt76->band_idx) {
  		debugfs_create_u32("dfs_hw_pattern", 0400, dir,
 diff --git a/mt7915/init.c b/mt7915/init.c
-index f40d09c3..27395316 100644
+index 6a864a55..3f07aa11 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -571,10 +571,46 @@ mt7915_init_led_mux(struct mt7915_dev *dev)
@@ -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 16a038f3..675510cc 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 75532899..1530a14c 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/autobuild_mac80211_release/package/kernel/mt76/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
similarity index 81%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
index bcb5b02..4d2ecce 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3006-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 749eff80bbf6cd121877bb2235095e4908733956 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 b2046b43..7792cabf 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 7bfb7a24..4c88710f 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,11 +331,11 @@
  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
+index d64f492a..08322453 100644
 --- a/mt7915/dma.c
 +++ b/mt7915/dma.c
 @@ -493,7 +493,6 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -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 @@
@@ -450,10 +457,10 @@
  #define MT7915_CFEND_RATE_DEFAULT	0x49	/* OFDM 24M */
  #define MT7915_CFEND_RATE_11B		0x03	/* 11B LP, 11M */
 diff --git a/tx.c b/tx.c
-index 6d55566f..a72b7779 100644
+index 91c8dd8d..04b6f2e7 100644
 --- a/tx.c
 +++ b/tx.c
-@@ -756,16 +756,16 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
+@@ -751,16 +751,16 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
  EXPORT_SYMBOL_GPL(mt76_token_consume);
  
  int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
@@ -474,7 +481,7 @@
  	}
  	spin_unlock_bh(&dev->rx_token_lock);
  
-@@ -802,15 +802,15 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
+@@ -797,15 +797,15 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
  }
  EXPORT_SYMBOL_GPL(mt76_token_release);
  
@@ -495,5 +502,5 @@
  }
  EXPORT_SYMBOL_GPL(mt76_rx_token_release);
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch
similarity index 75%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3006-wifi-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-supp.patch
index f5f46f4..1272da2 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3007-mt76-mt7915-wed-add-mt7915_net_setup_tc-to-support-w.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 2d1997c452cf6367b4d60bafa03077fc262c6323 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 675510cc..9173734a 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/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3007-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
index 9f30456..ff5ae32 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 ce034bf305908b8467b9e1031ef36cd7974fcb89 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 9173734a..f39e1e4c 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 1530a14c..99d52ea1 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/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
index f1d5c88..35b088e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 1fe4d0c69528d5b185b816859784f2d66d036e50 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 f39e1e4c..df0a4d6b 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 99d52ea1..93e102f6 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/autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
index d7af854..a40e74f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 a3b35051c293bf0f138ec4d10098da5a71f69fc5 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
@@ -26,7 +26,7 @@
  			wcid->stats.tx_packets++;
  	}
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 27395316..70563c9d 100644
+index 3f07aa11..0b852286 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -503,6 +503,12 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
@@ -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)
@@ -94,10 +94,10 @@
  
  static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
 diff --git a/tx.c b/tx.c
-index a72b7779..36b0f486 100644
+index 04b6f2e7..6b590b27 100644
 --- a/tx.c
 +++ b/tx.c
-@@ -120,6 +120,7 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -115,6 +115,7 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
  		       struct sk_buff *skb)
  {
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -105,7 +105,7 @@
  	struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
  	int pid;
  
-@@ -131,6 +132,11 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -126,6 +127,11 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
  	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
  		return MT_PACKET_ID_NO_ACK;
  
@@ -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/autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
index 6904bea..abe8d1d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 0203bb436851bab5f95f162d599c02d463e5fbcd 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
 
 ---
@@ -11,7 +11,7 @@
  3 files changed, 18 insertions(+), 7 deletions(-)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 175498b1..180c1ae3 100644
+index c2e3048c..583b71b1 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -1005,6 +1005,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
@@ -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 df0a4d6b..3f495cbb 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/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
similarity index 93%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
index c852b73..9981c56 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/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 184d7ac3d8a67661080b8547fd1a8513780490f4 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/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
new file mode 100644
index 0000000..3d4eeb2
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
@@ -0,0 +1,250 @@
+From 5c24f0a51e202daf46f91adab95fcddb55fdd1e1 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 7792cabf..e7d174b8 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/autobuild_mac80211_release/package/kernel/mt76/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
deleted file mode 100644
index 89b423c..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3013-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
+++ /dev/null
@@ -1,836 +0,0 @@
-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
-
-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(-)
-
-diff --git a/dma.c b/dma.c
-index d1a1dae4..3adb1136 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);
- 	}
- 	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)
- 			return NULL;
- 
--		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, r->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,
- 	} else {
- 		buf = e->buf;
- 		e->buf = NULL;
--		dma_sync_single_for_cpu(dev->dma_dev, e->dma_addr[0],
--				SKB_WITH_OVERHEAD(q->buf_size),
--				page_pool_get_dma_dir(q->page_pool));
-+		dma_unmap_single(dev->dma_dev, e->dma_addr[0],
-+				 SKB_WITH_OVERHEAD(q->buf_size),
-+				 DMA_FROM_DEVICE);
- 	}
- 
- 	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:
- }
- 
- static int
--mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q,
--		 bool allow_direct)
-+mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
- {
- 	int len = SKB_WITH_OVERHEAD(q->buf_size);
--	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,
- 	spin_lock_bh(&q->lock);
- 
- 	while (q->queued < q->ndesc - 1) {
--		enum dma_data_direction dir;
- 		struct mt76_queue_buf qbuf;
--		dma_addr_t addr;
--		int offset;
--		void *buf;
-+		void *buf = NULL;
- 
--		buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
-+		buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
- 		if (!buf)
- 			break;
- 
--		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->dma_dev, addr, len, dir);
-+		addr = dma_map_single(dev->dma_dev, buf, len, DMA_FROM_DEVICE);
-+		if (unlikely(dma_mapping_error(dev->dma_dev, addr))) {
-+			skb_free_frag(buf);
-+			break;
-+		}
- 
--		qbuf.addr = addr + q->buf_offset;
--		qbuf.len = len - q->buf_offset;
-+		qbuf.addr = addr + offset;
-+		qbuf.len = len - offset;
- 		qbuf.skip_unmap = false;
--		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)
- 		/* WED txfree queue needs ring to be initialized before setup */
- 		q->flags = 0;
- 		mt76_dma_queue_reset(dev, q);
--		mt76_dma_rx_fill(dev, q, false);
-+		mt76_dma_rx_fill(dev, q);
- 		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,
- 	if (!q->entry)
- 		return -ENOMEM;
- 
--	ret = mt76_create_page_pool(dev, q);
--	if (ret)
--		return ret;
--
- 	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,
- static void
- mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
- {
-+	struct page *page;
- 	void *buf;
- 	bool more;
- 
-@@ -759,7 +795,7 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
- 		if (!buf)
- 			break;
- 
--		mt76_put_page_pool_buf(buf, false);
-+		skb_free_frag(buf);
- 	} while (1);
- 
- 	if (q->rx_head) {
-@@ -768,6 +804,15 @@ 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;
-+
-+		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)
- 	mt76_dma_wed_setup(dev, q, true);
- 	if (q->flags != MT_WED_Q_TXFREE) {
- 		mt76_dma_sync_idx(dev, q);
--		mt76_dma_rx_fill(dev, q, false);
-+		mt76_dma_rx_fill(dev, q);
- 	}
- }
- 
-@@ -806,7 +851,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 {
--		mt76_put_page_pool_buf(data, true);
-+		skb_free_frag(data);
- 	}
- 
- 	if (more)
-@@ -879,7 +924,6 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
- 			goto free_frag;
- 
- 		skb_reserve(skb, q->buf_offset);
--		skb_mark_for_recycle(skb);
- 
- 		*(u32 *)skb->cb = info;
- 
-@@ -895,10 +939,10 @@ mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
- 		continue;
- 
- free_frag:
--		mt76_put_page_pool_buf(data, true);
-+		skb_free_frag(data);
- 	}
- 
--	mt76_dma_rx_fill(dev, q, true);
-+	mt76_dma_rx_fill(dev, q);
- 	return done;
- }
- 
-@@ -943,7 +987,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);
--		mt76_dma_rx_fill(dev, &dev->q_rx[i], false);
-+		mt76_dma_rx_fill(dev, &dev->q_rx[i]);
- 		napi_enable(&dev->napi[i]);
- 	}
- 
-@@ -994,8 +1038,6 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
- 
- 		netif_napi_del(&dev->napi[i]);
- 		mt76_dma_rx_cleanup(dev, q);
--
--		page_pool_destroy(q->page_pool);
- 	}
- 
- 	mt76_free_pending_txwi(dev);
-diff --git a/mac80211.c b/mac80211.c
-index 4655f814..4dc7627e 100644
---- a/mac80211.c
-+++ b/mac80211.c
-@@ -4,7 +4,6 @@
-  */
- #include <linux/sched.h>
- #include <linux/of.h>
--#include <net/page_pool.h>
- #include "mt76.h"
- 
- #define CHAN2G(_idx, _freq) {			\
-@@ -573,47 +572,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
- }
- EXPORT_SYMBOL_GPL(mt76_unregister_phy);
- 
--int mt76_create_page_pool(struct mt76_dev *dev, struct mt76_queue *q)
--{
--	struct page_pool_params pp_params = {
--		.order = 0,
--		.flags = PP_FLAG_PAGE_FRAG,
--		.nid = NUMA_NO_NODE,
--		.dev = dev->dma_dev,
--	};
--	int idx = q - dev->q_rx;
--
--	switch (idx) {
--	case MT_RXQ_MAIN:
--	case MT_RXQ_BAND1:
--	case MT_RXQ_BAND2:
--		pp_params.pool_size = 256;
--		break;
--	default:
--		pp_params.pool_size = 16;
--		break;
--	}
--
--	if (mt76_is_mmio(dev)) {
--		/* rely on page_pool for DMA mapping */
--		pp_params.flags |= PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
--		pp_params.dma_dir = DMA_FROM_DEVICE;
--		pp_params.max_len = PAGE_SIZE;
--		pp_params.offset = 0;
--	}
--
--	q->page_pool = page_pool_create(&pp_params);
--	if (IS_ERR(q->page_pool)) {
--		int err = PTR_ERR(q->page_pool);
--
--		q->page_pool = NULL;
--		return err;
--	}
--
--	return 0;
--}
--EXPORT_SYMBOL_GPL(mt76_create_page_pool);
--
- 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,
- }
- EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
- 
--void mt76_ethtool_page_pool_stats(struct mt76_dev *dev, u64 *data, int *index)
--{
--#ifdef CONFIG_PAGE_POOL_STATS
--	struct page_pool_stats stats = {};
--	int i;
--
--	mt76_for_each_q_rx(dev, i)
--		page_pool_get_stats(dev->q_rx[i].page_pool, &stats);
--
--	page_pool_ethtool_stats_get(data, &stats);
--	*index += page_pool_ethtool_stats_get_count();
--#endif
--}
--EXPORT_SYMBOL_GPL(mt76_ethtool_page_pool_stats);
--
- enum mt76_dfs_state mt76_phy_dfs_state(struct mt76_phy *phy)
- {
- 	struct ieee80211_hw *hw = phy->hw;
-diff --git a/mt76.h b/mt76.h
-index bc0c9ae7..d17650d0 100644
---- a/mt76.h
-+++ b/mt76.h
-@@ -209,7 +209,7 @@ struct mt76_queue {
- 
- 	dma_addr_t desc_dma;
- 	struct sk_buff *rx_head;
--	struct page_pool *page_pool;
-+	struct page_frag_cache rx_page;
- };
- 
- struct mt76_mcu_ops {
-@@ -1458,7 +1458,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);
- }
- 
--void mt76_ethtool_page_pool_stats(struct mt76_dev *dev, u64 *data, int *index);
- 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);
- int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
- 			  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)
--{
--	struct page *page = virt_to_head_page(buf);
--
--	page_pool_put_full_page(page->pp, page, allow_direct);
--}
--
--static inline void *
--mt76_get_page_pool_buf(struct mt76_queue *q, u32 *offset, u32 size)
--{
--	struct page *page;
--
--	page = page_pool_dev_alloc_frag(q->page_pool, offset, size);
--	if (!page)
--		return NULL;
--
--	return page_address(page) + *offset;
--}
- 
- static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
- {
-diff --git a/mt7915/main.c b/mt7915/main.c
-index a4d1b816..21caddbe 100644
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -1359,22 +1359,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
- 			   struct ieee80211_vif *vif,
- 			   u32 sset, u8 *data)
- {
--	if (sset != ETH_SS_STATS)
--		return;
--
--	memcpy(data, *mt7915_gstrings_stats, sizeof(mt7915_gstrings_stats));
--	data += sizeof(mt7915_gstrings_stats);
--	page_pool_ethtool_stats_get_strings(data);
-+	if (sset == ETH_SS_STATS)
-+		memcpy(data, *mt7915_gstrings_stats,
-+		       sizeof(mt7915_gstrings_stats));
- }
- 
- static
- int mt7915_get_et_sset_count(struct ieee80211_hw *hw,
- 			     struct ieee80211_vif *vif, int sset)
- {
--	if (sset != ETH_SS_STATS)
--		return 0;
-+	if (sset == ETH_SS_STATS)
-+		return MT7915_SSTATS_LEN;
- 
--	return MT7915_SSTATS_LEN + page_pool_ethtool_stats_get_count();
-+	return 0;
- }
- 
- 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,
- 	};
- 	struct mib_stats *mib = &phy->mib;
- 	/* See mt7915_ampdu_stat_read_phy, etc */
--	int i, ei = 0, stats_size;
-+	int i, ei = 0;
- 
- 	mutex_lock(&dev->mt76.mutex);
- 
-@@ -1483,12 +1480,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
- 		return;
- 
- 	ei += wi.worker_stat_count;
--
--	mt76_ethtool_page_pool_stats(&dev->mt76, &data[ei], &ei);
--
--	stats_size = MT7915_SSTATS_LEN + page_pool_ethtool_stats_get_count();
--	if (ei != stats_size)
--		dev_err(dev->mt76.dev, "ei: %d size: %d", ei, stats_size);
-+	if (ei != MT7915_SSTATS_LEN)
-+		dev_err(dev->mt76.dev, "ei: %d  MT7915_SSTATS_LEN: %d",
-+			ei, (int)MT7915_SSTATS_LEN);
- }
- 
- static void
-diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 87cff5d4..b6adfd0b 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)
- static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
- {
- 	struct mt7915_dev *dev;
-+	struct page *page;
-+	u32 length;
- 	int i;
- 
- 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
-+	length = SKB_DATA_ALIGN(NET_SKB_PAD + wed->wlan.rx_size +
-+				sizeof(struct skb_shared_info));
-+
- 	for (i = 0; i < dev->mt76.rx_token_size; i++) {
- 		struct mt76_rxwi_cache *r;
- 
-@@ -591,50 +596,79 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
- 		if (!r || !r->ptr)
- 			continue;
- 
--		mt76_put_page_pool_buf(r->ptr, false);
-+		dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
-+				 wed->wlan.rx_size, DMA_FROM_DEVICE);
-+		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)
- {
- 	struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
--	struct mt76_rxwi_cache *r = NULL;
- 	struct mt7915_dev *dev;
--	struct mt76_queue *q;
--	int i, len;
-+	u32 length;
-+	int i;
- 
- 	dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
--	q = &dev->mt76.q_rx[MT_RXQ_MAIN];
--	len = SKB_WITH_OVERHEAD(q->buf_size);
-+	length = SKB_DATA_ALIGN(NET_SKB_PAD + wed->wlan.rx_size +
-+				sizeof(struct skb_shared_info));
- 
- 	for (i = 0; i < size; i++) {
--		enum dma_data_direction dir;
--		dma_addr_t addr;
--		u32 offset;
-+		struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
-+		dma_addr_t phy_addr;
- 		int token;
--		void *buf;
-+		void *ptr;
- 
--		r = mt76_get_rxwi(&dev->mt76);
- 		if (!r)
- 			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);
- 			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);
-+		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);
-+		if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
-+			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) {
--			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);
- 			goto unmap;
- 		}
- 
-@@ -646,8 +680,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);
- 	mt7915_mmio_wed_release_rx_buf(wed);
- 	return -ENOMEM;
- }
-diff --git a/mt7921/main.c b/mt7921/main.c
-index a72964e7..4c400223 100644
---- a/mt7921/main.c
-+++ b/mt7921/main.c
-@@ -1090,34 +1090,17 @@ static void
- mt7921_get_et_strings(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- 		      u32 sset, u8 *data)
- {
--	struct mt7921_dev *dev = mt7921_hw_dev(hw);
--
- 	if (sset != ETH_SS_STATS)
- 		return;
- 
- 	memcpy(data, *mt7921_gstrings_stats, sizeof(mt7921_gstrings_stats));
--
--	if (mt76_is_sdio(&dev->mt76))
--		return;
--
--	data += sizeof(mt7921_gstrings_stats);
--	page_pool_ethtool_stats_get_strings(data);
- }
- 
- static int
- mt7921_get_et_sset_count(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- 			 int sset)
- {
--	struct mt7921_dev *dev = mt7921_hw_dev(hw);
--
--	if (sset != ETH_SS_STATS)
--		return 0;
--
--	if (mt76_is_sdio(&dev->mt76))
--		return ARRAY_SIZE(mt7921_gstrings_stats);
--
--	return ARRAY_SIZE(mt7921_gstrings_stats) +
--	       page_pool_ethtool_stats_get_count();
-+	return sset == ETH_SS_STATS ? ARRAY_SIZE(mt7921_gstrings_stats) : 0;
- }
- 
- static void
-@@ -1137,7 +1120,6 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- 			 struct ethtool_stats *stats, u64 *data)
- {
- 	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
--	int stats_size = ARRAY_SIZE(mt7921_gstrings_stats);
- 	struct mt7921_phy *phy = mt7921_hw_phy(hw);
- 	struct mt7921_dev *dev = phy->dev;
- 	struct mib_stats *mib = &phy->mib;
-@@ -1193,14 +1175,9 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- 		return;
- 
- 	ei += wi.worker_stat_count;
--
--	if (!mt76_is_sdio(&dev->mt76)) {
--		mt76_ethtool_page_pool_stats(&dev->mt76, &data[ei], &ei);
--		stats_size += page_pool_ethtool_stats_get_count();
--	}
--
--	if (ei != stats_size)
--		dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %d", ei, stats_size);
-+	if (ei != ARRAY_SIZE(mt7921_gstrings_stats))
-+		dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %zu",
-+			ei, ARRAY_SIZE(mt7921_gstrings_stats));
- }
- 
- static u64
-diff --git a/usb.c b/usb.c
-index 5e5c7bf5..f0a50f57 100644
---- a/usb.c
-+++ b/usb.c
-@@ -319,27 +319,29 @@ mt76u_set_endpoints(struct usb_interface *intf,
- 
- static int
- mt76u_fill_rx_sg(struct mt76_dev *dev, struct mt76_queue *q, struct urb *urb,
--		 int nsgs)
-+		 int nsgs, gfp_t gfp)
- {
- 	int i;
- 
- 	for (i = 0; i < nsgs; i++) {
-+		struct page *page;
- 		void *data;
- 		int offset;
- 
--		data = mt76_get_page_pool_buf(q, &offset, q->buf_size);
-+		data = page_frag_alloc(&q->rx_page, q->buf_size, gfp);
- 		if (!data)
- 			break;
- 
--		sg_set_page(&urb->sg[i], virt_to_head_page(data), q->buf_size,
--			    offset);
-+		page = virt_to_head_page(data);
-+		offset = data - page_address(page);
-+		sg_set_page(&urb->sg[i], page, q->buf_size, offset);
- 	}
- 
- 	if (i < nsgs) {
- 		int j;
- 
- 		for (j = nsgs; j < urb->num_sgs; j++)
--			mt76_put_page_pool_buf(sg_virt(&urb->sg[j]), false);
-+			skb_free_frag(sg_virt(&urb->sg[j]));
- 		urb->num_sgs = i;
- 	}
- 
-@@ -352,16 +354,15 @@ mt76u_fill_rx_sg(struct mt76_dev *dev, struct mt76_queue *q, struct urb *urb,
- 
- static int
- mt76u_refill_rx(struct mt76_dev *dev, struct mt76_queue *q,
--		struct urb *urb, int nsgs)
-+		struct urb *urb, int nsgs, gfp_t gfp)
- {
- 	enum mt76_rxq_id qid = q - &dev->q_rx[MT_RXQ_MAIN];
--	int offset;
- 
- 	if (qid == MT_RXQ_MAIN && dev->usb.sg_en)
--		return mt76u_fill_rx_sg(dev, q, urb, nsgs);
-+		return mt76u_fill_rx_sg(dev, q, urb, nsgs, gfp);
- 
- 	urb->transfer_buffer_length = q->buf_size;
--	urb->transfer_buffer = mt76_get_page_pool_buf(q, &offset, q->buf_size);
-+	urb->transfer_buffer = page_frag_alloc(&q->rx_page, q->buf_size, gfp);
- 
- 	return urb->transfer_buffer ? 0 : -ENOMEM;
- }
-@@ -399,7 +400,7 @@ mt76u_rx_urb_alloc(struct mt76_dev *dev, struct mt76_queue *q,
- 	if (err)
- 		return err;
- 
--	return mt76u_refill_rx(dev, q, e->urb, sg_size);
-+	return mt76u_refill_rx(dev, q, e->urb, sg_size, GFP_KERNEL);
- }
- 
- static void mt76u_urb_free(struct urb *urb)
-@@ -407,10 +408,10 @@ static void mt76u_urb_free(struct urb *urb)
- 	int i;
- 
- 	for (i = 0; i < urb->num_sgs; i++)
--		mt76_put_page_pool_buf(sg_virt(&urb->sg[i]), false);
-+		skb_free_frag(sg_virt(&urb->sg[i]));
- 
- 	if (urb->transfer_buffer)
--		mt76_put_page_pool_buf(urb->transfer_buffer, false);
-+		skb_free_frag(urb->transfer_buffer);
- 
- 	usb_free_urb(urb);
- }
-@@ -546,8 +547,6 @@ mt76u_process_rx_entry(struct mt76_dev *dev, struct urb *urb,
- 		len -= data_len;
- 		nsgs++;
- 	}
--
--	skb_mark_for_recycle(skb);
- 	dev->drv->rx_skb(dev, MT_RXQ_MAIN, skb, NULL);
- 
- 	return nsgs;
-@@ -613,7 +612,7 @@ mt76u_process_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
- 
- 		count = mt76u_process_rx_entry(dev, urb, q->buf_size);
- 		if (count > 0) {
--			err = mt76u_refill_rx(dev, q, urb, count);
-+			err = mt76u_refill_rx(dev, q, urb, count, GFP_ATOMIC);
- 			if (err < 0)
- 				break;
- 		}
-@@ -664,10 +663,6 @@ mt76u_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid)
- 	struct mt76_queue *q = &dev->q_rx[qid];
- 	int i, err;
- 
--	err = mt76_create_page_pool(dev, q);
--	if (err)
--		return err;
--
- 	spin_lock_init(&q->lock);
- 	q->entry = devm_kcalloc(dev->dev,
- 				MT_NUM_RX_ENTRIES, sizeof(*q->entry),
-@@ -696,6 +691,7 @@ EXPORT_SYMBOL_GPL(mt76u_alloc_mcu_queue);
- static void
- mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
- {
-+	struct page *page;
- 	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)
- 		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;
-+
-+	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 mt76u_free_rx(struct mt76_dev *dev)
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/4001-mt76-revert-get_of_mac_addr.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4001-mt76-revert-get_of_mac_addr.patch
deleted file mode 100644
index 7a0aa12..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/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/autobuild_mac80211_release/package/kernel/mt76/patches/4002-mt76-include-header-files-for-module-param.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4002-mt76-include-header-files-for-module-param.patch
deleted file mode 100644
index e7661df..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/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/autobuild_mac80211_release/package/kernel/mt76/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
deleted file mode 100644
index a75825e..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/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/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
deleted file mode 100644
index 652fa50..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
+++ /dev/null
@@ -1,1183 +0,0 @@
-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
-
----
- dma.c             |   2 +-
- mac80211.c        |   4 +-
- mt7615/dma.c      |   4 +-
- mt7615/main.c     |   6 +-
- mt7615/mcu.c      |   8 +--
- mt76_connac_mcu.c | 108 +++++++++++++++---------------
- mt76x02_mac.c     |   6 +-
- mt7915/debugfs.c  |   4 +-
- mt7915/dma.c      |   4 +-
- mt7915/init.c     |   3 +-
- mt7915/mac.c      |   2 +-
- mt7915/main.c     |  10 +--
- mt7915/mcu.c      | 166 +++++++++++++++++++++++-----------------------
- mt7915/testmode.c |   8 +--
- tx.c              |  11 +--
- 15 files changed, 168 insertions(+), 178 deletions(-)
-
-diff --git a/dma.c b/dma.c
-index 1fc4bd2d..e7d174b8 100644
---- a/dma.c
-+++ b/dma.c
-@@ -986,7 +986,7 @@ mt76_dma_init(struct mt76_dev *dev,
- 	init_completion(&dev->mmio.wed_reset_complete);
- 
- 	mt76_for_each_q_rx(dev, i) {
--		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll);
-+		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll, 64);
- 		mt76_dma_rx_fill(dev, &dev->q_rx[i]);
- 		napi_enable(&dev->napi[i]);
- 	}
-diff --git a/mac80211.c b/mac80211.c
-index 4dc7627e..4c88710f 100644
---- a/mac80211.c
-+++ b/mac80211.c
-@@ -1517,7 +1517,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power);
- static void
- __mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
- {
--	if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
-+	if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
- 		ieee80211_csa_finish(vif);
- }
- 
-@@ -1539,7 +1539,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
- {
- 	struct mt76_dev *dev = priv;
- 
--	if (!vif->bss_conf.csa_active)
-+	if (!vif->csa_active)
- 		return;
- 
- 	dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
-diff --git a/mt7615/dma.c b/mt7615/dma.c
-index f1914431..ec729dbe 100644
---- a/mt7615/dma.c
-+++ b/mt7615/dma.c
-@@ -281,8 +281,8 @@ int mt7615_dma_init(struct mt7615_dev *dev)
- 	if (ret < 0)
- 		return ret;
- 
--	netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
--			  mt7615_poll_tx);
-+	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
-+			  mt7615_poll_tx, NAPI_POLL_WEIGHT);
- 	napi_enable(&dev->mt76.tx_napi);
- 
- 	mt76_poll(dev, MT_WPDMA_GLO_CFG,
-diff --git a/mt7615/main.c b/mt7615/main.c
-index ab4c1b44..8fb5b256 100644
---- a/mt7615/main.c
-+++ b/mt7615/main.c
-@@ -474,7 +474,7 @@ static int mt7615_config(struct ieee80211_hw *hw, u32 changed)
- 
- static int
- mt7615_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
--	       unsigned int link_id, u16 queue,
-+	       u16 queue,
- 	       const struct ieee80211_tx_queue_params *params)
- {
- 	struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
-@@ -556,7 +556,7 @@ static void mt7615_configure_filter(struct ieee80211_hw *hw,
- static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
- 				    struct ieee80211_vif *vif,
- 				    struct ieee80211_bss_conf *info,
--				    u64 changed)
-+				    u32 changed)
- {
- 	struct mt7615_dev *dev = mt7615_hw_dev(hw);
- 	struct mt7615_phy *phy = mt7615_hw_phy(hw);
-@@ -599,7 +599,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
- 	}
- 
- 	if (changed & BSS_CHANGED_ASSOC)
--		mt7615_mac_set_beacon_filter(phy, vif, vif->cfg.assoc);
-+		mt7615_mac_set_beacon_filter(phy, vif, info->assoc);
- 
- 	mt7615_mutex_release(dev);
- }
-diff --git a/mt7615/mcu.c b/mt7615/mcu.c
-index 4593b2e1..39e81d26 100644
---- a/mt7615/mcu.c
-+++ b/mt7615/mcu.c
-@@ -353,7 +353,7 @@ out:
- static void
- mt7615_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
- {
--	if (vif->bss_conf.csa_active)
-+	if (vif->csa_active)
- 		ieee80211_csa_finish(vif);
- }
- 
-@@ -699,7 +699,7 @@ mt7615_mcu_add_beacon_offload(struct mt7615_dev *dev,
- 	if (!enable)
- 		goto out;
- 
--	skb = ieee80211_beacon_get_template(hw, vif, &offs, 0);
-+	skb = ieee80211_beacon_get_template(hw, vif, &offs);
- 	if (!skb)
- 		return -EINVAL;
- 
-@@ -1074,7 +1074,7 @@ mt7615_mcu_uni_add_beacon_offload(struct mt7615_dev *dev,
- 	if (!enable)
- 		goto out;
- 
--	skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs, 0);
-+	skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs);
- 	if (!skb)
- 		return -EINVAL;
- 
-@@ -2525,7 +2525,7 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
- 		u8 pad;
- 	} req = {
- 		.bss_idx = mvif->mt76.idx,
--		.aid = cpu_to_le16(vif->cfg.aid),
-+		.aid = cpu_to_le16(vif->bss_conf.aid),
- 		.dtim_period = vif->bss_conf.dtim_period,
- 		.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
---- 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)
- 			      */
- 	} req = {
- 		.bss_idx = mvif->idx,
--		.ps_state = vif->cfg.ps ? 2 : 0,
-+		.ps_state = vif->bss_conf.ps ? 2 : 0,
- 	};
- 
- 	if (vif->type != NL80211_IFTYPE_STATION)
-@@ -409,7 +409,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
- 		else
- 			conn_type = CONNECTION_INFRA_AP;
- 		basic->conn_type = cpu_to_le32(conn_type);
--		basic->aid = cpu_to_le16(vif->cfg.aid);
-+		basic->aid = cpu_to_le16(vif->bss_conf.aid);
- 		break;
- 	case NL80211_IFTYPE_ADHOC:
- 		basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
-@@ -553,7 +553,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
- 
- 	if (sta) {
- 		if (vif->type == NL80211_IFTYPE_STATION)
--			generic->partial_aid = cpu_to_le16(vif->cfg.aid);
-+			generic->partial_aid = cpu_to_le16(vif->bss_conf.aid);
- 		else
- 			generic->partial_aid = cpu_to_le16(sta->aid);
- 		memcpy(generic->peer_addr, sta->addr, ETH_ALEN);
-@@ -602,14 +602,14 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
- 	    vif->type != NL80211_IFTYPE_STATION)
- 		return;
- 
--	if (!sta->deflink.agg.max_amsdu_len)
-+	if (!sta->max_amsdu_len)
- 		return;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
- 	amsdu = (struct sta_rec_amsdu *)tlv;
- 	amsdu->max_amsdu_num = 8;
- 	amsdu->amsdu_en = true;
--	amsdu->max_mpdu_size = sta->deflink.agg.max_amsdu_len >=
-+	amsdu->max_mpdu_size = sta->max_amsdu_len >=
- 			       IEEE80211_MAX_MPDU_LEN_VHT_7991;
- 
- 	wcid->amsdu = true;
-@@ -620,7 +620,7 @@ mt76_connac_mcu_sta_amsdu_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
- static void
- mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
- {
--	struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
-+	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
- 	struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem;
- 	struct sta_rec_he *he;
- 	struct tlv *tlv;
-@@ -708,7 +708,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
- 
- 	he->he_cap = cpu_to_le32(cap);
- 
--	switch (sta->deflink.bandwidth) {
-+	switch (sta->bandwidth) {
- 	case IEEE80211_STA_RX_BW_160:
- 		if (elem->phy_cap_info[0] &
- 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
-@@ -753,7 +753,7 @@ mt76_connac_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
- static void
- mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
- {
--	struct ieee80211_sta_he_cap *he_cap = &sta->deflink.he_cap;
-+	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
- 	struct ieee80211_he_cap_elem *elem = &he_cap->he_cap_elem;
- 	struct sta_rec_he_v2 *he;
- 	struct tlv *tlv;
-@@ -764,7 +764,7 @@ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
- 	memcpy(he->he_phy_cap, elem->phy_cap_info, sizeof(he->he_phy_cap));
- 	memcpy(he->he_mac_cap, elem->mac_cap_info, sizeof(he->he_mac_cap));
- 
--	switch (sta->deflink.bandwidth) {
-+	switch (sta->bandwidth) {
- 	case IEEE80211_STA_RX_BW_160:
- 		if (elem->phy_cap_info[0] &
- 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
-@@ -780,7 +780,7 @@ mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta)
- 		break;
- 	}
- 
--	he->pkt_ext = IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US;
-+	he->pkt_ext = IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US;
- }
- 
- static u8
-@@ -793,9 +793,9 @@ mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
- 	u8 mode = 0;
- 
- 	if (sta) {
--		ht_cap = &sta->deflink.ht_cap;
--		vht_cap = &sta->deflink.vht_cap;
--		he_cap = &sta->deflink.he_cap;
-+		ht_cap = &sta->ht_cap;
-+		vht_cap = &sta->vht_cap;
-+		he_cap = &sta->he_cap;
- 	} else {
- 		struct ieee80211_supported_band *sband;
- 
-@@ -844,25 +844,25 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
- 	u16 supp_rates;
- 
- 	/* starec ht */
--	if (sta->deflink.ht_cap.ht_supported) {
-+	if (sta->ht_cap.ht_supported) {
- 		struct sta_rec_ht *ht;
- 
- 		tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht));
- 		ht = (struct sta_rec_ht *)tlv;
--		ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap);
-+		ht->ht_cap = cpu_to_le16(sta->ht_cap.cap);
- 	}
- 
- 	/* starec vht */
--	if (sta->deflink.vht_cap.vht_supported) {
-+	if (sta->vht_cap.vht_supported) {
- 		struct sta_rec_vht *vht;
- 		int len;
- 
- 		len = is_mt7921(dev) ? sizeof(*vht) : sizeof(*vht) - 4;
- 		tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, len);
- 		vht = (struct sta_rec_vht *)tlv;
--		vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
--		vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map;
--		vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map;
-+		vht->vht_cap = cpu_to_le32(sta->vht_cap.cap);
-+		vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map;
-+		vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map;
- 	}
- 
- 	/* starec uapsd */
-@@ -871,11 +871,11 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
- 	if (!is_mt7921(dev))
- 		return;
- 
--	if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)
-+	if (sta->ht_cap.ht_supported || sta->he_cap.has_he)
- 		mt76_connac_mcu_sta_amsdu_tlv(skb, sta, vif);
- 
- 	/* starec he */
--	if (sta->deflink.he_cap.has_he) {
-+	if (sta->he_cap.has_he) {
- 		mt76_connac_mcu_sta_he_tlv(skb, sta);
- 		mt76_connac_mcu_sta_he_tlv_v2(skb, sta);
- 		if (band == NL80211_BAND_6GHZ &&
-@@ -885,7 +885,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
- 			tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE_6G,
- 						      sizeof(*he_6g_capa));
- 			he_6g_capa = (struct sta_rec_he_6g_capa *)tlv;
--			he_6g_capa->capa = sta->deflink.he_6ghz_capa.capa;
-+			he_6g_capa->capa = sta->he_6ghz_capa.capa;
- 		}
- 	}
- 
-@@ -895,14 +895,14 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
- 	phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates);
- 	phy->rcpi = rcpi;
- 	phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR,
--				sta->deflink.ht_cap.ampdu_factor) |
-+				sta->ht_cap.ampdu_factor) |
- 		     FIELD_PREP(IEEE80211_HT_AMPDU_PARM_DENSITY,
--				sta->deflink.ht_cap.ampdu_density);
-+				sta->ht_cap.ampdu_density);
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra_info));
- 	ra_info = (struct sta_rec_ra_info *)tlv;
- 
--	supp_rates = sta->deflink.supp_rates[band];
-+	supp_rates = sta->supp_rates[band];
- 	if (band == NL80211_BAND_2GHZ)
- 		supp_rates = FIELD_PREP(RA_LEGACY_OFDM, supp_rates >> 4) |
- 			     FIELD_PREP(RA_LEGACY_CCK, supp_rates & 0xf);
-@@ -911,18 +911,18 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
- 
- 	ra_info->legacy = cpu_to_le16(supp_rates);
- 
--	if (sta->deflink.ht_cap.ht_supported)
-+	if (sta->ht_cap.ht_supported)
- 		memcpy(ra_info->rx_mcs_bitmask,
--		       sta->deflink.ht_cap.mcs.rx_mask,
-+		       sta->ht_cap.mcs.rx_mask,
- 		       HT_MCS_MASK_NUM);
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_STATE, sizeof(*state));
- 	state = (struct sta_rec_state *)tlv;
- 	state->state = sta_state;
- 
--	if (sta->deflink.vht_cap.vht_supported) {
--		state->vht_opmode = sta->deflink.bandwidth;
--		state->vht_opmode |= (sta->deflink.rx_nss - 1) <<
-+	if (sta->vht_cap.vht_supported) {
-+		state->vht_opmode = sta->bandwidth;
-+		state->vht_opmode |= (sta->rx_nss - 1) <<
- 			IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT;
- 	}
- }
-@@ -938,7 +938,7 @@ void mt76_connac_mcu_wtbl_smps_tlv(struct sk_buff *skb,
- 	tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_SMPS, sizeof(*smps),
- 					     wtbl_tlv, sta_wtbl);
- 	smps = (struct wtbl_smps *)tlv;
--	smps->smps = (sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC);
-+	smps->smps = (sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
- }
- EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_smps_tlv);
- 
-@@ -950,27 +950,27 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
- 	struct tlv *tlv;
- 	u32 flags = 0;
- 
--	if (sta->deflink.ht_cap.ht_supported || sta->deflink.he_6ghz_capa.capa) {
-+	if (sta->ht_cap.ht_supported || sta->he_6ghz_capa.capa) {
- 		tlv = mt76_connac_mcu_add_nested_tlv(skb, WTBL_HT, sizeof(*ht),
- 						     wtbl_tlv, sta_wtbl);
- 		ht = (struct wtbl_ht *)tlv;
- 		ht->ldpc = ht_ldpc &&
--			   !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING);
-+			   !!(sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING);
- 
--		if (sta->deflink.ht_cap.ht_supported) {
--			ht->af = sta->deflink.ht_cap.ampdu_factor;
--			ht->mm = sta->deflink.ht_cap.ampdu_density;
-+		if (sta->ht_cap.ht_supported) {
-+			ht->af = sta->ht_cap.ampdu_factor;
-+			ht->mm = sta->ht_cap.ampdu_density;
- 		} else {
--			ht->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
-+			ht->af = le16_get_bits(sta->he_6ghz_capa.capa,
- 					       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
--			ht->mm = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
-+			ht->mm = le16_get_bits(sta->he_6ghz_capa.capa,
- 					       IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START);
- 		}
- 
- 		ht->ht = true;
- 	}
- 
--	if (sta->deflink.vht_cap.vht_supported || sta->deflink.he_6ghz_capa.capa) {
-+	if (sta->vht_cap.vht_supported || sta->he_6ghz_capa.capa) {
- 		struct wtbl_vht *vht;
- 		u8 af;
- 
-@@ -979,18 +979,18 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
- 						     sta_wtbl);
- 		vht = (struct wtbl_vht *)tlv;
- 		vht->ldpc = vht_ldpc &&
--			    !!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC);
-+			    !!(sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC);
- 		vht->vht = true;
- 
- 		af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
--			       sta->deflink.vht_cap.cap);
-+			       sta->vht_cap.cap);
- 		if (ht)
- 			ht->af = max(ht->af, af);
- 	}
- 
- 	mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_tlv);
- 
--	if (is_connac_v1(dev) && sta->deflink.ht_cap.ht_supported) {
-+	if (is_connac_v1(dev) && sta->ht_cap.ht_supported) {
- 		/* sgi */
- 		u32 msk = MT_WTBL_W5_SHORT_GI_20 | MT_WTBL_W5_SHORT_GI_40 |
- 			  MT_WTBL_W5_SHORT_GI_80 | MT_WTBL_W5_SHORT_GI_160;
-@@ -1000,15 +1000,15 @@ void mt76_connac_mcu_wtbl_ht_tlv(struct mt76_dev *dev, struct sk_buff *skb,
- 						     sizeof(*raw), wtbl_tlv,
- 						     sta_wtbl);
- 
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
- 			flags |= MT_WTBL_W5_SHORT_GI_20;
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
- 			flags |= MT_WTBL_W5_SHORT_GI_40;
- 
--		if (sta->deflink.vht_cap.vht_supported) {
--			if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
-+		if (sta->vht_cap.vht_supported) {
-+			if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
- 				flags |= MT_WTBL_W5_SHORT_GI_80;
--			if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
-+			if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
- 				flags |= MT_WTBL_W5_SHORT_GI_160;
- 		}
- 		raw = (struct wtbl_raw *)tlv;
-@@ -1294,9 +1294,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
- 		return 0x38;
- 
- 	if (sta) {
--		ht_cap = &sta->deflink.ht_cap;
--		vht_cap = &sta->deflink.vht_cap;
--		he_cap = &sta->deflink.he_cap;
-+		ht_cap = &sta->ht_cap;
-+		vht_cap = &sta->vht_cap;
-+		he_cap = &sta->he_cap;
- 	} else {
- 		struct ieee80211_supported_band *sband;
- 
-@@ -1662,7 +1662,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;
--
- 		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,
- 		memcpy(req->ssids[i].ssid, ssid->ssid, ssid->ssid_len);
- 		req->ssids[i].ssid_len = cpu_to_le32(ssid->ssid_len);
- 	}
--
- 	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,
- 				      struct mt76_vif *vif,
- 				      struct ieee80211_bss_conf *info)
- {
--	struct ieee80211_vif *mvif = container_of(info, struct ieee80211_vif,
--						  bss_conf);
- 	struct sk_buff *skb;
--	int i, len = min_t(int, mvif->cfg.arp_addr_cnt,
-+	int i, len = min_t(int, info->arp_addr_cnt,
- 			   IEEE80211_BSS_ARP_ADDR_LIST_LEN);
- 	struct {
- 		struct {
-@@ -2313,7 +2309,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++)
--		skb_put_data(skb, &mvif->cfg.arp_addr_list[i], sizeof(__be32));
-+		skb_put_data(skb, &info->arp_addr_list[i], sizeof(__be32));
- 
- 	return mt76_mcu_skb_send_msg(dev, skb, MCU_UNI_CMD(OFFLOAD), true);
- }
-diff --git a/mt76x02_mac.c b/mt76x02_mac.c
-index d3f74473..87ea3db1 100644
---- a/mt76x02_mac.c
-+++ b/mt76x02_mac.c
-@@ -404,7 +404,7 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi,
- 		txwi->rate |= cpu_to_le16(MT_RXWI_RATE_LDPC);
- 	if ((info->flags & IEEE80211_TX_CTL_STBC) && nss == 1)
- 		txwi->rate |= cpu_to_le16(MT_RXWI_RATE_STBC);
--	if (nss > 1 && sta && sta->deflink.smps_mode == IEEE80211_SMPS_DYNAMIC)
-+	if (nss > 1 && sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC)
- 		txwi_flags |= MT_TXWI_FLAGS_MMPS;
- 	if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
- 		txwi->ack_ctl |= MT_TXWI_ACK_CTL_REQ;
-@@ -412,9 +412,9 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi,
- 		txwi->ack_ctl |= MT_TXWI_ACK_CTL_NSEQ;
- 	if ((info->flags & IEEE80211_TX_CTL_AMPDU) && sta) {
- 		u8 ba_size = IEEE80211_MIN_AMPDU_BUF;
--		u8 ampdu_density = sta->deflink.ht_cap.ampdu_density;
-+		u8 ampdu_density = sta->ht_cap.ampdu_density;
- 
--		ba_size <<= sta->deflink.ht_cap.ampdu_factor;
-+		ba_size <<= sta->ht_cap.ampdu_factor;
- 		ba_size = min_t(int, 63, ba_size - 1);
- 		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
---- a/mt7915/debugfs.c
-+++ b/mt7915/debugfs.c
-@@ -1905,8 +1905,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++) {
--		phy.sgi |= gi << (i << sta->deflink.he_cap.has_he);
--		phy.he_ltf |= he_ltf << (i << sta->deflink.he_cap.has_he);
-+		phy.sgi |= gi << (i << sta->he_cap.has_he);
-+		phy.he_ltf |= he_ltf << (i << sta->he_cap.has_he);
- 	}
- 	field = RATE_PARAM_FIXED;
- 
-diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 6d9b2d15..08322453 100644
---- a/mt7915/dma.c
-+++ b/mt7915/dma.c
-@@ -554,8 +554,8 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
- 	if (ret < 0)
- 		return ret;
- 
--	netif_napi_add_tx(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
--			  mt7915_poll_tx);
-+	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
-+			  mt7915_poll_tx, NAPI_POLL_WEIGHT);
- 	napi_enable(&dev->mt76.tx_napi);
- 
- 	mt7915_dma_enable(dev);
-diff --git a/mt7915/init.c b/mt7915/init.c
-index 70563c9d..0b852286 100644
---- a/mt7915/init.c
-+++ b/mt7915/init.c
-@@ -1160,8 +1160,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
- 			mt7915_gen_ppe_thresh(he_cap->ppe_thres, nss);
- 		} else {
- 			he_cap_elem->phy_cap_info[9] |=
--				u8_encode_bits(IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US,
--					       IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK);
-+				IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US;
- 		}
- 
- 		if (band == NL80211_BAND_6GHZ) {
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 180c1ae3..583b71b1 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -902,7 +902,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
- 	u16 fc, tid;
- 	u32 val;
- 
--	if (!sta || !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
-+	if (!sta || !(sta->ht_cap.ht_supported || sta->he_cap.has_he))
- 		return;
- 
- 	tid = le32_get_bits(txwi[1], MT_TXD1_TID);
-diff --git a/mt7915/main.c b/mt7915/main.c
-index 21caddbe..fd62a659 100644
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -523,7 +523,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
- 
- static int
- mt7915_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
--	       unsigned int link_id, u16 queue,
-+	       u16 queue,
- 	       const struct ieee80211_tx_queue_params *params)
- {
- 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-@@ -618,7 +618,7 @@ mt7915_update_bss_color(struct ieee80211_hw *hw,
- static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
- 				    struct ieee80211_vif *vif,
- 				    struct ieee80211_bss_conf *info,
--				    u64 changed)
-+				    u32 changed)
- {
- 	struct mt7915_phy *phy = mt7915_hw_phy(hw);
- 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
-@@ -638,7 +638,7 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
- 	}
- 
- 	if (changed & BSS_CHANGED_ASSOC)
--		mt7915_mcu_add_bss_info(phy, vif, vif->cfg.assoc);
-+		mt7915_mcu_add_bss_info(phy, vif, info->assoc);
- 
- 	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,
- {
- 	struct mt7915_phy *phy = mt7915_hw_phy(hw);
- 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
--	s16 txpower = sta->deflink.txpwr.power;
-+	s16 txpower = sta->txpwr.power;
- 	int ret;
- 
--	if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC)
-+	if (sta->txpwr.type == NL80211_TX_POWER_AUTOMATIC)
- 		txpower = 0;
- 
- 	mutex_lock(&dev->mt76.mutex);
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 37291865..4f1bd1cd 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,
- 	struct mt7915_dev *dev = msta->vif->phy->dev;
- 	enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band;
- 	const u16 *mask = msta->vif->bitrate_mask.control[band].he_mcs;
--	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
-+	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
- 
- 	for (nss = 0; nss < max_nss; nss++) {
- 		int mcs;
-@@ -104,7 +104,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
- 
- 		/* only support 2ss on 160MHz for mt7915 */
- 		if (is_mt7915(&dev->mt76) && nss > 1 &&
--		    sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
-+		    sta->bandwidth == IEEE80211_STA_RX_BW_160)
- 			break;
- 	}
- 
-@@ -117,8 +117,8 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs,
- {
- 	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
- 	struct mt7915_dev *dev = msta->vif->phy->dev;
--	u16 mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map);
--	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
-+	u16 mcs_map = le16_to_cpu(sta->vht_cap.vht_mcs.rx_mcs_map);
-+	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
- 	u16 mcs;
- 
- 	for (nss = 0; nss < max_nss; nss++, mcs_map >>= 2) {
-@@ -140,7 +140,7 @@ mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs,
- 
- 		/* only support 2ss on 160MHz for mt7915 */
- 		if (is_mt7915(&dev->mt76) && nss > 1 &&
--		    sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
-+		    sta->bandwidth == IEEE80211_STA_RX_BW_160)
- 			break;
- 	}
- }
-@@ -149,10 +149,10 @@ static void
- mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs,
- 			  const u8 *mask)
- {
--	int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss;
-+	int nss, max_nss = sta->rx_nss > 3 ? 4 : sta->rx_nss;
- 
- 	for (nss = 0; nss < max_nss; nss++)
--		ht_mcs[nss] = sta->deflink.ht_cap.mcs.rx_mask[nss] & mask[nss];
-+		ht_mcs[nss] = sta->ht_cap.mcs.rx_mask[nss] & mask[nss];
- }
- 
- static int
-@@ -233,7 +233,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
- static void
- mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
- {
--	if (vif->bss_conf.csa_active)
-+	if (vif->csa_active)
- 		ieee80211_csa_finish(vif);
- }
- 
-@@ -334,7 +334,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
- static void
- mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
- {
--	if (!vif->bss_conf.color_change_active)
-+	if (!vif->color_change_active)
- 		return;
- 
- 	ieee80211_color_change_finish(vif);
-@@ -748,13 +748,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
- 		      struct ieee80211_vif *vif)
- {
- 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
--	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
-+	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
- 	struct ieee80211_he_mcs_nss_supp mcs_map;
- 	struct sta_rec_he *he;
- 	struct tlv *tlv;
- 	u32 cap = 0;
- 
--	if (!sta->deflink.he_cap.has_he)
-+	if (!sta->he_cap.has_he)
- 		return;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he));
-@@ -840,8 +840,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
- 
- 	he->he_cap = cpu_to_le32(cap);
- 
--	mcs_map = sta->deflink.he_cap.he_mcs_nss_supp;
--	switch (sta->deflink.bandwidth) {
-+	mcs_map = sta->he_cap.he_mcs_nss_supp;
-+	switch (sta->bandwidth) {
- 	case IEEE80211_STA_RX_BW_160:
- 		if (elem->phy_cap_info[0] &
- 		    IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
-@@ -892,7 +892,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- {
- 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
- 	struct mt7915_phy *phy = mvif->phy;
--	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
-+	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
- 	struct sta_rec_muru *muru;
- 	struct tlv *tlv;
- 
-@@ -916,11 +916,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	muru->cfg.ofdma_dl_en = !!(phy->muru_onoff & OFDMA_DL);
- 	muru->cfg.ofdma_ul_en = !!(phy->muru_onoff & OFDMA_UL);
- 
--	if (sta->deflink.vht_cap.vht_supported)
-+	if (sta->vht_cap.vht_supported)
- 		muru->mimo_dl.vht_mu_bfee =
--			!!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
-+			!!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
- 
--	if (!sta->deflink.he_cap.has_he)
-+	if (!sta->he_cap.has_he)
- 		return;
- 
- 	muru->mimo_dl.partial_bw_dl_mimo =
-@@ -954,13 +954,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
- 	struct sta_rec_ht *ht;
- 	struct tlv *tlv;
- 
--	if (!sta->deflink.ht_cap.ht_supported)
-+	if (!sta->ht_cap.ht_supported)
- 		return;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HT, sizeof(*ht));
- 
- 	ht = (struct sta_rec_ht *)tlv;
--	ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap);
-+	ht->ht_cap = cpu_to_le16(sta->ht_cap.cap);
- }
- 
- static void
-@@ -969,15 +969,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
- 	struct sta_rec_vht *vht;
- 	struct tlv *tlv;
- 
--	if (!sta->deflink.vht_cap.vht_supported)
-+	if (!sta->vht_cap.vht_supported)
- 		return;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_VHT, sizeof(*vht));
- 
- 	vht = (struct sta_rec_vht *)tlv;
--	vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
--	vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map;
--	vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map;
-+	vht->vht_cap = cpu_to_le32(sta->vht_cap.cap);
-+	vht->vht_rx_mcs_map = sta->vht_cap.vht_mcs.rx_mcs_map;
-+	vht->vht_tx_mcs_map = sta->vht_cap.vht_mcs.tx_mcs_map;
- }
- 
- static void
-@@ -992,7 +992,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	    vif->type != NL80211_IFTYPE_AP)
- 		return;
- 
--	if (!sta->deflink.agg.max_amsdu_len)
-+	if (!sta->max_amsdu_len)
- 	    return;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
-@@ -1001,7 +1001,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	amsdu->amsdu_en = true;
- 	msta->wcid.amsdu = true;
- 
--	switch (sta->deflink.agg.max_amsdu_len) {
-+	switch (sta->max_amsdu_len) {
- 	case IEEE80211_MAX_MPDU_LEN_VHT_11454:
- 		if (!is_mt7915(&dev->mt76)) {
- 			amsdu->max_mpdu_size =
-@@ -1064,8 +1064,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
- 	if (!bfee && tx_ant < 2)
- 		return false;
- 
--	if (sta->deflink.he_cap.has_he) {
--		struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem;
-+	if (sta->he_cap.has_he) {
-+		struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem;
- 
- 		if (bfee)
- 			return mvif->cap.he_su_ebfee &&
-@@ -1075,8 +1075,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
- 			       HE_PHY(CAP4_SU_BEAMFORMEE, pe->phy_cap_info[4]);
- 	}
- 
--	if (sta->deflink.vht_cap.vht_supported) {
--		u32 cap = sta->deflink.vht_cap.cap;
-+	if (sta->vht_cap.vht_supported) {
-+		u32 cap = sta->vht_cap.cap;
- 
- 		if (bfee)
- 			return mvif->cap.vht_su_ebfee &&
-@@ -1102,7 +1102,7 @@ static void
- mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
- 		       struct sta_rec_bf *bf)
- {
--	struct ieee80211_mcs_info *mcs = &sta->deflink.ht_cap.mcs;
-+	struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
- 	u8 n = 0;
- 
- 	bf->tx_mode = MT_PHY_TYPE_HT;
-@@ -1127,7 +1127,7 @@ static void
- mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
- 			struct sta_rec_bf *bf, bool explicit)
- {
--	struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap;
-+	struct ieee80211_sta_vht_cap *pc = &sta->vht_cap;
- 	struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap;
- 	u16 mcs_map = le16_to_cpu(pc->vht_mcs.rx_mcs_map);
- 	u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map);
-@@ -1148,14 +1148,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
- 		bf->ncol = min_t(u8, nss_mcs, bf->nrow);
- 		bf->ibf_ncol = bf->ncol;
- 
--		if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
-+		if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
- 			bf->nrow = 1;
- 	} else {
- 		bf->nrow = tx_ant;
- 		bf->ncol = min_t(u8, nss_mcs, bf->nrow);
- 		bf->ibf_ncol = nss_mcs;
- 
--		if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
-+		if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
- 			bf->ibf_nrow = 1;
- 	}
- }
-@@ -1164,7 +1164,7 @@ static void
- mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
- 		       struct mt7915_phy *phy, struct sta_rec_bf *bf)
- {
--	struct ieee80211_sta_he_cap *pc = &sta->deflink.he_cap;
-+	struct ieee80211_sta_he_cap *pc = &sta->he_cap;
- 	struct ieee80211_he_cap_elem *pe = &pc->he_cap_elem;
- 	const struct ieee80211_sta_he_cap *vc =
- 		mt76_connac_get_he_phy_cap(phy->mt76, vif);
-@@ -1189,7 +1189,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
- 	bf->ncol = min_t(u8, nss_mcs, bf->nrow);
- 	bf->ibf_ncol = bf->ncol;
- 
--	if (sta->deflink.bandwidth != IEEE80211_STA_RX_BW_160)
-+	if (sta->bandwidth != IEEE80211_STA_RX_BW_160)
- 		return;
- 
- 	/* go over for 160MHz and 80p80 */
-@@ -1237,7 +1237,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	};
- 	bool ebf;
- 
--	if (!(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
-+	if (!(sta->ht_cap.ht_supported || sta->he_cap.has_he))
- 		return;
- 
- 	ebf = mt7915_is_ebf_supported(phy, vif, sta, false);
-@@ -1251,21 +1251,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	 * vht: support eBF and iBF
- 	 * ht: iBF only, since mac80211 lacks of eBF support
- 	 */
--	if (sta->deflink.he_cap.has_he && ebf)
-+	if (sta->he_cap.has_he && ebf)
- 		mt7915_mcu_sta_bfer_he(sta, vif, phy, bf);
--	else if (sta->deflink.vht_cap.vht_supported)
-+	else if (sta->vht_cap.vht_supported)
- 		mt7915_mcu_sta_bfer_vht(sta, phy, bf, ebf);
--	else if (sta->deflink.ht_cap.ht_supported)
-+	else if (sta->ht_cap.ht_supported)
- 		mt7915_mcu_sta_bfer_ht(sta, phy, bf);
- 	else
- 		return;
- 
- 	bf->bf_cap = ebf ? ebf : dev->ibf << 1;
--	bf->bw = sta->deflink.bandwidth;
--	bf->ibf_dbw = sta->deflink.bandwidth;
-+	bf->bw = sta->bandwidth;
-+	bf->ibf_dbw = sta->bandwidth;
- 	bf->ibf_nrow = tx_ant;
- 
--	if (!ebf && sta->deflink.bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol)
-+	if (!ebf && sta->bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol)
- 		bf->ibf_timeout = 0x48;
- 	else
- 		bf->ibf_timeout = 0x18;
-@@ -1275,7 +1275,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	else
- 		bf->mem_20m = matrix[bf->nrow][bf->ncol];
- 
--	switch (sta->deflink.bandwidth) {
-+	switch (sta->bandwidth) {
- 	case IEEE80211_STA_RX_BW_160:
- 	case IEEE80211_STA_RX_BW_80:
- 		bf->mem_total = bf->mem_20m * 2;
-@@ -1300,7 +1300,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	struct tlv *tlv;
- 	u8 nrow = 0;
- 
--	if (!(sta->deflink.vht_cap.vht_supported || sta->deflink.he_cap.has_he))
-+	if (!(sta->vht_cap.vht_supported || sta->he_cap.has_he))
- 		return;
- 
- 	if (!mt7915_is_ebf_supported(phy, vif, sta, true))
-@@ -1309,13 +1309,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_BFEE, sizeof(*bfee));
- 	bfee = (struct sta_rec_bfee *)tlv;
- 
--	if (sta->deflink.he_cap.has_he) {
--		struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem;
-+	if (sta->he_cap.has_he) {
-+		struct ieee80211_he_cap_elem *pe = &sta->he_cap.he_cap_elem;
- 
- 		nrow = HE_PHY(CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK,
- 			      pe->phy_cap_info[5]);
--	} else if (sta->deflink.vht_cap.vht_supported) {
--		struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap;
-+	} else if (sta->vht_cap.vht_supported) {
-+		struct ieee80211_sta_vht_cap *pc = &sta->vht_cap;
- 
- 		nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
- 				 pc->cap);
-@@ -1371,7 +1371,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
- 			ra->phy = *phy;
- 		break;
- 	case RATE_PARAM_MMPS_UPDATE:
--		ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode);
-+		ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode);
- 		break;
- 	case RATE_PARAM_SPE_UPDATE:
- 		ra->spe_idx = *(u8 *)data;
-@@ -1446,7 +1446,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
- 	do {									\
- 		u8 i, gi = mask->control[band]._gi;				\
- 		gi = (_he) ? gi : gi == NL80211_TXRATE_FORCE_SGI;		\
--		for (i = 0; i <= sta->deflink.bandwidth; i++) {			\
-+		for (i = 0; i <= sta->bandwidth; i++) {				\
- 			phy.sgi |= gi << (i << (_he));				\
- 			phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\
- 		}								\
-@@ -1460,11 +1460,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
- 		}								\
- 	} while (0)
- 
--	if (sta->deflink.he_cap.has_he) {
-+	if (sta->he_cap.has_he) {
- 		__sta_phy_bitrate_mask_check(he_mcs, he_gi, 0, 1);
--	} else if (sta->deflink.vht_cap.vht_supported) {
-+	} else if (sta->vht_cap.vht_supported) {
- 		__sta_phy_bitrate_mask_check(vht_mcs, gi, 0, 0);
--	} else if (sta->deflink.ht_cap.ht_supported) {
-+	} else if (sta->ht_cap.ht_supported) {
- 		__sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0);
- 	} else {
- 		nrates = hweight32(mask->control[band].legacy);
-@@ -1498,7 +1498,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
- 		 * actual txrate hardware sends out.
- 		 */
- 		addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 7);
--		if (sta->deflink.he_cap.has_he)
-+		if (sta->he_cap.has_he)
- 			mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi);
- 		else
- 			mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi);
-@@ -1531,7 +1531,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
- 	enum nl80211_band band = chandef->chan->band;
- 	struct sta_rec_ra *ra;
- 	struct tlv *tlv;
--	u32 supp_rate = sta->deflink.supp_rates[band];
-+	u32 supp_rate = sta->supp_rates[band];
- 	u32 cap = sta->wme ? STA_CAP_WMM : 0;
- 
- 	tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra));
-@@ -1541,9 +1541,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
- 	ra->auto_rate = true;
- 	ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta);
- 	ra->channel = chandef->chan->hw_value;
--	ra->bw = sta->deflink.bandwidth;
--	ra->phy.bw = sta->deflink.bandwidth;
--	ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode);
-+	ra->bw = sta->bandwidth;
-+	ra->phy.bw = sta->bandwidth;
-+	ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->smps_mode);
- 
- 	if (supp_rate) {
- 		supp_rate &= mask->control[band].legacy;
-@@ -1563,22 +1563,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
- 		}
- 	}
- 
--	if (sta->deflink.ht_cap.ht_supported) {
-+	if (sta->ht_cap.ht_supported) {
- 		ra->supp_mode |= MODE_HT;
--		ra->af = sta->deflink.ht_cap.ampdu_factor;
--		ra->ht_gf = !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD);
-+		ra->af = sta->ht_cap.ampdu_factor;
-+		ra->ht_gf = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD);
- 
- 		cap |= STA_CAP_HT;
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
- 			cap |= STA_CAP_SGI_20;
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
- 			cap |= STA_CAP_SGI_40;
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_TX_STBC)
- 			cap |= STA_CAP_TX_STBC;
--		if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
-+		if (sta->ht_cap.cap & IEEE80211_HT_CAP_RX_STBC)
- 			cap |= STA_CAP_RX_STBC;
- 		if (mvif->cap.ht_ldpc &&
--		    (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING))
-+		    (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING))
- 			cap |= STA_CAP_LDPC;
- 
- 		mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs,
-@@ -1586,37 +1586,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
- 		ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs;
- 	}
- 
--	if (sta->deflink.vht_cap.vht_supported) {
-+	if (sta->vht_cap.vht_supported) {
- 		u8 af;
- 
- 		ra->supp_mode |= MODE_VHT;
- 		af = FIELD_GET(IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK,
--			       sta->deflink.vht_cap.cap);
-+			       sta->vht_cap.cap);
- 		ra->af = max_t(u8, ra->af, af);
- 
- 		cap |= STA_CAP_VHT;
--		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
-+		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80)
- 			cap |= STA_CAP_VHT_SGI_80;
--		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
-+		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160)
- 			cap |= STA_CAP_VHT_SGI_160;
--		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC)
-+		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC)
- 			cap |= STA_CAP_VHT_TX_STBC;
--		if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1)
-+		if (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1)
- 			cap |= STA_CAP_VHT_RX_STBC;
- 		if (mvif->cap.vht_ldpc &&
--		    (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC))
-+		    (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC))
- 			cap |= STA_CAP_VHT_LDPC;
- 
- 		mt7915_mcu_set_sta_vht_mcs(sta, ra->supp_vht_mcs,
- 					   mask->control[band].vht_mcs);
- 	}
- 
--	if (sta->deflink.he_cap.has_he) {
-+	if (sta->he_cap.has_he) {
- 		ra->supp_mode |= MODE_HE;
- 		cap |= STA_CAP_HE;
- 
--		if (sta->deflink.he_6ghz_capa.capa)
--			ra->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa,
-+		if (sta->he_6ghz_capa.capa)
-+			ra->af = le16_get_bits(sta->he_6ghz_capa.capa,
- 					       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
- 	}
- 
-@@ -1825,7 +1825,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
- 	if (!offs->cntdwn_counter_offs[0])
- 		return;
- 
--	sub_tag = vif->bss_conf.csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
-+	sub_tag = vif->csa_active ? BSS_INFO_BCN_CSA : BSS_INFO_BCN_BCC;
- 	tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info),
- 					   &bcn->sub_ntlv, &bcn->len);
- 	info = (struct bss_info_bcn_cntdwn *)tlv;
-@@ -1910,9 +1910,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
- 	if (offs->cntdwn_counter_offs[0]) {
- 		u16 offset = offs->cntdwn_counter_offs[0];
- 
--		if (vif->bss_conf.csa_active)
-+		if (vif->csa_active)
- 			cont->csa_ofs = cpu_to_le16(offset - 4);
--		if (vif->bss_conf.color_change_active)
-+		if (vif->color_change_active)
- 			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,
- 	if (!en)
- 		goto out;
- 
--	skb = ieee80211_beacon_get_template(hw, vif, &offs, 0);
-+	skb = ieee80211_beacon_get_template(hw, vif, &offs);
- 	if (!skb)
- 		return -EINVAL;
- 
-@@ -3358,17 +3358,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
- 	if (txpower) {
- 		u32 offs, len, i;
- 
--		if (sta->deflink.ht_cap.ht_supported) {
-+		if (sta->ht_cap.ht_supported) {
- 			const u8 *sku_len = mt7915_sku_group_len;
- 
- 			offs = sku_len[SKU_CCK] + sku_len[SKU_OFDM];
- 			len = sku_len[SKU_HT_BW20] + sku_len[SKU_HT_BW40];
- 
--			if (sta->deflink.vht_cap.vht_supported) {
-+			if (sta->vht_cap.vht_supported) {
- 				offs += len;
- 				len = sku_len[SKU_VHT_BW20] * 4;
- 
--				if (sta->deflink.he_cap.has_he) {
-+				if (sta->he_cap.has_he) {
- 					offs += len + sku_len[SKU_HE_RU26] * 3;
- 					len = sku_len[SKU_HE_RU242] * 4;
- 				}
-diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index e4af5e1c..19dfb354 100644
---- a/mt7915/testmode.c
-+++ b/mt7915/testmode.c
-@@ -397,12 +397,12 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
- 		memcpy(sta->addr, td->addr[0], ETH_ALEN);
- 
- 	if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
--		memcpy(&sta->deflink.ht_cap, &sband->ht_cap, sizeof(sta->deflink.ht_cap));
-+		memcpy(&sta->ht_cap, &sband->ht_cap, sizeof(sta->ht_cap));
- 	if (td->tx_rate_mode >= MT76_TM_TX_MODE_VHT)
--		memcpy(&sta->deflink.vht_cap, &sband->vht_cap, sizeof(sta->deflink.vht_cap));
-+		memcpy(&sta->vht_cap, &sband->vht_cap, sizeof(sta->vht_cap));
- 	if (td->tx_rate_mode >= MT76_TM_TX_MODE_HE_SU)
--		memcpy(&sta->deflink.he_cap, &sdata[NL80211_IFTYPE_STATION].he_cap,
--		       sizeof(sta->deflink.he_cap));
-+		memcpy(&sta->he_cap, &sdata[NL80211_IFTYPE_STATION].he_cap,
-+		       sizeof(sta->he_cap));
- 	sta->aid = aid;
- 	sta->wme = 1;
- 
-diff --git a/tx.c b/tx.c
-index 36b0f486..6b590b27 100644
---- a/tx.c
-+++ b/tx.c
-@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
- 			.skb = skb,
- 			.info = IEEE80211_SKB_CB(skb),
- 		};
--		struct ieee80211_rate_status rs = {};
- 		struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
- 		struct mt76_wcid *wcid;
- 
- 		wcid = rcu_dereference(dev->wcid[cb->wcid]);
- 		if (wcid) {
- 			status.sta = wcid_to_sta(wcid);
--			if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
--				rs.rate_idx = wcid->rate;
--				status.rates = &rs;
--				status.n_rates = 1;
--			} else {
--				status.n_rates = 0;
--			}
-+
-+			if (status.sta)
-+				status.rate = &wcid->rate;
- 		}
- 
- 		hw = mt76_tx_status_get_hw(dev, skb);
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/4005-wifi-mt76-revert-EHT-definitions.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4005-wifi-mt76-revert-EHT-definitions.patch
deleted file mode 100644
index 479accf..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/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
-