[][MAC80211][mt76][refactor internal patches]

[Description]
Fix patch fails and build errors for rebasing the internal patches to
the latest mt76 codebase.

[Release-log]
N/A

Change-Id: I23d60090954fa9869a0e0222e3e045cc6d195271
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6144109
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 abdd03f..94b6063 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,16 +1,16 @@
-From 31be26088119f67efdc8dcb79c64765abb10d356 Mon Sep 17 00:00:00 2001
+From 5a498af3e4f021f1554c7ffa57272aa89dcdad14 Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Mon, 6 Jun 2022 19:46:26 +0800
-Subject: [PATCH 1/7] mt76: mt7915: rework testmode init registers
+Subject: [PATCH 01/11] mt76: mt7915: rework testmode init registers
 
 ---
- mt7915/mmio.c     |  2 ++
- mt7915/regs.h     | 16 +++++++++++++--
- mt7915/testmode.c | 52 ++++++++++++++++++++++++++++++++++-------------
+ .../net/wireless/mediatek/mt76/mt7915/mmio.c  |  2 +
+ .../net/wireless/mediatek/mt76/mt7915/regs.h  | 16 +++++-
+ .../wireless/mediatek/mt76/mt7915/testmode.c  | 52 ++++++++++++++-----
  3 files changed, 54 insertions(+), 16 deletions(-)
 
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 46ee8a7d..71945ba9 100644
+index c2646d24..a8e3810e 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -59,6 +59,7 @@ static const u32 mt7986_reg[] = {
@@ -78,7 +78,7 @@
  #define MT_AGG_ACR0(_band)		MT_WF_AGG(_band, __OFFS(AGG_ACR0))
  #define MT_AGG_ACR_CFEND_RATE		GENMASK(13, 0)
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 20f63644..8d7ec9e8 100644
+index 0f5c1e5b..20c593d0 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -30,7 +30,7 @@ struct reg_band {
@@ -90,7 +90,7 @@
  static struct reg_band reg_backup_list[TM_REG_MAX_ID];
  
  
-@@ -334,7 +334,7 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
+@@ -335,7 +335,7 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
  {
  	int n_regs = ARRAY_SIZE(reg_backup_list);
  	struct mt7915_dev *dev = phy->dev;
@@ -99,7 +99,7 @@
  	int i;
  
  	REG_BAND_IDX(reg_backup_list[0], AGG_PCR0, 0);
-@@ -346,18 +346,28 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
+@@ -347,18 +347,28 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
  	REG_BAND(reg_backup_list[6], AGG_MRCR);
  	REG_BAND(reg_backup_list[7], TMAC_TFCR0);
  	REG_BAND(reg_backup_list[8], TMAC_TCR0);
@@ -138,7 +138,7 @@
  		return;
  	}
  
-@@ -377,8 +387,13 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
+@@ -378,8 +388,13 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
  		   MT_AGG_PCR0_BW40_PROT | MT_AGG_PCR0_BW80_PROT);
  	mt76_set(dev, MT_AGG_PCR0(phy->band_idx, 0), MT_AGG_PCR0_PTA_WIN_DIS);
  
@@ -154,7 +154,7 @@
  
  	mt76_clear(dev, MT_AGG_MRCR(phy->band_idx), MT_AGG_MRCR_BAR_CNT_LIMIT |
  		   MT_AGG_MRCR_LAST_RTS_CTS_RN | MT_AGG_MRCR_RTS_FAIL_LIMIT |
-@@ -391,10 +406,19 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
+@@ -392,10 +407,19 @@ mt7915_tm_reg_backup_restore(struct mt7915_phy *phy)
  
  	mt76_wr(dev, MT_TMAC_TFCR0(phy->band_idx), 0);
  	mt76_clear(dev, MT_TMAC_TCR0(phy->band_idx), MT_TMAC_TCR0_TBTT_STOP_CTRL);
@@ -175,5 +175,5 @@
  
  static void
 -- 
-2.18.0
+2.25.1
 
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 61256ba..64fca3e 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,19 +1,19 @@
-From ce19a95831eeb721ce52bb913ac52bd5a0d88bab Mon Sep 17 00:00:00 2001
+From 5fef96ecd9dfc88f21a41d01319dc934f66bd098 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/7] mt76: testmode: rework tx antenna setting
+Subject: [PATCH 02/11] mt76: testmode: rework tx antenna setting
 
 ---
- mt7915/mcu.c      | 7 +------
- mt7915/testmode.c | 9 +--------
- testmode.c        | 4 ++--
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c      | 7 +------
+ drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 9 +--------
+ drivers/net/wireless/mediatek/mt76/testmode.c        | 4 ++--
  3 files changed, 4 insertions(+), 16 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2a88c14b..bdef2b37 100644
+index 552352dd..f513005b 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2933,14 +2933,9 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
+@@ -2637,14 +2637,9 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
  
  #ifdef CONFIG_NL80211_TESTMODE
  	if (phy->mt76->test.tx_antenna_mask &&
@@ -30,10 +30,10 @@
  #endif
  
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 8d7ec9e8..d6f71436 100644
+index 20c593d0..b8c1da19 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
-@@ -473,11 +473,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -474,11 +474,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
  		if (td->tx_spe_idx) {
  			phy->test.spe_idx = td->tx_spe_idx;
  		} else {
@@ -46,7 +46,7 @@
  		}
  	}
  
-@@ -728,9 +724,6 @@ mt7915_tm_set_params(struct mt76_phy *mphy, struct nlattr **tb,
+@@ -729,9 +725,6 @@ mt7915_tm_set_params(struct mt76_phy *mphy, struct nlattr **tb,
  	    td->state == MT76_TM_STATE_OFF)
  		return 0;
  
@@ -72,5 +72,5 @@
  	    mt76_tm_get_u8(tb[MT76_TM_ATTR_TX_DUTY_CYCLE],
  			   &td->tx_duty_cycle, 0, 99) ||
 -- 
-2.18.0
+2.25.1
 
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 fd20055..b09c8dd 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,24 +1,24 @@
-From ab8812a820a8b001d5abeb4d73b46db8e6453451 Mon Sep 17 00:00:00 2001
+From fee99898576c5a91a3d729aa9d0b88334c72ee36 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/7] mt76: mt7915: rework rx testmode stats
+Subject: [PATCH 03/11] mt76: mt7915: rework rx testmode stats
 
 ---
- mac80211.c        |  3 +-
- mt76.h            |  5 +++
- mt76_connac_mcu.h |  1 +
- mt7915/mcu.h      |  1 +
- mt7915/testmode.c | 82 ++++++++++++++++++++++++++++++++++++++---------
- mt7915/testmode.h | 28 ++++++++++++++++
- testmode.c        |  3 ++
- testmode.h        |  3 ++
+ drivers/net/wireless/mediatek/mt76/mac80211.c |  3 +-
+ drivers/net/wireless/mediatek/mt76/mt76.h     |  5 ++
+ .../wireless/mediatek/mt76/mt76_connac_mcu.h  |  1 +
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |  1 +
+ .../wireless/mediatek/mt76/mt7915/testmode.c  | 82 +++++++++++++++----
+ .../wireless/mediatek/mt76/mt7915/testmode.h  | 28 +++++++
+ drivers/net/wireless/mediatek/mt76/testmode.c |  3 +
+ drivers/net/wireless/mediatek/mt76/testmode.h |  3 +
  8 files changed, 109 insertions(+), 17 deletions(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 5515e169..8c90db87 100644
+index 57e91565..5782244d 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -745,7 +745,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
+@@ -747,7 +747,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
  	}
  
  #ifdef CONFIG_NL80211_TESTMODE
@@ -59,10 +59,10 @@
  };
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 561fb036..aa14d2d4 100644
+index f1d7c05b..e94d6706 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -979,6 +979,7 @@ enum {
+@@ -1130,6 +1130,7 @@ enum {
  	MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
  	MCU_EXT_CMD_SET_RDD_TH = 0x9d,
  	MCU_EXT_CMD_MURU_CTRL = 0x9f,
@@ -71,10 +71,10 @@
  	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 5abde482..21aa9633 100644
+index da4ee0ac..bd9c6dcc 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -28,6 +28,7 @@ struct mt7915_mcu_txd {
+@@ -9,6 +9,7 @@
  enum {
  	MCU_ATE_SET_TRX = 0x1,
  	MCU_ATE_SET_FREQ_OFFSET = 0xa,
@@ -83,7 +83,7 @@
  	MCU_ATE_CLEAN_TXQUEUE = 0x1c,
  };
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index d6f71436..e8bf616c 100644
+index b8c1da19..123ceaf9 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -133,6 +133,21 @@ mt7915_tm_clean_hwq(struct mt7915_phy *phy, u8 wcid)
@@ -108,7 +108,7 @@
  static int
  mt7915_tm_set_slot_time(struct mt7915_phy *phy, u8 slot_time, u8 sifs)
  {
-@@ -438,6 +453,8 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
+@@ -439,6 +454,8 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
  	mt7915_mcu_add_bss_info(phy, phy->monitor_vif, en);
  	mt7915_mcu_add_sta(dev, phy->monitor_vif, NULL, en);
  
@@ -117,7 +117,7 @@
  	if (!en)
  		mt7915_tm_set_tam_arb(phy, en, 0);
  }
-@@ -503,18 +520,63 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -504,18 +521,63 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
  	mt7915_tm_set_trx(phy, TM_MAC_TX, en);
  }
  
@@ -184,7 +184,7 @@
  		mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, en);
  	}
  }
-@@ -738,12 +800,8 @@ static int
+@@ -739,12 +801,8 @@ static int
  mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
  {
  	struct mt7915_phy *phy = mphy->priv;
@@ -197,7 +197,7 @@
  
  	rx = nla_nest_start(msg, MT76_TM_STATS_ATTR_LAST_RX);
  	if (!rx)
-@@ -787,15 +845,7 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
+@@ -788,15 +846,7 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
  
  	nla_nest_end(msg, rx);
  
@@ -301,5 +301,5 @@
  	/* keep last */
  	NUM_MT76_TM_STATS_ATTRS,
 -- 
-2.18.0
+2.25.1
 
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 acf3a52..9270b0d 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 51cffe3e010931c8f070a101ece043072bed2512 Mon Sep 17 00:00:00 2001
+From 6d03d29acbfbfebbdf11ddedcfc6e5e9a550a84c 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/7] mt76: mt7915: fix tx descriptor
+Subject: [PATCH 04/11] mt76: mt7915: fix tx descriptor
 
 ---
- mt7915/mac.c | 1 +
+ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index a57d2732..a3cf1b74 100644
+index b280b0e9..9092b40f 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1002,6 +1002,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -653,6 +653,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;
  
