[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]

[Description]
Refactor and sync kernel/wifi from Openwrt

[Release-log]
N/A

diff --git a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl.patch b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl.patch
index 97002bb..d1c487a 100644
--- a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl.patch
@@ -1,18 +1,19 @@
-From b3325580c9d1f3503582323e0787de7f28d49b58 Mon Sep 17 00:00:00 2001
+From a7682d61851c686f78273df7a9926203c8e17ee9 Mon Sep 17 00:00:00 2001
 From: Howard Hsu <howard-yh.hsu@mediatek.com>
 Date: Fri, 24 Jun 2022 11:15:45 +0800
-Subject: [PATCH 1120/1128] mt76: mt7915: add vendor subcmd EDCCA ctrl
+Subject: [PATCH] mt76: mt7915: add vendor subcmd EDCCA ctrl
+ enable/threshold/compensation
 
-Change-Id: I92dabf8be9c5a7ecec78f35325bc5645af8d15ab
+Change-Id: I06a3f94d5e444be894200e2b6588d76ed38d09d0
 ---
- mt76_connac_mcu.h |  1 +
- mt7915/main.c     |  3 +++
- mt7915/mcu.c      | 38 ++++++++++++++++++++++++++++
- mt7915/mcu.h      | 13 ++++++++++
- mt7915/mt7915.h   |  2 ++
- mt7915/vendor.c   | 63 +++++++++++++++++++++++++++++++++++++++++++++++
- mt7915/vendor.h   | 19 ++++++++++++++
- 7 files changed, 139 insertions(+)
+ mt76_connac_mcu.h |   1 +
+ mt7915/main.c     |   3 ++
+ mt7915/mcu.c      |  72 +++++++++++++++++++++++++
+ mt7915/mcu.h      |  21 ++++++++
+ mt7915/mt7915.h   |   3 +-
+ mt7915/vendor.c   | 134 ++++++++++++++++++++++++++++++++++++++++++++++
+ mt7915/vendor.h   |  33 ++++++++++++
+ 7 files changed, 266 insertions(+), 1 deletion(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
 index a31b85f0..bceb6799 100644
@@ -41,16 +42,15 @@
  		ret = mt7915_set_channel(phy);
  		if (ret)
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e03ec9e3..8fc40c5a 100644
+index e03ec9e3..67304c84 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -4282,3 +4282,41 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
+@@ -4282,3 +4282,75 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
  
  	return 0;
  }
 +
-+int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value,
-+			 s8 compensation)
++int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value, s8 compensation)
 +{
 +	static const u8 ch_band[] = {
 +		[NL80211_BAND_2GHZ] = 0,
@@ -70,27 +70,62 @@
 +		.band_idx = phy->band_idx,
 +		.cmd_idx = mode,
 +		.record_in_fw = false,
-+		.region = dev->mt76.region,
 +		.thres_compensation = compensation,
 +	};
 +
-+	if (ch_band[chandef->chan->band] != 2)
-+		return 0;
++	if (ch_band[chandef->chan->band] == 2 && dev->mt76.region == NL80211_DFS_FCC)
++		req.region = dev->mt76.region;
 +
 +	if (mode == EDCCA_CTRL_SET_EN) {
-+		if (!value)
-+			req.setting[0] = EDCCA_MODE_AUTO;
-+		else
-+			req.setting[0] = value[0];
++		req.setting[0] = (!value)? EDCCA_MODE_AUTO: value[0];
++	} else if (mode == EDCCA_CTRL_SET_THERS) {
++		req.setting[0] = value[0];
++		req.setting[1] = value[1];
++		req.setting[2] = value[2];
++	} else {
++		return -EINVAL;
 +	}
 +
 +	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EDCCA), &req, sizeof(req), true);
 +}
++
++
++int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value)
++{
++	struct mt7915_dev *dev = phy->dev;
++	struct {
++		u8 band_idx;
++		u8 cmd_idx;
++		u8 setting[3];
++		bool record_in_fw;
++		u8 region;
++		s8 thres_compensation;
++	} __packed req = {
++		.band_idx = phy->band_idx,
++		.cmd_idx = mode,
++		.record_in_fw = false,
++	};
++	struct sk_buff *skb;
++	int ret;
++	struct mt7915_mcu_edcca_info *res;
++
++	ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(EDCCA), &req, sizeof(req),
++				        true, &skb);
++	if (ret)
++		return ret;
++
++	res = (struct mt7915_mcu_edcca_info *)skb->data;
++	*value++ = res->info[0];
++	*value++ = res->info[1];
++	*value = res->info[2];
++
++	return 0;
++}
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 0a79fe04..2ca2c005 100644
+index 0a79fe04..b608cb6a 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -836,6 +836,19 @@ enum {
+@@ -836,6 +836,27 @@ enum {
     MURU_DL_INIT,
     MURU_UL_INIT,
  };
@@ -107,27 +142,36 @@
 +   EDCCA_MODE_FORCE_DISABLE,
 +   EDCCA_MODE_AUTO,
 +};
++
++struct mt7915_mcu_edcca_info {
++	u8 cmd_idx;
++	u8 band_idx;
++	u8 info[3];
++	u8 fginit;
++	u8 rsv[2];
++};
  #endif
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 5023cfcb..1cfa6f03 100644
+index 5023cfcb..2b56692d 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -747,6 +747,8 @@ void mt7915_vendor_amnt_fill_rx(struct mt7915_phy *phy, struct sk_buff *skb);
+@@ -747,7 +747,8 @@ void mt7915_vendor_amnt_fill_rx(struct mt7915_phy *phy, struct sk_buff *skb);
  int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
  				  struct ieee80211_sta *sta);
  #endif
-+int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value,
-+			 s8 compensation);
- 
+-
++int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value, s8 compensation);
++int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value);
  int mt7915_mcu_ipi_hist_ctrl(struct mt7915_phy *phy, void *data, u8 cmd, bool wait_resp);
  int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool wait_resp);
+ 
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 77d71e48..5a28a554 100644
+index 77d71e48..cd5c3b83 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
-@@ -62,6 +62,17 @@ phy_capa_dump_policy[NUM_MTK_VENDOR_ATTRS_PHY_CAPA_DUMP] = {
+@@ -62,6 +62,24 @@ phy_capa_dump_policy[NUM_MTK_VENDOR_ATTRS_PHY_CAPA_DUMP] = {
  	[MTK_VENDOR_ATTR_PHY_CAPA_DUMP_MAX_SUPPORTED_STA] = { .type = NLA_U16 },
  };
  
@@ -141,11 +185,18 @@
 +       [MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE] = { .type = NLA_S8 },
 +};
 +
++static const struct nla_policy
++edcca_dump_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP] = {
++       [MTK_VENDOR_ATTR_EDCCA_DUMP_MODE] = { .type = NLA_U8 },
++       [MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL] = { .type = NLA_U8 },
++       [MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL] = { .type = NLA_U8 },
++       [MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL] = { .type = NLA_U8 },
++};
 +
  struct csi_null_tone {
  	u8 start;
  	u8 end;
-@@ -1015,6 +1026,47 @@ mt7915_vendor_phy_capa_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+@@ -1015,6 +1033,110 @@ mt7915_vendor_phy_capa_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
  	return len;
  }
  
@@ -160,6 +211,7 @@
 +	int err;
 +	u8 edcca_mode;
 +	s8 edcca_compensation;
++	u8 edcca_value[EDCCA_THRES_NUM] = {0};
 +
 +	err = nla_parse(tb, MTK_VENDOR_ATTR_EDCCA_CTRL_MAX, data, data_len,
 +			edcca_ctrl_policy, NULL);
@@ -171,7 +223,6 @@
 +
 +	edcca_mode = nla_get_u8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE]);
 +	if (edcca_mode == EDCCA_CTRL_SET_EN) {
-+		u8 edcca_value[3] = {0};
 +		if (!tb[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL] ||
 +			!tb[MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE]) {
 +			return -EINVAL;
@@ -182,18 +233,81 @@
 +			nla_get_s8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE]);
 +
 +		err = mt7915_mcu_set_edcca(phy, edcca_mode, edcca_value,
-+					 edcca_compensation);
++					   edcca_compensation);
 +		if (err)
 +			return err;
++	} else if (edcca_mode == EDCCA_CTRL_SET_THERS) {
++		if (!tb[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL] ||
++		    !tb[MTK_VENDOR_ATTR_EDCCA_CTRL_SEC40_VAL] ||
++		    !tb[MTK_VENDOR_ATTR_EDCCA_CTRL_SEC80_VAL]) {
++			return -EINVAL;
++		}
++		edcca_value[0] =
++			nla_get_u8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_PRI20_VAL]);
++		edcca_value[1] =
++			nla_get_u8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_SEC40_VAL]);
++		edcca_value[2] =
++			nla_get_u8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_SEC80_VAL]);
++		err = mt7915_mcu_set_edcca(phy, edcca_mode, edcca_value,
++					   edcca_compensation);
++		if (err)
++			return err;
++	} else {
++		return -EINVAL;
 +	}
++
 +	return 0;
 +}
 +
