[][MAC80211][mt76][move muru_onoff in mt7915_phy]

[Description]
Change muru_onoff from mt7915_dev to mt7915_phy.
Without this patch, APUT can't set muru_onoff per band in DBDC mode.

[Release-log]
N/A

Change-Id: Ida7fec4c31d02fba1ba1e60c4a6940d9ea982af4
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7114266
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 2ebf984..a6336d6 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,4 +1,4 @@
-From c1c5febad5b40bba3026976061a2d6c234f8ad25 Mon Sep 17 00:00:00 2001
+From ecececeedd9e0b8ed6589ed4e25d5fdf6789a59b Mon Sep 17 00:00:00 2001
 From: Shayne Chen <shayne.chen@mediatek.com>
 Date: Wed, 22 Jun 2022 10:39:47 +0800
 Subject: [PATCH 1001/1009] mt76: mt7915: add mtk internal debug tools for mt76
@@ -11,18 +11,18 @@
  mt7915/main.c         |    4 +
  mt7915/mcu.c          |   48 +-
  mt7915/mcu.h          |    4 +
- mt7915/mt7915.h       |   44 +
+ mt7915/mt7915.h       |   43 +
  mt7915/mt7915_debug.h | 1363 +++++++++++++++++++
  mt7915/mtk_debugfs.c  | 3003 +++++++++++++++++++++++++++++++++++++++++
  mt7915/mtk_mcu.c      |   51 +
  tools/fwlog.c         |   44 +-
- 12 files changed, 4642 insertions(+), 14 deletions(-)
+ 12 files changed, 4641 insertions(+), 14 deletions(-)
  create mode 100644 mt7915/mt7915_debug.h
  create mode 100644 mt7915/mtk_debugfs.c
  create mode 100644 mt7915/mtk_mcu.c
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index a5e6ee4d..cbe0c52a 100644
+index a5e6ee4..cbe0c52 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1151,6 +1151,7 @@ enum {
@@ -46,7 +46,7 @@
  	MCU_EXT_CMD_CAL_CACHE = 0x67,
  	MCU_EXT_CMD_RED_ENABLE = 0x68,
 diff --git a/mt7915/Makefile b/mt7915/Makefile
-index f033116c..cbcb64be 100644
+index f033116..cbcb64b 100644
 --- a/mt7915/Makefile
 +++ b/mt7915/Makefile
 @@ -4,7 +4,7 @@ EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
@@ -59,7 +59,7 @@
  mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
  mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 5a46813a..f1f3f2f3 100644
+index 5a46813..f1f3f2f 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -8,6 +8,9 @@
@@ -203,7 +203,7 @@
  
  	if (dev->relay_fwlog)
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 97ca55d2..1ba4096d 100644
+index 97ca55d..1ba4096 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -299,6 +299,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
@@ -242,7 +242,7 @@
  }
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3bbccbdf..94ecded5 100644
+index 3bbccbd..94ecded 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -73,7 +73,11 @@ int mt7915_run(struct ieee80211_hw *hw)
@@ -258,7 +258,7 @@
  		goto out;
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index f151ce86..ff718f78 100644
+index f151ce8..ff718f7 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -199,6 +199,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
@@ -342,7 +342,7 @@
 +}
 +#endif
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index b9ea297f..da863601 100644
+index b9ea297..da86360 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -278,6 +278,10 @@ enum {
@@ -357,7 +357,7 @@
  };
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 3cbfb9b6..19880099 100644
+index 3cbfb9b..5fcc8ac 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -9,6 +9,7 @@
@@ -368,7 +368,7 @@
  #define MT7915_MAX_INTERFACES		19
  #define MT7915_WTBL_SIZE		288
  #define MT7916_WTBL_SIZE		544