@@ -20,5 +20,5 @@
  	txwi[6] |= cpu_to_le32(val);
  	txwi[7] |= cpu_to_le32(FIELD_PREP(MT_TXD7_SPE_IDX,
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0005-mt76-mt7915-drop-undefined-action-frame.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0005-mt76-mt7915-drop-undefined-action-frame.patch
index cfb0764..e65db45 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0005-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 65c8978578ae5a485455617e5598ec83c2d519ae Mon Sep 17 00:00:00 2001
+From 169c87faf30925e8bdd4a841143a7cd640d892ca 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 5/7] mt76: mt7915: drop undefined action frame
+Subject: [PATCH 05/11] mt76: mt7915: drop undefined action frame
 
 ---
- mt7915/mac.c | 6 ++++++
+ drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 6 ++++++
  1 file changed, 6 insertions(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index a3cf1b74..b0e86968 100644
+index 9092b40f..6a4da8e6 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1281,6 +1281,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -683,6 +683,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;
-@@ -1311,6 +1313,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -713,6 +715,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;
  
@@ -32,5 +32,5 @@
  	if (id < 0)
  		return id;
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0006-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
index 5758ac2..f5c6a0f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0006-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,22 +1,22 @@
-From 29eed004474096aa960336f7850dc0bad49eda6a Mon Sep 17 00:00:00 2001
+From fbb9cf16ce6656345047b7c09c2bca02df9130d3 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 6/7] mt76: mt7915: add the maximum size of beacon offload
+Subject: [PATCH 06/11] mt76: mt7915: add the maximum size of beacon offload
 
 add the maximum size of beacon offload to avoid exceeding the size limit
 
 Signed-off-by: Money Wang <Money.Wang@mediatek.com>
 Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 ---
- mt7915/mcu.c | 11 +++++++++--
- mt7915/mcu.h |  3 +++
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 11 +++++++++--
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.h |  3 +++
  2 files changed, 12 insertions(+), 2 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index bdef2b37..81559002 100644
+index f513005b..3a88638f 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
+@@ -1937,6 +1937,13 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
  	len = sizeof(*discov) + MT_TXD_SIZE + skb->len;
  	len = (len & 0x3) ? ((len | 0x3) + 1) : len;
  
@@ -30,7 +30,7 @@
  	tlv = mt7915_mcu_add_nested_subtlv(rskb, BSS_INFO_BCN_DISCOV,
  					   len, &bcn->sub_ntlv, &bcn->len);
  	discov = (struct bss_info_inband_discovery *)tlv;
-@@ -2059,7 +2066,6 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -1959,7 +1966,6 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
  int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			  int en, u32 changed)
  {
@@ -38,7 +38,7 @@
  	struct mt7915_dev *dev = mt7915_hw_dev(hw);
  	struct mt7915_phy *phy = mt7915_hw_phy(hw);
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-@@ -2068,7 +2074,8 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -1968,7 +1974,8 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  	struct sk_buff *skb, *rskb;
  	struct tlv *tlv;
  	struct bss_info_bcn *bcn;
@@ -49,10 +49,10 @@
  
  	if (vif->bss_conf.nontransmitted)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 21aa9633..d46c8da4 100644
+index bd9c6dcc..b82f2581 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -490,6 +490,9 @@ enum {
+@@ -453,6 +453,9 @@ enum {
  	SER_RECOVER
  };
  
@@ -63,5 +63,5 @@
  					 sizeof(struct bss_info_omac) +	\
  					 sizeof(struct bss_info_basic) +\
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-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
index 371424b..2282405 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-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,20 +1,20 @@
-From 173ee8c64b2e4cac133df1fbb1fd676c933fb7b1 Mon Sep 17 00:00:00 2001
+From 86648ca31161ecf87b21fe54e462120198e5cc21 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 7/7] mt76: mt7915: update mpdu density in 6g capability
+Subject: [PATCH 07/11] mt76: mt7915: update mpdu density in 6g capability
 
 Set mpdu density to 2 usec in 6g capability.
 
 Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
 ---
- mt7915/init.c | 2 +-
+ drivers/net/wireless/mediatek/mt76/mt7915/init.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index b4727526..66884be0 100644
+index 39936b3b..8554c9dc 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -980,7 +980,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+@@ -982,7 +982,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;
  
@@ -24,5 +24,5 @@
  			       u16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K,
  					       IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP) |
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0008-mt76-common-RF-CR-idx-require-8-bits.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0008-mt76-common-RF-CR-idx-require-8-bits.patch
index cef3c72..5375432 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0008-mt76-common-RF-CR-idx-require-8-bits.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0008-mt76-common-RF-CR-idx-require-8-bits.patch
@@ -1,18 +1,18 @@
-From 01508ed2c2fb03cdacd855c5a870133cc04048f5 Mon Sep 17 00:00:00 2001
+From 43a9ad408f0daaa522b14b9c5f3aacb2acd0b929 Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Mon, 13 Jun 2022 23:10:26 +0800
-Subject: [PATCH] mt76: common: RF CR idx require 8 bits
+Subject: [PATCH 08/11] mt76: common: RF CR idx require 8 bits
 
 Change-Id: I95af9cca36052be090be776868822d0a74377c9d
 ---
- mt7915/mcu.c | 4 ++--
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9da3e85..3615195 100644
+index 3a88638f..1b7a630a 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4479,8 +4479,8 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
+@@ -3444,8 +3444,8 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
  		__le32 ofs;
  		__le32 data;
  	} __packed req = {
@@ -24,5 +24,5 @@
  	};
  	struct sk_buff *skb;
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-check-starec-newly.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0009-check-starec-newly.patch
index ed3059e..1662f75 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-check-starec-newly.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0009-check-starec-newly.patch
@@ -1,18 +1,18 @@
-From 03a261c28f08e5c8aae5e4dde8f5f45e841fb0de Mon Sep 17 00:00:00 2001
+From 35a89b4db0a8df5af61018fa7ebc47a889d08cdf Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Wed, 15 Jun 2022 23:15:13 +0800
-Subject: [PATCH] check starec newly
+Subject: [PATCH 09/11] check starec newly
 
 ---
- mt7915/main.c | 2 +-
- mt7915/mcu.c  | 4 +++-
+ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c  | 4 +++-
  2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 7da3eada..9feba0d6 100644