++static int
++mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
++			     struct sk_buff *skb, const void *data, int data_len,
++			     unsigned long *storage)
++{
++	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_EDCCA_CTRL];
++	void *a;
++	int len = EDCCA_THRES_NUM;
++	int err;
++	u8 edcca_mode;
++	s8 value[EDCCA_THRES_NUM];
++
++	if (*storage == 1)
++		return -ENOENT;
++	*storage = 1;
++
++	err = nla_parse(tb, MTK_VENDOR_ATTR_EDCCA_CTRL_MAX, data, data_len,
++			edcca_ctrl_policy, NULL);
++	if (err)
++		return err;
++
++	if (!tb[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE])
++		return -EINVAL;
++
++	edcca_mode = nla_get_u8(tb[MTK_VENDOR_ATTR_EDCCA_CTRL_MODE]);
++	if (edcca_mode ==  EDCCA_CTRL_GET_EN || edcca_mode == EDCCA_CTRL_GET_THERS) {
++		err = mt7915_mcu_get_edcca(phy, edcca_mode, value);
++	} else {
++		return -EINVAL;
++	}
++
++	if (err)
++		return err;
++
++	if (nla_put_u8(skb, MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL, value[0]) ||
++	    nla_put_u8(skb, MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL, value[1]) ||
++	    nla_put_u8(skb, MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL, value[2]))
++		return -ENOMEM;
++
++	return len;
++}
 +
  static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  	{
  		.info = {
-@@ -1083,6 +1135,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1083,6 +1205,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  		.dumpit = mt7915_vendor_phy_capa_ctrl_dump,
  		.policy = phy_capa_ctrl_policy,
  		.maxattr = MTK_VENDOR_ATTR_PHY_CAPA_CTRL_MAX,
@@ -206,22 +320,31 @@
 +		.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
 +			 WIPHY_VENDOR_CMD_NEED_RUNNING,
 +		.doit = mt7915_vendor_edcca_ctrl,
++		.dumpit = mt7915_vendor_edcca_ctrl_dump,
 +		.policy = edcca_ctrl_policy,
 +		.maxattr = MTK_VENDOR_ATTR_EDCCA_CTRL_MAX,
  	}
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 719b851f..83c41bc1 100644
+index 719b851f..72319717 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
-@@ -10,8 +10,27 @@ enum mtk_nl80211_vendor_subcmds {
+@@ -2,6 +2,7 @@
+ #define __MT7915_VENDOR_H
+ 
+ #define MTK_NL80211_VENDOR_ID	0x0ce7
++#define EDCCA_THRES_NUM 3
+ 
+ enum mtk_nl80211_vendor_subcmds {
+ 	MTK_NL80211_VENDOR_SUBCMD_AMNT_CTRL = 0xae,
+@@ -10,6 +11,38 @@ enum mtk_nl80211_vendor_subcmds {
  	MTK_NL80211_VENDOR_SUBCMD_WIRELESS_CTRL = 0xc4,
  	MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
  	MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
 +	MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
- };
- 
++};
++
 +
 +enum mtk_vendor_attr_edcca_ctrl {
 +        MTK_VENDOR_ATTR_EDCCA_THRESHOLD_INVALID = 0,
@@ -239,10 +362,21 @@
 +                NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL - 1
 +};
 +
++enum mtk_vendor_attr_edcca_dump {
++        MTK_VENDOR_ATTR_EDCCA_DUMP_UNSPEC = 0,
 +
++        MTK_VENDOR_ATTR_EDCCA_DUMP_MODE,
++        MTK_VENDOR_ATTR_EDCCA_DUMP_PRI20_VAL,
++        MTK_VENDOR_ATTR_EDCCA_DUMP_SEC40_VAL,
++        MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL,
++
++        /* keep last */
++        NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP,
++        MTK_VENDOR_ATTR_EDCCA_DUMP_MAX =
++                NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP - 1
+ };
+ 
  enum mtk_capi_control_changed {
- 	CAPI_RFEATURE_CHANGED		= BIT(16),
- 	CAPI_WIRELESS_CHANGED		= BIT(17),
 -- 
 2.18.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-implement-bin-file-mode.patch b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-implement-bin-file-mode.patch
index def5acf..db53404 100644
--- a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-implement-bin-file-mode.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-implement-bin-file-mode.patch
@@ -1,4 +1,4 @@
-From b42c0050ce6061473569362d2884ffabae54e404 Mon Sep 17 00:00:00 2001
+From f7cb9b3ad2c0207db231a16d04beea22be1ef798 Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 7 Jul 2022 11:09:59 +0800
 Subject: [PATCH 1121/1128] mt76: mt7915: implement bin file mode
@@ -6,14 +6,16 @@
 Change-Id: I2a726341541a11cbecdb210b33a8e79aefbd6cf3
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 ---
- eeprom.c        | 18 +++++++++++++++++
- mt76.h          |  1 +
- mt7915/eeprom.c | 53 +++++++++++++++++++++++++++++++++++++++----------
- mt7915/mt7915.h | 10 ++++++++++
- 4 files changed, 71 insertions(+), 11 deletions(-)
+ eeprom.c             | 18 +++++++++++++++
+ mt76.h               |  1 +
+ mt7915/eeprom.c      | 52 ++++++++++++++++++++------------------------
+ mt7915/eeprom.h      | 44 +++++++++++++++++++++++++++++++++++++
+ mt7915/mt7915.h      | 17 ++++++++++++---
+ mt7915/mtk_debugfs.c | 36 ++++++++++++++++++++++++++++++
+ 6 files changed, 136 insertions(+), 32 deletions(-)
 
 diff --git a/eeprom.c b/eeprom.c
-index 4c50bfe6..baca86fd 100644
+index e083964..5b9faf7 100644
 --- a/eeprom.c
 +++ b/eeprom.c
 @@ -104,6 +104,24 @@ out_put_node:
@@ -42,7 +44,7 @@
  mt76_eeprom_override(struct mt76_phy *phy)
  {
 diff --git a/mt76.h b/mt76.h
-index 0a9552b5..e29f490e 100644
+index 0a9552b..e29f490 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -1010,6 +1010,7 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str,
@@ -54,55 +56,44 @@
  struct mt76_queue *
  mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
 diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
-index 0f5862e3..0ae8d1b4 100644
+index 0f5862e..4d2d9ca 100644
 --- a/mt7915/eeprom.c
 +++ b/mt7915/eeprom.c
-@@ -46,26 +46,36 @@ static char *mt7915_eeprom_name(struct mt7915_dev *dev)
- {
- 	switch (mt76_chip(&dev->mt76)) {
- 	case 0x7915:
+@@ -42,33 +42,6 @@ static int mt7915_check_eeprom(struct mt7915_dev *dev)
+ 	}
+ }
+ 
+-static char *mt7915_eeprom_name(struct mt7915_dev *dev)
+-{
+-	switch (mt76_chip(&dev->mt76)) {
+-	case 0x7915:
 -		return dev->dbdc_support ?
 -		       MT7915_EEPROM_DEFAULT_DBDC : MT7915_EEPROM_DEFAULT;
-+		if (dev->bin_file_mode)
-+			return dev->dbdc_support ?
-+				MT7915_BIN_FILE_DBDC : MT7915_BIN_FILE;
-+		else
-+			return dev->dbdc_support ?
-+				MT7915_EEPROM_DEFAULT_DBDC : MT7915_EEPROM_DEFAULT;
- 	case 0x7986:
- 		switch (mt7915_check_adie(dev, true)) {
- 		case MT7976_ONE_ADIE_DBDC:
+-	case 0x7986:
+-		switch (mt7915_check_adie(dev, true)) {
+-		case MT7976_ONE_ADIE_DBDC:
 -			return MT7986_EEPROM_MT7976_DEFAULT_DBDC;
-+			return dev->bin_file_mode ?
-+			MT7986_BIN_FILE_MT7976_DBDC : MT7986_EEPROM_MT7976_DEFAULT_DBDC;
- 		case MT7975_ONE_ADIE:
+-		case MT7975_ONE_ADIE:
 -			return MT7986_EEPROM_MT7975_DEFAULT;
-+			return dev->bin_file_mode ?
-+			MT7986_BIN_FILE_MT7975 : MT7986_EEPROM_MT7975_DEFAULT;
- 		case MT7976_ONE_ADIE:
+-		case MT7976_ONE_ADIE:
 -			return MT7986_EEPROM_MT7976_DEFAULT;
-+			return dev->bin_file_mode ?
-+			MT7986_BIN_FILE_MT7976 : MT7986_EEPROM_MT7976_DEFAULT;
- 		case MT7975_DUAL_ADIE:
+-		case MT7975_DUAL_ADIE:
 -			return MT7986_EEPROM_MT7975_DUAL_DEFAULT;
-+			return dev->bin_file_mode ?
-+			MT7986_BIN_FILE_MT7975_DUAL : MT7986_EEPROM_MT7975_DUAL_DEFAULT;
- 		case MT7976_DUAL_ADIE:
+-		case MT7976_DUAL_ADIE:
 -			return MT7986_EEPROM_MT7976_DUAL_DEFAULT;
-+			return dev->bin_file_mode ?
-+			MT7986_BIN_FILE_MT7976_DUAL : MT7986_EEPROM_MT7976_DUAL_DEFAULT;
- 		default:
- 			break;
- 		}
- 		return NULL;
- 	default:
+-		default:
+-			break;
+-		}
+-		return NULL;
+-	default:
 -		return MT7916_EEPROM_DEFAULT;
-+		return dev->bin_file_mode ?
-+			MT7916_BIN_FILE : MT7916_EEPROM_DEFAULT;
- 	}
- }
- 
-@@ -81,7 +91,10 @@ mt7915_eeprom_load_default(struct mt7915_dev *dev)
+-	}
+-}
+-
+ static int
+ mt7915_eeprom_load_default(struct mt7915_dev *dev)
+ {
+@@ -81,7 +54,10 @@ mt7915_eeprom_load_default(struct mt7915_dev *dev)
  		return ret;
  
  	if (!fw || !fw->data) {
@@ -114,7 +105,23 @@
  		ret = -EINVAL;
  		goto out;
  	}
+@@ -106,6 +82,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
+ 
+ 	if (ret) {
+ 		dev->flash_mode = true;
++		dev->eeprom_mode = FLASH_MODE;
+ 	} else {
+ 		u8 free_block_num;
+ 		u32 block_num, i;
+@@ -121,6 +98,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
+ 		for (i = 0; i < block_num; i++)
+ 			mt7915_mcu_get_eeprom(dev,
+ 					      i * MT7915_EEPROM_BLOCK_SIZE);
++		dev->eeprom_mode = EFUSE_MODE;
+ 	}
-@@ -224,12 +237,30 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
+ 
+ 	return mt7915_check_eeprom(dev);
+@@ -224,12 +202,28 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
  {
  	int ret;
  
@@ -124,10 +131,11 @@
 +	if (dev->bin_file_mode) {
 +		dev->mt76.eeprom.size = mt7915_eeprom_size(dev);
 +		dev->mt76.eeprom.data = devm_kzalloc(dev->mt76.dev, dev->mt76.eeprom.size,
-+						      GFP_KERNEL);
++						     GFP_KERNEL);
 +		if (!dev->mt76.eeprom.data)
 +			return -ENOMEM;
 +		ret = mt7915_eeprom_load_default(dev);
++		dev->eeprom_mode = BIN_FILE_MODE;
 +	} else {
 +		ret = mt7915_eeprom_load(dev);
 +	}
@@ -136,28 +144,98 @@
  		if (ret != -EINVAL)
  			return ret;
  
--		dev_warn(dev->mt76.dev, "eeprom load fail, use default bin\n");
-+		if (dev->bin_file_mode) {
-+			dev_warn(dev->mt76.dev, "bin file load fail, use default bin\n");
-+			dev->bin_file_mode = false;
-+		} else {
-+			dev_warn(dev->mt76.dev, "eeprom load fail, use default bin\n");
-+		}
+ 		dev_warn(dev->mt76.dev, "eeprom load fail, use default bin\n");
++		dev->bin_file_mode = false;
++		dev->eeprom_mode = DEFAULT_BIN_MODE;
 +
  		ret = mt7915_eeprom_load_default(dev);
  		if (ret)
  			return ret;
+diff --git a/mt7915/eeprom.h b/mt7915/eeprom.h
+index fdae347..f228926 100644
+--- a/mt7915/eeprom.h
++++ b/mt7915/eeprom.h
+@@ -108,6 +108,13 @@ enum mt7915_sku_rate_group {
+ 	MAX_SKU_RATE_GROUP_NUM,
+ };
+ 
++enum mt7915_eeprom_mode {
++	DEFAULT_BIN_MODE,
++	EFUSE_MODE,
++	FLASH_MODE,
++	BIN_FILE_MODE,
++};
++
+ static inline int
+ mt7915_get_channel_group_5g(int channel, bool is_7976)
+ {
+@@ -184,6 +191,43 @@ mt7915_get_cal_group_size(struct mt7915_dev *dev)
+ 	}
+ }
+ 
++static inline char *mt7915_eeprom_name(struct mt7915_dev *dev)
++{
++	switch (mt76_chip(&dev->mt76)) {
++	case 0x7915:
++		if (dev->bin_file_mode)
++			return dev->dbdc_support ?
++				MT7915_BIN_FILE_DBDC : MT7915_BIN_FILE;
++		else
++			return dev->dbdc_support ?
++				MT7915_EEPROM_DEFAULT_DBDC : MT7915_EEPROM_DEFAULT;
++	case 0x7986:
++		switch (mt7915_check_adie(dev, true)) {
++		case MT7976_ONE_ADIE_DBDC:
++			return dev->bin_file_mode ?
++			MT7986_BIN_FILE_MT7976_DBDC : MT7986_EEPROM_MT7976_DEFAULT_DBDC;
++		case MT7975_ONE_ADIE:
++			return dev->bin_file_mode ?
++			MT7986_BIN_FILE_MT7975 : MT7986_EEPROM_MT7975_DEFAULT;
++		case MT7976_ONE_ADIE:
++			return dev->bin_file_mode ?
++			MT7986_BIN_FILE_MT7976 : MT7986_EEPROM_MT7976_DEFAULT;
++		case MT7975_DUAL_ADIE:
++			return dev->bin_file_mode ?
++			MT7986_BIN_FILE_MT7975_DUAL : MT7986_EEPROM_MT7975_DUAL_DEFAULT;
++		case MT7976_DUAL_ADIE:
++			return dev->bin_file_mode ?
++			MT7986_BIN_FILE_MT7976_DUAL : MT7986_EEPROM_MT7976_DUAL_DEFAULT;
++		default:
++			break;
++		}
++		return NULL;
++	default:
++		return dev->bin_file_mode ?
++			MT7916_BIN_FILE : MT7916_EEPROM_DEFAULT;
++	}
++}
++
+ extern const u8 mt7915_sku_group_len[MAX_SKU_RATE_GROUP_NUM];
+ 
+ #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 1cfa6f03..15db02c4 100644
+index 1cfa6f0..9b72f41 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -51,6 +51,15 @@
+@@ -42,15 +42,24 @@
+ #define MT7986_ROM_PATCH		"mediatek/mt7986_rom_patch.bin"
+ #define MT7986_ROM_PATCH_MT7975		"mediatek/mt7986_rom_patch_mt7975.bin"
+ 
+-#define MT7915_EEPROM_DEFAULT		"mediatek/mt7915_eeprom.bin"
+-#define MT7915_EEPROM_DEFAULT_DBDC	"mediatek/mt7915_eeprom_dbdc.bin"
+-#define MT7916_EEPROM_DEFAULT		"mediatek/mt7916_eeprom.bin"
++#define MT7915_EEPROM_DEFAULT			"mediatek/mt7915_eeprom.bin"
++#define MT7915_EEPROM_DEFAULT_DBDC		"mediatek/mt7915_eeprom_dbdc.bin"
++#define MT7916_EEPROM_DEFAULT			"mediatek/mt7916_eeprom.bin"
+ #define MT7986_EEPROM_MT7975_DEFAULT		"mediatek/mt7986_eeprom_mt7975.bin"
+ #define MT7986_EEPROM_MT7975_DUAL_DEFAULT	"mediatek/mt7986_eeprom_mt7975_dual.bin"
+ #define MT7986_EEPROM_MT7976_DEFAULT		"mediatek/mt7986_eeprom_mt7976.bin"
  #define MT7986_EEPROM_MT7976_DEFAULT_DBDC	"mediatek/mt7986_eeprom_mt7976_dbdc.bin"
  #define MT7986_EEPROM_MT7976_DUAL_DEFAULT	"mediatek/mt7986_eeprom_mt7976_dual.bin"
  
-+#define MT7915_BIN_FILE			"mediatek/mt7915_binfile.bin"
-+#define MT7915_BIN_FILE_DBDC	 	        "mediatek/mt7915_binfile_dbdc.bin"
-+#define MT7916_BIN_FILE		        "mediatek/mt7916_binfile.bin"
++#define MT7915_BIN_FILE				"mediatek/mt7915_binfile.bin"
++#define MT7915_BIN_FILE_DBDC			"mediatek/mt7915_binfile_dbdc.bin"
++#define MT7916_BIN_FILE				"mediatek/mt7916_binfile.bin"
 +#define MT7986_BIN_FILE_MT7975			"mediatek/mt7986_binfile_mt7975.bin"
 +#define MT7986_BIN_FILE_MT7975_DUAL		"mediatek/mt7986_binfile_mt7975_dual.bin"
 +#define MT7986_BIN_FILE_MT7976			"mediatek/mt7986_binfile_mt7976.bin"
@@ -167,14 +245,76 @@
  #define MT7915_EEPROM_SIZE		3584
  #define MT7916_EEPROM_SIZE		4096
  
-@@ -395,6 +404,7 @@ struct mt7915_dev {
+@@ -395,6 +404,8 @@ struct mt7915_dev {
  
  	bool dbdc_support;
  	bool flash_mode;
 +	bool bin_file_mode;
++	u8 eeprom_mode;
  	bool muru_debug;
  	bool ibf;
  
+diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
+index 9de5b0f..36cb6f0 100644
+--- a/mt7915/mtk_debugfs.c
++++ b/mt7915/mtk_debugfs.c
+@@ -3,6 +3,7 @@
+ #include "mt7915_debug.h"
+ #include "mac.h"
+ #include "mcu.h"
++#include "eeprom.h"
+ 
+ #ifdef MTK_DEBUG
+ #define LWTBL_IDX2BASE_ID		GENMASK(14, 8)
+@@ -2893,6 +2894,39 @@ mt7915_wa_debug(void *data, u64 val)
+ DEFINE_DEBUGFS_ATTRIBUTE(fops_wa_debug, NULL, mt7915_wa_debug,
+ 			 "0x%llx\n");
+ 
++static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
++{
++	struct mt7915_dev *dev = dev_get_drvdata(s->private);
++	struct mt76_dev *mdev = &dev->mt76;
++	char *mtd_name = mdev->test_mtd.name;
++	u32 mtd_offset = mdev->test_mtd.offset;
++
++	seq_printf(s, "Current eeprom mode:\n");
++
++	switch (dev->eeprom_mode) {
++	case DEFAULT_BIN_MODE:
++		seq_printf(s, "   default bin mode\n   filename = %s\n", mt7915_eeprom_name(dev));
++		break;
++	case EFUSE_MODE:
++		seq_printf(s, "   efuse mode\n");
++		break;
++	case FLASH_MODE:
++		if (mtd_name)
++			seq_printf(s, "   flash mode\n   mtd name = %s\n   flash offset = 0x%x\n",
++				   mtd_name, mtd_offset);
++		else
++			seq_printf(s, "   flash mode\n");
++		break;
++	case BIN_FILE_MODE:
++		seq_printf(s, "   bin file mode\n   filename = %s\n", mt7915_eeprom_name(dev));
++		break;
++	default:
++		break;
++	}
++
++	return 0;
++}
++
+ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+ {
+ 	struct mt7915_dev *dev = phy->dev;
+@@ -2973,6 +3007,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+ 	debugfs_create_devm_seqfile(dev->mt76.dev, "fw_version", dir,
+ 				    mt7915_dump_version);
+ 
++	debugfs_create_devm_seqfile(dev->mt76.dev, "eeprom_mode", dir,
++				    mt7915_show_eeprom_mode);
+ 	return 0;
+ }
+ #endif
 -- 
 2.18.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-initialize-wcid.patch b/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-initialize-wcid.patch
index a71c142..f0e0d3c 100644
--- a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-initialize-wcid.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-initialize-wcid.patch
@@ -1,4 +1,4 @@
-From 60c9370658471d7e5813edd312fa4ad1cb15e613 Mon Sep 17 00:00:00 2001
+From 202e4428abd4d55ee3bb1b3e692a257269ec68c3 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 12 Jul 2022 13:56:07 +0800
 Subject: [PATCH 1122/1128] mt76 mt7915 initialize wcid
@@ -9,7 +9,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 9af86163..acc9871b 100644
+index 9af8616..acc9871 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -999,7 +999,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
diff --git a/recipes-wifi/linux-mt76/files/patches/1123-mt76-HEMU-Add-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1123-mt76-HEMU-Add-dump-support.patch
index 1be72f3..dd3830e 100644
--- a/recipes-wifi/linux-mt76/files/patches/1123-mt76-HEMU-Add-dump-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1123-mt76-HEMU-Add-dump-support.patch
@@ -1,4 +1,4 @@
-From f57bad3523d617ebb4b1357e9e1bf28c23421fde Mon Sep 17 00:00:00 2001
+From 32c6671d000c26212b3c6894467392a7b2061f92 Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Thu, 11 Aug 2022 18:09:45 -0700
 Subject: [PATCH 1123/1128] mt76: HEMU: Add dump support
@@ -10,7 +10,7 @@
  2 files changed, 27 insertions(+)
 
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 5a28a554..7acb3304 100644
+index 5a28a55..7acb330 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -37,6 +37,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -61,7 +61,7 @@
  		.maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
  	},
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 83c41bc1..57f52f3a 100644
+index 83c41bc..57f52f3 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -58,6 +58,7 @@ enum mtk_vendor_attr_hemu_ctrl {
diff --git a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
index a7811a0..7d42880 100644
--- a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
@@ -1,8 +1,7 @@
-From 6d6786706421d191e6320d4476024dcf4a2a6e27 Mon Sep 17 00:00:00 2001
+From 5f2097d8515e59239f365b2a9f73e7f6e580149d Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Fri, 28 Oct 2022 10:15:56 +0800
-Subject: [PATCH 1124/1128] mt76: mt7915: add vendor subcmd three wire (PTA)
- ctrl
+Subject: [PATCH] mt76: mt7915: add vendor subcmd three wire (PTA) ctrl
 
 Change-Id: Ic1044698f294455594a0c6254f55326fdab90580
 Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -11,9 +10,9 @@
  mt7915/mcu.c      | 50 ++++++++++++++++++++++-------------------------
  mt7915/mcu.h      | 29 +++++++++++++++++++++++++++
  mt7915/mt7915.h   |  1 +
- mt7915/vendor.c   | 42 ++++++++++++++++++++++++++++++++++++++-
- mt7915/vendor.h   | 12 ++++++++++++
- 6 files changed, 107 insertions(+), 29 deletions(-)
+ mt7915/vendor.c   | 44 ++++++++++++++++++++++++++++++++++++++++-
+ mt7915/vendor.h   | 14 +++++++++++++
+ 6 files changed, 111 insertions(+), 29 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
 index bceb6799..86a8688e 100644
@@ -29,7 +28,7 @@
  	MCU_EXT_CMD_CSI_CTRL = 0xc2,
  	MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8fc40c5a..39c8e2c2 100644
+index a6c84c2f..3caa5996 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -3964,37 +3964,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
@@ -94,7 +93,7 @@
  
  void mt7915_mcu_set_bypass_smthint(struct mt7915_phy *phy, u8 val)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 2ca2c005..b2e4032f 100644
+index b608cb6a..2172d491 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -625,6 +625,35 @@ struct mt7915_mcu_rdd_ipi_scan {
@@ -134,7 +133,7 @@
  #define OFDMA_DL                       BIT(0)
  #define OFDMA_UL                       BIT(1)
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 15db02c4..7c7c4882 100644
+index d979950f..28a2f684 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -749,6 +749,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
@@ -146,7 +145,7 @@
  void mt7915_vendor_register(struct mt7915_phy *phy);
  int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 7acb3304..7f67c0d3 100644
+index b95a1582..84e088c9 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -40,6 +40,11 @@ hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
@@ -161,7 +160,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 },
-@@ -964,7 +969,7 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
+@@ -971,7 +976,7 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
  			mt7915_set_wireless_vif, &val32);
  	} else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT]) {
  		val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT]);
