[][MAC80211][Rebase Patches][update internal patches based on mt76-2023-06-22-29cfabbb]

[Description]
Fix and rebase internal patches based on mt76-2023-06-22-29cfabbb

[Release-log]
N/A

Change-Id: Ic49c929e0bc93915300f7e2c37e6052158b0b826
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7662070
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch
new file mode 100644
index 0000000..77ad7f1
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch
@@ -0,0 +1,68 @@
+From a16f98e2a2abcda88b80b5614d38b4083e30b59f Mon Sep 17 00:00:00 2001
+From: MeiChia Chiu <meichia.chiu@mediatek.com>
+Date: Wed, 24 May 2023 22:35:54 +0800
+Subject: [PATCH 1031/1031] wifi: mt76: mt7915: remove BW160 support
+
+Remove BW160 capability in mt7915.
+---
+ mt7915/init.c | 29 +++++++----------------------
+ 1 file changed, 7 insertions(+), 22 deletions(-)
+
+diff --git a/mt7915/init.c b/mt7915/init.c
+index 09ee080..bc16f17 100644
+--- a/mt7915/init.c
++++ b/mt7915/init.c
+@@ -420,13 +420,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+ 
+ 			vht_cap->cap |=
+ 				IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
+-				IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
+-
+-			if (!dev->dbdc_support)
+-				vht_cap->cap |=
+-					IEEE80211_VHT_CAP_SHORT_GI_160 |
+-					IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
+-					FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
++				IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;;
+ 		} else {
+ 			phy->mt76->sband_5g.sband.ht_cap.ampdu_density =
+ 				IEEE80211_HT_MPDU_DENSITY_2;
+@@ -886,13 +880,9 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
+ 	int sts = hweight8(phy->mt76->chainmask);
+ 	u8 c, sts_160 = sts;
+ 
+-	/* Can do 1/2 of STS in 160Mhz mode for mt7915 */
+-	if (is_mt7915(&dev->mt76)) {
+-		if (!dev->dbdc_support)
+-			sts_160 /= 2;
+-		else
+-			sts_160 = 0;
+-	}
++	/* mt7915 doesn't support bw160 */
++	if (is_mt7915(&dev->mt76))
++		sts_160 = 0;
+ 
+ #ifdef CONFIG_MAC80211_MESH
+ 	if (vif == NL80211_IFTYPE_MESH_POINT)
+@@ -972,15 +962,10 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+ 	int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask);
+ 	u16 mcs_map = 0;
+ 	u16 mcs_map_160 = 0;
+-	u8 nss_160;
++	u8 nss_160 = nss;
+ 
+-	if (!is_mt7915(&dev->mt76))
+-		nss_160 = nss;
+-	else if (!dev->dbdc_support)
+-		/* Can do 1/2 of NSS streams in 160Mhz mode for mt7915 */
+-		nss_160 = nss / 2;
+-	else
+-		/* Can't do 160MHz with mt7915 dbdc */
++	/* Can't do 160MHz with mt7915 */
++	if (is_mt7915(&dev->mt76))
+ 		nss_160 = 0;
+ 
+ 	for (i = 0; i < 8; i++) {
+-- 
+2.18.0
+