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

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

[Release-log]
N/A

Change-Id: I23d60090954fa9869a0e0222e3e045cc6d195271
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6144109
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
index cac0cd4..0e6bf6c 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-mt76-certification-patches.patch
@@ -1,26 +1,26 @@
-From 1482994a9bfbc34fdb5887cd6438eb04be0c9d26 Mon Sep 17 00:00:00 2001
+From 76cd7f08cc80b561d83cc265dccf531721792964 Mon Sep 17 00:00:00 2001
 From: MeiChia Chiu <meichia.chiu@mediatek.com>
 Date: Mon, 6 Jun 2022 20:15:51 +0800
-Subject: [PATCH 1005/1007] mt76: certification patches
+Subject: [PATCH 1005/1008] mt76: certification patches
 
 ---
- mt76_connac_mcu.h    |   1 +
- mt7915/init.c        |   7 +-
- mt7915/mac.c         |  23 +++
- mt7915/main.c        |  15 +-
- mt7915/mcu.c         | 466 +++++++++++++++++++++++++++++++++++++++++++
- mt7915/mcu.h         | 209 ++++++++++++++++++-
- mt7915/mt7915.h      |  13 ++
- mt7915/mtk_debugfs.c |   7 +-
- mt7915/vendor.c      | 187 +++++++++++++++++
- mt7915/vendor.h      |  42 ++++
+ .../wireless/mediatek/mt76/mt76_connac_mcu.h  |   1 +
+ .../net/wireless/mediatek/mt76/mt7915/init.c  |   7 +-
+ .../net/wireless/mediatek/mt76/mt7915/mac.c   |  23 +
+ .../net/wireless/mediatek/mt76/mt7915/main.c  |  15 +-
+ .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 466 ++++++++++++++++++
+ .../net/wireless/mediatek/mt76/mt7915/mcu.h   | 209 +++++++-
+ .../wireless/mediatek/mt76/mt7915/mt7915.h    |  13 +
+ .../mediatek/mt76/mt7915/mtk_debugfs.c        |   7 +-
+ .../wireless/mediatek/mt76/mt7915/vendor.c    | 187 +++++++
+ .../wireless/mediatek/mt76/mt7915/vendor.h    |  42 ++
  10 files changed, 964 insertions(+), 6 deletions(-)
 
 diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 1c24dbf4..82498039 100644
+index 42425f75..32e540cc 100644
 --- a/mt76_connac_mcu.h
 +++ b/mt76_connac_mcu.h
-@@ -993,6 +993,7 @@ enum {
+@@ -1144,6 +1144,7 @@ enum {
  	MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
  	/* for vendor csi and air monitor */
  	MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -29,10 +29,10 @@
  };
  
 diff --git a/mt7915/init.c b/mt7915/init.c
-index 2b8d758f..b4404aec 100644
+index 6e2a1c13..02d1b6d8 100644
 --- a/mt7915/init.c
 +++ b/mt7915/init.c
-@@ -371,12 +371,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
+@@ -372,12 +372,17 @@ mt7915_init_wiphy(struct ieee80211_hw *hw)
  	if (!phy->dev->dbdc_support)
  		wiphy->txq_memory_limit = 32 << 20; /* 32 MiB */
  
@@ -52,7 +52,7 @@
  			IEEE80211_HT_CAP_LDPC_CODING |
  			IEEE80211_HT_CAP_MAX_AMSDU;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 4989f437..9af0644f 100644
+index 69c226f0..9058c750 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
 @@ -7,6 +7,7 @@
@@ -63,7 +63,7 @@
  
  #define to_rssi(field, rxv)	((FIELD_GET(field, rxv) - 220) / 2)
  
-@@ -2486,6 +2487,21 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
+@@ -1734,6 +1735,21 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
  	phy->trb_ts = trb;
  }
  
@@ -85,7 +85,7 @@
  void mt7915_mac_sta_rc_work(struct work_struct *work)
  {
  	struct mt7915_dev *dev = container_of(work, struct mt7915_dev, rc_work);
-@@ -2508,6 +2524,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
+@@ -1756,6 +1772,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
  		sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
  		vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
  
@@ -100,7 +100,7 @@
  			       IEEE80211_RC_NSS_CHANGED |
  			       IEEE80211_RC_BW_CHANGED))
 diff --git a/mt7915/main.c b/mt7915/main.c
-index 7d4e7838..24bc12f5 100644
+index 91c4370a..90543596 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
 @@ -649,6 +649,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
@@ -133,10 +133,10 @@
  
  void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
 diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5df0b4fd..495f2368 100644
+index 3ee1db4e..6ae4d159 100644
 --- a/mt7915/mcu.c
 +++ b/mt7915/mcu.c
-@@ -3850,6 +3850,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -3558,6 +3558,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
  
  	return 0;
  }
@@ -610,10 +610,10 @@
  
  #ifdef MTK_DEBUG
 diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 0ff1fd11..364ea0dd 100644
+index 92715b97..7418f78c 100644
 --- a/mt7915/mcu.h
 +++ b/mt7915/mcu.h
-@@ -433,9 +433,13 @@ enum {
+@@ -396,9 +396,13 @@ enum {
  	RATE_PARAM_FIXED = 3,
  	RATE_PARAM_MMPS_UPDATE = 5,
  	RATE_PARAM_FIXED_HE_LTF = 7,
@@ -628,7 +628,7 @@
  };
  
  #define RATE_CFG_MCS			GENMASK(3, 0)
-@@ -447,6 +451,9 @@ enum {
+@@ -410,6 +414,9 @@ enum {
  #define RATE_CFG_PHY_TYPE		GENMASK(27, 24)
  #define RATE_CFG_HE_LTF			GENMASK(31, 28)
  
@@ -638,7 +638,7 @@
  enum {
  	THERMAL_PROTECT_PARAMETER_CTRL,
  	THERMAL_PROTECT_BASIC_INFO,
-@@ -594,5 +601,205 @@ struct csi_data {
+@@ -557,5 +564,205 @@ struct csi_data {
  #define OFDMA_UL			BIT(1)
  #define MUMIMO_DL			BIT(2)
  #define MUMIMO_UL			BIT(3)
@@ -845,10 +845,10 @@
  
  #endif
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 06f2737f..80a17a7d 100644
+index c4f8a6ad..6c6c2424 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -677,6 +677,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -661,6 +661,19 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  #endif
  
  #ifdef CONFIG_MTK_VENDOR
@@ -1159,5 +1159,5 @@
  
  enum mtk_vendor_attr_csi_ctrl {
 -- 
-2.18.0
+2.25.1