@@ -170,10 +169,18 @@
  		mt7915_mcu_set_bypass_smthint(phy, val8); /* Cert bypass smooth interpolation */
  	}
  
-@@ -1091,6 +1096,30 @@ static int mt7915_vendor_edcca_ctrl(struct wiphy *wiphy,
+@@ -1117,6 +1122,7 @@ static int mt7915_vendor_edcca_ctrl(struct wiphy *wiphy,
  	return 0;
  }
  
++
+ static int
+ mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+ 			     struct sk_buff *skb, const void *data, int data_len,
+@@ -1164,6 +1170,31 @@ mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+ 	return len;
+ }
+ 
 +static int mt7915_vendor_3wire_ctrl(struct wiphy *wiphy,
 +				    struct wireless_dev *wdev,
 +				    const void *data,
@@ -198,11 +205,12 @@
 +	return mt7915_mcu_set_cfg(phy, CFGINFO_3WIRE_EN_CFG, three_wire_mode);
 +}
 +
- 
++
  static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  	{
-@@ -1172,6 +1201,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
- 		.doit = mt7915_vendor_edcca_ctrl,
+ 		.info = {
+@@ -1245,6 +1276,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+ 		.dumpit = mt7915_vendor_edcca_ctrl_dump,
  		.policy = edcca_ctrl_policy,
  		.maxattr = MTK_VENDOR_ATTR_EDCCA_CTRL_MAX,
 +	},
@@ -220,10 +228,10 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 57f52f3a..e0c5fd94 100644
+index c19ffe72..d96e5c23 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
-@@ -11,6 +11,7 @@ enum mtk_nl80211_vendor_subcmds {
+@@ -12,6 +12,7 @@ enum mtk_nl80211_vendor_subcmds {
  	MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
  	MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
  	MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
@@ -231,10 +239,18 @@
  };
  
  
-@@ -30,6 +31,17 @@ enum mtk_vendor_attr_edcca_ctrl {
+@@ -31,6 +32,7 @@ enum mtk_vendor_attr_edcca_ctrl {
                  NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL - 1
  };
  
++
+ enum mtk_vendor_attr_edcca_dump {
+         MTK_VENDOR_ATTR_EDCCA_DUMP_UNSPEC = 0,
+ 
+@@ -45,6 +47,18 @@ enum mtk_vendor_attr_edcca_dump {
+                 NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP - 1
+ };
+ 
 +enum mtk_vendor_attr_3wire_ctrl {
 +	MTK_VENDOR_ATTR_3WIRE_CTRL_UNSPEC,
 +
@@ -246,9 +262,10 @@
 +		NUM_MTK_VENDOR_ATTRS_3WIRE_CTRL - 1
 +};
 +
- 
++
  enum mtk_capi_control_changed {
  	CAPI_RFEATURE_CHANGED		= BIT(16),
+ 	CAPI_WIRELESS_CHANGED		= BIT(17),
 -- 
 2.18.0
 
diff --git a/recipes-wifi/linux-mt76/files/patches/1125-mt76-add-ibf-control-vendor-cmd.patch b/recipes-wifi/linux-mt76/files/patches/1125-mt76-add-ibf-control-vendor-cmd.patch
index 0045198..b5be350 100644
--- a/recipes-wifi/linux-mt76/files/patches/1125-mt76-add-ibf-control-vendor-cmd.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1125-mt76-add-ibf-control-vendor-cmd.patch
@@ -1,20 +1,20 @@
-From d8381a4d6847fcfeb96bbfd0fbb6bcbfd9a4bd61 Mon Sep 17 00:00:00 2001
+From 6de06b0f652673f2db19060161dcc94d47ff4ce3 Mon Sep 17 00:00:00 2001
 From: mtk27835 <shurong.wen@mediatek.com>
 Date: Wed, 7 Sep 2022 14:01:29 -0700
-Subject: [PATCH 1125/1128] mt76: add ibf control vendor cmd
+Subject: [PATCH] mt76: add ibf control vendor cmd
 
 Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
 ---
- mt7915/vendor.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++
- mt7915/vendor.h | 25 +++++++++++++++++-
- 2 files changed, 94 insertions(+), 1 deletion(-)
+ mt7915/vendor.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++
+ mt7915/vendor.h | 25 ++++++++++++++++-
+ 2 files changed, 95 insertions(+), 1 deletion(-)
 
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 7f67c0d3..cbbb0843 100644
+index 84e088c9..648d2dfb 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
-@@ -78,6 +78,16 @@ edcca_ctrl_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_CTRL] = {
-        [MTK_VENDOR_ATTR_EDCCA_CTRL_COMPENSATE] = { .type = NLA_S8 },
+@@ -86,6 +86,17 @@ edcca_dump_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP] = {
+        [MTK_VENDOR_ATTR_EDCCA_DUMP_SEC80_VAL] = { .type = NLA_U8 },
  };
  
 +static const struct nla_policy
@@ -27,10 +27,11 @@
 +	[MTK_VENDOR_ATTR_IBF_DUMP_ENABLE] = { .type = NLA_U8 },
 +};
 +
- 
++
  struct csi_null_tone {
  	u8 start;
-@@ -1120,6 +1130,54 @@ static int mt7915_vendor_3wire_ctrl(struct wiphy *wiphy,
+ 	u8 end;
+@@ -1194,6 +1205,54 @@ static int mt7915_vendor_3wire_ctrl(struct wiphy *wiphy,
  	return mt7915_mcu_set_cfg(phy, CFGINFO_3WIRE_EN_CFG, three_wire_mode);
  }
  
@@ -85,7 +86,7 @@
  
  static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  	{
-@@ -1212,6 +1270,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1287,6 +1346,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
  		.doit = mt7915_vendor_3wire_ctrl,
  		.policy = three_wire_ctrl_policy,
  		.maxattr = MTK_VENDOR_ATTR_3WIRE_CTRL_MAX,
@@ -105,10 +106,10 @@
  };
  
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index e0c5fd94..5aac5595 100644
+index d96e5c23..949c8853 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
-@@ -11,7 +11,8 @@ enum mtk_nl80211_vendor_subcmds {
+@@ -12,7 +12,8 @@ enum mtk_nl80211_vendor_subcmds {
  	MTK_NL80211_VENDOR_SUBCMD_HEMU_CTRL = 0xc5,
  	MTK_NL80211_VENDOR_SUBCMD_PHY_CAPA_CTRL = 0xc6,
  	MTK_NL80211_VENDOR_SUBCMD_EDCCA_CTRL = 0xc7,
@@ -118,7 +119,7 @@
  };
  
  
-@@ -206,4 +207,26 @@ enum mtk_vendor_attr_phy_capa_dump {
+@@ -222,4 +223,26 @@ enum mtk_vendor_attr_phy_capa_dump {
  		NUM_MTK_VENDOR_ATTRS_PHY_CAPA_DUMP - 1
  };
  
diff --git a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-AMPDU-AMSDU-OnOff-ctonrol.patch b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-AMPDU-AMSDU-OnOff-ctonrol.patch
index e9f90e1..bbeca19 100644
--- a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-AMPDU-AMSDU-OnOff-ctonrol.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-AMPDU-AMSDU-OnOff-ctonrol.patch
@@ -1,4 +1,4 @@
-From e5184f1fcbbeba3543d267190e886b1fb68cc757 Mon Sep 17 00:00:00 2001
+From 6545cf953298db275cb7373c797be2b6ae2e0d81 Mon Sep 17 00:00:00 2001
 From: TomLiu <tomml.liu@mediatek.com>
 Date: Wed, 21 Sep 2022 13:55:15 -0700
 Subject: [PATCH 1126/1128] mt76: mt7915: add AMPDU/AMSDU OnOff ctonrol
@@ -12,7 +12,7 @@
  4 files changed, 83 insertions(+)
 
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index acc9871b..5a809c2c 100644
+index acc9871..5a809c2 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -2020,6 +2020,34 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
@@ -51,10 +51,10 @@
  void mt7915_capi_sta_rc_work(void *data, struct ieee80211_sta *sta)
  {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 7c7c4882..c43661f5 100644
+index 98c35d2..4cdcb63 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -737,6 +737,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -738,6 +738,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
  			 bool pci, int *irq);
  
  #ifdef CONFIG_MTK_VENDOR
@@ -64,7 +64,7 @@
  void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif);
  void mt7915_mcu_set_rfeature_starec(void *data, struct mt7915_dev *dev,
 diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index cbbb0843..d73fdd4c 100644
+index cbbb084..d73fdd4 100644
 --- a/mt7915/vendor.c
 +++ b/mt7915/vendor.c
 @@ -30,10 +30,18 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -137,7 +137,7 @@
  		.maxattr = MTK_VENDOR_ATTR_WIRELESS_CTRL_MAX,
  	},
 diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 5aac5595..53abb100 100644
+index 5aac559..53abb10 100644
 --- a/mt7915/vendor.h
 +++ b/mt7915/vendor.h
 @@ -58,6 +58,8 @@ enum mtk_vendor_attr_wireless_ctrl {
diff --git a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch b/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
index 5dd02c4..9780db3 100644
--- a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
@@ -1,4 +1,4 @@
-From d3bae8d8ba808b52ee9090e7e2a09e3750ab8465 Mon Sep 17 00:00:00 2001
+From ba976379e903eb0a26276037718d5679ae95051a Mon Sep 17 00:00:00 2001
 From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
 Date: Thu, 13 Oct 2022 13:22:05 +0800
 Subject: [PATCH 1127/1128] mt76: mt7915: add E3 re-bonding for low yield rate
@@ -12,19 +12,19 @@
  3 files changed, 38 insertions(+), 5 deletions(-)
 
 diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
-index 0ae8d1b4..0c3e43b0 100644
+index 4d2d9ca..b3d2bbc 100644
 --- a/mt7915/eeprom.c
 +++ b/mt7915/eeprom.c
-@@ -133,7 +133,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
+@@ -97,7 +97,7 @@ static int mt7915_eeprom_load(struct mt7915_dev *dev)
  					 MT7915_EEPROM_BLOCK_SIZE);
  		for (i = 0; i < block_num; i++)
  			mt7915_mcu_get_eeprom(dev,
 -					      i * MT7915_EEPROM_BLOCK_SIZE);
 +					      i * MT7915_EEPROM_BLOCK_SIZE, NULL);
+ 		dev->eeprom_mode = EFUSE_MODE;
  	}
  
- 	return mt7915_check_eeprom(dev);
-@@ -233,6 +233,29 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
+@@ -198,6 +198,29 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
  	dev->chainshift = hweight8(dev->mphy.chainmask);
  }
  
@@ -54,7 +54,7 @@
  int mt7915_eeprom_init(struct mt7915_dev *dev)
  {
  	int ret;
-@@ -266,6 +289,8 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
+@@ -229,6 +252,8 @@ int mt7915_eeprom_init(struct mt7915_dev *dev)
  			return ret;
  	}
  
@@ -64,7 +64,7 @@
  	if (ret)
  		return ret;
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 39c8e2c2..fad35595 100644
+index 39c8e2c..fad3559 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -2779,7 +2779,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
@@ -95,10 +95,10 @@
  
  	return 0;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index c43661f5..527ec9ea 100644
+index 4cdcb63..dbd634a 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -559,6 +559,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
+@@ -560,6 +560,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
  
  int mt7915_register_device(struct mt7915_dev *dev);
  void mt7915_unregister_device(struct mt7915_dev *dev);
@@ -106,7 +106,7 @@
  int mt7915_eeprom_init(struct mt7915_dev *dev);
  void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
  				struct mt7915_phy *phy);
-@@ -612,7 +613,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -613,7 +614,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
  				   struct ieee80211_sta *sta,
  				   void *data, u32 field);
  int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode);
