[][MAC80211][Rebase Patches][Fix WiFi6 build error]

[Description]
Fix mt76 build fail

[Release-log]
N/A

Change-Id: I32f4251c497570a44a12c29d45f71b0af98830a3
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7806259
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
new file mode 100644
index 0000000..077a54a
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
@@ -0,0 +1,100 @@
+From b05f2dc2b9d87a93201af91ec5df00629151bb92 Mon Sep 17 00:00:00 2001
+From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
+Date: Tue, 24 Jan 2023 14:32:08 +0800
+Subject: [PATCH 1027/1034] wifi: mt76: mt7915: Add vendor command attribute
+ for RTS BW signaling.
+
+Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
+---
+ mt7915/mcu.c    | 6 ++++++
+ mt7915/mcu.h    | 9 +++++++++
+ mt7915/vendor.c | 4 ++++
+ mt7915/vendor.h | 1 +
+ 4 files changed, 20 insertions(+)
+
+diff --git a/mt7915/mcu.c b/mt7915/mcu.c
+index 10fade2..15915c9 100644
+--- a/mt7915/mcu.c
++++ b/mt7915/mcu.c
+@@ -4603,6 +4603,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
+ 		req.cert.length = cpu_to_le16(tlv_len);
+ 		req.cert.cert_program = type;
+ 		break;
++	case CFGINFO_RTS_SIGTA_EN_FEATURE:
++		tlv_len = sizeof(struct rts_sigta_cfg);
++		req.rts_sigta.tag = cpu_to_le16(cfg_info);
++		req.rts_sigta.length = cpu_to_le16(tlv_len);
++		req.rts_sigta.enable  = type ? 1: 0;
++		break;
+ 	case CFGINFO_3WIRE_EN_CFG:
+ 		tlv_len = sizeof(struct three_wire_cfg);
+ 		req.three_wire.tag = cpu_to_le16(cfg_info);
+diff --git a/mt7915/mcu.h b/mt7915/mcu.h
+index 142bfc1..286f7a5 100644
+--- a/mt7915/mcu.h
++++ b/mt7915/mcu.h
+@@ -924,6 +924,13 @@ struct three_wire_cfg {
+ 	u8 rsv[3];
+ } __packed;
+ 
++struct rts_sigta_cfg {
++	__le16 tag;
++	__le16 length;
++	bool enable; /* 0: Disable, 1: Enable */
++	u8 rsv[3];
++} __packed;
++
+ struct cfg_basic_info {
+ 	u8 dbdc_idx;
+ 	u8 rsv[3];
+@@ -931,11 +938,13 @@ struct cfg_basic_info {
+ 	union {
+ 		struct cert_cfg cert;
+ 		struct three_wire_cfg three_wire;
++		struct rts_sigta_cfg rts_sigta;
+ 	};
+ } __packed;
+ 
+ enum {
+ 	CFGINFO_CERT_CFG = 4,
++	CFGINFO_RTS_SIGTA_EN_FEATURE = 7,
+ 	CFGINFO_3WIRE_EN_CFG = 10,
+ };
+ 
+diff --git a/mt7915/vendor.c b/mt7915/vendor.c
+index 0105d2f..fb2fe82 100644
+--- a/mt7915/vendor.c
++++ b/mt7915/vendor.c
+@@ -33,6 +33,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
+ 	[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU] = {.type = NLA_U8 },
+ 	[MTK_VENDOR_ATTR_WIRELESS_CTRL_MU_EDCA] = {.type = NLA_U8 },
+ 	[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT] = {.type = NLA_U8 },
++	[MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA] = {.type = NLA_U8 },
+ };
+ 
+ static const struct nla_policy
+@@ -994,6 +995,9 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
+ 	} else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU]) {
+ 		val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU]);
+ 		mt7915_set_wireless_amsdu(hw, val8);
++	} else if (tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA]) {
++		val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA]);
++		mt7915_mcu_set_cfg(phy, CFGINFO_RTS_SIGTA_EN_FEATURE, val8);
+ 	}
+ 
+ 	return 0;
+diff --git a/mt7915/vendor.h b/mt7915/vendor.h
+index 33c75dc..6001ce4 100644
+--- a/mt7915/vendor.h
++++ b/mt7915/vendor.h
+@@ -76,6 +76,7 @@ enum mtk_vendor_attr_wireless_ctrl {
+ 	MTK_VENDOR_ATTR_WIRELESS_CTRL_MIMO,
+ 	MTK_VENDOR_ATTR_WIRELESS_CTRL_AMSDU,
+ 	MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT = 9,
++	MTK_VENDOR_ATTR_WIRELESS_CTRL_RTS_SIGTA,
+ 
+ 	MTK_VENDOR_ATTR_WIRELESS_CTRL_MU_EDCA, /* reserve */
+ 	/* keep last */
+-- 
+2.18.0
+