+index 79349817..39587992 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -247,7 +247,6 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
+@@ -235,7 +235,6 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
  	mt7915_mac_wtbl_update(dev, idx,
  			       MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
  
@@ -20,7 +20,7 @@
  	if (vif->txq) {
  		mtxq = (struct mt76_txq *)vif->txq->drv_priv;
  		mtxq->wcid = idx;
-@@ -263,6 +262,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
+@@ -251,6 +250,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
  
  	mt7915_mcu_add_bss_info(phy, vif, true);
  	mt7915_mcu_add_sta(dev, vif, NULL, true);
@@ -29,10 +29,10 @@
  out:
  	mutex_unlock(&dev->mt76.mutex);
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 36151959..ff5a73e3 100755
+index 1b7a630a..a726021e 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -1803,6 +1803,7 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1610,6 +1610,7 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
  	struct mt7915_sta *msta;
  	struct sk_buff *skb;
@@ -40,7 +40,7 @@
  	int ret;
  
  	msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta;
-@@ -1813,7 +1814,8 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1620,7 +1621,8 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
  		return PTR_ERR(skb);
  
  	/* starec basic */
@@ -51,5 +51,5 @@
  		goto out;
  
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-success-WDS.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-success-WDS.patch
deleted file mode 100755
index 5b61802..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0009-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-success-WDS.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 84ecaf8d9a4c7d0a1eae5b3b0ed20e171a58b3c7 Mon Sep 17 00:00:00 2001
-From: "lian.chen" <lian.chen@mediatek.com>
-Date: Thu, 16 Jun 2022 17:41:28 +0800
-Subject: [PATCH] mt76: mt7915: 4addr null frame using fixed rate to success WDS
-
----
- mt7915/mac.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 094d10a5..b0933625 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -1133,7 +1133,7 @@ mt7915_mac_write_txwi_80211(struct mt7915_dev *dev, __le32 *txwi,
- 		txwi[3] &= ~cpu_to_le32(MT_TXD3_PROTECT_FRAME);
- 	}
- 
--	if (!ieee80211_is_data(fc) || *mcast ||
-+	if (!ieee80211_is_data(fc) || *mcast || ((ieee80211_is_nullfunc(fc) && ieee80211_has_a4(fc))) ||
- 	    info->flags & IEEE80211_TX_CTL_USE_MINRATE)
- 		val |= MT_TXD2_FIX_RATE;
- 
--- 
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch
new file mode 100644
index 0000000..ce550a3
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0010-mt76-mt7915-4addr-null-frame-using-fixed-rate-to-suc.patch
@@ -0,0 +1,27 @@
+From e55a1b50333a925c64f78e59d582bfcb9af9372a Mon Sep 17 00:00:00 2001
+From: "lian.chen" <lian.chen@mediatek.com>
+Date: Wed, 22 Jun 2022 10:31:55 +0800
+Subject: [PATCH 10/11] mt76: mt7915: 4addr null frame using fixed rate to
+ success WDS
+
+---
+ drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
+index af2b33d7..27eaf224 100644
+--- a/mt76_connac_mac.c
++++ b/mt76_connac_mac.c
+@@ -393,7 +393,8 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
+ 	}
+ 
+ 	if (!ieee80211_is_data(fc) || multicast ||
+-	    info->flags & IEEE80211_TX_CTL_USE_MINRATE)
++	    info->flags & IEEE80211_TX_CTL_USE_MINRATE ||
++	    (ieee80211_is_nullfunc(fc) && ieee80211_has_a4(fc)))
+ 		val |= MT_TXD2_FIX_RATE;
+ 
+ 	txwi[2] |= cpu_to_le32(val);
+-- 
+2.25.1
+
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0011-mt76-do-not-check-the-ccmp-pn-for-ONLY_MONITOR-frame.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0011-mt76-do-not-check-the-ccmp-pn-for-ONLY_MONITOR-frame.patch
index 41149e4..65ccefe 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0011-mt76-do-not-check-the-ccmp-pn-for-ONLY_MONITOR-frame.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0011-mt76-do-not-check-the-ccmp-pn-for-ONLY_MONITOR-frame.patch
@@ -1,7 +1,7 @@
-From d3a089aa2c46bd58ab415c909e7232c0bffce74e Mon Sep 17 00:00:00 2001
+From 1c694d2fe3f98e08ebed1df18599be2b2885ccc6 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 20 Jun 2022 17:42:19 +0800
-Subject: [PATCH] mt76: do not check the ccmp pn for ONLY_MONITOR frame
+Subject: [PATCH 11/11] mt76: do not check the ccmp pn for ONLY_MONITOR frame
 
 if the received frame enables RX_FLAG_ONLY_MONITOR,
 driver doesn't need to check the ccmp pn of this frame.
@@ -9,14 +9,14 @@
 Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 Change-Id: I85abba5b66ef3b58739069e04830980384f805d1
 ---
- mac80211.c | 3 +++
+ drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/mac80211.c b/mac80211.c
-index 5515e16..35329c7 100644
+index 5782244d..c1df063f 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -1028,6 +1028,9 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
+@@ -1031,6 +1031,9 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
  	if (!(status->flag & RX_FLAG_DECRYPTED))
  		return 0;
  
@@ -27,5 +27,5 @@
  		return 0;
  
 -- 
-2.36.1
+2.25.1
 
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
index 77cbc39..b634866 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
@@ -1,31 +1,31 @@
-From a9cf0fd711fdccf35e6171dd4aba0eb7f6588148 Mon Sep 17 00:00:00 2001
-From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Mon, 6 Jun 2022 20:08:58 +0800
-Subject: [PATCH] mt76: mt7915: add mtk internal debug tools for mt76
+From 6bde2bca6b391d6e7e0b5d8599eedc136354e5c5 Mon Sep 17 00:00:00 2001
+From: Shayne Chen <shayne.chen@mediatek.com>
+Date: Wed, 22 Jun 2022 10:39:47 +0800
+Subject: [PATCH 1001/1008] mt76: mt7915: add mtk internal debug tools for mt76
 
 ---
- 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
+ .../wireless/mediatek/mt76/mt76_connac_mcu.h  |    6 +
+ .../wireless/mediatek/mt76/mt7915/Makefile    |    2 +-
+ .../wireless/mediatek/mt76/mt7915/debugfs.c   |   73 +-
+ .../net/wireless/mediatek/mt76/mt7915/mac.c   |   14 +
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   |   42 +
+ .../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, 4535 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
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index aa14d2d4..03134066 100644
+index e94d6706..333d3a04 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -968,6 +968,12 @@ enum {
+@@ -1119,6 +1119,12 @@ enum {
  	MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
  	MCU_EXT_CMD_RXDCOC_CAL = 0x59,
  	MCU_EXT_CMD_GET_MIB_INFO = 0x5a,
@@ -197,10 +197,10 @@
  
  	if (dev->relay_fwlog)
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index b0e86968..9e92b32f 100644
+index 6a4da8e6..c332e0a0 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)
+@@ -239,6 +239,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
  	__le16 fc = 0;
  	int idx;
  
@@ -211,7 +211,7 @@
  	memset(status, 0, sizeof(*status));
  
  	if ((rxd1 & MT_RXD1_NORMAL_BAND_IDX) && !phy->band_idx) {
-@@ -780,6 +784,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -421,6 +425,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
  	}
  
  	hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
@@ -220,9 +220,9 @@
 +		mt7915_packet_log_to_host(dev, skb->data, skb->len, PKT_BIN_DEBUG_RX, hdr_gap);
 +#endif
  	if (hdr_trans && ieee80211_has_morefrags(fc)) {
- 		if (mt7915_reverse_frag0_hdr_trans(skb, hdr_gap))
- 			return -EINVAL;
-@@ -1358,6 +1366,12 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+ 		struct ieee80211_vif *vif;
+ 		int err;
+@@ -760,6 +768,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,21 +238,22 @@
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
 old mode 100644
 new mode 100755
-index 81559002..6ec321e1
+index a726021e..e4c5b40c
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -298,6 +298,10 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
- 		mcu_txd->s2d_index = MCU_S2D_H2N;
+@@ -195,6 +195,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
+ 	else
+ 		qid = MT_MCUQ_WM;
  
- exit:
 +#ifdef MTK_DEBUG
 +	if (dev->dbg.dump_mcu_pkt)
 +		mt7915_packet_log_to_host(dev, skb->data, skb->len, PKT_BIN_DEBUG_MCU, 0);
 +#endif
- 	if (wait_seq)
- 		*wait_seq = seq;
++
+ 	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
+ }
  
-@@ -3733,6 +3737,43 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3439,6 +3444,43 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -297,10 +298,10 @@
  {
  	struct {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index d46c8da4..2f7007fd 100644
+index b82f2581..b2c51bfb 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -296,6 +296,10 @@ enum {
+@@ -259,6 +259,10 @@ enum {
  	MCU_WA_PARAM_PDMA_RX = 0x04,
  	MCU_WA_PARAM_CPU_UTIL = 0x0b,
  	MCU_WA_PARAM_RED = 0x0e,
@@ -312,7 +313,7 @@
  
  enum mcu_mmps_mode {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index bd985e6c..001a6015 100644
+index b6a6aa7f..2bc0e915 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -9,6 +9,7 @@
@@ -321,9 +322,9 @@
  
 +#define MTK_DEBUG 1
  #define MT7915_MAX_INTERFACES		19
- #define MT7915_MAX_WMM_SETS		4
  #define MT7915_WTBL_SIZE		288
-@@ -339,6 +340,27 @@ struct mt7915_dev {
+ #define MT7916_WTBL_SIZE		544
+@@ -338,6 +339,27 @@ struct mt7915_dev {
  	struct reset_control *rstc;
  	void __iomem *dcm;
  	void __iomem *sku;
@@ -351,7 +352,7 @@
  };
  
  enum {
-@@ -608,4 +630,23 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -592,4 +614,23 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			    struct ieee80211_sta *sta, struct dentry *dir);
  #endif
  
@@ -4830,5 +4831,5 @@
  	return ret;
  }
 -- 
-2.18.0
+2.25.1
 
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 44dc578..0b7a3be 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,27 +1,27 @@
-From fac076082992f4e6bf576b44778ad6d5c37d9abd Mon Sep 17 00:00:00 2001
+From 776a9607718423c9cf52c08bc137d08820f1e2d1 Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
 Date: Mon, 6 Jun 2022 20:13:02 +0800
-Subject: [PATCH 1002/1007] mt76: mt7915: csi: implement csi support
+Subject: [PATCH 1002/1008] mt76: mt7915: csi: implement csi support
 
 ---
- mt76_connac_mcu.h |   2 +
- mt7915/Makefile   |   4 +-
- mt7915/init.c     |  39 ++++
- mt7915/mcu.c      | 111 ++++++++++++
- mt7915/mcu.h      |  76 ++++++++
- mt7915/mt7915.h   |  20 ++
- mt7915/vendor.c   | 452 ++++++++++++++++++++++++++++++++++++++++++++++
- mt7915/vendor.h   |  60 ++++++
+ .../wireless/mediatek/mt76/mt76_connac_mcu.h  |   2 +
+ .../wireless/mediatek/mt76/mt7915/Makefile    |   4 +-
+ .../net/wireless/mediatek/mt76/mt7915/init.c  |  39 ++
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 111 +++++
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |  76 +++
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  20 +
+ .../wireless/mediatek/mt76/mt7915/vendor.c    | 452 ++++++++++++++++++
+ .../wireless/mediatek/mt76/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
+ mode change 100755 => 100644 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+ create mode 100644 drivers/net/wireless/mediatek/mt76/mt7915/vendor.c
+ create mode 100644 drivers/net/wireless/mediatek/mt76/mt7915/vendor.h
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 03134066..96591a8c 100644
+index 333d3a04..b25807a3 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -820,6 +820,7 @@ enum {
+@@ -971,6 +971,7 @@ enum {
  	MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
  	MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
  	MCU_EXT_EVENT_MURU_CTRL = 0x9f,
@@ -29,7 +29,7 @@
  };
  
  enum {
-@@ -990,6 +991,7 @@ enum {
+@@ -1141,6 +1142,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,
@@ -55,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 66884be0..258bb20a 100644
+index 8554c9dc..fa9568ca 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -541,6 +541,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
+@@ -542,6 +542,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);
  
@@ -71,7 +71,7 @@
  	ret = mt76_register_phy(mphy, true, mt76_rates,
  				ARRAY_SIZE(mt76_rates));
  	if (ret)
-@@ -1030,6 +1036,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
+@@ -1032,6 +1038,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
  	}
  }
  
@@ -97,7 +97,7 @@
  static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  {
  	struct mt7915_phy *phy = mt7915_ext_phy(dev);
-@@ -1038,6 +1063,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
+@@ -1040,6 +1065,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
  	if (!phy)
  		return;
  
@@ -108,7 +108,7 @@
  	mt7915_unregister_thermal(phy);
  	mt76_unregister_phy(mphy);
  	ieee80211_free_hw(mphy->hw);
-@@ -1050,6 +1079,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
+@@ -1052,6 +1081,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
  	mt7915_dma_cleanup(dev);
  	tasklet_disable(&dev->irq_tasklet);
  
@@ -119,7 +119,7 @@
  	if (is_mt7986(&dev->mt76))
  		mt7986_wmac_disable(dev);
  }
-@@ -1090,6 +1123,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1092,6 +1125,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
  	dev->mt76.test_ops = &mt7915_testmode_ops;
  #endif
  
@@ -135,10 +135,10 @@
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
 old mode 100755
 new mode 100644
-index 6ec321e1..18b05b2e
+index e4c5b40c..5e87db13
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -89,6 +89,10 @@ struct mt7915_fw_region {
+@@ -32,6 +32,10 @@
  #define HE_PHY(p, c)			u8_get_bits(c, IEEE80211_HE_PHY_##p)
  #define HE_MAC(m, c)			u8_get_bits(c, IEEE80211_HE_MAC_##m)
  
@@ -149,7 +149,7 @@
  static u8
  mt7915_mcu_get_sta_nss(u16 mcs_map)
  {
-@@ -453,6 +457,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -351,6 +355,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_FW_LOG_2_HOST:
  		mt7915_mcu_rx_log_message(dev, skb);
  		break;
@@ -161,7 +161,7 @@
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
-@@ -3737,6 +3746,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
+@@ -3444,6 +3453,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
  				 &req, sizeof(req), true);
  }
  
@@ -188,15 +188,15 @@
 +static int
 +mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
 +{
-+	struct mt7915_mcu_rxd *rxd = (struct mt7915_mcu_rxd *)skb->data;
++	struct mt76_connac2_mcu_rxd *rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
 +	struct mt7915_phy *phy = &dev->phy;
 +	struct mt7915_mcu_csi_report *cr;
 +	struct csi_data *csi;
 +	int len, i;
 +
-+	skb_pull(skb, sizeof(struct mt7915_mcu_rxd));
++	skb_pull(skb, sizeof(struct mt76_connac2_mcu_rxd));
 +
-+	len = le16_to_cpu(rxd->len) - sizeof(struct mt7915_mcu_rxd) + 24;
++	len = le16_to_cpu(rxd->len) - sizeof(struct mt76_connac2_mcu_rxd) + 24;
 +	if (len < sizeof(*cr))
 +		return -EINVAL;
 +
@@ -271,10 +271,10 @@
  int mt7915_dbg_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3, bool wait_resp)
  {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 2f7007fd..cb854b28 100644
+index b2c51bfb..ec8887b5 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -513,4 +513,80 @@ enum {
+@@ -476,4 +476,80 @@ enum {
  					 sizeof(struct bss_info_bcn_cont) + \
  					 sizeof(struct bss_info_inband_discovery))
  
@@ -356,10 +356,10 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 001a6015..ff957425 100644
+index 2bc0e915..bab44e13 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -277,6 +277,20 @@ struct mt7915_phy {
+@@ -276,6 +276,20 @@ struct mt7915_phy {
  		u8 spe_idx;
  	} test;
  #endif
@@ -380,7 +380,7 @@
  };
  
  struct mt7915_dev {
-@@ -630,6 +644,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -614,6 +628,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  			    struct ieee80211_sta *sta, struct dentry *dir);
  #endif
  
@@ -918,5 +918,5 @@
 +
 +#endif
 -- 
-2.18.0
+2.25.1
 
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 018c3f0..3bafdb7 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 2722263634d9890cfd956d924341c2239e1507b1 Mon Sep 17 00:00:00 2001
+From e3ff3fb461a37b3f85ced46aa13f2e4ee563533f 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/1007] mt76: mt7915: air monitor support
+Subject: [PATCH 1003/1008] mt76: mt7915: air monitor support
 
 ---
- 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 +++++
+ .../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 ++
  6 files changed, 440 insertions(+)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 96591a8c..1c24dbf4 100644
+index b25807a3..42425f75 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -991,6 +991,8 @@ enum {
+@@ -1142,6 +1142,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 9e92b32f..4989f437 100644
+index c332e0a0..69c226f0 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -835,6 +835,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -486,6 +486,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,7 +41,7 @@
  		status->flag |= RX_FLAG_8023;
  	}
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 79349817..7d4e7838 100644
+index 39587992..91c4370a 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -671,6 +671,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
@@ -55,10 +55,10 @@
  }
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index ff957425..ace01e15 100644
+index bab44e13..b2b9b7ec 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -232,6 +232,35 @@ struct mt7915_hif {
+@@ -231,6 +231,35 @@ struct mt7915_hif {
  	int irq;
  };
  
@@ -94,7 +94,7 @@
  struct mt7915_phy {
  	struct mt76_phy *mt76;
  	struct mt7915_dev *dev;
-@@ -290,6 +319,8 @@ struct mt7915_phy {
+@@ -289,6 +318,8 @@ struct mt7915_phy {
  		u32 interval;
  		u32 last_record;
  	} csi;
@@ -103,7 +103,7 @@
  #endif
  };
  
-@@ -648,6 +679,9 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -632,6 +663,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);
@@ -545,5 +545,5 @@
 +
  #endif
 -- 
-2.18.0
+2.25.1
 
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 72f8d24..c4355c5 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,22 +1,22 @@
-From 37b133c4d8fa05aae067dfb5fb68c24d3cabea2d Mon Sep 17 00:00:00 2001
+From bc23057e7ba6d15de91adc11be0093e672a87dbb 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 1004/1007] mt76: mt7915: add support for muru_onoff via
+Date: Wed, 22 Jun 2022 10:45:53 +0800
+Subject: [PATCH 1004/1008] mt76: mt7915: add support for muru_onoff via
  debugfs
 
 ---
- mt7915/init.c        |  1 +
- mt7915/mcu.c         | 12 ++++++++----
- mt7915/mcu.h         |  6 ++++++
- mt7915/mt7915.h      |  1 +
- mt7915/mtk_debugfs.c | 33 +++++++++++++++++++++++++++++++++
- 5 files changed, 49 insertions(+), 4 deletions(-)
+ .../net/wireless/mediatek/mt76/mt7915/init.c  |  1 +
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   |  9 +++--
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |  6 ++++
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  1 +
+ .../mediatek/mt76/mt7915/mtk_debugfs.c        | 33 +++++++++++++++++++
+ 5 files changed, 48 insertions(+), 2 deletions(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 258bb20a..2b8d758f 100644
+index fa9568ca..6e2a1c13 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -576,6 +576,7 @@ static void mt7915_init_work(struct work_struct *work)
+@@ -577,6 +577,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);
@@ -25,18 +25,10 @@
  
  void mt7915_wfsys_reset(struct mt7915_dev *dev)
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 18b05b2e..5df0b4fd 100644
+index 5e87db13..3ee1db4e 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,
- 			struct ieee80211_vif *vif)
- {
- 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-+	struct mt7915_dev *dev = mvif->phy->dev;
- 	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
- 	struct sta_rec_muru *muru;
- 	struct tlv *tlv;
-@@ -956,11 +957,14 @@ mt7915_mcu_sta_muru_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+@@ -856,13 +856,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
  
  	muru = (struct sta_rec_muru *)tlv;
  
@@ -44,22 +36,24 @@
 +	muru->cfg.mimo_dl_en = (mvif->cap.he_mu_ebfer ||
  			       mvif->cap.vht_mu_ebfer ||
 -			       mvif->cap.vht_mu_ebfee;
--	muru->cfg.mimo_ul_en = true;
--	muru->cfg.ofdma_dl_en = true;
 +			       mvif->cap.vht_mu_ebfee) &&
 +			       !!(dev->dbg.muru_onoff & MUMIMO_DL);
-+
+ 	if (!is_mt7915(&dev->mt76))
+ 		muru->cfg.mimo_ul_en = true;
+ 	muru->cfg.ofdma_dl_en = true;
+ 
 +	muru->cfg.mimo_ul_en = !!(dev->dbg.muru_onoff & MUMIMO_UL);
 +	muru->cfg.ofdma_dl_en = !!(dev->dbg.muru_onoff & OFDMA_DL);
 +	muru->cfg.ofdma_ul_en = !!(dev->dbg.muru_onoff & OFDMA_UL);
- 
++
  	if (sta->vht_cap.vht_supported)
  		muru->mimo_dl.vht_mu_bfee =
+ 			!!(sta->vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index cb854b28..0ff1fd11 100644
+index ec8887b5..92715b97 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -589,4 +589,10 @@ struct csi_data {
+@@ -552,4 +552,10 @@ struct csi_data {
  };
  #endif
  
@@ -71,10 +65,10 @@
 +
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index ace01e15..06f2737f 100644
+index b2b9b7ec..c4f8a6ad 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -403,6 +403,7 @@ struct mt7915_dev {
+@@ -402,6 +402,7 @@ struct mt7915_dev {
  		bool dump_rx_pkt;
  		bool dump_rx_raw;
  		u32 token_idx;
@@ -134,5 +128,5 @@
  			    &fops_fw_debug_module);
  	debugfs_create_file("fw_debug_level", 0600, dir, dev,
 -- 
-2.18.0
+2.25.1
 
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 cac0cd4..0e6bf6c 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,26 +1,26 @@
-From 1482994a9bfbc34fdb5887cd6438eb04be0c9d26 Mon Sep 17 00:00:00 2001
+From 76cd7f08cc80b561d83cc265dccf531721792964 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 6 Jun 2022 20:15:51 +0800
-Subject: [PATCH 1005/1007] mt76: certification patches
+Subject: [PATCH 1005/1008] mt76: certification patches
 
 ---
- mt76_connac_mcu.h    |   1 +
- mt7915/init.c        |   7 +-
- mt7915/mac.c         |  23 +++
- mt7915/main.c        |  15 +-
- mt7915/mcu.c         | 466 +++++++++++++++++++++++++++++++++++++++++++
- mt7915/mcu.h         | 209 ++++++++++++++++++-
- mt7915/mt7915.h      |  13 ++
- mt7915/mtk_debugfs.c |   7 +-
- mt7915/vendor.c      | 187 +++++++++++++++++
- mt7915/vendor.h      |  42 ++++
+ .../wireless/mediatek/mt76/mt76_connac_mcu.h  |   1 +
+ .../net/wireless/mediatek/mt76/mt7915/init.c  |   7 +-
+ .../net/wireless/mediatek/mt76/mt7915/mac.c   |  23 +
+ .../net/wireless/mediatek/mt76/mt7915/main.c  |  15 +-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 466 ++++++++++++++++++
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   | 209 +++++++-
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  13 +
+ .../mediatek/mt76/mt7915/mtk_debugfs.c        |   7 +-
+ .../wireless/mediatek/mt76/mt7915/vendor.c    | 187 +++++++
+ .../wireless/mediatek/mt76/mt7915/vendor.h    |  42 ++
  10 files changed, 964 insertions(+), 6 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 1c24dbf4..82498039 100644
+index 42425f75..32e540cc 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -993,6 +993,7 @@ enum {
+@@ -1144,6 +1144,7 @@ enum {
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
  	/* for vendor csi and air monitor */
  	MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -29,10 +29,10 @@
  };
  
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 2b8d758f..b4404aec 100644
+index 6e2a1c13..02d1b6d8 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -371,12 +371,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
+@@ -372,12 +372,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
  	if (!phy->dev->dbdc_support)
  		wiphy->txq_memory_limit = 32 << 20; /* 32 MiB */
  
@@ -52,7 +52,7 @@
  			IEEE80211_HT_CAP_LDPC_CODING |
  			IEEE80211_HT_CAP_MAX_AMSDU;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 4989f437..9af0644f 100644
+index 69c226f0..9058c750 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -7,6 +7,7 @@
@@ -63,7 +63,7 @@
  
  #define to_rssi(field, rxv)	((FIELD_GET(field, rxv) - 220) / 2)
  
-@@ -2486,6 +2487,21 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
+@@ -1734,6 +1735,21 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
  	phy->trb_ts = trb;
  }
  
@@ -85,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);
-@@ -2508,6 +2524,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
+@@ -1756,6 +1772,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);
  
@@ -100,7 +100,7 @@
  			       IEEE80211_RC_NSS_CHANGED |
  			       IEEE80211_RC_BW_CHANGED))
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 7d4e7838..24bc12f5 100644
+index 91c4370a..90543596 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -649,6 +649,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
@@ -133,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 5df0b4fd..495f2368 100644
+index 3ee1db4e..6ae4d159 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3850,6 +3850,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -3558,6 +3558,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
  
  	return 0;
  }
@@ -610,10 +610,10 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 0ff1fd11..364ea0dd 100644
+index 92715b97..7418f78c 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -433,9 +433,13 @@ enum {
+@@ -396,9 +396,13 @@ enum {
  	RATE_PARAM_FIXED = 3,
  	RATE_PARAM_MMPS_UPDATE = 5,
  	RATE_PARAM_FIXED_HE_LTF = 7,
@@ -628,7 +628,7 @@
  };
  
  #define RATE_CFG_MCS			GENMASK(3, 0)
-@@ -447,6 +451,9 @@ enum {
+@@ -410,6 +414,9 @@ enum {
  #define RATE_CFG_PHY_TYPE		GENMASK(27, 24)
  #define RATE_CFG_HE_LTF			GENMASK(31, 28)
  
@@ -638,7 +638,7 @@
  enum {
  	THERMAL_PROTECT_PARAMETER_CTRL,
  	THERMAL_PROTECT_BASIC_INFO,
-@@ -594,5 +601,205 @@ struct csi_data {
+@@ -557,5 +564,205 @@ struct csi_data {
  #define OFDMA_UL			BIT(1)
  #define MUMIMO_DL			BIT(2)
  #define MUMIMO_UL			BIT(3)
@@ -845,10 +845,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 06f2737f..80a17a7d 100644
+index c4f8a6ad..6c6c2424 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -677,6 +677,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -661,6 +661,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  #endif
  
  #ifdef CONFIG_MTK_VENDOR
@@ -1159,5 +1159,5 @@
  
  enum mtk_vendor_attr_csi_ctrl {
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1006-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
index 34b74bb..59af5bb 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1006-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,24 +1,24 @@
-From 295dac8799e536a2d5dc53e727e246e469739853 Mon Sep 17 00:00:00 2001
+From c27f0452975f76f67a53a67cf808ba49f8e3c51b Mon Sep 17 00:00:00 2001
 From: Bo Jiao <Bo.Jiao@mediatek.com>
-Date: Mon, 6 Jun 2022 20:18:15 +0800
-Subject: [PATCH 1006/1007] mt76: mt7915: add L0.5 system error recovery
+Date: Wed, 22 Jun 2022 10:51:59 +0800
+Subject: [PATCH 1006/1008] mt76: mt7915: add L0.5 system error recovery
  support
 
 ---
- mt7915/debugfs.c |  88 ++++++++++++---
- mt7915/dma.c     |  48 ++++++++
- mt7915/init.c    |   8 +-
- mt7915/mac.c     | 280 +++++++++++++++++++++++++++++++++++++----------
- mt7915/main.c    |  20 +++-
- mt7915/mcu.c     |  96 ++++++++++++++--
- mt7915/mcu.h     |   3 +-
- mt7915/mmio.c    |   8 +-
- mt7915/mt7915.h  |  23 ++++
- mt7915/regs.h    |  16 +++
- 10 files changed, 493 insertions(+), 97 deletions(-)
+ .../wireless/mediatek/mt76/mt7915/debugfs.c   |  88 ++++--
+ .../net/wireless/mediatek/mt76/mt7915/dma.c   |  48 +++
+ .../net/wireless/mediatek/mt76/mt7915/init.c  |   8 +-
+ .../net/wireless/mediatek/mt76/mt7915/mac.c   | 284 ++++++++++++++----
+ .../net/wireless/mediatek/mt76/mt7915/main.c  |  19 +-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   |  95 +++++-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |   3 +-
+ .../net/wireless/mediatek/mt76/mt7915/mmio.c  |   8 +-
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  23 ++
+ .../net/wireless/mediatek/mt76/mt7915/regs.h  |  16 +
+ 10 files changed, 493 insertions(+), 99 deletions(-)
 
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 27eae83b..c75d9e5b 100644
+index 0cfb6068..07de2eef 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -52,12 +52,17 @@ static ssize_t
@@ -201,7 +201,7 @@
  {
  	mt7915_dma_disable(dev, true);
 diff --git a/mt7915/init.c b/mt7915/init.c
-index b4404aec..80ada114 100644
+index 02d1b6d8..0d5109a3 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -262,7 +262,7 @@ static void mt7915_led_set_brightness(struct led_classdev *led_cdev,
@@ -213,7 +213,7 @@
  mt7915_init_txpower(struct mt7915_dev *dev,
  		    struct ieee80211_supported_band *sband)
  {
-@@ -448,7 +448,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
+@@ -449,7 +449,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
  	mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
  }
  
@@ -222,7 +222,7 @@
  {
  	int i;
  	u32 rx_len = is_mt7915(&dev->mt76) ? 0x400 : 0x680;
-@@ -478,7 +478,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
+@@ -479,7 +479,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev)
  	}
  }
  
@@ -231,7 +231,7 @@
  {
  	int ret;
  
-@@ -1160,6 +1160,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1162,6 +1162,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
  
  	mt7915_init_debugfs(&dev->phy);
  
@@ -241,7 +241,7 @@
  
  unreg_thermal:
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 9af0644f..a9ebbf12 100644
+index 9058c750..05932707 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -3,6 +3,7 @@
@@ -252,7 +252,7 @@
  #include "mt7915.h"
  #include "../dma.h"
  #include "mac.h"
-@@ -2063,85 +2064,188 @@ mt7915_update_beacons(struct mt7915_dev *dev)
+@@ -1311,85 +1312,188 @@ mt7915_update_beacons(struct mt7915_dev *dev)
  		mt7915_update_vif_beacon, dev->mt76.phy2->hw);
  }
  
@@ -265,10 +265,7 @@
 -	int i;
 +	struct mt76_txwi_cache *txwi;
 +	int id;
- 
--	mt76_clear(dev, MT_WFDMA0_GLO_CFG,
--		   MT_WFDMA0_GLO_CFG_TX_DMA_EN |
--		   MT_WFDMA0_GLO_CFG_RX_DMA_EN);
++
 +	spin_lock_bh(&dev->mt76.token_lock);
 +	idr_for_each_entry(&dev->mt76.token, txwi, id) {
 +		mt7915_txwi_free(dev, txwi, NULL, NULL);
@@ -277,11 +274,7 @@
 +	spin_unlock_bh(&dev->mt76.token_lock);
 +	idr_destroy(&dev->mt76.token);
 +}
- 
--	if (is_mt7915(&dev->mt76))
--		mt76_clear(dev, MT_WFDMA1_GLO_CFG,
--			   MT_WFDMA1_GLO_CFG_TX_DMA_EN |
--			   MT_WFDMA1_GLO_CFG_RX_DMA_EN);
++
 +static int
 +mt7915_mac_reset(struct mt7915_dev *dev)
 +{
@@ -290,10 +283,17 @@
 +	struct mt76_dev *mdev = &dev->mt76;
 +	int i, ret;
 +	u32 irq_mask;
-+
+ 
+-	mt76_clear(dev, MT_WFDMA0_GLO_CFG,
+-		   MT_WFDMA0_GLO_CFG_TX_DMA_EN |
+-		   MT_WFDMA0_GLO_CFG_RX_DMA_EN);
 +	ext_phy = dev->mt76.phy2;
 +	phy2 = ext_phy ? ext_phy->priv : NULL;
-+
+ 
+-	if (is_mt7915(&dev->mt76))
+-		mt76_clear(dev, MT_WFDMA1_GLO_CFG,
+-			   MT_WFDMA1_GLO_CFG_TX_DMA_EN |
+-			   MT_WFDMA1_GLO_CFG_RX_DMA_EN);
 +	/* irq disable */
 +	mt76_wr(dev, MT_INT_MASK_CSR, 0x0);
 +	mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
@@ -301,6 +301,11 @@
 -		mt76_clear(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
 -			   MT_WFDMA0_GLO_CFG_TX_DMA_EN |
 -			   MT_WFDMA0_GLO_CFG_RX_DMA_EN);
+-
+-		if (is_mt7915(&dev->mt76))
+-			mt76_clear(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
+-				   MT_WFDMA1_GLO_CFG_TX_DMA_EN |
+-				   MT_WFDMA1_GLO_CFG_RX_DMA_EN);
 +		mt76_wr(dev, MT_INT1_MASK_CSR, 0x0);
 +		mt76_wr(dev, MT_INT1_SOURCE_CSR, ~0);
 +	}
@@ -308,12 +313,14 @@
 +		mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0x0);
 +		if (dev->hif2)
 +			mt76_wr(dev, MT_PCIE1_MAC_INT_ENABLE, 0x0);
-+	}
+ 	}
  
--		if (is_mt7915(&dev->mt76))
--			mt76_clear(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
--				   MT_WFDMA1_GLO_CFG_TX_DMA_EN |
--				   MT_WFDMA1_GLO_CFG_RX_DMA_EN);
+-	usleep_range(1000, 2000);
+-
+-	for (i = 0; i < __MT_TXQ_MAX; i++) {
+-		mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[i], true);
+-		if (mphy_ext)
+-			mt76_queue_tx_cleanup(dev, mphy_ext->q_tx[i], true);
 +	set_bit(MT76_RESET, &dev->mphy.state);
 +	set_bit(MT76_MCU_RESET, &dev->mphy.state);
 +	wake_up(&dev->mt76.mcu.wait);
@@ -322,38 +329,40 @@
 +		set_bit(MT76_MCU_RESET, &ext_phy->state);
  	}
  
--	usleep_range(1000, 2000);
+-	for (i = 0; i < __MT_MCUQ_MAX; i++)
+-		mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[i], true);
 +	/* lock/unlock all queues to ensure that no tx is pending */
 +	mt76_txq_schedule_all(&dev->mphy);
 +	if (ext_phy)
 +		mt76_txq_schedule_all(ext_phy);
  
--	for (i = 0; i < __MT_TXQ_MAX; i++) {
--		mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[i], true);
--		if (mphy_ext)
--			mt76_queue_tx_cleanup(dev, mphy_ext->q_tx[i], true);
+-	mt76_for_each_q_rx(&dev->mt76, i)
+-		mt76_queue_rx_reset(dev, i);
 +	/* disable all tx/rx napi */
 +	mt76_worker_disable(&dev->mt76.tx_worker);
 +	mt76_for_each_q_rx(mdev, i) {
 +		if (mdev->q_rx[i].ndesc)
 +			napi_disable(&dev->mt76.napi[i]);
- 	}
++	}
 +	napi_disable(&dev->mt76.tx_napi);
  
--	for (i = 0; i < __MT_MCUQ_MAX; i++)
--		mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[i], true);
--
--	mt76_for_each_q_rx(&dev->mt76, i)
--		mt76_queue_rx_reset(dev, i);
+-	mt76_tx_status_check(&dev->mt76, true);
 +	/* token reinit */
 +	mt7915_tx_token_put(dev);
 +	idr_init(&dev->mt76.token);
  
--	mt76_tx_status_check(&dev->mt76, true);
-+	mt7915_dma_reset(dev, true);
- 
 -	/* re-init prefetch settings after reset */
 -	mt7915_dma_prefetch(dev);
++	mt7915_dma_reset(dev, true);
+ 
+-	mt76_set(dev, MT_WFDMA0_GLO_CFG,
+-		 MT_WFDMA0_GLO_CFG_TX_DMA_EN | MT_WFDMA0_GLO_CFG_RX_DMA_EN);
+-	if (is_mt7915(&dev->mt76))
+-		mt76_set(dev, MT_WFDMA1_GLO_CFG,
+-			 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);
 +	local_bh_disable();
 +	mt76_for_each_q_rx(mdev, i) {
 +		if (mdev->q_rx[i].ndesc) {
@@ -364,21 +373,20 @@
 +	local_bh_enable();
 +	clear_bit(MT76_MCU_RESET, &dev->mphy.state);
 +	clear_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);
- 
--	mt76_set(dev, MT_WFDMA0_GLO_CFG,
--		 MT_WFDMA0_GLO_CFG_TX_DMA_EN | MT_WFDMA0_GLO_CFG_RX_DMA_EN);
--	if (is_mt7915(&dev->mt76))
--		mt76_set(dev, MT_WFDMA1_GLO_CFG,
--			 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);
++
 +	mt76_wr(dev, MT_INT_MASK_CSR, dev->mt76.mmio.irqmask);
 +	mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
  	if (dev->hif2) {
 -		mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
 -			 MT_WFDMA0_GLO_CFG_TX_DMA_EN |
 -			 MT_WFDMA0_GLO_CFG_RX_DMA_EN);
+-
+-		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);
 +		mt76_wr(dev, MT_INT1_MASK_CSR, irq_mask);
 +		mt76_wr(dev, MT_INT1_SOURCE_CSR, ~0);
 +	}
@@ -387,13 +395,7 @@
 +		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)
@@ -499,7 +501,7 @@
  }
  
  /* system error recovery */
-@@ -2156,6 +2260,36 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1404,6 +1508,36 @@ void mt7915_mac_reset_work(struct work_struct *work)
  	ext_phy = dev->mt76.phy2;
  	phy2 = ext_phy ? ext_phy->priv : NULL;
  
@@ -536,7 +538,7 @@
  	if (!(READ_ONCE(dev->reset_state) & MT_MCU_CMD_STOP_DMA))
  		return;
  
-@@ -2181,7 +2315,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1429,7 +1563,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)) {
@@ -545,7 +547,7 @@
  
  		mt7915_tx_token_put(dev);
  		idr_init(&dev->mt76.token);
-@@ -2230,6 +2364,34 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1478,6 +1612,34 @@ void mt7915_mac_reset_work(struct work_struct *work)
  					     MT7915_WATCHDOG_TIME);
  }
  