diff --git a/recipes-wifi/linux-mt76/files/patches/1128-mt76-support-on-off-SW-ACI-through-debugfs.patch b/recipes-wifi/linux-mt76/files/patches/1128-mt76-support-on-off-SW-ACI-through-debugfs.patch
index 208e243..94cf85c 100644
--- a/recipes-wifi/linux-mt76/files/patches/1128-mt76-support-on-off-SW-ACI-through-debugfs.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1128-mt76-support-on-off-SW-ACI-through-debugfs.patch
@@ -1,4 +1,4 @@
-From adc0119417e143af9b9775a9fa4590101070fb5b Mon Sep 17 00:00:00 2001
+From 03db7df14e4b8fcf9cf69725ee3baf74656293dc Mon Sep 17 00:00:00 2001
 From: Evelyn Tsai <evelyn.tsai@mediatek.com>
 Date: Fri, 14 Oct 2022 11:15:13 +0800
 Subject: [PATCH 1128/1128] mt76: support on off SW ACI through debugfs
@@ -11,7 +11,7 @@
  2 files changed, 22 insertions(+)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 86a8688e..a368b65b 100644
+index 86a8688..a368b65 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1164,6 +1164,7 @@ enum {
@@ -23,12 +23,12 @@
  	MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
  };
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 9de5b0f6..c5e04728 100644
+index 36cb6f0..facdd69 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -2893,6 +2893,25 @@ mt7915_wa_debug(void *data, u64 val)
- DEFINE_DEBUGFS_ATTRIBUTE(fops_wa_debug, NULL, mt7915_wa_debug,
- 			 "0x%llx\n");
+@@ -2927,6 +2927,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
+ 	return 0;
+ }
  
 +static int
 +mt7915_sw_aci_set(void *data, u64 val)
