[][MAC80211][MT76][Fix patch failed]

[Description]
Fix patch fail

[Release-log]
N/A

Change-Id: Id39214073eefc34651dbac7fc721e9042534d674
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6074564
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-rework-testmode-init-registers.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-rework-testmode-init-registers.patch
index 4b45104..abdd03f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-rework-testmode-init-registers.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-mt76-mt7915-rework-testmode-init-registers.patch
@@ -1,7 +1,7 @@
-From 9d16552ff5dc96dd576d15f263ac1ae180ac615e Mon Sep 17 00:00:00 2001
+From 31be26088119f67efdc8dcb79c64765abb10d356 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
-Date: Wed, 19 Jan 2022 15:46:06 +0800
-Subject: [PATCH 1/6] mt76: mt7915: rework testmode init registers
+Date: Mon, 6 Jun 2022 19:46:26 +0800
+Subject: [PATCH 1/7] mt76: mt7915: rework testmode init registers
 
 ---
  mt7915/mmio.c     |  2 ++
@@ -10,10 +10,10 @@
  3 files changed, 54 insertions(+), 16 deletions(-)
 
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 5062e0d8..2466907e 100644
+index 46ee8a7d..71945ba9 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -53,6 +53,7 @@ static const u32 mt7986_reg[] = {
+@@ -59,6 +59,7 @@ static const u32 mt7986_reg[] = {
  };
  
  static const u32 mt7915_offs[] = {
@@ -21,7 +21,7 @@
  	[TMAC_CDTR]		= 0x090,
  	[TMAC_ODTR]		= 0x094,
  	[TMAC_ATCR]		= 0x098,
-@@ -126,6 +127,7 @@ static const u32 mt7915_offs[] = {
+@@ -132,6 +133,7 @@ static const u32 mt7915_offs[] = {
  };
  
  static const u32 mt7916_offs[] = {
@@ -30,10 +30,10 @@
  	[TMAC_ODTR]		= 0x0cc,
  	[TMAC_ATCR]		= 0x00c,
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index e5f93c40..999dd7fc 100644
+index 77fd448b..c7c9e411 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -34,6 +34,7 @@ enum reg_rev {
+@@ -36,6 +36,7 @@ enum reg_rev {
  };
  
  enum offs_rev {
@@ -41,9 +41,9 @@
  	TMAC_CDTR,
  	TMAC_ODTR,
  	TMAC_ATCR,
-@@ -172,6 +173,12 @@ enum offs_rev {
- #define MT_MDP_TO_HIF			0
- #define MT_MDP_TO_WM			1
+@@ -185,6 +186,12 @@ enum offs_rev {
+ #define MT_TRB_RXPSR0_RX_WTBL_PTR	GENMASK(25, 16)
+ #define MT_TRB_RXPSR0_RX_RMAC_PTR	GENMASK(9, 0)
  
 +#define MT_MDP_TOP_DBG_WDT_CTRL			MT_MDP(0x0d0)
 +#define MT_MDP_TOP_DBG_WDT_CTRL_TDP_DIS_BLK	BIT(7)
@@ -54,7 +54,7 @@
  /* TMAC: band 0(0x820e4000), band 1(0x820f4000) */
  #define MT_WF_TMAC_BASE(_band)		((_band) ? 0x820f4000 : 0x820e4000)
  #define MT_WF_TMAC(_band, ofs)		(MT_WF_TMAC_BASE(_band) + (ofs))
-@@ -180,6 +187,9 @@ enum offs_rev {
+@@ -193,6 +200,9 @@ enum offs_rev {
  #define MT_TMAC_TCR0_TX_BLINK		GENMASK(7, 6)
  #define MT_TMAC_TCR0_TBTT_STOP_CTRL	BIT(25)
  
@@ -64,7 +64,7 @@
  #define MT_TMAC_CDTR(_band)		MT_WF_TMAC(_band, __OFFS(TMAC_CDTR))
   #define MT_TMAC_ODTR(_band)		MT_WF_TMAC(_band, __OFFS(TMAC_ODTR))
  #define MT_TIMEOUT_VAL_PLCP		GENMASK(15, 0)
-@@ -451,8 +461,10 @@ enum offs_rev {
+@@ -464,8 +474,10 @@ enum offs_rev {
  #define MT_AGG_PCR0_VHT_PROT		BIT(13)
  #define MT_AGG_PCR0_PTA_WIN_DIS		BIT(15)
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0002-mt76-testmode-rework-tx-antenna-setting.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0002-mt76-testmode-rework-tx-antenna-setting.patch
index 2ece0e0..61256ba 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0002-mt76-testmode-rework-tx-antenna-setting.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0002-mt76-testmode-rework-tx-antenna-setting.patch
@@ -1,7 +1,7 @@
-From 2b65580db9081ac1ace74aed7b06cc855162d408 Mon Sep 17 00:00:00 2001
+From ce19a95831eeb721ce52bb913ac52bd5a0d88bab Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Fri, 25 Feb 2022 09:36:01 +0800
-Subject: [PATCH 2/6] mt76: testmode: rework tx antenna setting
+Subject: [PATCH 2/7] mt76: testmode: rework tx antenna setting
 
 ---
  mt7915/mcu.c      | 7 +------
@@ -10,10 +10,10 @@
  3 files changed, 4 insertions(+), 16 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2aba342c..549281a4 100644
+index 2a88c14b..bdef2b37 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2822,14 +2822,9 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
+@@ -2933,14 +2933,9 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
  
  #ifdef CONFIG_NL80211_TESTMODE
  	if (phy->mt76->test.tx_antenna_mask &&
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0003-mt76-mt7915-rework-rx-testmode-stats.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0003-mt76-mt7915-rework-rx-testmode-stats.patch
index 822aaad..fd20055 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0003-mt76-mt7915-rework-rx-testmode-stats.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0003-mt76-mt7915-rework-rx-testmode-stats.patch
@@ -1,7 +1,7 @@
-From 0b8c7d725830b5873c648777ab7813fff9d5951f Mon Sep 17 00:00:00 2001
+From ab8812a820a8b001d5abeb4d73b46db8e6453451 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Mon, 3 Jan 2022 17:09:53 +0800
-Subject: [PATCH 3/6] mt76: mt7915: rework rx testmode stats
+Subject: [PATCH 3/7] mt76: mt7915: rework rx testmode stats
 
 ---
  mac80211.c        |  3 +-
@@ -15,10 +15,10 @@
  8 files changed, 109 insertions(+), 17 deletions(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 5b53d008..5a4ac5de 100644
+index 5515e169..8c90db87 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -737,7 +737,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
+@@ -745,7 +745,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
  	}
  
  #ifdef CONFIG_NL80211_TESTMODE
@@ -29,10 +29,10 @@
  		if (status->flag & RX_FLAG_FAILED_FCS_CRC)
  			phy->test.rx_stats.fcs_error[q]++;
 diff --git a/mt76.h b/mt76.h
-index 81078be3..d5f8650f 100644
+index 4e8997c4..28720ee4 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -583,6 +583,8 @@ struct mt76_testmode_ops {
+@@ -604,6 +604,8 @@ struct mt76_testmode_ops {
  	int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
  };
  
@@ -41,7 +41,7 @@
  struct mt76_testmode_data {
  	enum mt76_testmode_state state;
  
-@@ -614,6 +616,8 @@ struct mt76_testmode_data {
+@@ -635,6 +637,8 @@ struct mt76_testmode_data {
  
  	u8 addr[3][ETH_ALEN];
  
@@ -50,7 +50,7 @@
  	u32 tx_pending;
  	u32 tx_queued;
  	u16 tx_queued_limit;
-@@ -621,6 +625,7 @@ struct mt76_testmode_data {
+@@ -642,6 +646,7 @@ struct mt76_testmode_data {
  	struct {
  		u64 packets[__MT_RXQ_MAX];
  		u64 fcs_error[__MT_RXQ_MAX];
@@ -59,10 +59,10 @@
  };
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index c3c93338..54419864 100644
+index 561fb036..aa14d2d4 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -980,6 +980,7 @@ enum {
+@@ -979,6 +979,7 @@ enum {
  	MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
  	MCU_EXT_CMD_SET_RDD_TH = 0x9d,
  	MCU_EXT_CMD_MURU_CTRL = 0x9f,
@@ -71,7 +71,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 960072a4..52368dc3 100644
+index 5abde482..21aa9633 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -28,6 +28,7 @@ struct mt7915_mcu_txd {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0004-mt76-mt7915-fix-tx-descriptor.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0004-mt76-mt7915-fix-tx-descriptor.patch
index c84c60e..acf3a52 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0004-mt76-mt7915-fix-tx-descriptor.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0004-mt76-mt7915-fix-tx-descriptor.patch
@@ -1,17 +1,17 @@
-From d0a61bbe57616c1a87a3bb4676f141ed54110add Mon Sep 17 00:00:00 2001
+From 51cffe3e010931c8f070a101ece043072bed2512 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Wed, 19 Jan 2022 15:51:01 +0800
-Subject: [PATCH 4/6] mt76: mt7915: fix tx descriptor
+Subject: [PATCH 4/7] mt76: mt7915: fix tx descriptor
 
 ---
  mt7915/mac.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 47d5a993..887292da 100644
+index a57d2732..a3cf1b74 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1001,6 +1001,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -1002,6 +1002,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
  	if (td->tx_rate_ldpc || (bw > 0 && mode >= MT_PHY_TYPE_HE_SU))
  		val |= MT_TXD6_LDPC;
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0015-mt76-mt7915-drop-undefined-action-frame.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0005-mt76-mt7915-drop-undefined-action-frame.patch
similarity index 77%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0015-mt76-mt7915-drop-undefined-action-frame.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0005-mt76-mt7915-drop-undefined-action-frame.patch
index f8f766e..cfb0764 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0015-mt76-mt7915-drop-undefined-action-frame.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0005-mt76-mt7915-drop-undefined-action-frame.patch
@@ -1,17 +1,17 @@
-From 573b80a984695b338e12c6c30bb4e9f7af7e3495 Mon Sep 17 00:00:00 2001
+From 65c8978578ae5a485455617e5598ec83c2d519ae 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] mt76: mt7915: drop undefined action frame
+Subject: [PATCH 5/7] 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 1e0ddc13..81c582f2 100644
+index a3cf1b74..b0e86968 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1303,6 +1303,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1281,6 +1281,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  			  struct mt76_tx_info *tx_info)
  {
  	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx_info->skb->data;
@@ -20,7 +20,7 @@
  	struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
  	struct ieee80211_key_conf *key = info->control.hw_key;
-@@ -1333,6 +1335,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1311,6 +1313,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	t = (struct mt76_txwi_cache *)(txwi + mdev->drv->txwi_size);
  	t->skb = tx_info->skb;
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0019-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0006-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0019-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0006-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch
index db4638d..5758ac2 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0019-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0006-mt76-mt7915-add-the-maximum-size-of-beacon-offload.patch
@@ -1,7 +1,7 @@
-From f5a80422207b76c740f284719539419b6a3dcc89 Mon Sep 17 00:00:00 2001
+From 29eed004474096aa960336f7850dc0bad49eda6a Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 23 May 2022 17:09:52 +0800
-Subject: [PATCH] mt76: mt7915: add the maximum size of beacon offload
+Subject: [PATCH 6/7] mt76: mt7915: add the maximum size of beacon offload
 
 add the maximum size of beacon offload to avoid exceeding the size limit
 
@@ -13,7 +13,7 @@
  2 files changed, 12 insertions(+), 2 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index bdef2b3..8155900 100644
+index bdef2b37..81559002 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -2037,6 +2037,13 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
@@ -49,7 +49,7 @@
  
  	if (vif->bss_conf.nontransmitted)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 21aa963..d46c8da 100644
+index 21aa9633..d46c8da4 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -490,6 +490,9 @@ enum {
@@ -63,5 +63,5 @@
  					 sizeof(struct bss_info_omac) +	\
  					 sizeof(struct bss_info_basic) +\
 -- 
-2.29.2
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0020-mt76-mt7915-update-mpdu-density-in-6g-capability.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mpdu-density-in-6g-capability.patch
similarity index 76%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0020-mt76-mt7915-update-mpdu-density-in-6g-capability.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mpdu-density-in-6g-capability.patch
index d7e61e1..371424b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0020-mt76-mt7915-update-mpdu-density-in-6g-capability.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mpdu-density-in-6g-capability.patch
@@ -1,7 +1,7 @@
-From 7f874a8cf1cf77e18cc593bad4565519a2e71173 Mon Sep 17 00:00:00 2001
+From 173ee8c64b2e4cac133df1fbb1fd676c933fb7b1 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Mon, 6 Jun 2022 17:03:07 +0800
-Subject: [PATCH] mt76: mt7915: update mpdu density in 6g capability
+Subject: [PATCH 7/7] mt76: mt7915: update mpdu density in 6g capability
 
 Set mpdu density to 2 usec in 6g capability.
 
@@ -11,10 +11,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 146ffa99..eb992d38 100644
+index b4727526..66884be0 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -979,7 +979,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+@@ -980,7 +980,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
  			u16 cap = IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS |
  				  IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS;
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mt7986-CR-for-different-adie-vers.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mt7986-CR-for-different-adie-vers.patch
deleted file mode 100644
index 1340ac9..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-mt76-mt7915-update-mt7986-CR-for-different-adie-vers.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 14baf1e2df409bdfdf3255dbe8ad5ecc1852b8b0 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Tue, 15 Mar 2022 14:21:13 +0800
-Subject: [PATCH] mt76: mt7915: update mt7986 CR for different adie version
-
-Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
----
- mt7915/regs.h |  1 +
- mt7915/soc.c  | 21 ++++++++++++++++++---
- 2 files changed, 19 insertions(+), 3 deletions(-)
-
-diff --git a/mt7915/regs.h b/mt7915/regs.h
-index cb7c7e14..97984aaf 100644
---- a/mt7915/regs.h
-+++ b/mt7915/regs.h
-@@ -822,6 +822,7 @@ enum offs_rev {
- 
- /* ADIE */
- #define MT_ADIE_CHIP_ID			0x02c
-+#define MT_ADIE_VERSION_MASK		GENMASK(15, 0)
- #define MT_ADIE_CHIP_ID_MASK		GENMASK(31, 16)
- #define MT_ADIE_IDX0			GENMASK(15, 0)
- #define MT_ADIE_IDX1			GENMASK(31, 16)
-diff --git a/mt7915/soc.c b/mt7915/soc.c
-index d465f8d8..a977f90a 100644
---- a/mt7915/soc.c
-+++ b/mt7915/soc.c
-@@ -469,17 +469,32 @@ static int mt7986_wmac_adie_xtal_trim_7976(struct mt7915_dev *dev, u8 adie)
- 
- static int mt7986_wmac_adie_patch_7976(struct mt7915_dev *dev, u8 adie)
- {
-+	u32 id, version, rg_xo_01, rg_xo_03;
- 	int ret;
- 
--	ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_TOP_THADC, 0x4a563b00);
-+	ret = mt76_wmac_spi_read(dev, adie, MT_ADIE_CHIP_ID, &id);
- 	if (ret)
- 		return ret;
- 
--	ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_XO_01, 0x1d59080f);
-+	version = FIELD_GET(MT_ADIE_VERSION_MASK, id);
-+
-+	ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_TOP_THADC, 0x4a563b00);
- 	if (ret)
- 		return ret;
- 
--	return mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_XO_03, 0x34c00fe0);
-+	if (version == 0x8a00 || version == 0x8a10 || version == 0x8b00) {
-+		rg_xo_01 = 0x1d59080f;
-+		rg_xo_03 = 0x34c00fe0;
-+	} else {
-+		rg_xo_01 = 0x1959f80f;
-+		rg_xo_03 = 0x34d00fe0;
-+	}
-+
-+	ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_XO_01, rg_xo_01);
-+ 	if (ret)
-+	 		return ret;
-+
-+	return mt76_wmac_spi_write(dev, adie, MT_ADIE_RG_XO_03, rg_xo_03);
- }
- 
- static int
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-fix-table_mask-to-u16.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-fix-table_mask-to-u16.patch
deleted file mode 100644
index e9184f3..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-fix-table_mask-to-u16.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 053df93aaa079c2942eadf52fb33f76dfffa2f05 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Tue, 22 Mar 2022 15:49:04 +0800
-Subject: [PATCH] mt76: mt7915: fix table_mask to u16
-
-mt7915 can support 16 twt stations so modify table_mask to u16.
-
-Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
----
- mt7915/mt7915.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 6efa0a2e..4b6eda95 100644
---- a/mt7915/mt7915.h
-+++ b/mt7915/mt7915.h
-@@ -319,7 +319,7 @@ struct mt7915_dev {
- 	void *cal;
- 
- 	struct {
--		u8 table_mask;
-+		u16 table_mask;
- 		u8 n_agrt;
- 	} twt;
- 
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0012-mt76-mt7915-reject-duplicated-twt-flow.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0012-mt76-mt7915-reject-duplicated-twt-flow.patch
deleted file mode 100644
index bf6ea87..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0012-mt76-mt7915-reject-duplicated-twt-flow.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 261d8a198f9fd9c7f58586f102eafabd2d73b80a Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Thu, 7 Apr 2022 08:40:05 +0800
-Subject: [PATCH 2/2] mt76: mt7915: reject duplicated twt flow
-
----
- mt7915/mac.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index aa312b75..8c7edd98 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -2889,7 +2889,7 @@ void mt7915_mac_add_twt_setup(struct ieee80211_hw *hw,
- 	enum ieee80211_twt_setup_cmd sta_setup_cmd;
- 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
- 	struct mt7915_twt_flow *flow;
--	int flowid, table_id;
-+	int flowid, table_id, i;
- 	u8 exp;
- 
- 	if (mt7915_mac_check_twt_req(twt))
-@@ -2907,10 +2907,24 @@ void mt7915_mac_add_twt_setup(struct ieee80211_hw *hw,
- 	le16p_replace_bits(&twt_agrt->req_type, flowid,
- 			   IEEE80211_TWT_REQTYPE_FLOWID);
- 
-+
- 	table_id = ffs(~dev->twt.table_mask) - 1;
- 	exp = FIELD_GET(IEEE80211_TWT_REQTYPE_WAKE_INT_EXP, req_type);
- 	sta_setup_cmd = FIELD_GET(IEEE80211_TWT_REQTYPE_SETUP_CMD, req_type);
- 
-+	for (i = 0; i < 8; i++) {
-+		if (msta->twt.flowid_mask & BIT(i)) {
-+			flow = &msta->twt.flow[i];
-+			if (flow->duration == twt_agrt->min_twt_dur &&
-+			    flow->mantissa == twt_agrt->mantissa &&
-+			    flow->exp == exp &&
-+			    flow->protection == !!(req_type & IEEE80211_TWT_REQTYPE_PROTECTION) &&
-+			    flow->flowtype == !!(req_type & IEEE80211_TWT_REQTYPE_FLOWTYPE) &&
-+			    flow->trigger == !!(req_type & IEEE80211_TWT_REQTYPE_TRIGGER))
-+				goto unlock;
-+		}
-+	}
-+
- 	flow = &msta->twt.flow[flowid];
- 	memset(flow, 0, sizeof(*flow));
- 	INIT_LIST_HEAD(&flow->list);
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0014-mt76-mt7915-limit-minimum-twt-duration-due-to-hw-lim.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0014-mt76-mt7915-limit-minimum-twt-duration-due-to-hw-lim.patch
deleted file mode 100644
index d5aafcb..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0014-mt76-mt7915-limit-minimum-twt-duration-due-to-hw-lim.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 58706d81a82726f488cda771097f5586708b47f2 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Tue, 12 Apr 2022 16:06:36 +0800
-Subject: [PATCH] mt76: mt7915: limit minimum twt duration due to hw limitation
-
----
- mt7915/mac.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 925f5eb9..fd897fd5 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -2698,6 +2698,7 @@ void mt7915_mac_add_twt_setup(struct ieee80211_hw *hw,
- 			      struct ieee80211_sta *sta,
- 			      struct ieee80211_twt_setup *twt)
- {
-+#define MT7915_MIN_TWT_DUR 64
- 	enum ieee80211_twt_setup_cmd setup_cmd = TWT_SETUP_CMD_REJECT;
- 	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
- 	struct ieee80211_twt_params *twt_agrt = (void *)twt->params;
-@@ -2719,6 +2720,12 @@ void mt7915_mac_add_twt_setup(struct ieee80211_hw *hw,
- 	if (hweight8(msta->twt.flowid_mask) == ARRAY_SIZE(msta->twt.flow))
- 		goto unlock;
- 
-+	if (twt_agrt->min_twt_dur < MT7915_MIN_TWT_DUR) {
-+		setup_cmd = TWT_SETUP_CMD_DICTATE;
-+		twt_agrt->min_twt_dur = MT7915_MIN_TWT_DUR;
-+		goto unlock;
-+	}
-+
- 	flowid = ffs(~msta->twt.flowid_mask) - 1;
- 	le16p_replace_bits(&twt_agrt->req_type, flowid,
- 			   IEEE80211_TWT_REQTYPE_FLOWID);
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0016-mt76-mt7915-reowrk-SER-debugfs-knob.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0016-mt76-mt7915-reowrk-SER-debugfs-knob.patch
deleted file mode 100755
index d4c81d9..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0016-mt76-mt7915-reowrk-SER-debugfs-knob.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From f3f9ccbb417cae6e503084e13d627b68a141b0bd Mon Sep 17 00:00:00 2001
-From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Thu, 5 May 2022 11:45:23 +0800
-Subject: [PATCH 02/10] mt76: mt7915: reowrk SER debugfs knob
-
-1. get status of system recovery from firmware.
-2. add more recovery points.
-3. make knob per phy.
-
-Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
-Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
----
- mt7915/debugfs.c | 106 ++++++++++++++++++++++++++++++++++++++++-------
- mt7915/mcu.c     |   5 +--
- mt7915/mcu.h     |  14 +++++++
- mt7915/mmio.c    |   3 ++
- mt7915/regs.h    |  18 +++++++-
- 5 files changed, 126 insertions(+), 20 deletions(-)
-
-diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 77bbeeed..b45181c1 100644
---- a/mt7915/debugfs.c
-+++ b/mt7915/debugfs.c
-@@ -44,35 +44,113 @@ mt7915_implicit_txbf_get(void *data, u64 *val)
- DEFINE_DEBUGFS_ATTRIBUTE(fops_implicit_txbf, mt7915_implicit_txbf_get,
- 			 mt7915_implicit_txbf_set, "%lld\n");
- 
--/* test knob of system layer 1/2 error recovery */
--static int mt7915_ser_trigger_set(void *data, u64 val)
-+/* test knob of system error recovery */
-+static ssize_t
-+mt7915_fw_ser_set(struct file *file, const char __user *user_buf,
-+		  size_t count, loff_t *ppos)
- {
--	enum {
--		SER_SET_RECOVER_L1 = 1,
--		SER_SET_RECOVER_L2,
--		SER_ENABLE = 2,
--		SER_RECOVER
--	};
--	struct mt7915_dev *dev = data;
-+	struct mt7915_phy *phy = file->private_data;
-+	struct mt7915_dev *dev = phy->dev;
-+	bool ext_phy = phy != &dev->phy;
-+	char buf[16];
- 	int ret = 0;
-+	u16 val;
-+
-+	if (count >= sizeof(buf))
-+		return -EINVAL;
-+
-+	if (copy_from_user(buf, user_buf, count))
-+		return -EFAULT;
-+
-+	if (count && buf[count - 1] == '\n')
-+		buf[count - 1] = '\0';
-+	else
-+		buf[count] = '\0';
-+
-+	if (kstrtou16(buf, 0, &val))
-+		return -EINVAL;
- 
- 	switch (val) {
-+	case SER_QUERY:
-+		/* grab firmware SER stats */
-+		ret = mt7915_mcu_set_ser(dev, 0, 0, ext_phy);
-+		break;
- 	case SER_SET_RECOVER_L1:
- 	case SER_SET_RECOVER_L2:
--		ret = mt7915_mcu_set_ser(dev, SER_ENABLE, BIT(val), 0);
-+	case SER_SET_RECOVER_L3_RX_ABORT:
-+	case SER_SET_RECOVER_L3_TX_ABORT:
-+	case SER_SET_RECOVER_L3_TX_DISABLE:
-+	case SER_SET_RECOVER_L3_BF:
-+		ret = mt7915_mcu_set_ser(dev, SER_ENABLE, BIT(val), ext_phy);
- 		if (ret)
- 			return ret;
- 
--		return mt7915_mcu_set_ser(dev, SER_RECOVER, val, 0);
-+		ret = mt7915_mcu_set_ser(dev, SER_RECOVER, val, ext_phy);
-+		break;
- 	default:
- 		break;
- 	}
- 
-+	return ret ? ret : count;
-+}
-+
-+static ssize_t
-+mt7915_fw_ser_get(struct file *file, char __user *user_buf,
-+		  size_t count, loff_t *ppos)
-+{
-+	struct mt7915_phy *phy = file->private_data;
-+	struct mt7915_dev *dev = phy->dev;
-+	char *buff;
-+	int desc = 0;
-+	ssize_t ret;
-+	static const size_t bufsz = 400;
-+
-+	buff = kmalloc(bufsz, GFP_KERNEL);
-+	if (!buff)
-+		return -ENOMEM;
-+
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_STATUS        = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_SER_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_PLE_ERR       = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_PLE_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_PLE_ERR_1     = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_PLE1_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_PLE_ERR_AMSDU = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_PLE_AMSDU_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_PSE_ERR       = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_PSE_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_PSE_ERR_1     = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_PSE1_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_LMAC_WISR6_B0 = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_LAMC_WISR6_BN0_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_LMAC_WISR6_B1 = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_LAMC_WISR6_BN1_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_LMAC_WISR7_B0 = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_LAMC_WISR7_BN0_STATS));
-+	desc += scnprintf(buff + desc, bufsz - desc,
-+			  "::E  R , SER_LMAC_WISR7_B1 = 0x%08x\n",
-+			  mt76_rr(dev, MT_SWDEF_LAMC_WISR7_BN1_STATS));
-+
-+	ret = simple_read_from_buffer(user_buf, count, ppos, buff, desc);
-+	kfree(buff);
- 	return ret;
- }
- 
--DEFINE_DEBUGFS_ATTRIBUTE(fops_ser_trigger, NULL,
--			 mt7915_ser_trigger_set, "%lld\n");
-+static const struct file_operations mt7915_fw_ser_ops = {
-+	.write = mt7915_fw_ser_set,
-+	.read = mt7915_fw_ser_get,
-+	.open = simple_open,
-+	.llseek = default_llseek,
-+};
- 
- static int
- mt7915_radar_trigger(void *data, u64 val)
-@@ -914,6 +992,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
- 	debugfs_create_file("xmit-queues", 0400, dir, phy,
- 			    &mt7915_xmit_queues_fops);
- 	debugfs_create_file("tx_stats", 0400, dir, phy, &mt7915_tx_stats_fops);
-+	debugfs_create_file("fw_ser", 0600, dir, phy, &mt7915_fw_ser_ops);
- 	debugfs_create_file("fw_debug_wm", 0600, dir, dev, &fops_fw_debug_wm);
- 	debugfs_create_file("fw_debug_wa", 0600, dir, dev, &fops_fw_debug_wa);
- 	debugfs_create_file("fw_debug_bin", 0600, dir, dev, &fops_fw_debug_bin);
-@@ -927,7 +1006,6 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
- 			    &mt7915_rate_txpower_fops);
- 	debugfs_create_devm_seqfile(dev->mt76.dev, "twt_stats", dir,
- 				    mt7915_twt_stats);
--	debugfs_create_file("ser_trigger", 0200, dir, dev, &fops_ser_trigger);
- 	debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
- 
- 	if (!dev->dbdc_support || phy->band_idx) {
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index c215bc9e..20f32f7f 100644
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -2471,10 +2471,7 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
- 	/* force firmware operation mode into normal state,
- 	 * which should be set before firmware download stage.
- 	 */
--	if (is_mt7915(&dev->mt76))
--		mt76_wr(dev, MT_SWDEF_MODE, MT_SWDEF_NORMAL_MODE);
--	else
--		mt76_wr(dev, MT_SWDEF_MODE_MT7916, MT_SWDEF_NORMAL_MODE);
-+	mt76_wr(dev, MT_SWDEF_MODE, MT_SWDEF_NORMAL_MODE);
- 
- 	ret = mt7915_driver_own(dev, 0);
- 	if (ret)
-diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index df7aefca..5cbc3ecf 100644
---- a/mt7915/mcu.h
-+++ b/mt7915/mcu.h
-@@ -464,6 +464,20 @@ enum {
- 	MURU_GET_TXC_TX_STATS = 151,
- };
- 
-+enum {
-+	SER_QUERY,
-+	/* recovery */
-+	SER_SET_RECOVER_L1,
-+	SER_SET_RECOVER_L2,
-+	SER_SET_RECOVER_L3_RX_ABORT,
-+	SER_SET_RECOVER_L3_TX_ABORT,
-+	SER_SET_RECOVER_L3_TX_DISABLE,
-+	SER_SET_RECOVER_L3_BF,
-+	/* action */
-+	SER_ENABLE = 2,
-+	SER_RECOVER
-+};
-+
- #define MT7915_BSS_UPDATE_MAX_SIZE	(sizeof(struct sta_req_hdr) +	\
- 					 sizeof(struct bss_info_omac) +	\
- 					 sizeof(struct bss_info_basic) +\
-diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 0bd32daa..2d733d32 100644
---- a/mt7915/mmio.c
-+++ b/mt7915/mmio.c
-@@ -22,6 +22,7 @@ static const u32 mt7915_reg[] = {
- 	[WFDMA_EXT_CSR_ADDR]	= 0xd7000,
- 	[CBTOP1_PHY_END]	= 0x77ffffff,
- 	[INFRA_MCU_ADDR_END]	= 0x7c3fffff,
-+	[SWDEF_BASE_ADDR]	= 0x41f200,
- };
- 
- static const u32 mt7916_reg[] = {
-@@ -36,6 +37,7 @@ static const u32 mt7916_reg[] = {
- 	[WFDMA_EXT_CSR_ADDR]	= 0xd7000,
- 	[CBTOP1_PHY_END]	= 0x7fffffff,
- 	[INFRA_MCU_ADDR_END]	= 0x7c085fff,
-+	[SWDEF_BASE_ADDR]	= 0x411400,
- };
- 
- static const u32 mt7986_reg[] = {
-@@ -50,6 +52,7 @@ static const u32 mt7986_reg[] = {
- 	[WFDMA_EXT_CSR_ADDR]	= 0x27000,
- 	[CBTOP1_PHY_END]	= 0x7fffffff,
- 	[INFRA_MCU_ADDR_END]	= 0x7c085fff,
-+	[SWDEF_BASE_ADDR]	= 0x411400,
- };
- 
- static const u32 mt7915_offs[] = {
-diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 97984aaf..4251cf78 100644
---- a/mt7915/regs.h
-+++ b/mt7915/regs.h
-@@ -30,6 +30,7 @@ enum reg_rev {
- 	WFDMA_EXT_CSR_ADDR,
- 	CBTOP1_PHY_END,
- 	INFRA_MCU_ADDR_END,
-+	SWDEF_BASE_ADDR,
- 	__MT_REG_MAX,
- };
- 
-@@ -942,12 +943,25 @@ enum offs_rev {
- #define MT_ADIE_TYPE_MASK		BIT(1)
- 
- /* FW MODE SYNC */
--#define MT_SWDEF_MODE			0x41f23c
--#define MT_SWDEF_MODE_MT7916		0x41143c
-+#define MT_SWDEF_BASE			__REG(SWDEF_BASE_ADDR)
-+
-+#define MT_SWDEF(ofs)			(MT_SWDEF_BASE + (ofs))
-+#define MT_SWDEF_MODE			MT_SWDEF(0x3c)
- #define MT_SWDEF_NORMAL_MODE		0
- #define MT_SWDEF_ICAP_MODE		1
- #define MT_SWDEF_SPECTRUM_MODE		2
- 
-+#define MT_SWDEF_SER_STATS		MT_SWDEF(0x040)
-+#define MT_SWDEF_PLE_STATS		MT_SWDEF(0x044)
-+#define MT_SWDEF_PLE1_STATS		MT_SWDEF(0x048)
-+#define MT_SWDEF_PLE_AMSDU_STATS	MT_SWDEF(0x04C)
-+#define MT_SWDEF_PSE_STATS		MT_SWDEF(0x050)
-+#define MT_SWDEF_PSE1_STATS		MT_SWDEF(0x054)
-+#define MT_SWDEF_LAMC_WISR6_BN0_STATS	MT_SWDEF(0x058)
-+#define MT_SWDEF_LAMC_WISR6_BN1_STATS	MT_SWDEF(0x05C)
-+#define MT_SWDEF_LAMC_WISR7_BN0_STATS	MT_SWDEF(0x060)
-+#define MT_SWDEF_LAMC_WISR7_BN1_STATS	MT_SWDEF(0x064)
-+
- #define MT_DIC_CMD_REG_BASE		0x41f000
- #define MT_DIC_CMD_REG(ofs)		(MT_DIC_CMD_REG_BASE + (ofs))
- #define MT_DIC_CMD_REG_CMD		MT_DIC_CMD_REG(0x10)
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0017-mt76-mt7615-mt7915-do-reset_work-with-mt76-s-work-qu.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0017-mt76-mt7615-mt7915-do-reset_work-with-mt76-s-work-qu.patch
deleted file mode 100755
index 9e20c45..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0017-mt76-mt7615-mt7915-do-reset_work-with-mt76-s-work-qu.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From a56d23330b0ac01929a54c427bd338b02a7e727e Mon Sep 17 00:00:00 2001
-From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Fri, 6 May 2022 21:06:55 +0800
-Subject: [PATCH 03/10] mt76: mt7615/mt7915: do reset_work with mt76's work
- queue
-
-reset_work may be blocked when mcu message timeout occurs
-
-Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
----
- mt7615/mmio.c | 2 +-
- mt7915/mmio.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/mt7615/mmio.c b/mt7615/mmio.c
-index ce45c3bf..a208035e 100644
---- a/mt7615/mmio.c
-+++ b/mt7615/mmio.c
-@@ -145,7 +145,7 @@ static void mt7615_irq_tasklet(struct tasklet_struct *t)
- 		return;
- 
- 	dev->reset_state = mcu_int;
--	ieee80211_queue_work(mt76_hw(dev), &dev->reset_work);
-+	queue_work(dev->mt76.wq, &dev->reset_work);
- 	wake_up(&dev->reset_wait);
- }
- 
-diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 2d733d32..4d4537cd 100644
---- a/mt7915/mmio.c
-+++ b/mt7915/mmio.c
-@@ -612,7 +612,7 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
- 		mt76_wr(dev, MT_MCU_CMD, val);
- 		if (val & MT_MCU_CMD_ERROR_MASK) {
- 			dev->reset_state = val;
--			ieee80211_queue_work(mt76_hw(dev), &dev->reset_work);
-+			queue_work(dev->mt76.wq, &dev->reset_work);
- 			wake_up(&dev->reset_wait);
- 		}
- 	}
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0018-mt76-mt7915-add-support-for-6G-in-band-discovery.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0018-mt76-mt7915-add-support-for-6G-in-band-discovery.patch
deleted file mode 100644
index d710df8..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0018-mt76-mt7915-add-support-for-6G-in-band-discovery.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From 3b12e37a1c903b7f30c1515b6eec481c206abb4e Mon Sep 17 00:00:00 2001
-From: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
-Date: Mon, 25 Apr 2022 15:31:02 +0800
-Subject: [PATCH] mt76: mt7915: add support for 6G in-band discovery
-
-Add offloading FILS discovery and unsolicited broadcast probe response support.
-
-Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
-Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
----
- mt7915/init.c  |  2 +
- mt7915/mac.c   | 17 +++--
- mt7915/main.c  |  8 +-
- mt7915/mcu.c   | 75 ++++++++++++++++++-
- mt7915/mcu.h   | 15 +++-
- mt7915/mt7915.h    |  4 +-
- 6 files changed, 107 insertions(+), 14 deletions(-)
-
-diff --git a/mt7915/init.c b/mt7915/init.c
-index 70baad756dd0..d123ecb9fb0c 100644
---- a/mt7915/init.c
-+++ b/mt7915/init.c
-@@ -351,6 +351,8 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
- 	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_HT);
- 	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_VHT);
- 	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_RATE_HE);
-+	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
-+	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_DISCOVERY);
- 
- 	if (!mdev->dev->of_node ||
- 	    !of_property_read_bool(mdev->dev->of_node,
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index e353e8c44d6c..de7bf137c234 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -1177,7 +1177,7 @@ mt7915_mac_tx_rate_val(struct mt76_phy *mphy, struct ieee80211_vif *vif,
- 
- void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
- 			   struct sk_buff *skb, struct mt76_wcid *wcid, int pid,
--			   struct ieee80211_key_conf *key, bool beacon)
-+			   struct ieee80211_key_conf *key, u32 changed)
- {
- 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- 	struct ieee80211_vif *vif = info->control.vif;
-@@ -1188,6 +1188,10 @@ void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
- 	bool mcast = false;
- 	u16 tx_count = 15;
- 	u32 val;
-+	bool beacon = !!(changed & (BSS_CHANGED_BEACON |
-+				    BSS_CHANGED_BEACON_ENABLED));
-+	bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
-+					 BSS_CHANGED_FILS_DISCOVERY));
- 
- 	if (vif) {
- 		struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-@@ -1200,7 +1204,10 @@ void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
- 	if (ext_phy && dev->mt76.phy2)
- 		mphy = dev->mt76.phy2;
- 
--	if (beacon) {
-+	if (inband_disc) {
-+		p_fmt = MT_TX_TYPE_FW;
-+		q_idx = MT_LMAC_ALTX0;
-+	} else if (beacon) {
- 		p_fmt = MT_TX_TYPE_FW;
- 		q_idx = MT_LMAC_BCN0;
- 	} else if (skb_get_queue_mapping(skb) >= MT_TXQ_PSD) {
-@@ -1308,8 +1315,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
- 		return id;
- 
- 	pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
--	mt7915_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, pid, key,
--			      false);
-+	mt7915_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, pid, key, 0);
- 
- 	txp = (struct mt7915_txp *)(txwi + MT_TXD_SIZE);
- 	for (i = 0; i < nbuf; i++) {
-@@ -1919,7 +1925,8 @@ mt7915_update_vif_beacon(void *priv, u8 *mac, struct ieee80211_vif *vif)
- 	case NL80211_IFTYPE_MESH_POINT:
- 	case NL80211_IFTYPE_ADHOC:
- 	case NL80211_IFTYPE_AP:
--		mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon);
-+		mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon,
-+				      BSS_CHANGED_BEACON_ENABLED);
- 		break;
- 	default:
- 		break;
-diff --git a/mt7915/main.c b/mt7915/main.c
-index 5177b19f9154..c2c615931782 100644
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -622,8 +622,10 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
- 		mt7915_update_bss_color(hw, vif, &info->he_bss_color);
- 
- 	if (changed & (BSS_CHANGED_BEACON |
--		       BSS_CHANGED_BEACON_ENABLED))
--		mt7915_mcu_add_beacon(hw, vif, info->enable_beacon);
-+		       BSS_CHANGED_BEACON_ENABLED |
-+		       BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
-+		       BSS_CHANGED_FILS_DISCOVERY))
-+		mt7915_mcu_add_beacon(hw, vif, info->enable_beacon, changed);
- 
- 	mutex_unlock(&dev->mt76.mutex);
- }
-@@ -636,7 +638,7 @@ mt7915_channel_switch_beacon(struct ieee80211_hw *hw,
- 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
- 
- 	mutex_lock(&dev->mt76.mutex);
--	mt7915_mcu_add_beacon(hw, vif, true);
-+	mt7915_mcu_add_beacon(hw, vif, true, BSS_CHANGED_BEACON);
- 	mutex_unlock(&dev->mt76.mutex);
- }
- 
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2a07a5d2a439..87e44c69d72b 100644
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -1892,6 +1892,7 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
- 	u8 *buf;
- 	int len = sizeof(*cont) + MT_TXD_SIZE + skb->len;
- 
-+	len = (len & 0x3) ? ((len | 0x3) + 1) : len;
- 	tlv = mt7915_mcu_add_nested_subtlv(rskb, BSS_INFO_BCN_CONTENT,
- 					   len, &bcn->sub_ntlv, &bcn->len);
- 
-@@ -1910,7 +1911,7 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
- 
- 	buf = (u8 *)tlv + sizeof(*cont);
- 	mt7915_mac_write_txwi(dev, (__le32 *)buf, skb, wcid, 0, NULL,
--			      true);
-+			      BSS_CHANGED_BEACON);
- 	memcpy(buf + MT_TXD_SIZE, skb->data, skb->len);
- }
- 
-@@ -1992,8 +1993,71 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
- 	}
- }
- 
--int mt7915_mcu_add_beacon(struct ieee80211_hw *hw,
--			  struct ieee80211_vif *vif, int en)
-+static void
-+mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
-+				struct sk_buff *rskb, struct bss_info_bcn *bcn,
-+				u32 changed)
-+{
-+#define OFFLOAD_TX_MODE_SU	BIT(0)
-+#define OFFLOAD_TX_MODE_MU	BIT(1)
-+	struct ieee80211_hw *hw = mt76_hw(dev);
-+	struct mt7915_phy *phy = mt7915_hw_phy(hw);
-+	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-+	struct cfg80211_chan_def *chandef = &mvif->phy->mt76->chandef;
-+	enum nl80211_band band = chandef->chan->band;
-+	struct mt76_wcid *wcid = &dev->mt76.global_wcid;
-+	struct bss_info_inband_discovery *discov;
-+	struct ieee80211_tx_info *info;
-+	struct sk_buff *skb = NULL;
-+	struct tlv *tlv;
-+	bool ext_phy = phy != &dev->phy;
-+	u8 *buf, interval;
-+	int len;
-+
-+	if (changed & BSS_CHANGED_FILS_DISCOVERY &&
-+	    vif->bss_conf.fils_discovery.max_interval) {
-+		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 &&
-+		   vif->bss_conf.unsol_bcast_probe_resp_interval) {
-+		interval = vif->bss_conf.unsol_bcast_probe_resp_interval;
-+		skb = ieee80211_get_unsol_bcast_probe_resp_tmpl(hw, vif);
-+	}
-+
-+	if (!skb)
-+		return;
-+
-+	info = IEEE80211_SKB_CB(skb);
-+	info->control.vif = vif;
-+	info->band = band;
-+
-+	if (ext_phy)
-+		info->hw_queue |= MT_TX_HW_QUEUE_EXT_PHY;
-+
-+	len = sizeof(*discov) + MT_TXD_SIZE + skb->len;
-+	len = (len & 0x3) ? ((len | 0x3) + 1) : len;
-+
-+	tlv = mt7915_mcu_add_nested_subtlv(rskb, BSS_INFO_BCN_DISCOV,
-+					   len, &bcn->sub_ntlv, &bcn->len);
-+	discov = (struct bss_info_inband_discovery *)tlv;
-+	discov->tx_mode = OFFLOAD_TX_MODE_SU;
-+	/* 0: UNSOL PROBE RESP, 1: FILS DISCOV */
-+	discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
-+	discov->tx_interval = interval;
-+	discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
-+	discov->enable = true;
-+
-+	buf = (u8 *)tlv + sizeof(*discov);
-+
-+	mt7915_mac_write_txwi(dev, (__le32 *)buf, skb, wcid, 0, NULL,
-+			      changed);
-+	memcpy(buf + MT_TXD_SIZE, skb->data, skb->len);
-+
-+	dev_kfree_skb(skb);
-+}
-+
-+int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-+			  int en, u32 changed)
- {
- #define MAX_BEACON_SIZE 512
- 	struct mt7915_dev *dev = mt7915_hw_dev(hw);
-@@ -2044,6 +2108,11 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw,
- 	mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);
- 	dev_kfree_skb(skb);
- 
-+	if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP ||
-+	    changed & BSS_CHANGED_FILS_DISCOVERY)
-+		mt7915_mcu_beacon_inband_discov(dev, vif, rskb,
-+						bcn, changed);
-+
- out:
- 	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 064d33e33738..e1d576701fdf 100644
---- a/mt7915/mcu.h
-+++ b/mt7915/mcu.h
-@@ -404,11 +404,23 @@ struct bss_info_bcn_cont {
- 	__le16 pkt_len;
- } __packed __aligned(4);
- 
-+struct bss_info_inband_discovery {
-+	__le16 tag;
-+	__le16 len;
-+	u8 tx_type;
-+	u8 tx_mode;
-+	u8 tx_interval;
-+	u8 enable;
-+	__le16 rsv;
-+	__le16 prob_rsp_len;
-+} __packed __aligned(4);
-+
- enum {
- 	BSS_INFO_BCN_CSA,
- 	BSS_INFO_BCN_BCC,
- 	BSS_INFO_BCN_MBSSID,
- 	BSS_INFO_BCN_CONTENT,
-+	BSS_INFO_BCN_DISCOV,
- 	BSS_INFO_BCN_MAX
- };
- 
-@@ -476,6 +488,7 @@ enum {
- #define MT7915_BEACON_UPDATE_SIZE	(sizeof(struct sta_req_hdr) +	\
- 					 sizeof(struct bss_info_bcn_cntdwn) + \
- 					 sizeof(struct bss_info_bcn_mbss) + \
--					 sizeof(struct bss_info_bcn_cont))
-+					 sizeof(struct bss_info_bcn_cont) + \
-+					 sizeof(struct bss_info_inband_discovery))
- 
- #endif
-diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 6c590eff14f1..03431012b2ff 100644
---- a/mt7915/mt7915.h
-+++ b/mt7915/mt7915.h
-@@ -464,7 +464,7 @@ int mt7915_mcu_add_rx_ba(struct mt7915_dev *dev,
- int mt7915_mcu_update_bss_color(struct mt7915_dev *dev, struct ieee80211_vif *vif,
- 				struct cfg80211_he_bss_color *he_bss_color);
- int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
--			  int enable);
-+			  int enable, u32 changed);
- int mt7915_mcu_add_obss_spr(struct mt7915_dev *dev, struct ieee80211_vif *vif,
-                             bool enable);
- int mt7915_mcu_add_rate_ctrl(struct mt7915_dev *dev, struct ieee80211_vif *vif,
-@@ -551,7 +551,7 @@ void mt7915_mac_cca_stats_reset(struct mt7915_phy *phy);
- void mt7915_mac_enable_nf(struct mt7915_dev *dev, bool ext_phy);
- void mt7915_mac_write_txwi(struct mt7915_dev *dev, __le32 *txwi,
- 			   struct sk_buff *skb, struct mt76_wcid *wcid, int pid,
--			   struct ieee80211_key_conf *key, bool beacon);
-+			   struct ieee80211_key_conf *key, u32 changed);
- void mt7915_mac_set_timing(struct mt7915_phy *phy);
- int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
- 		       struct ieee80211_sta *sta);
--- 
-2.18.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/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
old mode 100755
new mode 100644
index 94dff56..77cbc39
--- 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/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
@@ -1,26 +1,25 @@
-From 235e69804c130fd7381fd44b1853859984e97ac5 Mon Sep 17 00:00:00 2001
+From a9cf0fd711fdccf35e6171dd4aba0eb7f6588148 Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Thu, 21 Apr 2022 19:42:55 +0800
+Date: Mon, 6 Jun 2022 20:08:58 +0800
 Subject: [PATCH] mt76: mt7915: add mtk internal debug tools for mt76
 
-Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
 ---
- .../wireless/mediatek/mt76/mt76_connac_mcu.h  |    6 +
- .../wireless/mediatek/mt76/mt7915/Makefile    |    2 +-
- .../wireless/mediatek/mt76/mt7915/debugfs.c   |   72 +-
- .../net/wireless/mediatek/mt76/mt7915/mac.c   |   14 +
- .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   41 +
- .../net/wireless/mediatek/mt76/mt7915/mcu.h   |    4 +
- .../wireless/mediatek/mt76/mt7915/mt7915.h    |   41 +
- .../mediatek/mt76/mt7915/mt7915_debug.h       | 1350 ++++++++
- .../mediatek/mt76/mt7915/mtk_debugfs.c        | 2921 +++++++++++++++++
- .../wireless/mediatek/mt76/mt7915/mtk_mcu.c   |   51 +
- .../net/wireless/mediatek/mt76/tools/fwlog.c  |   44 +-
- 11 files changed, 4533 insertions(+), 13 deletions(-)
- mode change 100644 => 100755 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
- create mode 100644 drivers/net/wireless/mediatek/mt76/mt7915/mt7915_debug.h
- create mode 100644 drivers/net/wireless/mediatek/mt76/mt7915/mtk_debugfs.c
- create mode 100644 drivers/net/wireless/mediatek/mt76/mt7915/mtk_mcu.c
+ mt76_connac_mcu.h     |    6 +
+ mt7915/Makefile       |    2 +-
+ mt7915/debugfs.c      |   73 +-
+ mt7915/mac.c          |   14 +
+ mt7915/mcu.c          |   41 +
+ mt7915/mcu.h          |    4 +
+ mt7915/mt7915.h       |   41 +
+ mt7915/mt7915_debug.h | 1350 +++++++++++++++++++
+ mt7915/mtk_debugfs.c  | 2921 +++++++++++++++++++++++++++++++++++++++++
+ mt7915/mtk_mcu.c      |   51 +
+ tools/fwlog.c         |   44 +-
+ 11 files changed, 4534 insertions(+), 13 deletions(-)
+ mode change 100644 => 100755 mt7915/mcu.c
+ create mode 100644 mt7915/mt7915_debug.h
+ create mode 100644 mt7915/mtk_debugfs.c
+ create mode 100644 mt7915/mtk_mcu.c
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
 index aa14d2d4..03134066 100644
@@ -54,7 +53,7 @@
  mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
 \ No newline at end of file
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index b45181c1..27321528 100644
+index 9f21d978..0cfb6068 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -8,6 +8,9 @@
@@ -70,16 +69,16 @@
 @@ -448,6 +451,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
  	int ret;
  
- 	dev->fw_debug_wm = val ? MCU_FW_LOG_TO_HOST : 0;
+ 	dev->fw.debug_wm = val ? MCU_FW_LOG_TO_HOST : 0;
 +#ifdef MTK_DEBUG
-+	dev->fw_debug_wm = val;
++	dev->fw.debug_wm = val;
 +#endif
  
- 	if (dev->fw_debug_bin)
+ 	if (dev->fw.debug_bin)
  		val = 16;
 @@ -472,6 +478,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
  		if (ret)
- 			return ret;
+ 			goto out;
  	}
 +#ifdef MTK_DEBUG
 +	mt7915_mcu_fw_dbg_ctrl(dev, 68, !!val);
@@ -92,28 +91,28 @@
  	mt76_wr(dev, MT_MCU_WM_CIRQ_IRQ_SOFT_ADDR, BIT(5));
  
 +#ifdef MTK_DEBUG
-+	if (dev->fw_debug_bin & BIT(3))
++	if (dev->fw.debug_bin & BIT(3))
 +		/* use bit 7 to indicate v2 magic number */
-+		dev->fw_debug_wm |= BIT(7);
++		dev->fw.debug_wm |= BIT(7);
 +#endif
 +
- 	return 0;
- }
- 
-@@ -487,7 +502,11 @@ mt7915_fw_debug_wm_get(void *data, u64 *val)
+ out:
+ 	if (ret)
+ 		dev->fw.debug_wm = 0;
+@@ -491,7 +506,11 @@ mt7915_fw_debug_wm_get(void *data, u64 *val)
  {
  	struct mt7915_dev *dev = data;
  
--	*val = dev->fw_debug_wm;
+-	*val = dev->fw.debug_wm;
 +#ifdef MTK_DEBUG
-+	*val = dev->fw_debug_wm & ~BIT(7);
++	*val = dev->fw.debug_wm & ~BIT(7);
 +#else
-+	val = dev->fw_debug_wm;
++	val = dev->fw.debug_wm;
 +#endif
  
  	return 0;
  }
-@@ -567,6 +586,16 @@ mt7915_fw_debug_bin_set(void *data, u64 val)
+@@ -576,6 +595,17 @@ mt7915_fw_debug_bin_set(void *data, u64 val)
  
  	relay_reset(dev->relay_fwlog);
  
@@ -127,10 +126,11 @@
 +		return 0;
 +#endif
 +
- 	return mt7915_fw_debug_wm_set(dev, dev->fw_debug_wm);
++
+ 	return mt7915_fw_debug_wm_set(dev, dev->fw.debug_wm);
  }
  
-@@ -1020,6 +1049,11 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1038,6 +1068,11 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
  	if (!ext_phy)
  		dev->debugfs_dir = dir;
  
@@ -142,7 +142,7 @@
  	return 0;
  }
  
-@@ -1060,17 +1094,53 @@ void mt7915_debugfs_rx_fw_monitor(struct mt7915_dev *dev, const void *data, int
+@@ -1078,17 +1113,53 @@ void mt7915_debugfs_rx_fw_monitor(struct mt7915_dev *dev, const void *data, int
  		.msg_type = cpu_to_le16(PKT_TYPE_RX_FW_MONITOR),
  	};
  
@@ -167,7 +167,7 @@
  
 +#ifdef MTK_DEBUG
 +	/* old magic num */
-+	if (!(dev->fw_debug_wm & BIT(7))) {
++	if (!(dev->fw.debug_wm & BIT(7))) {
 +		hdr.timestamp = mt76_rr(dev, MT_LPON_FRCR(0));
 +		hdr.len = *(__le16 *)data;
 +		mt7915_debugfs_write_fwlog(dev, &hdr, sizeof(hdr), data, len);
@@ -197,7 +197,7 @@
  
  	if (dev->relay_fwlog)
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index de5f3f10..ce760cdb 100644
+index b0e86968..9e92b32f 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -596,6 +596,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
@@ -222,7 +222,7 @@
  	if (hdr_trans && ieee80211_has_morefrags(fc)) {
  		if (mt7915_reverse_frag0_hdr_trans(skb, hdr_gap))
  			return -EINVAL;
-@@ -1352,6 +1360,12 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1358,6 +1366,12 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	tx_info->buf[1].skip_unmap = true;
  	tx_info->nbuf = MT_CT_DMA_BUF_NUM;
  
@@ -238,7 +238,7 @@
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
 old mode 100644
 new mode 100755
-index 20f32f7f..c325c4b6
+index 81559002..6ec321e1
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -298,6 +298,10 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
@@ -252,7 +252,7 @@
  	if (wait_seq)
  		*wait_seq = seq;
  
-@@ -3657,6 +3661,43 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3733,6 +3737,43 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -297,7 +297,7 @@
  {
  	struct {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 5cbc3ecf..3f303885 100644
+index d46c8da4..2f7007fd 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -296,6 +296,10 @@ enum {
@@ -312,7 +312,7 @@
  
  enum mcu_mmps_mode {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e5f89161..92fedaf3 100644
+index bd985e6c..001a6015 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -9,6 +9,7 @@
@@ -323,7 +323,7 @@
  #define MT7915_MAX_INTERFACES		19
  #define MT7915_MAX_WMM_SETS		4
  #define MT7915_WTBL_SIZE		288
-@@ -326,6 +327,27 @@ struct mt7915_dev {
+@@ -339,6 +340,27 @@ struct mt7915_dev {
  	struct reset_control *rstc;
  	void __iomem *dcm;
  	void __iomem *sku;
@@ -351,7 +351,7 @@
  };
  
  enum {
-@@ -595,4 +617,23 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -608,4 +630,23 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			    struct ieee80211_sta *sta, struct dentry *dir);
  #endif
  
@@ -4830,5 +4830,5 @@
  	return ret;
  }
 -- 
-2.25.1
+2.18.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/1002-mt76-mt7915-csi-implement-csi-support.patch
index 9286d3c..44dc578 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/1002-mt76-mt7915-csi-implement-csi-support.patch
@@ -1,7 +1,7 @@
-From 317b05bb3db50a63ef5e8497a9dc9c59e5830d9b Mon Sep 17 00:00:00 2001
+From fac076082992f4e6bf576b44778ad6d5c37d9abd Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Mon, 28 Mar 2022 09:12:54 +0800
-Subject: [PATCH] mt76: mt7915: csi: implement csi support
+Date: Mon, 6 Jun 2022 20:13:02 +0800
+Subject: [PATCH 1002/1007] mt76: mt7915: csi: implement csi support
 
 ---
  mt76_connac_mcu.h |   2 +
@@ -13,11 +13,12 @@
  mt7915/vendor.c   | 452 ++++++++++++++++++++++++++++++++++++++++++++++
  mt7915/vendor.h   |  60 ++++++
  8 files changed, 762 insertions(+), 2 deletions(-)
+ mode change 100755 => 100644 mt7915/mcu.c
  create mode 100644 mt7915/vendor.c
  create mode 100644 mt7915/vendor.h
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 494c5c71..6f84a0fc 100644
+index 03134066..96591a8c 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -820,6 +820,7 @@ enum {
@@ -28,7 +29,7 @@
  };
  
  enum {
-@@ -991,6 +992,7 @@ enum {
+@@ -990,6 +991,7 @@ enum {
  	MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
  	MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
@@ -54,10 +55,10 @@
  mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
 \ No newline at end of file
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 02eb0612..dbcdf147 100644
+index 66884be0..258bb20a 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -539,6 +539,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
+@@ -541,6 +541,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
  	/* init wiphy according to mphy and phy */
  	mt7915_init_wiphy(mphy->hw);
  
@@ -70,7 +71,7 @@
  	ret = mt76_register_phy(mphy, true, mt76_rates,
  				ARRAY_SIZE(mt76_rates));
  	if (ret)
-@@ -1027,6 +1033,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
+@@ -1030,6 +1036,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
  	}
  }
  
@@ -96,7 +97,7 @@
  static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  {
  	struct mt7915_phy *phy = mt7915_ext_phy(dev);
-@@ -1035,6 +1060,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
+@@ -1038,6 +1063,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  	if (!phy)
  		return;
  
@@ -107,7 +108,7 @@
  	mt7915_unregister_thermal(phy);
  	mt76_unregister_phy(mphy);
  	ieee80211_free_hw(mphy->hw);
-@@ -1047,6 +1076,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
+@@ -1050,6 +1079,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
  	mt7915_dma_cleanup(dev);
  	tasklet_disable(&dev->irq_tasklet);
  
@@ -118,7 +119,7 @@
  	if (is_mt7986(&dev->mt76))
  		mt7986_wmac_disable(dev);
  }
-@@ -1087,6 +1120,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1090,6 +1123,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
  	dev->mt76.test_ops = &mt7915_testmode_ops;
  #endif
  
@@ -132,7 +133,9 @@
  	if (IS_ENABLED(CONFIG_MT76_LEDS)) {
  		dev->mt76.led_cdev.brightness_set = mt7915_led_set_brightness;
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9a7941fa..26831327 100644
+old mode 100755
+new mode 100644
+index 6ec321e1..18b05b2e
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -89,6 +89,10 @@ struct mt7915_fw_region {
@@ -158,7 +161,7 @@
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
-@@ -3677,6 +3686,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3737,6 +3746,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -268,12 +271,12 @@
  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 94e0a81b..007282d4 100644
+index 2f7007fd..cb854b28 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -493,4 +493,80 @@ enum {
- 					 sizeof(struct bss_info_bcn_mbss) + \
- 					 sizeof(struct bss_info_bcn_cont))
+@@ -513,4 +513,80 @@ enum {
+ 					 sizeof(struct bss_info_bcn_cont) + \
+ 					 sizeof(struct bss_info_inband_discovery))
  
 +#ifdef CONFIG_MTK_VENDOR
 +struct mt7915_mcu_csi {
@@ -353,10 +356,10 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e0ec262a..908c47c8 100644
+index 001a6015..ff957425 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -267,6 +267,20 @@ struct mt7915_phy {
+@@ -277,6 +277,20 @@ struct mt7915_phy {
  		u8 spe_idx;
  	} test;
  #endif
@@ -377,7 +380,7 @@
  };
  
  struct mt7915_dev {
-@@ -615,6 +629,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -630,6 +644,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			    struct ieee80211_sta *sta, struct dentry *dir);
  #endif
  
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/1003-mt76-mt7915-air-monitor-support.patch
index 32f206c..018c3f0 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1003-mt76-mt7915-air-monitor-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1003-mt76-mt7915-air-monitor-support.patch
@@ -1,22 +1,22 @@
-From 03d314ba186fa4d49e599690d5e719650d62cd90 Mon Sep 17 00:00:00 2001
+From 2722263634d9890cfd956d924341c2239e1507b1 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/1005] mt76: mt7915: air monitor support
+Subject: [PATCH 1003/1007] mt76: mt7915: air monitor support
 
 ---
- .../wireless/mediatek/mt76/mt76_connac_mcu.h  |   2 +
- .../net/wireless/mediatek/mt76/mt7915/mac.c   |   4 +
- .../net/wireless/mediatek/mt76/mt7915/main.c  |   3 +
- .../wireless/mediatek/mt76/mt7915/mt7915.h    |  34 ++
- .../wireless/mediatek/mt76/mt7915/vendor.c    | 359 ++++++++++++++++++
- .../wireless/mediatek/mt76/mt7915/vendor.h    |  38 ++
+ mt76_connac_mcu.h |   2 +
+ mt7915/mac.c      |   4 +
+ mt7915/main.c     |   3 +
+ mt7915/mt7915.h   |  34 +++++
+ mt7915/vendor.c   | 359 ++++++++++++++++++++++++++++++++++++++++++++++
+ mt7915/vendor.h   |  38 +++++
  6 files changed, 440 insertions(+)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 464b55f..b0f2d97 100644
+index 96591a8c..1c24dbf4 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -992,6 +992,8 @@ enum {
+@@ -991,6 +991,8 @@ enum {
  	MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
  	MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
@@ -26,10 +26,10 @@
  };
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 261861a..78d2a96 100644
+index 9e92b32f..4989f437 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -827,6 +827,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -835,6 +835,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
  			seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
  			qos_ctl = *ieee80211_get_qos_ctl(hdr);
  		}
@@ -41,10 +41,10 @@
  		status->flag |= RX_FLAG_8023;
  	}
 diff --git a/mt7915/main.c b/mt7915/main.c
-index c3f44d8..1beadd8 100644
+index 79349817..7d4e7838 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -677,6 +677,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -671,6 +671,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	if (ret)
  		return ret;
  
@@ -55,10 +55,10 @@
  }
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index df42286..6e62a46 100644
+index ff957425..ace01e15 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -222,6 +222,35 @@ struct mt7915_hif {
+@@ -232,6 +232,35 @@ struct mt7915_hif {
  	int irq;
  };
  
@@ -94,7 +94,7 @@
  struct mt7915_phy {
  	struct mt76_phy *mt76;
  	struct mt7915_dev *dev;
-@@ -278,6 +307,8 @@ struct mt7915_phy {
+@@ -290,6 +319,8 @@ struct mt7915_phy {
  		u32 interval;
  		u32 last_record;
  	} csi;
@@ -103,7 +103,7 @@
  #endif
  };
  
-@@ -626,6 +657,9 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -648,6 +679,9 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  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);
@@ -114,7 +114,7 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 98fd9c2..b94d787 100644
+index 98fd9c2d..b94d787e 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -430,6 +430,353 @@ out:
@@ -491,7 +491,7 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 9d3db2a..976817f 100644
+index 9d3db2a7..976817f3 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -4,6 +4,7 @@
@@ -545,5 +545,5 @@
 +
  #endif
 -- 
-2.25.1
+2.18.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/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
index 31bdbf4..72f8d24 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/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
@@ -1,7 +1,8 @@
-From 6820d00b2fd86c760e281ea6e3e114cf2779cb12 Mon Sep 17 00:00:00 2001
+From 37b133c4d8fa05aae067dfb5fb68c24d3cabea2d Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 28 Mar 2022 09:19:29 +0800
-Subject: [PATCH] mt76: mt7915: add support for muru_onoff via debugfs
+Subject: [PATCH 1004/1007] mt76: mt7915: add support for muru_onoff via
+ debugfs
 
 ---
  mt7915/init.c        |  1 +
@@ -12,10 +13,10 @@
  5 files changed, 49 insertions(+), 4 deletions(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index ad2a9c9f..3eaf7916 100644
+index 258bb20a..2b8d758f 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -574,6 +574,7 @@ static void mt7915_init_work(struct work_struct *work)
+@@ -576,6 +576,7 @@ static void mt7915_init_work(struct work_struct *work)
  	mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband);
  	mt7915_init_txpower(dev, &dev->mphy.sband_6g.sband);
  	mt7915_txbf_init(dev);
@@ -24,7 +25,7 @@
  
  void mt7915_wfsys_reset(struct mt7915_dev *dev)
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index c7694819..cbcd3bd4 100755
+index 18b05b2e..5df0b4fd 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -944,6 +944,7 @@ mt7915_mcu_sta_muru_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
@@ -55,10 +56,10 @@
  	if (sta->vht_cap.vht_supported)
  		muru->mimo_dl.vht_mu_bfee =
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index f166eaea..ccb1c9d0 100644
+index cb854b28..0ff1fd11 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -573,4 +573,10 @@ struct csi_data {
+@@ -589,4 +589,10 @@ struct csi_data {
  };
  #endif
  
@@ -70,10 +71,10 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 1b37cef7..e6b87239 100644
+index ace01e15..06f2737f 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -390,6 +390,7 @@ struct mt7915_dev {
+@@ -403,6 +403,7 @@ struct mt7915_dev {
  		bool dump_rx_pkt;
  		bool dump_rx_raw;
  		u32 token_idx;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
index e4bef96..cac0cd4 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
@@ -1,9 +1,8 @@
-From f438253052b9cea4ec1339b53a44224393b0ad9d Mon Sep 17 00:00:00 2001
+From 1482994a9bfbc34fdb5887cd6438eb04be0c9d26 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
-Date: Fri, 21 Jan 2022 11:22:10 +0800
-Subject: [PATCH] mt76: certification patches
+Date: Mon, 6 Jun 2022 20:15:51 +0800
+Subject: [PATCH 1005/1007] mt76: certification patches
 
-Signed-off-by: MeiChia Chiu <meichia.chiu@mediatek.com>
 ---
  mt76_connac_mcu.h    |   1 +
  mt7915/init.c        |   7 +-
@@ -18,10 +17,10 @@
  10 files changed, 964 insertions(+), 6 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index f5acdf20..e0e5d10d 100644
+index 1c24dbf4..82498039 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -994,6 +994,7 @@ enum {
+@@ -993,6 +993,7 @@ enum {
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
  	/* for vendor csi and air monitor */
  	MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -30,10 +29,10 @@
  };
  
 diff --git a/mt7915/init.c b/mt7915/init.c
-index c58f045f..d6156453 100644
+index 2b8d758f..b4404aec 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -369,12 +369,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
+@@ -371,12 +371,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
  	if (!phy->dev->dbdc_support)
  		wiphy->txq_memory_limit = 32 << 20; /* 32 MiB */
  
@@ -53,7 +52,7 @@
  			IEEE80211_HT_CAP_LDPC_CODING |
  			IEEE80211_HT_CAP_MAX_AMSDU;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index a56f9be8..6637fa44 100644
+index 4989f437..9af0644f 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -7,6 +7,7 @@
@@ -64,8 +63,8 @@
  
  #define to_rssi(field, rxv)	((FIELD_GET(field, rxv) - 220) / 2)
  
-@@ -2411,6 +2412,21 @@ void mt7915_mac_update_stats(struct mt7915_phy *phy)
- 	}
+@@ -2486,6 +2487,21 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
+ 	phy->trb_ts = trb;
  }
  
 +#ifdef CONFIG_MTK_VENDOR
@@ -86,7 +85,7 @@
  void mt7915_mac_sta_rc_work(struct work_struct *work)
  {
  	struct mt7915_dev *dev = container_of(work, struct mt7915_dev, rc_work);
-@@ -2433,6 +2449,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
+@@ -2508,6 +2524,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
  		sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
  		vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
  
@@ -101,10 +100,10 @@
  			       IEEE80211_RC_NSS_CHANGED |
  			       IEEE80211_RC_BW_CHANGED))
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 12de9e35..d628f768 100644
+index 7d4e7838..24bc12f5 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -655,6 +655,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -649,6 +649,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;
@@ -114,7 +113,7 @@
  	int ret, idx;
  
  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
-@@ -680,7 +683,17 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -674,7 +677,17 @@ 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
@@ -134,10 +133,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 817298a1..e418742a 100644
+index 5df0b4fd..495f2368 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3793,6 +3793,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -3850,6 +3850,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
  
  	return 0;
  }
@@ -611,10 +610,10 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index a5e5afae..c15f89bf 100644
+index 0ff1fd11..364ea0dd 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -431,9 +431,13 @@ enum {
+@@ -433,9 +433,13 @@ enum {
  	RATE_PARAM_FIXED = 3,
  	RATE_PARAM_MMPS_UPDATE = 5,
  	RATE_PARAM_FIXED_HE_LTF = 7,
@@ -629,7 +628,7 @@
  };
  
  #define RATE_CFG_MCS			GENMASK(3, 0)
-@@ -445,6 +449,9 @@ enum {
+@@ -447,6 +451,9 @@ enum {
  #define RATE_CFG_PHY_TYPE		GENMASK(27, 24)
  #define RATE_CFG_HE_LTF			GENMASK(31, 28)
  
@@ -639,7 +638,7 @@
  enum {
  	THERMAL_PROTECT_PARAMETER_CTRL,
  	THERMAL_PROTECT_BASIC_INFO,
-@@ -574,5 +581,205 @@ struct csi_data {
+@@ -594,5 +601,205 @@ struct csi_data {
  #define OFDMA_UL			BIT(1)
  #define MUMIMO_DL			BIT(2)
  #define MUMIMO_UL			BIT(3)
@@ -846,10 +845,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 56057ace..ad4e20dd 100644
+index 06f2737f..80a17a7d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -664,6 +664,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -677,6 +677,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  #endif
  
  #ifdef CONFIG_MTK_VENDOR
@@ -870,10 +869,10 @@
  int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
  			u8 cfg, u8 v1, u32 v2, u8 *mac_addr);
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 6c48f115..03de46a9 100644
+index d2dbae45..815be6d8 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -2460,7 +2460,8 @@ static int mt7915_muru_onoff_get(void *data, u64 *val)
+@@ -2486,7 +2486,8 @@ static int mt7915_muru_onoff_get(void *data, u64 *val)
  
  	*val = dev->dbg.muru_onoff;
  
@@ -883,7 +882,7 @@
  		!!(dev->dbg.muru_onoff & MUMIMO_UL),
  		!!(dev->dbg.muru_onoff & MUMIMO_DL),
  		!!(dev->dbg.muru_onoff & OFDMA_UL),
-@@ -2473,8 +2474,8 @@ static int mt7915_muru_onoff_set(void *data, u64 val)
+@@ -2499,8 +2500,8 @@ static int mt7915_muru_onoff_set(void *data, u64 val)
  {
  	struct mt7915_dev *dev = data;
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-L0.5-system-error-recovery-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-L0.5-system-error-recovery-support.patch
old mode 100755
new mode 100644
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-L0.5-system-error-recovery-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-L0.5-system-error-recovery-support.patch
index 20ccd9d..34b74bb
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-L0.5-system-error-recovery-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1006-mt76-mt7915-add-L0.5-system-error-recovery-support.patch
@@ -1,12 +1,9 @@
-From ce9d865db52e49410af55a3b348f00ed1511ccbc Mon Sep 17 00:00:00 2001
+From 295dac8799e536a2d5dc53e727e246e469739853 Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Thu, 5 May 2022 16:25:44 +0800
-Subject: [PATCH 04/10] mt76: mt7915: add L0.5 system error recovery support
+Date: Mon, 6 Jun 2022 20:18:15 +0800
+Subject: [PATCH 1006/1007] mt76: mt7915: add L0.5 system error recovery
+ support
 
-add L0.5 system error recovery support
-auto trigger l0.5 ser when detect fw exception or mem dma hang.
-
-Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
 ---
  mt7915/debugfs.c |  88 ++++++++++++---
  mt7915/dma.c     |  48 ++++++++
@@ -21,10 +18,10 @@
  10 files changed, 493 insertions(+), 97 deletions(-)
 
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index b45181c1..f07df470 100644
+index 27eae83b..c75d9e5b 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
-@@ -49,12 +49,17 @@ static ssize_t
+@@ -52,12 +52,17 @@ static ssize_t
  mt7915_fw_ser_set(struct file *file, const char __user *user_buf,
  		  size_t count, loff_t *ppos)
  {
@@ -43,7 +40,7 @@
  
  	if (count >= sizeof(buf))
  		return -EINVAL;
-@@ -70,28 +75,71 @@ mt7915_fw_ser_set(struct file *file, const char __user *user_buf,
+@@ -73,28 +78,71 @@ mt7915_fw_ser_set(struct file *file, const char __user *user_buf,
  	if (kstrtou16(buf, 0, &val))
  		return -EINVAL;
  
@@ -131,7 +128,7 @@
  }
  
  static ssize_t
-@@ -140,6 +188,12 @@ mt7915_fw_ser_get(struct file *file, char __user *user_buf,
+@@ -143,6 +191,12 @@ mt7915_fw_ser_get(struct file *file, char __user *user_buf,
  			  "::E  R , SER_LMAC_WISR7_B1 = 0x%08x\n",
  			  mt76_rr(dev, MT_SWDEF_LAMC_WISR7_BN1_STATS));
  
@@ -204,7 +201,7 @@
  {
  	mt7915_dma_disable(dev, true);
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 1c956d3d..4984ec8f 100644
+index b4404aec..80ada114 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -262,7 +262,7 @@ static void mt7915_led_set_brightness(struct led_classdev *led_cdev,
@@ -216,7 +213,7 @@
  mt7915_init_txpower(struct mt7915_dev *dev,
  		    struct ieee80211_supported_band *sband)
  {
-@@ -441,7 +441,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
+@@ -448,7 +448,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
  	mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
  }
  
@@ -225,7 +222,7 @@
  {
  	int i;
  	u32 rx_len = is_mt7915(&dev->mt76) ? 0x400 : 0x680;
-@@ -471,7 +471,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
+@@ -478,7 +478,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
  	}
  }
  
@@ -234,7 +231,7 @@
  {
  	int ret;
  
-@@ -1112,6 +1112,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1160,6 +1160,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
  
  	mt7915_init_debugfs(&dev->phy);
  
@@ -244,7 +241,7 @@
  
  unreg_thermal:
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index de5f3f10..1a1798d2 100644
+index 9af0644f..a9ebbf12 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -3,6 +3,7 @@
@@ -255,7 +252,7 @@
  #include "mt7915.h"
  #include "../dma.h"
  #include "mac.h"
-@@ -2037,85 +2038,188 @@ mt7915_update_beacons(struct mt7915_dev *dev)
+@@ -2063,85 +2064,188 @@ mt7915_update_beacons(struct mt7915_dev *dev)
  		mt7915_update_vif_beacon, dev->mt76.phy2->hw);
  }
  
@@ -390,7 +387,13 @@
 +		if (dev->hif2)
 +			mt76_wr(dev, MT_PCIE1_MAC_INT_ENABLE, 0xff);
 +	}
-+
+ 
+-		if (is_mt7915(&dev->mt76))
+-			mt76_set(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
+-				 MT_WFDMA1_GLO_CFG_TX_DMA_EN |
+-				 MT_WFDMA1_GLO_CFG_RX_DMA_EN |
+-				 MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
+-				 MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
 +	/* load firmware */
 +	ret = mt7915_run_firmware(dev);
 +	if (ret)
@@ -405,24 +408,18 @@
 +	mt7915_init_txpower(dev, &dev->mphy.sband_2g.sband);
 +	mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband);
 +	ret = mt7915_txbf_init(dev);
- 
--		if (is_mt7915(&dev->mt76))
--			mt76_set(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
--				 MT_WFDMA1_GLO_CFG_TX_DMA_EN |
--				 MT_WFDMA1_GLO_CFG_RX_DMA_EN |
--				 MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
--				 MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
++
 +	if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) {
 +		ret = __mt7915_start(dev->mphy.hw);
 +		if (ret)
 +			goto out;
-+	}
+ 	}
 +
 +	if (ext_phy && test_bit(MT76_STATE_RUNNING, &ext_phy->state)) {
 +		ret = __mt7915_start(ext_phy->hw);
 +		if (ret)
 +			goto out;
- 	}
++	}
 +
 +out:
 +	/* reset done */
@@ -502,7 +499,7 @@
  }
  
  /* system error recovery */
-@@ -2129,6 +2233,36 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -2156,6 +2260,36 @@ void mt7915_mac_reset_work(struct work_struct *work)
  	ext_phy = dev->mt76.phy2;
  	phy2 = ext_phy ? ext_phy->priv : NULL;
  
@@ -539,7 +536,7 @@
  	if (!(READ_ONCE(dev->reset_state) & MT_MCU_CMD_STOP_DMA))
  		return;
  
-@@ -2155,7 +2289,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -2181,7 +2315,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
  	mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_STOPPED);
  
  	if (mt7915_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) {
@@ -548,7 +545,7 @@
  
  		mt7915_tx_token_put(dev);
  		idr_init(&dev->mt76.token);
-@@ -2206,6 +2340,34 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -2230,6 +2364,34 @@ void mt7915_mac_reset_work(struct work_struct *work)
  					     MT7915_WATCHDOG_TIME);
  }
  
@@ -584,7 +581,7 @@
  {
  	struct mt7915_dev *dev = phy->dev;
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 78bf5ffa..eabcd785 100644
+index 24bc12f5..082e27d4 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -20,17 +20,13 @@ static bool mt7915_dev_running(struct mt7915_dev *dev)
@@ -635,10 +632,10 @@
  	mutex_lock(&dev->mt76.mutex);
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 20f32f7f..b29776e9 100644
+index 495f2368..4a921a50 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -203,19 +203,90 @@ mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs,
+@@ -207,19 +207,90 @@ mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs,
  		ht_mcs[nss] = sta->ht_cap.mcs.rx_mask[nss] & mask[nss];
  }
  
@@ -729,7 +726,7 @@
  	rxd = (struct mt7915_mcu_rxd *)skb->data;
  	if (seq != rxd->seq)
  		return -EAGAIN;
-@@ -2456,18 +2527,10 @@ mt7915_mcu_init_rx_airtime(struct mt7915_dev *dev)
+@@ -2549,18 +2620,10 @@ mt7915_mcu_init_rx_airtime(struct mt7915_dev *dev)
  				 sizeof(req), true);
  }
  
@@ -749,7 +746,7 @@
  	/* force firmware operation mode into normal state,
  	 * which should be set before firmware download stage.
  	 */
-@@ -2516,6 +2579,21 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
+@@ -2609,6 +2672,21 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
  				 MCU_WA_PARAM_RED, 0, 0);
  }
  
@@ -772,10 +769,10 @@
  {
  	__mt76_mcu_restart(&dev->mt76);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 5cbc3ecf..229b9d72 100644
+index 364ea0dd..44d3722e 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -466,8 +466,9 @@ enum {
+@@ -489,8 +489,9 @@ enum {
  
  enum {
  	SER_QUERY,
@@ -787,34 +784,34 @@
  	SER_SET_RECOVER_L3_RX_ABORT,
  	SER_SET_RECOVER_L3_TX_ABORT,
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 4d4537cd..b3de3a7a 100644
+index 71945ba9..ba61ce2e 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -23,6 +23,7 @@ static const u32 mt7915_reg[] = {
- 	[CBTOP1_PHY_END]	= 0x77ffffff,
+@@ -24,6 +24,7 @@ static const u32 mt7915_reg[] = {
  	[INFRA_MCU_ADDR_END]	= 0x7c3fffff,
+ 	[FW_EXCEPTION_ADDR]	= 0x219848,
  	[SWDEF_BASE_ADDR]	= 0x41f200,
 +	[EXCEPTION_BASE_ADDR]	= 0x219848,
  };
  
  static const u32 mt7916_reg[] = {
-@@ -38,6 +39,7 @@ static const u32 mt7916_reg[] = {
- 	[CBTOP1_PHY_END]	= 0x7fffffff,
+@@ -40,6 +41,7 @@ static const u32 mt7916_reg[] = {
  	[INFRA_MCU_ADDR_END]	= 0x7c085fff,
+ 	[FW_EXCEPTION_ADDR]	= 0x022050bc,
  	[SWDEF_BASE_ADDR]	= 0x411400,
 +	[EXCEPTION_BASE_ADDR]	= 0x022050BC,
  };
  
  static const u32 mt7986_reg[] = {
-@@ -53,6 +55,7 @@ static const u32 mt7986_reg[] = {
- 	[CBTOP1_PHY_END]	= 0x7fffffff,
+@@ -56,6 +58,7 @@ static const u32 mt7986_reg[] = {
  	[INFRA_MCU_ADDR_END]	= 0x7c085fff,
+ 	[FW_EXCEPTION_ADDR]	= 0x02204ffc,
  	[SWDEF_BASE_ADDR]	= 0x411400,
 +	[EXCEPTION_BASE_ADDR]	= 0x02204FFC,
  };
  
  static const u32 mt7915_offs[] = {
-@@ -610,10 +613,9 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
+@@ -613,10 +616,9 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
  		u32 val = mt76_rr(dev, MT_MCU_CMD);
  
  		mt76_wr(dev, MT_MCU_CMD, val);
@@ -828,10 +825,10 @@
  	}
  }
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e5f89161..7f7ecdfe 100644
+index 80a17a7d..ae5ac72f 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -297,6 +297,15 @@ struct mt7915_dev {
+@@ -353,6 +353,15 @@ struct mt7915_dev {
  	struct work_struct reset_work;
  	wait_queue_head_t reset_wait;
  	u32 reset_state;
@@ -847,7 +844,7 @@
  
  	struct list_head sta_rc_list;
  	struct list_head sta_poll_list;
-@@ -335,6 +344,12 @@ enum {
+@@ -416,6 +425,12 @@ enum {
  	__MT_WFDMA_MAX,
  };
  
@@ -860,7 +857,7 @@
  enum {
  	MT_CTX0,
  	MT_HIF0 = 0x0,
-@@ -446,6 +461,14 @@ s8 mt7915_eeprom_get_power_delta(struct mt7915_dev *dev, int band);
+@@ -527,6 +542,14 @@ s8 mt7915_eeprom_get_power_delta(struct mt7915_dev *dev, int band);
  int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2);
  void mt7915_dma_prefetch(struct mt7915_dev *dev);
  void mt7915_dma_cleanup(struct mt7915_dev *dev);
@@ -876,18 +873,18 @@
  int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  			       struct mt7915_vif *mvif,
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 4251cf78..99834310 100644
+index c7c9e411..47bae86e 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -31,6 +31,7 @@ enum reg_rev {
- 	CBTOP1_PHY_END,
+@@ -32,6 +32,7 @@ enum reg_rev {
  	INFRA_MCU_ADDR_END,
+ 	FW_EXCEPTION_ADDR,
  	SWDEF_BASE_ADDR,
 +	EXCEPTION_BASE_ADDR,
  	__MT_REG_MAX,
  };
  
-@@ -112,6 +113,11 @@ enum offs_rev {
+@@ -113,6 +114,11 @@ enum offs_rev {
  #define __REG(id)			(dev->reg.reg_rev[(id)])
  #define __OFFS(id)			(dev->reg.offs_rev[(id)])
  
@@ -899,7 +896,7 @@
  /* MCU WFDMA0 */
  #define MT_MCU_WFDMA0_BASE		0x2000
  #define MT_MCU_WFDMA0(ofs)		(MT_MCU_WFDMA0_BASE + (ofs))
-@@ -556,6 +562,10 @@ enum offs_rev {
+@@ -565,6 +571,10 @@ enum offs_rev {
  #define MT_WFDMA0_PRI_DLY_INT_CFG1	MT_WFDMA0(0x2f4)
  #define MT_WFDMA0_PRI_DLY_INT_CFG2	MT_WFDMA0(0x2f8)
  
@@ -910,7 +907,7 @@
  /* WFDMA1 */
  #define MT_WFDMA1_BASE			0xd5000
  #define MT_WFDMA1(ofs)			(MT_WFDMA1_BASE + (ofs))
-@@ -701,6 +711,10 @@ enum offs_rev {
+@@ -710,6 +720,10 @@ enum offs_rev {
  #define MT_MCU_CMD_NORMAL_STATE		BIT(5)
  #define MT_MCU_CMD_ERROR_MASK		GENMASK(5, 1)
  
@@ -921,7 +918,7 @@
  /* TOP RGU */
  #define MT_TOP_RGU_BASE			0x18000000
  #define MT_TOP_PWR_CTRL			(MT_TOP_RGU_BASE + (0x0))
-@@ -974,6 +988,8 @@ enum offs_rev {
+@@ -985,6 +999,8 @@ enum offs_rev {
  #define MT_CPU_UTIL_PEAK_IDLE_CNT	MT_CPU_UTIL(0x0c)
  #define MT_CPU_UTIL_CTRL		MT_CPU_UTIL(0x1c)
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
similarity index 75%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
index ae9ca75..85c914e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-support-for-runtime-set-in-band-disc.patch
@@ -1,7 +1,8 @@
-From 71e967c4ea7f0e119ff66197491acae7b9bd87e0 Mon Sep 17 00:00:00 2001
+From eee8cdc1710c18f90b8e5345dc85a0749cffabe3 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Fri, 27 May 2022 15:51:48 +0800
-Subject: [PATCH] mt76: mt7915:add support for runtime set in-band discovery
+Subject: [PATCH 1007/1007] 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 203fa32..73239df 100644
+index 4a921a50..5e7b3f4a 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2014,8 +2014,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -2102,8 +2102,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
  	u8 *buf, interval;
  	int len;
  
@@ -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 &&
-@@ -2051,7 +2050,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -2140,7 +2139,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
  	discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
  	discov->tx_interval = interval;
  	discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
@@ -32,5 +33,5 @@
  	buf = (u8 *)tlv + sizeof(*discov);
  
 -- 
-2.29.2
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-additional-supports.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-additional-supports.patch
index 41339c0..14c4f2b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-additional-supports.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1111-mt76-testmode-additional-supports.patch
@@ -1,29 +1,29 @@
-From 90683f1b8f7961808da41b8782c98721265a2127 Mon Sep 17 00:00:00 2001
+From 85b7c70f08f3c363c605816143c5f0c64264016a 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 1/5] mt76: testmode: additional supports
+Subject: [PATCH 1111/1115] mt76: testmode: additional supports
 
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
 ---
- drivers/net/wireless/mediatek/mt76/dma.c      |    3 +-
- drivers/net/wireless/mediatek/mt76/mac80211.c |   12 +
- drivers/net/wireless/mediatek/mt76/mt76.h     |  111 +-
- .../wireless/mediatek/mt76/mt76_connac_mcu.c  |    4 +
- .../wireless/mediatek/mt76/mt76_connac_mcu.h  |    2 +
- .../net/wireless/mediatek/mt76/mt7915/init.c  |    2 +-
- .../net/wireless/mediatek/mt76/mt7915/mac.c   |   37 +-
- .../net/wireless/mediatek/mt76/mt7915/main.c  |    2 +-
- .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   11 +-
- .../net/wireless/mediatek/mt76/mt7915/mcu.h   |   31 +-
- .../net/wireless/mediatek/mt76/mt7915/mmio.c  |    2 +
- .../wireless/mediatek/mt76/mt7915/mt7915.h    |   14 +-
- .../net/wireless/mediatek/mt76/mt7915/regs.h  |    3 +
- .../wireless/mediatek/mt76/mt7915/testmode.c  | 1136 +++++++++++++++--
- .../wireless/mediatek/mt76/mt7915/testmode.h  |  278 ++++
- drivers/net/wireless/mediatek/mt76/testmode.c |  274 +++-
- drivers/net/wireless/mediatek/mt76/testmode.h |   75 ++
- .../net/wireless/mediatek/mt76/tools/fields.c |   80 ++
- drivers/net/wireless/mediatek/mt76/tx.c       |    3 +-
+ dma.c             |    3 +-
+ mac80211.c        |   12 +
+ mt76.h            |  111 ++++-
+ mt76_connac_mcu.c |    4 +
+ mt76_connac_mcu.h |    2 +
+ mt7915/init.c     |    2 +-
+ mt7915/mac.c      |   37 +-
+ mt7915/main.c     |    2 +-
+ mt7915/mcu.c      |   11 +-
+ mt7915/mcu.h      |   31 +-
+ mt7915/mmio.c     |    2 +
+ mt7915/mt7915.h   |   14 +-
+ mt7915/regs.h     |    3 +
+ mt7915/testmode.c | 1136 ++++++++++++++++++++++++++++++++++++++++++---
+ mt7915/testmode.h |  278 +++++++++++
+ testmode.c        |  274 +++++++++--
+ testmode.h        |   75 +++
+ tools/fields.c    |   80 ++++
+ tx.c              |    3 +-
  19 files changed, 1928 insertions(+), 152 deletions(-)
 
 diff --git a/dma.c b/dma.c
@@ -41,7 +41,7 @@
  #endif
  
 diff --git a/mac80211.c b/mac80211.c
-index 31602d7f..49b99f36 100644
+index 8c90db87..022b63e7 100644
 --- a/mac80211.c
 +++ b/mac80211.c
 @@ -55,6 +55,13 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
@@ -71,7 +71,7 @@
  
  static const struct ieee80211_channel mt76_channels_6ghz[] = {
 diff --git a/mt76.h b/mt76.h
-index 8f6279c5..3d1e893d 100644
+index 28720ee4..062c5ce4 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -602,6 +602,21 @@ struct mt76_testmode_ops {
@@ -277,10 +277,10 @@
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
  };
 diff --git a/mt7915/init.c b/mt7915/init.c
-index e4f6617f..25a9b5de 100644
+index 80ada114..d90a2e47 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -573,7 +573,7 @@ static void mt7915_init_work(struct work_struct *work)
+@@ -575,7 +575,7 @@ static void mt7915_init_work(struct work_struct *work)
  	struct mt7915_dev *dev = container_of(work, struct mt7915_dev,
  				 init_work);
  
@@ -290,7 +290,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 ffb0037b..12afb204 100644
+index a9ebbf12..af72e268 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -914,17 +914,39 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
@@ -356,7 +356,7 @@
  }
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index f2a6d9da..942b8a9a 100644
+index 082e27d4..55b4cefe 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -221,7 +221,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
@@ -369,7 +369,7 @@
  		mvif->mt76.wmm_idx += 2;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8a3bd33f..8ed8700d 100755
+index 5e7b3f4a..17a36ea3 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -360,7 +360,6 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
@@ -400,7 +400,7 @@
  	    !rxd->seq)
  		mt7915_mcu_rx_unsolicited_event(dev, skb);
  	else
-@@ -3030,14 +3035,14 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
+@@ -3105,14 +3110,14 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
  	return 0;
  }
  
@@ -418,7 +418,7 @@
  
  	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EFUSE_BUFFER_MODE),
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index adf71f10..82c21168 100644
+index 44d3722e..9aa133a3 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -27,10 +27,15 @@ struct mt7915_mcu_txd {
@@ -437,7 +437,7 @@
  };
  
  struct mt7915_mcu_rxd {
-@@ -455,6 +460,12 @@ enum {
+@@ -467,6 +472,12 @@ enum {
  
  enum {
  	MT_BF_SOUNDING_ON = 1,
@@ -450,7 +450,7 @@
  	MT_BF_TYPE_UPDATE = 20,
  	MT_BF_MODULE_UPDATE = 25
  };
-@@ -681,12 +692,20 @@ struct mt7915_muru {
+@@ -697,12 +708,20 @@ struct mt7915_muru {
  #define MURU_OFDMA_SCH_TYPE_DL          BIT(0)
  #define MURU_OFDMA_SCH_TYPE_UL          BIT(1)
  
@@ -478,10 +478,10 @@
  
  enum {
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index b3de3a7a..bbf8b16c 100644
+index ba61ce2e..995c9ee0 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -73,6 +73,7 @@ static const u32 mt7915_offs[] = {
+@@ -76,6 +76,7 @@ static const u32 mt7915_offs[] = {
  	[ARB_DRNGR0]		= 0x194,
  	[ARB_SCR]		= 0x080,
  	[RMAC_MIB_AIRTIME14]	= 0x3b8,
@@ -489,7 +489,7 @@
  	[AGG_AWSCR0]		= 0x05c,
  	[AGG_PCR0]		= 0x06c,
  	[AGG_ACR0]		= 0x084,
-@@ -147,6 +148,7 @@ static const u32 mt7916_offs[] = {
+@@ -150,6 +151,7 @@ static const u32 mt7916_offs[] = {
  	[ARB_DRNGR0]		= 0x1e0,
  	[ARB_SCR]		= 0x000,
  	[RMAC_MIB_AIRTIME14]	= 0x0398,
@@ -498,10 +498,10 @@
  	[AGG_PCR0]		= 0x040,
  	[AGG_ACR0]		= 0x054,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index cf0630c8..4b375629 100644
+index ae5ac72f..c99e700d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -294,6 +294,9 @@ struct mt7915_phy {
+@@ -304,6 +304,9 @@ struct mt7915_phy {
  		u8 last_snr;
  
  		u8 spe_idx;
@@ -511,7 +511,7 @@
  	} test;
  #endif
  
-@@ -382,6 +385,14 @@ struct mt7915_dev {
+@@ -395,6 +398,14 @@ struct mt7915_dev {
  	void __iomem *dcm;
  	void __iomem *sku;
  
@@ -526,7 +526,7 @@
  #ifdef MTK_DEBUG
  	u16 wlan_idx;
  	struct {
-@@ -572,7 +583,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -585,7 +596,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
  				   struct ieee80211_vif *vif,
  				   struct ieee80211_sta *sta,
  				   void *data, u32 field);
@@ -535,7 +535,7 @@
  int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset);
  int mt7915_mcu_get_eeprom_free_block(struct mt7915_dev *dev, u8 *block_num);
  int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
-@@ -605,6 +616,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -618,6 +629,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
  int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
  void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
  void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -544,10 +544,10 @@
  static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
  {
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 99834310..6ba5e9fe 100644
+index 47bae86e..444440e1 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -50,6 +50,7 @@ enum offs_rev {
+@@ -51,6 +51,7 @@ enum offs_rev {
  	ARB_DRNGR0,
  	ARB_SCR,
  	RMAC_MIB_AIRTIME14,
@@ -555,7 +555,7 @@
  	AGG_AWSCR0,
  	AGG_PCR0,
  	AGG_ACR0,
-@@ -458,6 +459,8 @@ enum offs_rev {
+@@ -467,6 +468,8 @@ enum offs_rev {
  #define MT_WF_AGG_BASE(_band)		((_band) ? 0x820f2000 : 0x820e2000)
  #define MT_WF_AGG(_band, ofs)		(MT_WF_AGG_BASE(_band) + (ofs))
  
@@ -2888,5 +2888,5 @@
  			wake_up(&dev->tx_wait);
  
 -- 
-2.25.1
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
similarity index 64%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
index 48b94cf..373557f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1112-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
@@ -1,17 +1,17 @@
-From af3f27909f812bcad1747429767e2521bc889465 Mon Sep 17 00:00:00 2001
+From 3b98e75fc0a9dfd1fbd36bdd98b73bd8bae00f18 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 2/5] mt76: mt7915: init rssi in WTBL when add station
+Subject: [PATCH 1112/1115] mt76: mt7915: init rssi in WTBL when add station
 
 ---
- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 ++++
+ mt7915/main.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 942b8a9a..64ba70fb 100644
+index 55b4cefe..e2a3af4d 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -661,6 +661,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -663,6 +663,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	struct mt7915_phy *phy;
  #endif
  	int ret, idx;
@@ -19,7 +19,7 @@
  
  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
  	if (idx < 0)
-@@ -682,6 +683,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -684,6 +685,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  	if (ret)
  		return ret;
  
@@ -30,5 +30,5 @@
  	mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
  #endif
 -- 
-2.25.1
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch
similarity index 72%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch
index 48303f7..17142a1 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1113-mt76-mt7915-drop-packets-when-TWT-stations-use-more-.patch
@@ -1,19 +1,19 @@
-From 077abb918aa653fa04d5e0acb08c31619a42e329 Mon Sep 17 00:00:00 2001
+From 7d082308e57e467607e4ca9e63938fea0eb00306 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Mon, 16 May 2022 10:03:36 +0800
-Subject: [PATCH 3/5] mt76: mt7915: drop packets when TWT stations use more
- tokens than 128
+Date: Mon, 6 Jun 2022 20:20:55 +0800
+Subject: [PATCH 1113/1115] mt76: mt7915: drop packets when TWT stations use
+ more tokens than 128
 
 ---
- .../net/wireless/mediatek/mt76/mt7915/mac.c   | 21 ++++++++++++++++---
- .../wireless/mediatek/mt76/mt7915/mt7915.h    |  2 ++
+ mt7915/mac.c    | 21 ++++++++++++++++++---
+ mt7915/mt7915.h |  2 ++
  2 files changed, 20 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 12afb204..d80ef1b3 100644
+index af72e268..bae700eb 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1315,6 +1315,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1322,6 +1322,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
  	struct ieee80211_key_conf *key = info->control.hw_key;
  	struct ieee80211_vif *vif = info->control.vif;
@@ -21,7 +21,7 @@
  	struct mt76_txwi_cache *t;
  	struct mt7915_txp *txp;
  	int id, i, nbuf = tx_info->nbuf - 1;
-@@ -1328,8 +1329,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1335,8 +1336,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  		wcid = &dev->mt76.global_wcid;
  
  	if (sta) {
@@ -30,7 +30,7 @@
  		msta = (struct mt7915_sta *)sta->drv_priv;
  
  		if (time_after(jiffies, msta->jiffies + HZ / 4)) {
-@@ -1345,10 +1344,22 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1352,10 +1351,22 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	    mgmt->u.action.category == 0xff)
  		return -1;
  
@@ -51,9 +51,9 @@
 +	spin_unlock_bh(&mdev->token_lock);
 +
  	pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
- 	mt7915_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, pid, key,
- 			      false);
-@@ -1540,6 +1551,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+ 	mt7915_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, pid, key, 0);
+ 
+@@ -1546,6 +1557,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  	struct mt76_dev *mdev = &dev->mt76;
  	struct mt76_txwi_cache *txwi;
  	struct ieee80211_sta *sta = NULL;
@@ -61,7 +61,7 @@
  	LIST_HEAD(free_list);
  	void *end = data + len;
  	bool v3, wake = false;
-@@ -1563,7 +1575,6 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -1569,7 +1581,6 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  		 * 1'b0: msdu_id with the same 'wcid pair' as above.
  		 */
  		if (info & MT_TX_FREE_PAIR) {
@@ -69,7 +69,7 @@
  			struct mt76_wcid *wcid;
  			u16 idx;
  
-@@ -1596,6 +1607,10 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -1602,6 +1613,10 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  			txwi = mt76_token_release(mdev, msdu, &wake);
  			if (!txwi)
  				continue;
@@ -81,10 +81,10 @@
  			mt7915_txwi_free(dev, txwi, sta, &free_list);
  		}
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 4b375629..6508cc26 100644
+index c99e700d..90391a07 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -136,6 +136,8 @@ struct mt7915_sta {
+@@ -137,6 +137,8 @@ struct mt7915_sta {
  		u8 flowid_mask;
  		struct mt7915_twt_flow flow[MT7915_MAX_STA_TWT_AGRT];
  	} twt;
@@ -94,5 +94,5 @@
  
  struct mt7915_vif_cap {
 -- 
-2.25.1
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-airtime-fairness-feature-off-in-mac80211.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-airtime-fairness-feature-off-in-mac80211.patch
similarity index 63%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-airtime-fairness-feature-off-in-mac80211.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-airtime-fairness-feature-off-in-mac80211.patch
index cef4bce..dfb8a1e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-airtime-fairness-feature-off-in-mac80211.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1114-mt76-airtime-fairness-feature-off-in-mac80211.patch
@@ -1,17 +1,17 @@
-From 945d3a873fb2b85a43592c88f6ccac5c81e3dbfb Mon Sep 17 00:00:00 2001
+From 110b036dfce5d60f59b02385a2d39c766921da30 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 4/5] mt76: airtime fairness feature off in mac80211
+Subject: [PATCH 1114/1115] mt76: airtime fairness feature off in mac80211
 
 ---
- drivers/net/wireless/mediatek/mt76/mac80211.c | 1 -
+ mac80211.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 49b99f36..e17b04b1 100644
+index 022b63e7..4b4d8b99 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -419,7 +419,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
+@@ -425,7 +425,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);
@@ -20,5 +20,5 @@
  
  	wiphy->available_antennas_tx = phy->antenna_mask;
 -- 
-2.25.1
+2.18.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
index 9920f01..8e53676 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1116-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1115-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
@@ -1,7 +1,7 @@
-From 8376a0a6abb778366fc1863f11acafdd918efb07 Mon Sep 17 00:00:00 2001
+From 33d4383e72491f7e8879c6e4334bf36c30704d18 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] mt76: mt7915: add mt7986 and mt7916 pre-calibration
+Subject: [PATCH 1115/1115] 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,
@@ -103,10 +103,10 @@
  
  #endif
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index d547cf6f..2f851669 100755
+index 17a36ea3..2b9797c8 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3122,9 +3122,10 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
+@@ -3203,9 +3203,10 @@ 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;
@@ -119,7 +119,7 @@
  		return 0;
  
  	/*
-@@ -3160,9 +3161,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
+@@ -3241,9 +3242,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
  	return -1;
  }
  
@@ -131,7 +131,7 @@
  		5180, 5200, 5220, 5240,
  		5260, 5280, 5300, 5320,
  		5500, 5520, 5540, 5560,
-@@ -3170,65 +3171,102 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
+@@ -3251,65 +3252,102 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
  		5660, 5680, 5700, 5745,
  		5765, 5785, 5805, 5825
  	};
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
index 7be7846..d637999 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3000-mt76-remove-WED-support-patch-for-build-err.patch
@@ -1,29 +1,29 @@
-From fba2423026ba723423ab2bab81e60eba4448ba57 Mon Sep 17 00:00:00 2001
+From 7caf2dd34d38bd98b5b1087c0f00ccdb009a461a Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
-Date: Tue, 12 Apr 2022 15:58:28 +0800
-Subject: [PATCH 5/5] mt76:remove WED support patch for build err
+Date: Mon, 6 Jun 2022 20:22:35 +0800
+Subject: [PATCH] mt76:remove WED support patch for build err
 
-Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
 ---
- drivers/net/wireless/mediatek/mt76/dma.c      | 160 ++++--------------
- drivers/net/wireless/mediatek/mt76/mac80211.c |   4 +-
- drivers/net/wireless/mediatek/mt76/mmio.c     |   9 +-
- drivers/net/wireless/mediatek/mt76/mt76.h     |  25 +--
- .../net/wireless/mediatek/mt76/mt7603/dma.c   |   8 +-
- .../net/wireless/mediatek/mt76/mt7615/dma.c   |   6 +-
- .../net/wireless/mediatek/mt76/mt76x02_mmio.c |   4 +-
- .../net/wireless/mediatek/mt76/mt7915/dma.c   |  43 +----
- .../net/wireless/mediatek/mt76/mt7915/mac.c   | 129 +++-----------
- .../net/wireless/mediatek/mt76/mt7915/mac.h   |   2 -
- .../net/wireless/mediatek/mt76/mt7915/main.c  |  36 ----
- .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   3 -
- .../net/wireless/mediatek/mt76/mt7915/mmio.c  |  29 +---
- .../wireless/mediatek/mt76/mt7915/mt7915.h    |   2 -
- .../net/wireless/mediatek/mt76/mt7915/pci.c   |  96 +----------
- .../net/wireless/mediatek/mt76/mt7915/regs.h  |  17 +-
- .../net/wireless/mediatek/mt76/mt7921/dma.c   |   2 +-
- drivers/net/wireless/mediatek/mt76/tx.c       |  16 +-
+ dma.c           | 160 ++++++++++--------------------------------------
+ mac80211.c      |   4 +-
+ mmio.c          |   9 +--
+ mt76.h          |  25 ++------
+ mt7603/dma.c    |   8 +--
+ mt7615/dma.c    |   6 +-
+ mt76x02_mmio.c  |   4 +-
+ mt7915/dma.c    |  43 ++-----------
+ mt7915/mac.c    | 129 ++++++--------------------------------
+ mt7915/mac.h    |   2 -
+ mt7915/main.c   |  36 -----------
+ mt7915/mcu.c    |   3 -
+ mt7915/mmio.c   |  29 +++------
+ mt7915/mt7915.h |   2 -
+ mt7915/pci.c    |  96 +++--------------------------
+ mt7915/regs.h   |  17 +----
+ mt7921/dma.c    |   2 +-
+ tx.c            |  16 +----
  18 files changed, 94 insertions(+), 497 deletions(-)
+ mode change 100644 => 100755 mt7915/mcu.c
 
 diff --git a/dma.c b/dma.c
 index f6f5f129..3f7456b1 100644
@@ -232,10 +232,10 @@
  }
  EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
 diff --git a/mac80211.c b/mac80211.c
-index e17b04b1..1b9a400b 100644
+index 4b4d8b99..19a2b849 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -1594,7 +1594,7 @@ EXPORT_SYMBOL_GPL(mt76_get_antenna);
+@@ -1600,7 +1600,7 @@ EXPORT_SYMBOL_GPL(mt76_get_antenna);
  
  struct mt76_queue *
  mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
@@ -244,7 +244,7 @@
  {
  	struct mt76_queue *hwq;
  	int err;
-@@ -1603,8 +1603,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
+@@ -1609,8 +1609,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
  	if (!hwq)
  		return ERR_PTR(-ENOMEM);
  
@@ -274,7 +274,7 @@
  }
  EXPORT_SYMBOL_GPL(mt76_set_irq_mask);
 diff --git a/mt76.h b/mt76.h
-index 3d1e893d..3e299bd4 100644
+index 062c5ce4..ed1924c1 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -13,7 +13,6 @@
@@ -527,10 +527,10 @@
  		return ret;
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index d80ef1b3..9e6ac1f0 100644
+index bae700eb..094d10a5 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1407,29 +1407,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -1413,29 +1413,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	return 0;
  }
  
@@ -560,7 +560,7 @@
  static void
  mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
  {
-@@ -1463,7 +1440,7 @@ mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
+@@ -1469,7 +1446,7 @@ mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
  
  	txp = mt7915_txwi_to_txp(dev, t);
  	for (i = 0; i < txp->nbuf; i++)
@@ -569,7 +569,7 @@
  				 le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
  }
  
-@@ -1472,7 +1449,6 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
+@@ -1478,7 +1455,6 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
  		 struct ieee80211_sta *sta, struct list_head *free_list)
  {
  	struct mt76_dev *mdev = &dev->mt76;
@@ -577,7 +577,7 @@
  	struct mt76_wcid *wcid;
  	__le32 *txwi;
  	u16 wcid_idx;
-@@ -1485,24 +1461,13 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
+@@ -1491,24 +1467,13 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
  	if (sta) {
  		wcid = (struct mt76_wcid *)sta->drv_priv;
  		wcid_idx = wcid->idx;
@@ -605,7 +605,7 @@
  	__mt76_tx_complete_skb(mdev, wcid_idx, t->skb, free_list);
  
  out:
-@@ -1510,56 +1475,30 @@ out:
+@@ -1516,56 +1481,30 @@ out:
  	mt76_put_txwi(mdev, t);
  }
  
@@ -671,7 +671,7 @@
  
  	total = le16_get_bits(free->ctrl, MT_TX_FREE_MSDU_CNT);
  	v3 = (FIELD_GET(MT_TX_FREE_VER, txd) == 0x4);
-@@ -1616,38 +1555,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -1622,38 +1561,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  		}
  	}
  
@@ -717,7 +717,7 @@
  }
  
  static bool
-@@ -1827,9 +1745,6 @@ bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len)
+@@ -1833,9 +1751,6 @@ bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len)
  	case PKT_TYPE_TXRX_NOTIFY:
  		mt7915_mac_tx_free(dev, data, len);
  		return false;
@@ -727,7 +727,7 @@
  	case PKT_TYPE_TXS:
  		for (rxd += 2; rxd + 8 <= end; rxd += 8)
  		    mt7915_mac_add_txs(dev, rxd);
-@@ -1857,10 +1772,6 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
+@@ -1863,10 +1778,6 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
  		mt7915_mac_tx_free(dev, skb->data, skb->len);
  		napi_consume_skb(skb, 1);
  		break;
@@ -759,10 +759,10 @@
  #define MT_TX_FREE_LATENCY		GENMASK(12, 0)
  /* 0: success, others: dropped */
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 64ba70fb..770090a1 100644
+index 2d5a46d3..7da3eada 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1403,39 +1403,6 @@ out:
+@@ -1421,39 +1421,6 @@ out:
  	return ret;
  }
  
@@ -802,7 +802,7 @@
  const struct ieee80211_ops mt7915_ops = {
  	.tx = mt7915_tx,
  	.start = mt7915_start,
-@@ -1483,7 +1450,4 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1501,7 +1468,4 @@ const struct ieee80211_ops mt7915_ops = {
  	.sta_add_debugfs = mt7915_sta_add_debugfs,
  #endif
  	.set_radar_background = mt7915_set_radar_background,
@@ -811,10 +811,12 @@
 -#endif
  };
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8ed8700d..899d7de7 100755
+old mode 100644
+new mode 100755
+index 2b9797c8..9da3e85c
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2581,9 +2581,6 @@ int mt7915_run_firmware(struct mt7915_dev *dev)
+@@ -2656,9 +2656,6 @@ int mt7915_run_firmware(struct mt7915_dev *dev)
  	if (ret)
  		return ret;
  
@@ -825,10 +827,10 @@
  	if (ret)
  		return ret;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index bbf8b16c..a795dda3 100644
+index 995c9ee0..4d196d74 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
-@@ -557,21 +557,15 @@ static void mt7915_rx_poll_complete(struct mt76_dev *mdev,
+@@ -560,21 +560,15 @@ static void mt7915_rx_poll_complete(struct mt76_dev *mdev,
  static void mt7915_irq_tasklet(struct tasklet_struct *t)
  {
  	struct mt7915_dev *dev = from_tasklet(dev, t, irq_tasklet);
@@ -856,7 +858,7 @@
  
  	if (dev->hif2) {
  		intr1 = mt76_rr(dev, MT_INT1_SOURCE_CSR);
-@@ -625,15 +619,10 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
+@@ -628,15 +622,10 @@ static void mt7915_irq_tasklet(struct tasklet_struct *t)
  irqreturn_t mt7915_irq_handler(int irq, void *dev_instance)
  {
  	struct mt7915_dev *dev = dev_instance;
@@ -876,10 +878,10 @@
  	if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
  		return IRQ_NONE;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 6508cc26..d6c9e7ed 100644
+index 90391a07..02a8c424 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -528,8 +528,6 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -541,8 +541,6 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
  void mt7915_wfsys_reset(struct mt7915_dev *dev);
  irqreturn_t mt7915_irq_handler(int irq, void *dev_instance);
  u64 __mt7915_get_tsf(struct ieee80211_hw *hw, struct mt7915_vif *mvif);
@@ -889,7 +891,7 @@
  void mt7915_unregister_device(struct mt7915_dev *dev);
  int mt7915_eeprom_init(struct mt7915_dev *dev);
 diff --git a/mt7915/pci.c b/mt7915/pci.c
-index f6222ef1..1bab1cbb 100644
+index d74f6097..7cea49f2 100644
 --- a/mt7915/pci.c
 +++ b/mt7915/pci.c
 @@ -12,9 +12,6 @@
@@ -1010,9 +1012,9 @@
 -		goto free_wed_or_irq_vector;
 +		goto free_irq_vector;
  
- 	mt76_wr(dev, MT_INT_MASK_CSR, 0);
- 
-@@ -253,11 +174,8 @@ free_hif2:
+ 	/* master switch of PCIe tnterrupt enable */
+ 	mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
+@@ -251,11 +172,8 @@ free_hif2:
  	if (dev->hif2)
  		put_device(dev->hif2->dev);
  	devm_free_irq(mdev->dev, irq, dev);
@@ -1027,10 +1029,10 @@
  	mt76_free_device(&dev->mt76);
  
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 6ba5e9fe..0e1e05f9 100644
+index 444440e1..1e7fbcee 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -594,31 +594,18 @@ enum offs_rev {
+@@ -603,31 +603,18 @@ enum offs_rev {
  
  /* WFDMA CSR */
  #define MT_WFDMA_EXT_CSR_BASE		__REG(WFDMA_EXT_CSR_ADDR)
@@ -1114,5 +1116,5 @@
  	    dev->phy.q_tx[0]->blocked)
  		*wake = true;
 -- 
-2.25.1
+2.18.0