@@ -581,7 +583,7 @@
  {
  	struct mt7915_dev *dev = phy->dev;
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 24bc12f5..082e27d4 100644
+index 90543596..42a0ece7 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -20,17 +20,13 @@ static bool mt7915_dev_running(struct mt7915_dev *dev)
@@ -603,7 +605,7 @@
  	running = mt7915_dev_running(dev);
  
  	if (!running) {
-@@ -80,6 +76,19 @@ static int mt7915_start(struct ieee80211_hw *hw)
+@@ -80,6 +76,18 @@ static int mt7915_start(struct ieee80211_hw *hw)
  		mt7915_mac_reset_counters(phy);
  
  out:
@@ -613,7 +615,6 @@
 +static int mt7915_start(struct ieee80211_hw *hw)
 +{
 +	struct mt7915_dev *dev = mt7915_hw_dev(hw);
-+	bool running;
 +	int ret;
 +
 +	flush_work(&dev->init_work);
@@ -623,7 +624,7 @@
  	mutex_unlock(&dev->mt76.mutex);
  
  	return ret;
-@@ -91,6 +100,7 @@ static void mt7915_stop(struct ieee80211_hw *hw)
+@@ -91,6 +99,7 @@ static void mt7915_stop(struct ieee80211_hw *hw)
  	struct mt7915_phy *phy = mt7915_hw_phy(hw);
  
  	cancel_delayed_work_sync(&phy->mt76->mac_work);
@@ -632,10 +633,10 @@
  	mutex_lock(&dev->mt76.mutex);
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 495f2368..4a921a50 100644
+index 6ae4d159..34409759 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -207,19 +207,90 @@ mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs,
+@@ -150,19 +150,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];
  }
  
@@ -698,7 +699,7 @@
  			  struct sk_buff *skb, int seq)
  {
 +	struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
- 	struct mt7915_mcu_rxd *rxd;
+ 	struct mt76_connac2_mcu_rxd *rxd;
  	int ret = 0;
  
  	if (!skb) {
@@ -723,10 +724,10 @@
  
 +	dev->ser.cmd_fail_cnt = 0;
 +
- 	rxd = (struct mt7915_mcu_rxd *)skb->data;
+ 	rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
  	if (seq != rxd->seq)
  		return -EAGAIN;
-@@ -2549,18 +2620,10 @@ mt7915_mcu_init_rx_airtime(struct mt7915_dev *dev)
+@@ -2257,18 +2328,10 @@ mt7915_mcu_init_rx_airtime(struct mt7915_dev *dev)
  				 sizeof(req), true);
  }
  