@@ -52,10 +52,10 @@
  int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
  {
  	struct mt7915_dev *dev = phy->dev;
-@@ -2973,6 +2992,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
- 	debugfs_create_devm_seqfile(dev->mt76.dev, "fw_version", dir,
- 				    mt7915_dump_version);
+@@ -3009,6 +3028,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
  
+ 	debugfs_create_devm_seqfile(dev->mt76.dev, "eeprom_mode", dir,
+ 				    mt7915_show_eeprom_mode);
 +	debugfs_create_file("sw_aci", 0600, dir, dev,
 +			    &fops_sw_aci);
  	return 0;
diff --git a/recipes-wifi/linux-mt76/files/patches/3001-mt76-add-wed-tx-support.patch b/recipes-wifi/linux-mt76/files/patches/3001-mt76-add-wed-tx-support.patch
index d12e62f..5f853a4 100644
--- a/recipes-wifi/linux-mt76/files/patches/3001-mt76-add-wed-tx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3001-mt76-add-wed-tx-support.patch
@@ -1,4 +1,4 @@
-From 3eac6f7492dee323a01408cacaa85e7bc55ea1d0 Mon Sep 17 00:00:00 2001
+From 457a54d92f80cb1a24cbde87e7bf2b49a65d4321 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Sun, 12 Jun 2022 16:38:45 +0800
 Subject: [PATCH 3001/3011] mt76 add wed tx support
@@ -12,7 +12,7 @@
  4 files changed, 20 insertions(+), 8 deletions(-)
 
 diff --git a/mt76_connac.h b/mt76_connac.h
-index 0915eb57..9a468878 100644
+index 0915eb5..9a46887 100644
 --- a/mt76_connac.h
 +++ b/mt76_connac.h
 @@ -116,6 +116,7 @@ struct mt76_connac_sta_key_conf {
@@ -24,7 +24,7 @@
  struct mt76_connac_fw_txp {
  	__le16 flags;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 5a809c2c..20e5b705 100644
+index 5a809c2..20e5b70 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -858,9 +858,9 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id)
@@ -65,7 +65,7 @@
  
  static void
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 2b4e122b..f9b2c1ef 100644
+index 2b4e122..f9b2c1e 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -1466,14 +1466,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
@@ -86,7 +86,7 @@
  
  	ctx->dev = NULL;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 63b66e40..f76f8967 100644
+index 63b66e4..f76f896 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -10,7 +10,7 @@
diff --git a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-add-wed-tx-wds-support-on-mt7986.patch b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-add-wed-tx-wds-support-on-mt7986.patch
index 8132783..2443604 100644
--- a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-add-wed-tx-wds-support-on-mt7986.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-add-wed-tx-wds-support-on-mt7986.patch
@@ -1,4 +1,4 @@
-From 2f1191e48c32e21c71c78f25961bc54baf579656 Mon Sep 17 00:00:00 2001
+From ad8a906f3ee37375a9f2ad9b57d0eeaff90c8f14 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Sat, 10 Sep 2022 17:09:21 +0800
 Subject: [PATCH 3002/3011] mt76: mt7915: add-wed-tx-wds-support-on-mt7986
@@ -16,7 +16,7 @@
  8 files changed, 76 insertions(+), 5 deletions(-)
 
 diff --git a/mac80211.c b/mac80211.c
-index b378231c..c84c9ef0 100644
+index b378231..c84c9ef 100644
 --- a/mac80211.c
 +++ b/mac80211.c
 @@ -1363,7 +1363,10 @@ void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif,
@@ -32,7 +32,7 @@
  }
  EXPORT_SYMBOL_GPL(__mt76_sta_remove);
 diff --git a/mt76.h b/mt76.h
-index e29f490e..b86c8355 100644
+index e29f490..b86c835 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -454,6 +454,7 @@ struct mt76_driver_ops {
@@ -52,7 +52,7 @@
  
  	u64 vif_mask;
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 69465dd0..039a5b01 100644
+index 69465dd..039a5b0 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -719,6 +719,15 @@ mt7915_init_hardware(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -72,7 +72,7 @@
  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
  	if (idx)
 diff --git a/mt7915/main.c b/mt7915/main.c
-index f9b2c1ef..c0617860 100644
+index f9b2c1e..c061786 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -660,6 +660,24 @@ mt7915_channel_switch_beacon(struct ieee80211_hw *hw,
@@ -150,7 +150,7 @@
  
  	ctx->dev = NULL;
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index fad35595..eb9343ca 100644
+index fad3559..eb9343c 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -2279,6 +2279,7 @@ mt7915_mcu_init_rx_airtime(struct mt7915_dev *dev)
@@ -180,7 +180,7 @@
  	ret = mt7915_mcu_set_mwds(dev, 1);
  	if (ret)
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index b2e4032f..42d5e39f 100644
+index b2e4032..42d5e39 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -270,6 +270,7 @@ enum {
@@ -192,7 +192,7 @@
  
  enum mcu_mmps_mode {
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index f76f8967..e45cd2d5 100644
+index f76f896..e45cd2d 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -646,6 +646,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
@@ -213,7 +213,7 @@
  	struct mt7915_dev *dev;
  	struct mt76_dev *mdev;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 527ec9ea..ba12a2d2 100644
+index dbd634a..06b98b7 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -18,6 +18,9 @@
@@ -226,7 +226,7 @@
  #define MT7915_WATCHDOG_TIME		(HZ / 10)
  #define MT7915_RESET_TIMEOUT		(30 * HZ)
  
-@@ -718,6 +721,7 @@ void mt7915_tx_token_put(struct mt7915_dev *dev);
+@@ -719,6 +722,7 @@ void mt7915_tx_token_put(struct mt7915_dev *dev);
  void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
  			 struct sk_buff *skb);
  bool mt7915_rx_check(struct mt76_dev *mdev, void *data, int len);
diff --git a/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch b/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
index 3e775fd..0cb1c16 100644
--- a/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3003-mt76-add-wed-rx-support.patch
@@ -1,4 +1,4 @@
-From 30ccfabd2dccb876067ca6ca666a862a9c693bdc Mon Sep 17 00:00:00 2001
+From bc9cac100bb95aa89b6ded079f1065fbb739c90c Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Tue, 5 Jul 2022 19:42:55 +0800
 Subject: [PATCH 3003/3011] mt76 add wed rx support
@@ -28,7 +28,7 @@
  20 files changed, 448 insertions(+), 67 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index 82b4da26..a8739eb4 100644
+index 82b4da2..a8739eb 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -98,6 +98,63 @@ mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t)
@@ -479,7 +479,7 @@
  }
  EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
 diff --git a/dma.h b/dma.h
-index fdf786f9..90370d12 100644
+index fdf786f..90370d1 100644
 --- a/dma.h
 +++ b/dma.h
 @@ -16,6 +16,16 @@
@@ -500,7 +500,7 @@
  #define MT_RX_INFO_LEN			4
  #define MT_FCE_INFO_LEN			4
 diff --git a/mac80211.c b/mac80211.c
-index c84c9ef0..32961b60 100644
+index c84c9ef..32961b6 100644
 --- a/mac80211.c
 +++ b/mac80211.c
 @@ -603,11 +603,14 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
@@ -531,7 +531,7 @@
  
  	mt76_rx_complete(dev, &frames, napi);
 diff --git a/mt76.h b/mt76.h
-index b86c8355..627bcbf9 100644
+index b86c835..627bcbf 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -20,6 +20,8 @@
@@ -629,7 +629,7 @@
  static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
  {
 diff --git a/mt7603/dma.c b/mt7603/dma.c
-index 590cff9d..2ff71c53 100644
+index 590cff9..2ff71c5 100644
 --- a/mt7603/dma.c
 +++ b/mt7603/dma.c
 @@ -69,7 +69,7 @@ free:
@@ -642,7 +642,7 @@
  	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
  	__le32 *rxd = (__le32 *)skb->data;
 diff --git a/mt7603/mt7603.h b/mt7603/mt7603.h
-index 0fd46d90..f2ce22ae 100644
+index 0fd46d9..f2ce22a 100644
 --- a/mt7603/mt7603.h
 +++ b/mt7603/mt7603.h
 @@ -244,7 +244,7 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
@@ -655,7 +655,7 @@
  void mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
  int mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 diff --git a/mt7615/mac.c b/mt7615/mac.c
-index 305bf182..4aed123b 100644
+index 305bf18..4aed123 100644
 --- a/mt7615/mac.c
 +++ b/mt7615/mac.c
 @@ -1666,7 +1666,7 @@ bool mt7615_rx_check(struct mt76_dev *mdev, void *data, int len)
@@ -668,7 +668,7 @@
  	struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
  	__le32 *rxd = (__le32 *)skb->data;
 diff --git a/mt7615/mt7615.h b/mt7615/mt7615.h
-index 1080d202..91b30373 100644
+index 1080d20..91b3037 100644
 --- a/mt7615/mt7615.h
 +++ b/mt7615/mt7615.h
 @@ -514,7 +514,7 @@ void mt7615_tx_worker(struct mt76_worker *w);
@@ -681,7 +681,7 @@
  int mt7615_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
  		       struct ieee80211_sta *sta);
 diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index afdd42ff..1b01ef26 100644
+index afdd42f..1b01ef2 100644
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
 @@ -1192,6 +1192,7 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
@@ -729,7 +729,7 @@
  }
  EXPORT_SYMBOL_GPL(mt76_connac_mcu_add_key);
 diff --git a/mt76x02.h b/mt76x02.h
-index 849c2644..49112ab6 100644
+index 849c264..49112ab 100644
 --- a/mt76x02.h
 +++ b/mt76x02.h
 @@ -187,7 +187,7 @@ int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val);
@@ -742,7 +742,7 @@
  irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance);
  void mt76x02_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
 diff --git a/mt76x02_txrx.c b/mt76x02_txrx.c