-@@ -373,6 +374,29 @@ struct mt7915_dev {
+@@ -373,6 +374,28 @@ struct mt7915_dev {
  	struct reset_control *rstc;
  	void __iomem *dcm;
  	void __iomem *sku;
@@ -391,14 +391,13 @@
 +		bool dump_rx_raw;
 +		u32 token_idx;
 +		u8 sku_disable;
-+		u8 muru_onoff;
 +	} dbg;
 +	const struct mt7915_dbg_reg_desc *dbg_reg;
 +#endif
  };
  
  enum {
-@@ -651,4 +675,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -651,4 +674,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
@@ -425,7 +424,7 @@
  #endif
 diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
 new file mode 100644
-index 00000000..ca553dca
+index 0000000..ca553dc
 --- /dev/null
 +++ b/mt7915/mt7915_debug.h
 @@ -0,0 +1,1363 @@
@@ -1794,7 +1793,7 @@
 +#endif
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
 new file mode 100644
-index 00000000..4fb845b0
+index 0000000..4fb845b
 --- /dev/null
 +++ b/mt7915/mtk_debugfs.c
 @@ -0,0 +1,3003 @@
@@ -4803,7 +4802,7 @@
 +#endif
 diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
 new file mode 100644
-index 00000000..143dae26
+index 0000000..143dae2
 --- /dev/null
 +++ b/mt7915/mtk_mcu.c
 @@ -0,0 +1,51 @@
@@ -4859,7 +4858,7 @@
 +				 sizeof(req), true);
 +}
 diff --git a/tools/fwlog.c b/tools/fwlog.c
-index e5d4a105..3d51d9ec 100644
+index e5d4a10..3d51d9e 100644
 --- a/tools/fwlog.c
 +++ b/tools/fwlog.c
 @@ -26,7 +26,7 @@ static const char *debugfs_path(const char *phyname, const char *file)
@@ -4973,5 +4972,5 @@
  	return ret;
  }
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1004-mt76-mt7915-add-support-for-muru_onoff-via-debugfs.patch
index 08c1be9..30c30f1 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,33 +1,43 @@
-From b2fbeb0f208704fa5e6bb2a5e6a32e5f77be4e96 Mon Sep 17 00:00:00 2001
+From f45e6908cbe43d1dd02f92569ed2549e021822e1 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Wed, 22 Jun 2022 10:45:53 +0800
 Subject: [PATCH 1004/1009] mt76: mt7915: add support for muru_onoff via
  debugfs
 
 ---
- mt7915/init.c        |  1 +
- mt7915/mcu.c         | 11 ++++++++---
+ mt7915/init.c        |  2 ++
+ mt7915/mcu.c         | 12 +++++++++---
  mt7915/mcu.h         |  6 ++++++
+ mt7915/mt7915.h      |  2 ++
  mt7915/mtk_debugfs.c | 33 +++++++++++++++++++++++++++++++++
- 4 files changed, 48 insertions(+), 3 deletions(-)
+ 5 files changed, 52 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 06ac261f..f73d34a9 100644
+index 06ac261..3897ac4 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -687,6 +687,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);
-+	dev->dbg.muru_onoff = OFDMA_DL | MUMIMO_UL | MUMIMO_DL;
+@@ -433,6 +433,8 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+ 		mphy->leds.cdev.brightness_set = mt7915_led_set_brightness;
+ 		mphy->leds.cdev.blink_set = mt7915_led_set_blink;
+ 	}
++
++	phy->muru_onoff = OFDMA_DL | MUMIMO_UL | MUMIMO_DL;
  }
  