@@ -734,7 +735,7 @@
 +int mt7915_run_firmware(struct mt7915_dev *dev)
  {
 -	static const struct mt76_mcu_ops mt7915_mcu_ops = {
--		.headroom = sizeof(struct mt7915_mcu_txd),
+-		.headroom = sizeof(struct mt76_connac2_mcu_txd),
 -		.mcu_skb_send_msg = mt7915_mcu_send_message,
 -		.mcu_parse_response = mt7915_mcu_parse_response,
 -		.mcu_restart = mt76_connac_mcu_restart,
@@ -746,19 +747,18 @@
  	/* force firmware operation mode into normal state,
  	 * which should be set before firmware download stage.
  	 */
-@@ -2609,6 +2672,21 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
+@@ -2317,6 +2380,20 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
  				 MCU_WA_PARAM_RED, 0, 0);
  }
  
 +int mt7915_mcu_init(struct mt7915_dev *dev)
 +{
 +	static const struct mt76_mcu_ops mt7915_mcu_ops = {
-+		.headroom = sizeof(struct mt7915_mcu_txd),
++		.headroom = sizeof(struct mt76_connac2_mcu_txd),
 +		.mcu_skb_send_msg = mt7915_mcu_send_message,
 +		.mcu_parse_response = mt7915_mcu_parse_response,
 +		.mcu_restart = mt76_connac_mcu_restart,
 +	};
-+	int ret;
 +
 +	dev->mt76.mcu_ops = &mt7915_mcu_ops;
 +
@@ -769,10 +769,10 @@
  {
  	__mt76_mcu_restart(&dev->mt76);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 364ea0dd..44d3722e 100644
+index 7418f78c..4c5482b2 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -489,8 +489,9 @@ enum {
+@@ -452,8 +452,9 @@ enum {
  
  enum {
  	SER_QUERY,
@@ -784,7 +784,7 @@
  	SER_SET_RECOVER_L3_RX_ABORT,
  	SER_SET_RECOVER_L3_TX_ABORT,
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 71945ba9..ba61ce2e 100644
+index a8e3810e..bccb1084 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -24,6 +24,7 @@ static const u32 mt7915_reg[] = {
@@ -825,10 +825,10 @@
  	}
  }
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 80a17a7d..ae5ac72f 100644
+index 6c6c2424..20aeca77 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -353,6 +353,15 @@ struct mt7915_dev {
+@@ -352,6 +352,15 @@ struct mt7915_dev {
  	struct work_struct reset_work;
  	wait_queue_head_t reset_wait;
  	u32 reset_state;
@@ -844,7 +844,7 @@
  
  	struct list_head sta_rc_list;
  	struct list_head sta_poll_list;
-@@ -416,6 +425,12 @@ enum {
+@@ -415,6 +424,12 @@ enum {
  	__MT_WFDMA_MAX,
  };
  
@@ -855,9 +855,9 @@
 +};
 +
  enum {
- 	MT_CTX0,
- 	MT_HIF0 = 0x0,
-@@ -527,6 +542,14 @@ s8 mt7915_eeprom_get_power_delta(struct mt7915_dev *dev, int band);
+ 	MT_RX_SEL0,
+ 	MT_RX_SEL1,
+@@ -512,6 +527,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);
@@ -928,5 +928,5 @@
  #define MT_LED_TOP_BASE			0x18013000
  #define MT_LED_PHYS(_n)			(MT_LED_TOP_BASE + (_n))
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-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
index 85c914e..fb5e85b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-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,19 +1,19 @@
-From eee8cdc1710c18f90b8e5345dc85a0749cffabe3 Mon Sep 17 00:00:00 2001
+From 7a1c00a4418ca3b5cf4e41aaeaca56b9f9b64b63 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 1007/1007] mt76: mt7915:add support for runtime set in-band
+Subject: [PATCH 1007/1008] mt76: mt7915:add support for runtime set in-band
  discovery
 
 Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
 ---
- mt7915/mcu.c | 5 ++---
+ drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 4a921a50..5e7b3f4a 100644
+index 34409759..a3ccc7a2 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2102,8 +2102,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -2006,8 +2006,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
  	u8 *buf, interval;
  	int len;
  
@@ -23,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 &&
-@@ -2140,7 +2139,7 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -2044,7 +2043,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);
@@ -33,5 +33,5 @@
  	buf = (u8 *)tlv + sizeof(*discov);
  
 -- 
-2.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
old mode 100755
new mode 100644
index 18be9d3..cd43f1c
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
@@ -1,8 +1,20 @@
+From acba3f5a21a66d8f1f46943d053e94b65762684c Mon Sep 17 00:00:00 2001
+From: MeiChia Chiu <meichia.chiu@mediatek.com>
+Date: Wed, 22 Jun 2022 10:53:43 +0800
+Subject: [PATCH 1008/1008] mt76: mt7915: add mt76 vendor muru onoff command
+
+---
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   |  7 +++
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |  1 +
+ .../wireless/mediatek/mt76/mt7915/vendor.c    | 43 +++++++++++++++++++
+ .../wireless/mediatek/mt76/mt7915/vendor.h    | 12 ++++++
+ 4 files changed, 63 insertions(+)
+
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index d547cf6..bec0cd0 100755
+index a3ccc7a2..e9169ed5 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3871,6 +3871,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
+@@ -3654,6 +3654,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
  		if (val == 0)
  			dev->dbg.muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
  		break;
@@ -17,10 +29,10 @@
  }
  
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index af939c4..fc382cd 100644
+index 4c5482b2..d96b1a66 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -431,6 +431,7 @@ enum {
+@@ -402,6 +402,7 @@ enum {
  #ifdef CONFIG_MTK_VENDOR
  	RATE_PARAM_FIXED_MIMO = 30,
  	RATE_PARAM_FIXED_OFDMA = 31,
@@ -29,7 +41,7 @@
  };
  
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 7456c57..cb5b60f 100644
+index 7456c577..c7551848 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -34,6 +34,11 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -44,7 +56,7 @@
  static const struct nla_policy
  rfeature_ctrl_policy[NUM_MTK_VENDOR_ATTRS_RFEATURE_CTRL] = {
  	[MTK_VENDOR_ATTR_RFEATURE_CTRL_HE_GI] = {.type = NLA_U8 },
-@@ -942,6 +947,35 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
+@@ -942,6 +947,33 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
  	return 0;
  }
  
@@ -54,8 +66,6 @@
 +				  int data_len)
 +{
 +	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-+	struct mt7915_phy *phy = mt7915_hw_phy(hw);
-+	struct mt7915_dev *dev = phy->dev;
 +	struct nlattr *tb[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL];
 +	int err;
 +	u8 val8;
@@ -80,7 +90,7 @@
  static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  	{
  		.info = {
-@@ -988,6 +1022,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -988,6 +1020,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  		.doit = mt7915_vendor_wireless_ctrl,
  		.policy = wireless_ctrl_policy,
  		.maxattr = MTK_VENDOR_ATTR_WIRELESS_CTRL_MAX,
@@ -99,7 +109,7 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 1b08321..b5c1420 100644
+index 1b08321c..a8e4ebf9 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -8,6 +8,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -128,3 +138,6 @@
  enum mtk_vendor_attr_rfeature_ctrl {
  	MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
  
+-- 
+2.25.1
+
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 fcea41b..aee7bfc 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,7 +1,7 @@
-From 2e542afa1d9932b4ec588ad2c622c74a16fa1edd Mon Sep 17 00:00:00 2001
+From c355ab2ff11c55754536215d29d9659b3ff4cfe2 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] mt76: testmode: additional supports
+Subject: [PATCH 1111/1115] mt76: testmode: additional supports
 
 Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
 ---
@@ -13,8 +13,8 @@
  .../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/mcu.c   |   10 +-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   |   29 +-
  .../net/wireless/mediatek/mt76/mt7915/mmio.c  |    2 +
  .../wireless/mediatek/mt76/mt7915/mt7915.h    |   14 +-
  .../net/wireless/mediatek/mt76/mt7915/regs.h  |    3 +
@@ -24,7 +24,7 @@
  drivers/net/wireless/mediatek/mt76/testmode.h |   75 ++
  .../net/wireless/mediatek/mt76/tools/fields.c |   80 ++
  drivers/net/wireless/mediatek/mt76/tx.c       |    3 +-
- 19 files changed, 1963 insertions(+), 152 deletions(-)
+ 19 files changed, 1962 insertions(+), 150 deletions(-)
 
 diff --git a/dma.c b/dma.c
 index 30de8be4..f6f5f129 100644
@@ -41,7 +41,7 @@
  #endif
  
 diff --git a/mac80211.c b/mac80211.c
-index 31602d7f..49b99f36 100644
+index c1df063f..dc3c63e9 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 {
@@ -235,10 +235,10 @@
  static inline void mt76_testmode_reset(struct mt76_phy *phy, bool disable)
  {
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 4e495d4f..ebb78d33 100644
+index 261181dc..cd350689 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
-@@ -389,6 +389,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
+@@ -391,6 +391,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct sk_buff *skb,
  	switch (vif->type) {
  	case NL80211_IFTYPE_MESH_POINT:
  	case NL80211_IFTYPE_AP:
@@ -246,7 +246,7 @@
  		if (vif->p2p)
  			conn_type = CONNECTION_P2P_GC;
  		else
-@@ -570,6 +571,9 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
+@@ -572,6 +573,9 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
  	rx->rca2 = 1;
  	rx->rv = 1;
  
@@ -257,10 +257,10 @@
  		return;
  
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 82498039..a3bbf5ca 100644
+index 32e540cc..a0e6fa6e 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -816,6 +816,7 @@ enum {
+@@ -967,6 +967,7 @@ enum {
  	MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
  	MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
  	MCU_EXT_EVENT_ASSERT_DUMP = 0x23,
@@ -268,7 +268,7 @@
  	MCU_EXT_EVENT_RDD_REPORT = 0x3a,
  	MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
  	MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
-@@ -993,6 +994,7 @@ enum {
+@@ -1144,6 +1145,7 @@ enum {
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
  	/* for vendor csi and air monitor */
  	MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -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 0d5109a3..b549fa04 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -573,7 +573,7 @@ static void mt7915_init_work(struct work_struct *work)
+@@ -576,7 +576,7 @@ static void mt7915_init_work(struct work_struct *work)
  	struct mt7915_dev *dev = container_of(work, struct mt7915_dev,
  				 init_work);
  
@@ -290,10 +290,10 @@
  	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 05932707..8fd46183 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -914,17 +914,39 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -565,17 +565,39 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
  {
  #ifdef CONFIG_NL80211_TESTMODE
  	struct mt76_testmode_data *td = &phy->mt76->test;
@@ -336,7 +336,7 @@
  	switch (td->tx_rate_mode) {
  	case MT76_TM_TX_MODE_HT:
  		nss = 1 + (rate_idx >> 3);
-@@ -1013,14 +1035,13 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -664,14 +686,13 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
  	if (mode >= MT_PHY_TYPE_HE_SU)
  		val |= FIELD_PREP(MT_TXD6_HELTF, td->tx_ltf);
  
@@ -356,10 +356,10 @@
  }
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index f2a6d9da..942b8a9a 100644
+index 42a0ece7..41bc2c30 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -221,7 +221,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
+@@ -220,7 +220,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
  	mvif->phy = phy;
  	mvif->mt76.band_idx = phy->band_idx;
  
@@ -369,18 +369,10 @@
  		mvif->mt76.wmm_idx += 2;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8a3bd33f..8ed8700d 100755
+index e9169ed5..ee3b1d76 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,
- 	if (mcu_txd->ext_cid) {
- 		mcu_txd->ext_cid_ack = 1;
- 
--		/* do not use Q_SET for efuse */
- 		if (cmd & __MCU_CMD_FIELD_QUERY)
- 			mcu_txd->set_query = MCU_Q_QUERY;
- 		else
-@@ -536,6 +535,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -434,6 +434,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	case MCU_EXT_EVENT_BCC_NOTIFY:
  		mt7915_mcu_rx_bcc_notify(dev, skb);
  		break;
@@ -392,7 +384,7 @@
  	default:
  		break;
  	}
-@@ -565,6 +569,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -465,6 +470,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
  	    rxd->ext_eid == MCU_EXT_EVENT_ASSERT_DUMP ||
  	    rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC ||
  	    rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY ||
@@ -400,7 +392,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)
+@@ -2812,14 +2818,14 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
  	return 0;
  }
  
@@ -418,10 +410,10 @@
  
  	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 d96b1a66..f6b7d1c3 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -27,10 +27,15 @@ struct mt7915_mcu_txd {
+@@ -8,10 +8,15 @@
  
  enum {
  	MCU_ATE_SET_TRX = 0x1,
@@ -436,8 +428,8 @@
 +	MCU_ATE_SET_MU_RX_AID = 0x1e,
  };
  
- struct mt7915_mcu_rxd {
-@@ -455,6 +460,12 @@ enum {
+ struct mt7915_mcu_thermal_ctrl {
+@@ -431,6 +436,12 @@ enum {
  
  enum {
  	MT_BF_SOUNDING_ON = 1,
@@ -450,17 +442,15 @@
  	MT_BF_TYPE_UPDATE = 20,
  	MT_BF_MODULE_UPDATE = 25
  };
-@@ -681,12 +692,20 @@ struct mt7915_muru {
- #define MURU_OFDMA_SCH_TYPE_DL          BIT(0)
+@@ -662,11 +673,19 @@ struct mt7915_muru {
  #define MURU_OFDMA_SCH_TYPE_UL          BIT(1)
  
--/* Common Config */
+ /* Common Config */
 -#define MURU_COMM_PPDU_FMT              BIT(0)
 -#define MURU_COMM_SCH_TYPE              BIT(1)
 -#define MURU_COMM_SET                   (MURU_COMM_PPDU_FMT | MURU_COMM_SCH_TYPE)
 -
 -/* DL&UL User config*/
-+/* Common Config */ 
 +/* #define MURU_COMM_PPDU_FMT              BIT(0) */
 +/* #define MURU_COMM_SCH_TYPE              BIT(1) */
 +/* #define MURU_COMM_SET                   (MURU_COMM_PPDU_FMT | MURU_COMM_SCH_TYPE) */
@@ -478,10 +468,10 @@
  
  enum {
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index b3de3a7a..bbf8b16c 100644
+index bccb1084..a84970d7 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 +479,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 +488,10 @@
  	[AGG_PCR0]		= 0x040,
  	[AGG_ACR0]		= 0x054,
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index cf0630c8..4b375629 100644
+index 20aeca77..1a279844 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -294,6 +294,9 @@ struct mt7915_phy {
+@@ -303,6 +303,9 @@ struct mt7915_phy {
  		u8 last_snr;
  
  		u8 spe_idx;
@@ -511,7 +501,7 @@
  	} test;
  #endif
  
-@@ -382,6 +385,14 @@ struct mt7915_dev {
+@@ -394,6 +397,14 @@ struct mt7915_dev {
  	void __iomem *dcm;
  	void __iomem *sku;
  
@@ -526,7 +516,7 @@
  #ifdef MTK_DEBUG
  	u16 wlan_idx;
  	struct {
-@@ -572,7 +583,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -570,7 +581,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 +525,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);
+@@ -603,6 +614,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 +534,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 +545,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))
  
@@ -565,7 +555,7 @@
  							  (_n) * 4))
  #define MT_AGG_PCR0(_band, _n)		MT_WF_AGG(_band, (__OFFS(AGG_PCR0) +	\
 diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index e8bf616c..16c9e4ae 100644
+index 123ceaf9..a0a9f7be 100644
 --- a/mt7915/testmode.c
 +++ b/mt7915/testmode.c
 @@ -9,6 +9,9 @@
@@ -660,7 +650,7 @@
  }
  
  static int
-@@ -182,11 +230,737 @@ mt7915_tm_set_tam_arb(struct mt7915_phy *phy, bool enable, bool mu)
+@@ -182,12 +230,738 @@ mt7915_tm_set_tam_arb(struct mt7915_phy *phy, bool enable, bool mu)
  	return mt7915_mcu_set_muru_ctrl(dev, MURU_SET_ARB_OP_MODE, op_mode);
  }
  
@@ -1225,7 +1215,7 @@
 +#define BF_CAL_PHASE	21
 +	u8 format_id;
 +
-+	skb_pull(skb, sizeof(struct mt7915_mcu_rxd));
++	skb_pull(skb, sizeof(struct mt76_connac2_mcu_rxd));
 +	format_id = *(u8 *)skb->data;
 +
 +	if (format_id == BF_PFMU_TAG) {
@@ -1387,10 +1377,11 @@
 +}
 +
  static int
- mt7915_tm_set_wmm_qid(struct mt7915_dev *dev, u8 qid, u8 aifs, u8 cw_min,
+ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
 -		      u16 cw_max, u16 txop)
 +		      u16 cw_max, u16 txop, u8 tx_cmd)
  {
+ 	struct mt7915_vif *mvif = (struct mt7915_vif *)phy->monitor_vif->drv_priv;
 -	struct mt7915_mcu_tx req = { .total = 1 };
 +	struct mt7915_mcu_tx req = {
 +		.valid = true,
@@ -1399,10 +1390,10 @@
 +	};
  	struct edca *e = &req.edca[0];
  
- 	e->queue = qid;
-@@ -261,7 +1035,8 @@ done:
+ 	e->queue = qid + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS;
+@@ -262,7 +1036,8 @@ done:
  
- 	return mt7915_tm_set_wmm_qid(dev,
+ 	return mt7915_tm_set_wmm_qid(phy,
  				     mt76_connac_lmac_mapping(IEEE80211_AC_BE),
 -				     aifsn, cw, cw, 0);
 +				     aifsn, cw, cw, 0,
@@ -1410,7 +1401,7 @@
  }
  
  static int
-@@ -337,7 +1112,7 @@ mt7915_tm_set_tx_len(struct mt7915_phy *phy, u32 tx_time)
+@@ -338,7 +1113,7 @@ mt7915_tm_set_tx_len(struct mt7915_phy *phy, u32 tx_time)
  	bitrate = cfg80211_calculate_bitrate(&rate);
  	tx_len = bitrate * tx_time / 10 / 8;
  
@@ -1419,7 +1410,7 @@
  	if (ret)
  		return ret;
  
-@@ -455,18 +1230,180 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
+@@ -456,18 +1231,180 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
  
  	phy->mt76->test.flag |= MT_TM_FW_RX_COUNT;
  
@@ -1606,7 +1597,7 @@
  }
  
  static void
-@@ -475,47 +1412,48 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -476,47 +1413,48 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
  	static const u8 spe_idx_map[] = {0, 0, 1, 0, 3, 2, 4, 0,
  					 9, 8, 6, 10, 16, 12, 18, 0};
  	struct mt76_testmode_data *td = &phy->mt76->test;
@@ -1680,7 +1671,7 @@
  
  	mt7915_tm_set_trx(phy, TM_MAC_TX, en);
  }
-@@ -544,10 +1482,6 @@ mt7915_tm_get_rx_stats(struct mt7915_phy *phy, bool clear)
+@@ -545,10 +1483,6 @@ mt7915_tm_get_rx_stats(struct mt7915_phy *phy, bool clear)
  		return ret;
  
  	rs_band = (struct mt7915_tm_rx_stat_band *)skb->data;
@@ -1691,7 +1682,7 @@
  
  	if (!clear) {
  		enum mt76_rxq_id q = req.band ? MT_RXQ_EXT : MT_RXQ_MAIN;
-@@ -562,13 +1496,61 @@ mt7915_tm_get_rx_stats(struct mt7915_phy *phy, bool clear)
+@@ -563,13 +1497,61 @@ mt7915_tm_get_rx_stats(struct mt7915_phy *phy, bool clear)
  	return 0;
  }
  
@@ -1754,7 +1745,7 @@
  
  		/* read-clear */
  		mt7915_tm_get_rx_stats(phy, true);
-@@ -576,9 +1558,12 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
+@@ -577,9 +1559,12 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
  		/* clear fw count */
  		mt7915_tm_set_phy_count(phy, 0);
  		mt7915_tm_set_phy_count(phy, 1);
@@ -1769,7 +1760,7 @@
  }
  
  static int
-@@ -615,35 +1600,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
+@@ -616,35 +1601,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
  	tx_cont->center_ch = freq1;
  	tx_cont->tx_ant = td->tx_antenna_mask;
  	tx_cont->band = phy != &dev->phy;
@@ -1806,7 +1797,7 @@
  
  	if (!en) {
  		req.op.rf.param.func_data = cpu_to_le32(phy != &dev->phy);
-@@ -727,6 +1684,12 @@ mt7915_tm_update_params(struct mt7915_phy *phy, u32 changed)
+@@ -728,6 +1685,12 @@ mt7915_tm_update_params(struct mt7915_phy *phy, u32 changed)
  		mt7915_tm_set_freq_offset(phy, en, en ? td->freq_offset : 0);
  	if (changed & BIT(TM_CHANGED_TXPOWER))
  		mt7915_tm_set_tx_power(phy);
@@ -1819,7 +1810,7 @@
  }
  
  static int
-@@ -800,6 +1763,7 @@ static int
+@@ -801,6 +1764,7 @@ static int
  mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
  {
  	struct mt7915_phy *phy = mphy->priv;
@@ -1827,7 +1818,7 @@
  	void *rx, *rssi;
  	int i;
  
-@@ -845,11 +1809,68 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
+@@ -846,11 +1810,68 @@ mt7915_tm_dump_stats(struct mt76_phy *mphy, struct sk_buff *msg)
  
  	nla_nest_end(msg, rx);
  
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1112-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
index 373557f..523648a 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1112-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 3b98e75fc0a9dfd1fbd36bdd98b73bd8bae00f18 Mon Sep 17 00:00:00 2001
+From ca953d62563e4084e1ea3b81882934e27711ed26 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 1112/1115] mt76: mt7915: init rssi in WTBL when add station
 
 ---
- mt7915/main.c | 4 ++++
+ drivers/net/wireless/mediatek/mt76/mt7915/main.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 55b4cefe..e2a3af4d 100644
+index 41bc2c30..5f3e2c2d 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -663,6 +663,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -662,6 +662,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)
-@@ -684,6 +685,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -683,6 +684,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.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-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
index 17142a1..8777b5f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1113-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,27 +1,27 @@
-From 7d082308e57e467607e4ca9e63938fea0eb00306 Mon Sep 17 00:00:00 2001
+From 627e2efd654f0a2ff430a1c22e4ac0717eac125d Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Mon, 6 Jun 2022 20:20:55 +0800
+Date: Wed, 22 Jun 2022 10:58:37 +0800
 Subject: [PATCH 1113/1115] mt76: mt7915: drop packets when TWT stations use
  more tokens than 128
 
 ---
- mt7915/mac.c    | 21 ++++++++++++++++++---
- mt7915/mt7915.h |  2 ++
+ .../net/wireless/mediatek/mt76/mt7915/mac.c   | 21 ++++++++++++++++---
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  2 ++
  2 files changed, 20 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index af72e268..bae700eb 100644
+index 8fd46183..fd0dd509 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1322,6 +1322,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -724,6 +724,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;
 +	struct mt7915_sta *msta = NULL;
+ 	struct mt76_connac_fw_txp *txp;
  	struct mt76_txwi_cache *t;
- 	struct mt7915_txp *txp;
  	int id, i, nbuf = tx_info->nbuf - 1;
-@@ -1335,8 +1336,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -737,8 +738,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)) {
-@@ -1352,10 +1351,22 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -754,10 +753,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, 0);
+ 	mt7915_mac_write_txwi(mdev, 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)
+@@ -937,6 +948,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;
-@@ -1569,7 +1581,6 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -960,7 +972,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;
  
-@@ -1602,6 +1613,10 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -993,6 +1004,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 c99e700d..90391a07 100644
+index 1a279844..e1e3ce2d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -137,6 +137,8 @@ struct mt7915_sta {
+@@ -136,6 +136,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.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1114-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
index dfb8a1e..cdf982e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1114-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 110b036dfce5d60f59b02385a2d39c766921da30 Mon Sep 17 00:00:00 2001
+From 29464597b5c41cd45618b034c5e4338217fa93d4 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 1114/1115] mt76: airtime fairness feature off in mac80211
 
 ---
- mac80211.c | 1 -
+ drivers/net/wireless/mediatek/mt76/mac80211.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index 022b63e7..4b4d8b99 100644
+index dc3c63e9..5600a09a 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -425,7 +425,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
+@@ -427,7 +427,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.18.0
+2.25.1
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1115-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
index 8e53676..19db641 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1115-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,4 +1,4 @@
-From 33d4383e72491f7e8879c6e4334bf36c30704d18 Mon Sep 17 00:00:00 2001
+From 91a666148d2ff1a7c4cb43afd0cfb2df56cd8c71 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 1115/1115] mt76: mt7915: add mt7986 and mt7916 pre-calibration
@@ -9,9 +9,9 @@
 
 Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
 ---
- mt7915/eeprom.c | 15 +++++-----
- mt7915/eeprom.h | 27 +++++++++++++++--
- mt7915/mcu.c    | 80 ++++++++++++++++++++++++++++++++++++-------------
+ .../wireless/mediatek/mt76/mt7915/eeprom.c    | 15 ++--
+ .../wireless/mediatek/mt76/mt7915/eeprom.h    | 27 ++++++-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 80 ++++++++++++++-----
  3 files changed, 90 insertions(+), 32 deletions(-)
 
 diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
@@ -103,10 +103,10 @@
  
  #endif
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 17a36ea3..2b9797c8 100644
+index ee3b1d76..42f2bda5 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3203,9 +3203,10 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
+@@ -2911,9 +2911,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;
  
  	/*
-@@ -3241,9 +3242,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
+@@ -2949,9 +2950,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,
-@@ -3251,65 +3252,102 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
+@@ -2959,65 +2960,102 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
  		5660, 5680, 5700, 5745,
  		5765, 5785, 5805, 5825
  	};
@@ -252,5 +252,5 @@
  
  	return 0;
 -- 
-2.18.0
+2.25.1
 
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 d637999..2d16db5 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,28 @@
-From 7caf2dd34d38bd98b5b1087c0f00ccdb009a461a Mon Sep 17 00:00:00 2001
+From f98398e44c811f22d3bf99a1543d9a4c2af49cd3 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Mon, 6 Jun 2022 20:22:35 +0800
 Subject: [PATCH] mt76:remove WED support patch for build err
 
 ---
- 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
+ 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   | 139 ++++-----------
+ .../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 +-
+ 18 files changed, 105 insertions(+), 496 deletions(-)
 
 diff --git a/dma.c b/dma.c
 index f6f5f129..3f7456b1 100644
@@ -232,10 +231,10 @@
  }
  EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
 diff --git a/mac80211.c b/mac80211.c
-index 4b4d8b99..19a2b849 100644
+index 5600a09a..78784469 100644
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -1600,7 +1600,7 @@ EXPORT_SYMBOL_GPL(mt76_get_antenna);
+@@ -1605,7 +1605,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 +243,7 @@
  {
  	struct mt76_queue *hwq;
  	int err;
-@@ -1609,8 +1609,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
+@@ -1614,8 +1614,6 @@ mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
  	if (!hwq)
  		return ERR_PTR(-ENOMEM);
  
@@ -527,16 +526,16 @@
  		return ret;
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index bae700eb..094d10a5 100644
+index fd0dd509..1bf3b416 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1413,29 +1413,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -815,29 +815,6 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  	return 0;
  }
  
 -u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id)
 -{
--	struct mt7915_txp *txp = ptr + MT_TXD_SIZE;
+-	struct mt76_connac_fw_txp *txp = ptr + MT_TXD_SIZE;
 -	__le32 *txwi = ptr;
 -	u32 val;
 -
@@ -560,16 +559,24 @@
  static void
  mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
  {
-@@ -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++)
--		dma_unmap_single(dev->dma_dev, le32_to_cpu(txp->buf[i]),
-+		dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]),
- 				 le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
+@@ -863,12 +840,23 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
+ 		ieee80211_start_tx_ba_session(sta, tid, 0);
  }
  
-@@ -1478,7 +1455,6 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
++/* static void */
++/* mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) */
++/* { */
++/* 	struct mt76_connac_fw_txp *txp; */
++/* 	int i; */
++
++/* 	txp = mt76_connac_txwi_to_txp(dev, t); */
++/* 	for (i = 0; i < txp->nbuf; i++) */
++/* 		dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), */
++/* 				 le16_to_cpu(txp->len[i]), DMA_TO_DEVICE); */
++/* } */
++
+ static void
+ 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 +584,7 @@
  	struct mt76_wcid *wcid;
  	__le32 *txwi;
  	u16 wcid_idx;
-@@ -1491,24 +1467,13 @@ mt7915_txwi_free(struct mt7915_dev *dev, struct mt76_txwi_cache *t,
+@@ -881,24 +869,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 +612,7 @@
  	__mt76_tx_complete_skb(mdev, wcid_idx, t->skb, free_list);
  
  out:
-@@ -1516,56 +1481,30 @@ out:
+@@ -906,57 +883,31 @@ out:
  	mt76_put_txwi(mdev, t);
  }
  
@@ -646,7 +653,8 @@
  static void
  mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  {
- 	struct mt7915_tx_free *free = (struct mt7915_tx_free *)data;
+ 	struct mt76_connac_tx_free *free = data;
+ 	__le32 *tx_info = (__le32 *)(data + sizeof(*free));
  	struct mt76_dev *mdev = &dev->mt76;
 +	struct mt76_phy *mphy_ext = mdev->phy2;
  	struct mt76_txwi_cache *txwi;
@@ -671,7 +679,7 @@
  
  	total = le16_get_bits(free->ctrl, MT_TX_FREE_MSDU_CNT);
  	v3 = (FIELD_GET(MT_TX_FREE_VER, txd) == 0x4);
-@@ -1622,38 +1561,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -1013,38 +964,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
  		}
  	}
  
@@ -681,9 +689,9 @@
 -static void
 -mt7915_mac_tx_free_v0(struct mt7915_dev *dev, void *data, int len)
 -{
--	struct mt7915_tx_free *free = (struct mt7915_tx_free *)data;
+-	struct mt76_connac_tx_free *free = data;
+-	__le16 *info = (__le16 *)(data + sizeof(*free));
 -	struct mt76_dev *mdev = &dev->mt76;
--	__le16 *info = (__le16 *)free->info;
 -	void *end = data + len;
 -	LIST_HEAD(free_list);
 -	bool wake = false;
@@ -716,8 +724,8 @@
 -	mt7915_mac_tx_free_done(dev, &free_list, wake);
  }
  
- static bool
-@@ -1833,9 +1751,6 @@ bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len)
+ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
+@@ -1102,9 +1032,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 +735,7 @@
  	case PKT_TYPE_TXS:
  		for (rxd += 2; rxd + 8 <= end; rxd += 8)
  		    mt7915_mac_add_txs(dev, rxd);
-@@ -1863,10 +1778,6 @@ void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
+@@ -1132,10 +1059,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;
@@ -739,19 +747,16 @@
  		mt7915_mcu_rx_event(dev, skb);
  		break;
 diff --git a/mt7915/mac.h b/mt7915/mac.h
-index c5fd1a61..5add1dd3 100644
+index 6fa9c79f..9986c033 100644
 --- a/mt7915/mac.h
 +++ b/mt7915/mac.h
-@@ -24,7 +24,6 @@ enum rx_pkt_type {
+@@ -26,12 +26,10 @@ enum rx_pkt_type {
  	PKT_TYPE_TXRX_NOTIFY,
  	PKT_TYPE_RX_EVENT,
  	PKT_TYPE_RX_FW_MONITOR = 0x0c,
 -	PKT_TYPE_TXRX_NOTIFY_V0 = 0x18,
  };
  
- /* RXD DW1 */
-@@ -312,7 +311,6 @@ struct mt7915_tx_free {
- 
  #define MT_TX_FREE_VER			GENMASK(18, 16)
  #define MT_TX_FREE_MSDU_CNT		GENMASK(9, 0)
 -#define MT_TX_FREE_MSDU_CNT_V0	GENMASK(6, 0)
@@ -759,10 +764,10 @@
  #define MT_TX_FREE_LATENCY		GENMASK(12, 0)
  /* 0: success, others: dropped */
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 2d5a46d3..7da3eada 100644
+index 5f3e2c2d..51b3ccba 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1421,39 +1421,6 @@ out:
+@@ -1418,39 +1418,6 @@ out:
  	return ret;
  }
  
@@ -802,7 +807,7 @@
  const struct ieee80211_ops mt7915_ops = {
  	.tx = mt7915_tx,
  	.start = mt7915_start,
-@@ -1501,7 +1468,4 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1498,7 +1465,4 @@ const struct ieee80211_ops mt7915_ops = {
  	.sta_add_debugfs = mt7915_sta_add_debugfs,
  #endif
  	.set_radar_background = mt7915_set_radar_background,
@@ -811,12 +816,10 @@
 -#endif
  };
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-old mode 100644
-new mode 100755
-index 2b9797c8..9da3e85c
+index 42f2bda5..716abd58 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -2656,9 +2656,6 @@ int mt7915_run_firmware(struct mt7915_dev *dev)
+@@ -2365,9 +2365,6 @@ int mt7915_run_firmware(struct mt7915_dev *dev)
  	if (ret)
  		return ret;
  
@@ -827,7 +830,7 @@
  	if (ret)
  		return ret;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 995c9ee0..4d196d74 100644
+index a84970d7..1f58b2f5 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -560,21 +560,15 @@ static void mt7915_rx_poll_complete(struct mt76_dev *mdev,
@@ -878,10 +881,10 @@
  	if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
  		return IRQ_NONE;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 90391a07..02a8c424 100644
+index e1e3ce2d..a81a59b9 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -541,8 +541,6 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -526,8 +526,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);
@@ -1116,5 +1119,5 @@
  	    dev->phy.q_tx[0]->blocked)
  		*wake = true;
 -- 
-2.18.0
+2.25.1