-index 3a313075..5d6c8f71 100644
+index 3a31307..5d6c8f7 100644
 --- a/mt76x02_txrx.c
 +++ b/mt76x02_txrx.c
 @@ -33,7 +33,7 @@ void mt76x02_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
@@ -755,7 +755,7 @@
  	struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
  	void *rxwi = skb->data;
 diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 9a57ad8f..6f6550f5 100644
+index 9a57ad8..6f6550f 100644
 --- a/mt7915/dma.c
 +++ b/mt7915/dma.c
 @@ -365,7 +365,8 @@ static int mt7915_dma_enable(struct mt7915_dev *dev)
@@ -811,7 +811,7 @@
  		ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_BAND1],
  				       MT_RXQ_ID(MT_RXQ_BAND1),
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 20e5b705..eac49465 100644
+index 20e5b70..eac4946 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -247,7 +247,7 @@ void mt7915_mac_enable_rtscts(struct mt7915_dev *dev,
@@ -951,7 +951,7 @@
  			return;
  		}
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index eb9343ca..c11e575a 100644
+index eb9343c..c11e575 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -1653,6 +1653,7 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
@@ -972,7 +972,7 @@
  				     MCU_EXT_CMD(STA_REC_UPDATE), true);
  }
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index e45cd2d5..1e22ec98 100644
+index e45cd2d..1e22ec9 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -44,6 +44,7 @@ static const u32 mt7915_reg[] = {
@@ -1064,7 +1064,7 @@
  		return 0;
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index ba12a2d2..acc345a2 100644
+index 06b98b7..6952825 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -81,6 +81,7 @@
@@ -1075,7 +1075,7 @@
  
  struct mt7915_vif;
  struct mt7915_sta;
-@@ -559,7 +560,9 @@ void mt7915_wfsys_reset(struct mt7915_dev *dev);
+@@ -560,7 +561,9 @@ 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);
  u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
@@ -1086,7 +1086,7 @@
  int mt7915_register_device(struct mt7915_dev *dev);
  void mt7915_unregister_device(struct mt7915_dev *dev);
  void mt7915_eeprom_rebonding(struct mt7915_dev *dev);
-@@ -719,7 +722,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -720,7 +723,7 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
  			  struct mt76_tx_info *tx_info);
  void mt7915_tx_token_put(struct mt7915_dev *dev);
  void mt7915_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