- void mt7915_wfsys_reset(struct mt7915_dev *dev)
+ static void
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 59cce553..a46b714d 100644
+index 59cce55..cf9a3e2 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -876,13 +876,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -864,6 +864,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+ 			struct ieee80211_sta *sta, struct ieee80211_vif *vif)
+ {
+ 	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
++	struct mt7915_phy *phy = mvif->phy;
+ 	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
+ 	struct sta_rec_muru *muru;
+ 	struct tlv *tlv;
+@@ -876,13 +877,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
  
  	muru = (struct sta_rec_muru *)tlv;
  
@@ -37,20 +47,20 @@
 +	muru->cfg.mimo_dl_en = (mvif->cap.he_mu_ebfer ||
 +			        mvif->cap.vht_mu_ebfer ||
 +			        mvif->cap.vht_mu_ebfee) &&
-+			       !!(dev->dbg.muru_onoff & MUMIMO_DL);
++			       !!(phy->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);
++	muru->cfg.mimo_ul_en = !!(phy->muru_onoff & MUMIMO_UL);
++	muru->cfg.ofdma_dl_en = !!(phy->muru_onoff & OFDMA_DL);
++	muru->cfg.ofdma_ul_en = !!(phy->muru_onoff & OFDMA_UL);
 +
  	if (sta->deflink.vht_cap.vht_supported)
  		muru->mimo_dl.vht_mu_bfee =
  			!!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index c776417b..275a0ece 100644
+index c776417..275a0ec 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -609,4 +609,10 @@ struct csi_data {
@@ -64,8 +74,21 @@
 +#define MUMIMO_UL                      BIT(3)
 +
  #endif
+diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
+index df0d7a1..e94970b 100644
+--- a/mt7915/mt7915.h
++++ b/mt7915/mt7915.h
+@@ -307,6 +307,8 @@ struct mt7915_phy {
+ 	u32 rx_ampdu_ts;
+ 	u32 ampdu_ref;
+ 
++	u8 muru_onoff;
++
+ 	struct mib_stats mib;
+ 	struct mt76_channel_state state_ts;
+ 
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 4fb845b0..1aafe040 100644
+index 4fb845b..1aafe04 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
 @@ -2558,6 +2558,38 @@ static int mt7915_token_txd_read(struct seq_file *s, void *data)
@@ -74,31 +97,31 @@
  
 +static int mt7915_muru_onoff_get(void *data, u64 *val)
 +{
-+       struct mt7915_dev *dev = data;
++	struct mt7915_phy *phy = data;
 +
-+       *val = dev->dbg.muru_onoff;
++	*val = phy->muru_onoff;
 +
-+       printk("mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
-+               !!(dev->dbg.muru_onoff & MUMIMO_UL),
-+               !!(dev->dbg.muru_onoff & MUMIMO_DL),
-+               !!(dev->dbg.muru_onoff & OFDMA_UL),
-+               !!(dev->dbg.muru_onoff & OFDMA_DL));
++	printk("mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
++		    !!(phy->muru_onoff & MUMIMO_UL),
++		    !!(phy->muru_onoff & MUMIMO_DL),
++		    !!(phy->muru_onoff & OFDMA_UL),
++		    !!(phy->muru_onoff & OFDMA_DL));
 +
-+       return 0;
++	return 0;
 +}
 +
 +static int mt7915_muru_onoff_set(void *data, u64 val)
 +{
-+       struct mt7915_dev *dev = data;
++	struct mt7915_phy *phy = data;
 +
-+       if (val > 15) {
-+               printk("Wrong value! The value is between 0 ~ 15.\n");
-+               goto exit;
-+       }
++	if (val > 15) {
++		printk("Wrong value! The value is between 0 ~ 15.\n");
++		goto exit;
++	}
 +
-+       dev->dbg.muru_onoff = val;
++	phy->muru_onoff = val;
 +exit:
-+       return 0;
++	return 0;
 +}
 +
 +DEFINE_DEBUGFS_ATTRIBUTE(fops_muru_onoff, mt7915_muru_onoff_get,
@@ -111,10 +134,10 @@
  
  	mt7915_mcu_fw_log_2_host(dev, MCU_FW_LOG_WM, 0);
  
-+	debugfs_create_file("muru_onoff", 0600, dir, dev, &fops_muru_onoff);
++	debugfs_create_file("muru_onoff", 0600, dir, phy, &fops_muru_onoff);
  	debugfs_create_file("fw_debug_module", 0600, dir, dev,
  			    &fops_fw_debug_module);
  	debugfs_create_file("fw_debug_level", 0600, dir, dev,
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
index 483bfab..8788a80 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-mt7915-certification-patches.patch
@@ -1,4 +1,4 @@
-From d3944b59509bc65831997e973cf800f1e3f2b205 Mon Sep 17 00:00:00 2001
+From a3246b4d0ebb9b123c552f05226b0dc612c70788 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 6 Jun 2022 20:15:51 +0800
 Subject: [PATCH 1005/1009] mt76: mt7915: certification patches
@@ -10,13 +10,13 @@
  mt7915/mcu.c         | 466 +++++++++++++++++++++++++++++++++++++++++++
  mt7915/mcu.h         | 207 ++++++++++++++++++-
  mt7915/mt7915.h      |  13 ++
- mt7915/mtk_debugfs.c |   7 +-
+ mt7915/mtk_debugfs.c |  25 +--
  mt7915/vendor.c      | 187 +++++++++++++++++
  mt7915/vendor.h      |  42 ++++
- 9 files changed, 956 insertions(+), 5 deletions(-)
+ 9 files changed, 965 insertions(+), 14 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 60161c9e..ff114cb9 100644
+index 60161c9..ff114cb 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1199,6 +1199,7 @@ enum {
@@ -28,7 +28,7 @@
  };
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 547519cc..599d328d 100644
+index 547519c..599d328 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -8,6 +8,7 @@
@@ -76,7 +76,7 @@
  			       IEEE80211_RC_NSS_CHANGED |
  			       IEEE80211_RC_BW_CHANGED))
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 3ded65de..e4d1c27b 100644
+index 3ded65d..05a5fbc 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -678,6 +678,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
@@ -99,7 +99,7 @@
 +		return ret;
 +
 +#ifdef CONFIG_MTK_VENDOR
-+	if (dev->dbg.muru_onoff & MUMIMO_DL_CERT) {
++	if (phy->muru_onoff & MUMIMO_DL_CERT) {
 +		phy = mvif->mt76.band_idx ? mt7915_ext_phy(dev) : &dev->phy;
 +		mt7915_mcu_set_mimo(phy, 0);
 +	}
@@ -109,10 +109,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 a46b714d..40b17b5f 100644
+index cf9a3e2..c15dce3 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3938,6 +3938,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -3939,6 +3939,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
  
  	return 0;
  }
@@ -120,7 +120,7 @@
 +{
 +	u8 mode, val;
 +	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
-+	struct mt7915_dev *dev =  mvif->phy->dev;
++	struct mt7915_phy *phy = mvif->phy;
 +
 +	mode = FIELD_GET(RATE_CFG_MODE, *((u32 *)data));
 +	val = FIELD_GET(RATE_CFG_VAL, *((u32 *)data));
@@ -128,13 +128,13 @@
 +	switch (mode) {
 +	case RATE_PARAM_FIXED_OFDMA:
 +		if (val == 3) /* DL 20 and 80 */
-+			dev->dbg.muru_onoff = OFDMA_DL; /* Enable OFDMA DL only */
++			phy->muru_onoff = OFDMA_DL; /* Enable OFDMA DL only */
 +		else
-+			dev->dbg.muru_onoff = val;
++			phy->muru_onoff = val;
 +		break;
 +	case RATE_PARAM_FIXED_MIMO:
 +		if (val == 0)
-+			dev->dbg.muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
++			phy->muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
 +		break;
 +	}
 +}
@@ -586,7 +586,7 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 275a0ece..714bc44d 100644
+index 275a0ec..714bc44 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -416,10 +416,14 @@ enum {
@@ -820,10 +820,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 9a9d7f55..018fd23e 100644
+index e94970b..8b292c3 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -721,6 +721,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -722,6 +722,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
  #ifdef CONFIG_MTK_VENDOR
@@ -844,32 +844,32 @@
  int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
  			u8 cfg, u8 v1, u32 v2, u8 *mac_addr);
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 1aafe040..f8d2cbbb 100644
+index 1aafe04..e0af645 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -2564,7 +2564,8 @@ static int mt7915_muru_onoff_get(void *data, u64 *val)
+@@ -2564,7 +2564,8 @@ static int mt7915_muru_onoff_get(void *d
  
-        *val = dev->dbg.muru_onoff;
+ 	*val = phy->muru_onoff;
  
--       printk("mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
-+	   printk("cert mumimo dl:%d, mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
-+               !!(dev->dbg.muru_onoff & MUMIMO_DL_CERT),
-                !!(dev->dbg.muru_onoff & MUMIMO_UL),
-                !!(dev->dbg.muru_onoff & MUMIMO_DL),
-                !!(dev->dbg.muru_onoff & OFDMA_UL),
-@@ -2577,8 +2578,8 @@ static int mt7915_muru_onoff_set(void *data, u64 val)
+-	printk("mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
++	printk("cert mumimo dl:%d, normal mumimo ul:%d, mumimo dl:%d, ofdma ul:%d, ofdma dl:%d\n",
++		    !!(phy->muru_onoff & MUMIMO_DL_CERT),
+ 		    !!(phy->muru_onoff & MUMIMO_UL),
+ 		    !!(phy->muru_onoff & MUMIMO_DL),
+ 		    !!(phy->muru_onoff & OFDMA_UL),
+@@ -2577,8 +2578,8 @@ static int mt7915_muru_onoff_set(void *d
  {
-        struct mt7915_dev *dev = data;
+ 	struct mt7915_phy *phy = data;
  
--       if (val > 15) {
--               printk("Wrong value! The value is between 0 ~ 15.\n");
-+       if (val > 31) {
-+               printk("Wrong value! The value is between 0 ~ 31.\n");
-                goto exit;
-        }
+-	if (val > 15) {
+-		printk("Wrong value! The value is between 0 ~ 15.\n");
++	if (val > 31) {
++		printk("Wrong value! The value is between 0 ~ 31.\n");
+ 		goto exit;
+ 	}
  
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index b94d787e..7456c577 100644
+index b94d787..beb0583 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -22,6 +22,29 @@ csi_ctrl_policy[NUM_MTK_VENDOR_ATTRS_CSI_CTRL] = {
@@ -1029,7 +1029,7 @@
 +		mt7915_mcu_set_ppdu_tx_type(phy, val8);
 +	} else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_NUSERS_OFDMA]) {
 +		val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_NUSERS_OFDMA]);
-+		if (FIELD_GET(OFDMA_UL, dev->dbg.muru_onoff) == 1)
++		if (FIELD_GET(OFDMA_UL, phy->muru_onoff) == 1)
 +			mt7915_mcu_set_nusers_ofdma(phy, MURU_UL_USER_CNT, val8);
 +		else
 +			mt7915_mcu_set_nusers_ofdma(phy, MURU_DL_USER_CNT, val8);
@@ -1081,7 +1081,7 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 976817f3..1b08321c 100644
+index 976817f..1b08321 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -6,6 +6,48 @@
@@ -1134,5 +1134,5 @@
  
  enum mtk_vendor_attr_csi_ctrl {
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
index 2df0a9c..92f3f59 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
@@ -1,4 +1,4 @@
-From dede9889b01c531a5e71c4b1beffaef33b799a0b Mon Sep 17 00:00:00 2001
+From 7197b9ba537a486c3ba398d2e0a806f093b682a3 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Wed, 22 Jun 2022 10:53:43 +0800
 Subject: [PATCH 1007/1009] mt76: mt7915: add mt76 vendor muru onoff command
@@ -11,25 +11,25 @@
  4 files changed, 63 insertions(+)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index f7ed1049..6ec12fd2 100644
+index 3a0e87a..62d83bf 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3957,6 +3957,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
+@@ -3958,6 +3958,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;
+ 			phy->muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
  		break;
 +	case RATE_PARAM_AUTO_HEMU:
 +		if (val < 0 || val > 15) {
 +			printk("Wrong value! The value is between 0-15.\n");
 +			break;
 +		}
-+		dev->dbg.muru_onoff = val;
++		phy->muru_onoff = val;
 +		break;
  	}
  }
  
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 714bc44d..aaea3230 100644
+index 714bc44..aaea323 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -423,6 +423,7 @@ enum {
@@ -41,7 +41,7 @@
  };
  
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 7456c577..c7551848 100644
+index beb0583..5acbd2d 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -34,6 +34,11 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -109,7 +109,7 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 1b08321c..a8e4ebf9 100644
+index 1b08321..a8e4ebf 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -8,6 +8,7 @@ enum mtk_nl80211_vendor_subcmds {
@@ -139,5 +139,5 @@
  	MTK_VENDOR_ATTR_RFEATURE_CTRL_UNSPEC,
  
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
index 7ccc7d8..eaa50d3 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
@@ -1,16 +1,16 @@
-From 12952f6d361dd09ed3e7c27ef54d0c2acd00ad6f Mon Sep 17 00:00:00 2001
+From 805623e9a7556fc147bd167a50bfe5538e924c7b Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Thu, 11 Aug 2022 18:09:45 -0700
 Subject: [PATCH 1124/1133] mt76: mt7915: Add hemu dump support
 
 Change-Id: I521214f3feb6f0d528a9f550255050ffd1ec96d2
 ---
- mt7915/vendor.c | 25 +++++++++++++++++++++++++
+ mt7915/vendor.c | 24 ++++++++++++++++++++++++
  mt7915/vendor.h |  1 +
- 2 files changed, 26 insertions(+)
+ 2 files changed, 25 insertions(+)
 
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 2484e25f..f7becce9 100644
+index f712d67..83f38e0 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -37,6 +37,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -21,7 +21,7 @@
  };
  
  static const struct nla_policy
-@@ -1004,6 +1005,29 @@ static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
+@@ -1004,6 +1005,28 @@ static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
  	return 0;
  }
  
@@ -33,14 +33,13 @@
 +{
 +	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
 +	struct mt7915_phy *phy = mt7915_hw_phy(hw);
-+	struct mt7915_dev *dev = phy->dev;
 +	int len = 0;
 +
 +	if (*storage == 1)
 +		return -ENOENT;
 +	*storage = 1;
 +
-+	if (nla_put_u8(skb, MTK_VENDOR_ATTR_HEMU_CTRL_DUMP, dev->dbg.muru_onoff))
++	if (nla_put_u8(skb, MTK_VENDOR_ATTR_HEMU_CTRL_DUMP, phy->muru_onoff))
 +		return -ENOMEM;
 +	len += 1;
 +
@@ -51,7 +50,7 @@
  static int
  mt7915_vendor_phy_capa_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
  			     struct sk_buff *skb, const void *data, int data_len,
-@@ -1190,6 +1214,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1190,6 +1213,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
  			WIPHY_VENDOR_CMD_NEED_RUNNING,
  		.doit = mt7915_vendor_hemu_ctrl,
@@ -60,7 +59,7 @@
  		.maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
  	},
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 72319717..c19ffe72 100644
+index 7231971..c19ffe7 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -72,6 +72,7 @@ enum mtk_vendor_attr_hemu_ctrl {
@@ -72,5 +71,5 @@
  	/* keep last */
  	NUM_MTK_VENDOR_ATTRS_HEMU_CTRL,
 -- 
-2.18.0
+2.39.0
 
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
index 1977b98..20fc039 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
@@ -713,14 +713,14 @@
  			struct ieee80211_sta *sta, struct ieee80211_vif *vif)
  {
  	struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
+	struct mt7915_phy *phy = mvif->phy;
 -	struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
 +	struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
  	struct sta_rec_muru *muru;
  	struct tlv *tlv;
- 
 @@ -912,11 +912,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- 	muru->cfg.ofdma_dl_en = !!(dev->dbg.muru_onoff & OFDMA_DL);
- 	muru->cfg.ofdma_ul_en = !!(dev->dbg.muru_onoff & OFDMA_UL);
+ 	muru->cfg.ofdma_dl_en = !!(phy->muru_onoff & OFDMA_DL);
+ 	muru->cfg.ofdma_ul_en = !!(phy->muru_onoff & OFDMA_UL);
  
 -	if (sta->deflink.vht_cap.vht_supported)
 +	if (sta->vht_cap.vht_supported)