@@ -1096,7 +1096,7 @@
  bool mt7915_wed_wds_check(struct mt76_dev *mdev, struct ieee80211_sta *sta);
  void mt7915_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 9b6266c1..faaac08c 100644
+index 9b6266c..faaac08 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
 @@ -43,6 +43,7 @@ enum reg_rev {
@@ -1130,7 +1130,7 @@
  #define MT_INT_SOURCE_CSR		__REG(INT_SOURCE_CSR)
  #define MT_INT_MASK_CSR			__REG(INT_MASK_CSR)
 diff --git a/mt7921/mac.c b/mt7921/mac.c
-index 7b15193c..ea6dd953 100644
+index 7b15193..ea6dd95 100644
 --- a/mt7921/mac.c
 +++ b/mt7921/mac.c
 @@ -692,7 +692,7 @@ bool mt7921_rx_check(struct mt76_dev *mdev, void *data, int len)
@@ -1143,7 +1143,7 @@
  	struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76);
  	__le32 *rxd = (__le32 *)skb->data;
 diff --git a/mt7921/mt7921.h b/mt7921/mt7921.h
-index d9d78f6b..0c9924a5 100644
+index d9d78f6..0c9924a 100644
 --- a/mt7921/mt7921.h
 +++ b/mt7921/mt7921.h
 @@ -422,7 +422,7 @@ void mt7921_tx_worker(struct mt76_worker *w);
@@ -1156,7 +1156,7 @@
  void mt7921_stats_work(struct work_struct *work);
  void mt7921_set_stream_he_caps(struct mt7921_phy *phy);
 diff --git a/tx.c b/tx.c
-index 8b33186b..b812d067 100644
+index 8b33186..b812d06 100644
 --- a/tx.c
 +++ b/tx.c
 @@ -778,3 +778,37 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
diff --git a/recipes-wifi/linux-mt76/files/patches/3004-mt76-add-fill-receive-path-to-report-wed-idx.patch b/recipes-wifi/linux-mt76/files/patches/3004-mt76-add-fill-receive-path-to-report-wed-idx.patch
index 30791ea..8b29384 100644
--- a/recipes-wifi/linux-mt76/files/patches/3004-mt76-add-fill-receive-path-to-report-wed-idx.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3004-mt76-add-fill-receive-path-to-report-wed-idx.patch
@@ -1,4 +1,4 @@
-From d9b8f90612abf82f99013762ec38113a4463de6d Mon Sep 17 00:00:00 2001
+From 5adc8023e3287208bb2ea04a20d0724b6264842d Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Thu, 19 May 2022 13:44:42 +0800
 Subject: [PATCH 3004/3011] mt76: add fill receive path to report wed idx
@@ -9,7 +9,7 @@
  1 file changed, 19 insertions(+)
 
 diff --git a/mt7915/main.c b/mt7915/main.c
-index c0617860..84b90010 100644
+index c061786..84b9001 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -1521,6 +1521,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
diff --git a/recipes-wifi/linux-mt76/files/patches/3005-mt76-add-ser-spport-when-wed-on.patch b/recipes-wifi/linux-mt76/files/patches/3005-mt76-add-ser-spport-when-wed-on.patch
index 3fc96e6..62ee299 100644
--- a/recipes-wifi/linux-mt76/files/patches/3005-mt76-add-ser-spport-when-wed-on.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3005-mt76-add-ser-spport-when-wed-on.patch
@@ -1,4 +1,4 @@
-From cfa2b02b3cbc63ccf936d0620c36ed5a5c841cb7 Mon Sep 17 00:00:00 2001
+From 5362658103f2059a16ad626ab2f075b9279877e5 Mon Sep 17 00:00:00 2001
 From: Sujuan Chen <sujuan.chen@mediatek.com>
 Date: Thu, 28 Jul 2022 11:16:15 +0800
 Subject: [PATCH 3005/3011] mt76 add ser spport when wed on
@@ -15,7 +15,7 @@
  7 files changed, 76 insertions(+), 15 deletions(-)
 
 diff --git a/dma.c b/dma.c
-index a8739eb4..d63b02f5 100644
+index a8739eb..d63b02f 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -169,7 +169,7 @@ mt76_free_pending_txwi(struct mt76_dev *dev)
@@ -109,7 +109,7 @@
  	if (!q->rx_head)
  		return;
 diff --git a/dma.h b/dma.h
-index 90370d12..083cbca4 100644
+index 90370d1..083cbca 100644
 --- a/dma.h
 +++ b/dma.h
 @@ -58,5 +58,5 @@ enum mt76_mcu_evt_type {
@@ -120,7 +120,7 @@
 +int mt76_dma_wed_setup(struct mt76_dev *dev, struct mt76_queue *q, bool reset);
  #endif
 diff --git a/mt76.h b/mt76.h
-index 627bcbf9..f22e96e0 100644
+index 627bcbf..f22e96e 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -1375,6 +1375,7 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
@@ -132,7 +132,7 @@
  		      struct napi_struct *napi);
  void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
 diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 6f6550f5..8edfa465 100644
+index 6f6550f..8edfa46 100644
 --- a/mt7915/dma.c
 +++ b/mt7915/dma.c
 @@ -553,6 +553,7 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -203,7 +203,7 @@
  }
  
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index eac49465..cbdabea0 100644
+index eac4946..cbdabea 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -948,6 +948,8 @@ void mt7915_wed_release_rx_buf(struct mtk_wed_device *wed)
@@ -248,7 +248,7 @@
  	if (ext_phy)
  		ieee80211_stop_queues(ext_phy->hw);
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 1e22ec98..60b7886c 100644
+index 1e22ec9..60b7886 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -666,6 +666,8 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
@@ -261,10 +261,10 @@
  	if (mtk_wed_device_attach(wed))
  		return 0;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index acc345a2..55fe6343 100644
+index 6952825..36d1d86 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -563,6 +563,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
+@@ -564,6 +564,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
  u32 mt7915_wed_init_rx_buf(struct mtk_wed_device *wed,
  				int pkt_num);
  void mt7915_wed_release_rx_buf(struct mtk_wed_device *wed);
diff --git a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-add-statistic-for-H-W-Rx-Path.patch b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-add-statistic-for-H-W-Rx-Path.patch
index 3941f41..f80fc8c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-add-statistic-for-H-W-Rx-Path.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-add-statistic-for-H-W-Rx-Path.patch
@@ -1,4 +1,4 @@
-From 209aeac176b9760b9de5889cb67f674900864633 Mon Sep 17 00:00:00 2001
+From ca3fdfbb27f8d7c4c57164276e0220a7825fa61c Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <Yi-Chia.Hsieh@mediatek.com>
 Date: Fri, 5 Aug 2022 13:58:11 -0700
 Subject: [PATCH 3006/3011] mt76: mt7915: add statistic for H/W Rx Path
@@ -13,7 +13,7 @@
  5 files changed, 56 insertions(+), 1 deletion(-)
 
 diff --git a/mt76.h b/mt76.h
-index f22e96e0..8011d4ca 100644
+index f22e96e..8011d4c 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -278,6 +278,10 @@ struct mt76_sta_stats {
@@ -28,7 +28,7 @@
  
  enum mt76_wcid_flags {
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index cbdabea0..f1d15d85 100644
+index cbdabea..f1d15d8 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -972,6 +972,31 @@ void mt7915_wed_trigger_ser(struct mtk_wed_device *wed)
@@ -64,7 +64,7 @@
  mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
  {
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 84b90010..4ac5259d 100644
+index 84b9001..4ac5259 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -1054,7 +1054,8 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
@@ -91,7 +91,7 @@
  
  	sinfo->ack_signal = (s8)msta->ack_signal;
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 60b7886c..f3144d15 100644
+index 60b7886..f3144d1 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -9,6 +9,7 @@
@@ -133,10 +133,10 @@
  #else
  	return 0;
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 55fe6343..40161cf6 100644
+index 36d1d86..7165273 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -564,6 +564,8 @@ u32 mt7915_wed_init_rx_buf(struct mtk_wed_device *wed,
+@@ -565,6 +565,8 @@ u32 mt7915_wed_init_rx_buf(struct mtk_wed_device *wed,
  				int pkt_num);
  void mt7915_wed_release_rx_buf(struct mtk_wed_device *wed);
  void mt7915_wed_trigger_ser(struct mtk_wed_device *wed);
diff --git a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-enable-red-per-band-token-drop-for-HW-Pa.patch b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-enable-red-per-band-token-drop-for-HW-Pa.patch
index 9e0bb9f..16d9e8f 100644
--- a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-enable-red-per-band-token-drop-for-HW-Pa.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-enable-red-per-band-token-drop-for-HW-Pa.patch
@@ -1,8 +1,7 @@
-From 3abad81e25879921c6b6a0403880f7a83f1e6503 Mon Sep 17 00:00:00 2001
+From 8a932d446bb0da8b7aa4cc7ea8ed541e002cf015 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Fri, 2 Sep 2022 14:40:40 +0800
-Subject: [PATCH 3007/3011] mt76: mt7915: enable red per-band token drop for HW
- Path
+Subject: [PATCH] mt76: mt7915: enable red per-band token drop for HW Path
 
 Limit the number of token used by each band. If a band uses too many token,
 it may hurt the throughput of the other band. The SW path can solve this
@@ -12,11 +11,11 @@
 ---
  mt7915/mcu.c    | 53 +++++++++++++++++++++++++++++++++++++++----------
  mt7915/mcu.h    |  1 +
- mt7915/mt7915.h |  2 +-
- 3 files changed, 45 insertions(+), 11 deletions(-)
+ mt7915/mt7915.h |  3 ++-
+ 3 files changed, 46 insertions(+), 11 deletions(-)
 
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index c11e575a..ad2d6a39 100644
+index 16349c58..2ef353b2 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -2320,8 +2320,13 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
@@ -110,7 +109,7 @@
  int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
  {
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 42d5e39f..3e892358 100644
+index 4ae8d532..14a0972b 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
 @@ -271,6 +271,7 @@ enum {
@@ -122,18 +121,18 @@
  
  enum mcu_mmps_mode {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 40161cf6..d93c394c 100644
+index 46670de4..d8765041 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -773,6 +773,7 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
+@@ -773,13 +773,14 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
  #endif
- int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value,
- 			 s8 compensation);
+ int mt7915_mcu_set_edcca(struct mt7915_phy *phy, int mode, u8 *value, s8 compensation);
+ int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value);
 +int mt7915_mcu_set_red(struct mt7915_dev *dev, bool enabled);
- 
++
  int mt7915_mcu_ipi_hist_ctrl(struct mt7915_phy *phy, void *data, u8 cmd, bool wait_resp);
  int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool wait_resp);
-@@ -780,7 +781,6 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
+ 
  #ifdef MTK_DEBUG
  int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir);
  int mt7915_dbg_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3, bool wait_resp);
diff --git a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-update-mt7916-trinfo-when-hw-path-enable.patch b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-update-mt7916-trinfo-when-hw-path-enable.patch
index b4f0889..52f3e79 100644
--- a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-update-mt7916-trinfo-when-hw-path-enable.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-update-mt7916-trinfo-when-hw-path-enable.patch
@@ -1,4 +1,4 @@
-From a80ea5a70e2353d61feadcdcd6d590b31a6d0eaf Mon Sep 17 00:00:00 2001
+From 2723beedc39c16ab67c7008779ebed4cf210e7ef Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Thu, 22 Sep 2022 09:54:53 +0800
 Subject: [PATCH 3008/3011] mt76: mt7915: update mt7916 trinfo when hw path
@@ -10,7 +10,7 @@
  2 files changed, 23 insertions(+), 3 deletions(-)
 
 diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
-index ecdc02ab..0a1ee808 100644
+index ecdc02a..0a1ee80 100644
 --- a/mt7915/mt7915_debug.h
 +++ b/mt7915/mt7915_debug.h
 @@ -133,6 +133,8 @@ enum dbg_reg_rev {
@@ -57,10 +57,10 @@
  #define MT_DBG_INT_SOURCE_CSR			__DBG_REG(dev, DBG_INT_SOURCE_CSR)
  #define MT_DBG_INT_MASK_CSR			__DBG_REG(dev, DBG_INT_MASK_CSR)
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index c5e04728..41bd0ff1 100644
+index facdd69..f25f9c6 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -855,12 +855,22 @@ mt7986_show_host_dma_info(struct seq_file *s, struct mt7915_dev *dev)
+@@ -856,12 +856,22 @@ mt7986_show_host_dma_info(struct seq_file *s, struct mt7915_dev *dev)
  		      "Name", "Base", "Cnt", "CIDX", "DIDX", "QCnt");
  	dump_dma_tx_ring_info(s, dev, "T16:FWDL", MT_DBG_TX_RING_CTRL(0));
  	dump_dma_tx_ring_info(s, dev, "T17:Cmd(H2WM)",	MT_DBG_TX_RING_CTRL(1));
diff --git a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-find-rx-token-by-physical-address.patch b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-find-rx-token-by-physical-address.patch
index 7c2bb77..872c4bc 100644
--- a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-find-rx-token-by-physical-address.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-find-rx-token-by-physical-address.patch
@@ -1,4 +1,4 @@
-From 70c17335911119c353fdf709d8ce1688509c02d0 Mon Sep 17 00:00:00 2001
+From 3a759e4352a6aebba5c39993c9042d37e25677e8 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Tue, 27 Sep 2022 16:34:26 +0800
 Subject: [PATCH 3009/3011] mt76: mt7915: find rx token by physical address
@@ -12,7 +12,7 @@
  1 file changed, 18 insertions(+), 1 deletion(-)
 
 diff --git a/dma.c b/dma.c
-index d63b02f5..a7a4538a 100644
+index d63b02f..a7a4538 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -380,11 +380,28 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
diff --git a/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-drop-scatter-and-gather-frame.patch b/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-drop-scatter-and-gather-frame.patch
index 1b985cf..ef6e990 100644
--- a/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-drop-scatter-and-gather-frame.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3010-mt76-mt7915-drop-scatter-and-gather-frame.patch
@@ -1,4 +1,4 @@
-From b584c123edfe2965d753d4fc7e77c1ec08f147ea Mon Sep 17 00:00:00 2001
+From 50d41085e1f54e1cb308bd615052aaf5e317c8c5 Mon Sep 17 00:00:00 2001
 From: Peter Chiu <chui-hao.chiu@mediatek.com>
 Date: Wed, 28 Sep 2022 18:52:54 +0800
 Subject: [PATCH 3010/3011] mt76: mt7915: drop scatter and gather frame
@@ -14,7 +14,7 @@
  3 files changed, 11 insertions(+)
 
 diff --git a/dma.c b/dma.c
-index a7a4538a..c106ae42 100644
+index a7a4538..c106ae4 100644
 --- a/dma.c
 +++ b/dma.c
 @@ -419,6 +419,15 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
@@ -34,7 +34,7 @@
  		buf_addr = e->dma_addr[0];
  		e->buf = NULL;
 diff --git a/dma.h b/dma.h
-index 083cbca4..221fcc8e 100644
+index 083cbca..221fcc8 100644
 --- a/dma.h
 +++ b/dma.h
 @@ -21,6 +21,7 @@
@@ -46,7 +46,7 @@
  #define MT_DMA_PPE_CPU_REASON		GENMASK(15, 11)
  #define MT_DMA_PPE_ENTRY		GENMASK(30, 16)
 diff --git a/mt76.h b/mt76.h
-index 8011d4ca..9b225510 100644
+index 8011d4c..9b22551 100644
 --- a/mt76.h
 +++ b/mt76.h
 @@ -32,6 +32,7 @@
diff --git a/recipes-wifi/linux-mt76/files/patches/3011-mt76-HW-ATF-support-for-mt7986.patch b/recipes-wifi/linux-mt76/files/patches/3011-mt76-HW-ATF-support-for-mt7986.patch
index d812562..86b01bb 100644
--- a/recipes-wifi/linux-mt76/files/patches/3011-mt76-HW-ATF-support-for-mt7986.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3011-mt76-HW-ATF-support-for-mt7986.patch
@@ -1,4 +1,4 @@
-From 966aa1887615c19ceb9d7675cd46c9c550847128 Mon Sep 17 00:00:00 2001
+From 49dd3f3791d2b28bc28225d09c6455722d96489d Mon Sep 17 00:00:00 2001
 From: Lian Chen <lian.chen@mediatek.com>
 Date: Mon, 7 Nov 2022 14:47:44 +0800
 Subject: [PATCH 3011/3011] mt76: HW ATF support for mt7986
@@ -16,7 +16,7 @@
  mode change 100644 => 100755 mt7915/init.c
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index a368b65b..2cb498f3 100644
+index a368b65..2cb498f 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
 @@ -1122,6 +1122,7 @@ enum {
@@ -36,7 +36,7 @@
  	MCU_EXT_CMD_EFUSE_FREE_BLOCK = 0x4f,
  	MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
 diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 21407030..85468cd2 100644
+index 2140703..85468cd 100644
 --- a/mt7915/debugfs.c
 +++ b/mt7915/debugfs.c
 @@ -12,6 +12,10 @@
@@ -468,7 +468,7 @@
 diff --git a/mt7915/init.c b/mt7915/init.c
 old mode 100644
 new mode 100755
-index 039a5b01..5a7fdb51
+index 039a5b0..5a7fdb5
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
 @@ -473,10 +473,46 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
@@ -529,7 +529,7 @@
  
  int mt7915_txbf_init(struct mt7915_dev *dev)
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 4ac5259d..6c910cf5 100644
+index 4ac5259..6c910cf 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -195,6 +195,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
@@ -577,7 +577,7 @@
  }
  
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index ad2d6a39..4728d849 100644
+index ad2d6a3..4728d84 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
 @@ -3323,6 +3323,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
@@ -753,7 +753,7 @@
  {
  	struct {
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index d93c394c..e5e861b8 100644
+index 8567415..872b0e7 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
 @@ -131,6 +131,58 @@ struct mt7915_twt_flow {
@@ -823,7 +823,7 @@
  };
  
  struct mt7915_vif_cap {
-@@ -466,6 +519,8 @@ struct mt7915_dev {
+@@ -467,6 +520,8 @@ struct mt7915_dev {
  	} dbg;
  	const struct mt7915_dbg_reg_desc *dbg_reg;
  #endif
@@ -832,7 +832,7 @@
  };
  
  enum {
-@@ -498,6 +553,15 @@ enum mt7915_rdd_cmd {
+@@ -499,6 +554,15 @@ enum mt7915_rdd_cmd {
  	RDD_IRQ_OFF,
  };
  
@@ -848,7 +848,7 @@
  static inline struct mt7915_phy *
  mt7915_hw_phy(struct ieee80211_hw *hw)
  {
-@@ -629,6 +693,10 @@ int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
+@@ -630,6 +694,10 @@ int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
  int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
  			      u8 en);
  int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band);
@@ -860,10 +860,10 @@
  int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy);
  int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len);
 diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 41bd0ff1..12251d91 100644
+index f25f9c6..c638d29 100644
 --- a/mt7915/mtk_debugfs.c
 +++ b/mt7915/mtk_debugfs.c
-@@ -1300,7 +1300,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
+@@ -1301,7 +1301,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
  };
  
  
@@ -871,7 +871,7 @@
  static char* sta_ctrl_reg[] = {"ENABLE", "DISABLE", "PAUSE"};
  static u32 chip_show_sta_acq_info(struct seq_file *s, struct mt7915_dev *dev, u32 *ple_stat,
  				  u32 *sta_pause, u32 *dis_sta_map,
-@@ -1454,6 +1453,138 @@ static void chip_get_sta_pause(struct mt7915_dev *dev, u32 *sta_pause)
+@@ -1455,6 +1454,138 @@ static void chip_get_sta_pause(struct mt7915_dev *dev, u32 *sta_pause)
  	}
  }