[][MAC80211][MT76][Fix patch fail]

[Description]
Fix patch fail

[Release-log]
N/A

Change-Id: Ic67b010637fec8ccdaafca746d82b43a1f1a41bd
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6438621
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-add-statistic-for-HW-Tx-Path.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-add-statistic-for-HW-Tx-Path.patch
index e99536a..0b48205 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-add-statistic-for-HW-Tx-Path.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/3005-mt76-mt7915-add-statistic-for-HW-Tx-Path.patch
@@ -1,4 +1,4 @@
-From c00e4e966cec137840f38cd0c7abf3f3237e9ea2 Mon Sep 17 00:00:00 2001
+From 7b9c6ae23f07ac5514492fff192fa927de1d5d17 Mon Sep 17 00:00:00 2001
 From: Yi-Chia Hsieh <Yi-Chia.Hsieh@mediatek.com>
 Date: Thu, 21 Jul 2022 10:56:09 -0700
 Subject: [PATCH] mt76: mt7915: add statistic for H/W Tx Path
@@ -7,7 +7,6 @@
 Add MT_PACKET_ID_WED for PPDU txs, and change MT_PACKET_ID_FIRST to 3
 to differentiate. We also need do byte cnt and pkt cnt for S/W path since
 we report it directly from mt7915_sta_statistics.
-
 ---
  mt76.h             | 49 ++++++++++++++++-------------
  mt76_connac.h      |  5 +--
@@ -22,10 +21,10 @@
  10 files changed, 141 insertions(+), 61 deletions(-)
 
 diff --git a/mt76.h b/mt76.h
-index 9162213..720a419 100644
+index 831a47a9..364b1119 100644
 --- a/mt76.h
 +++ b/mt76.h
-@@ -267,6 +267,30 @@ DECLARE_EWMA(signal, 10, 8);
+@@ -275,6 +275,30 @@ DECLARE_EWMA(signal, 10, 8);
  #define MT_WCID_TX_INFO_TXPWR_ADJ	GENMASK(25, 18)
  #define MT_WCID_TX_INFO_SET		BIT(31)
  
@@ -56,7 +55,7 @@
  struct mt76_wcid {
  	struct mt76_rx_tid __rcu *aggr[IEEE80211_NUM_TIDS];
  
-@@ -295,6 +319,8 @@ struct mt76_wcid {
+@@ -303,6 +327,8 @@ struct mt76_wcid {
  
  	struct list_head list;
  	struct idr pktid;
@@ -65,7 +64,7 @@
  };
  
  struct mt76_txq {
-@@ -341,7 +367,8 @@ struct mt76_rx_tid {
+@@ -349,7 +375,8 @@ struct mt76_rx_tid {
  #define MT_PACKET_ID_MASK		GENMASK(6, 0)
  #define MT_PACKET_ID_NO_ACK		0
  #define MT_PACKET_ID_NO_SKB		1
@@ -75,7 +74,7 @@
  #define MT_PACKET_ID_HAS_RATE		BIT(7)
  /* This is timer for when to give up when waiting for TXS callback,
   * with starting time being the time at which the DMA_DONE callback
-@@ -861,26 +888,6 @@ struct mt76_power_limits {
+@@ -874,26 +901,6 @@ struct mt76_power_limits {
  	s8 ru[7][12];
  };
  
@@ -103,10 +102,10 @@
  	u64 *data;
  	int idx;
 diff --git a/mt76_connac.h b/mt76_connac.h
-index c8d8680..8f78d12 100644
+index f71ded84..4a43838b 100644
 --- a/mt76_connac.h
 +++ b/mt76_connac.h
-@@ -352,9 +352,10 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
+@@ -366,9 +366,10 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
  				 struct sk_buff *skb, struct mt76_wcid *wcid,
  				 struct ieee80211_key_conf *key, int pid,
  				 enum mt76_txq_id qid, u32 changed);
@@ -120,7 +119,7 @@
  					 struct sk_buff *skb,
  					 __le32 *rxv, u32 mode);
 diff --git a/mt76_connac2_mac.h b/mt76_connac2_mac.h
-index 67ce216..c7064ba 100644
+index 67ce216f..c7064ba2 100644
 --- a/mt76_connac2_mac.h
 +++ b/mt76_connac2_mac.h
 @@ -123,6 +123,12 @@ enum {
@@ -152,10 +151,10 @@
  #define MT_RXD1_NORMAL_WLAN_IDX		GENMASK(9, 0)
  #define MT_RXD1_NORMAL_GROUP_1		BIT(11)
 diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index c1e8955..9e80cae 100644
+index a9e58cfa..af265d99 100644
 --- a/mt76_connac_mac.c
 +++ b/mt76_connac_mac.c
-@@ -471,6 +471,9 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
+@@ -487,6 +487,9 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
  		p_fmt = mt76_is_mmio(dev) ? MT_TX_TYPE_CT : MT_TX_TYPE_SF;
  		q_idx = wmm_idx * MT76_CONNAC_MAX_WMM_SETS +
  			mt76_connac_lmac_mapping(skb_get_queue_mapping(skb));
@@ -165,7 +164,7 @@
  	}
  
  	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + sz_txd) |
-@@ -539,35 +542,26 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
+@@ -555,35 +558,26 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
  }
  EXPORT_SYMBOL_GPL(mt76_connac2_mac_write_txwi);
  
@@ -213,7 +212,7 @@
  
  	txrate = FIELD_GET(MT_TXS0_TX_RATE, txs);
  
-@@ -602,7 +596,7 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -618,7 +612,7 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
  	case MT_PHY_TYPE_HT:
  	case MT_PHY_TYPE_HT_GF:
  		if (rate.mcs > 31)
@@ -222,7 +221,7 @@
  
  		rate.flags = RATE_INFO_FLAGS_MCS;
  		if (wcid->rate.flags & RATE_INFO_FLAGS_SHORT_GI)
-@@ -610,7 +604,7 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -626,7 +620,7 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
  		break;
  	case MT_PHY_TYPE_VHT:
  		if (rate.mcs > 9)
@@ -231,7 +230,7 @@
  
  		rate.flags = RATE_INFO_FLAGS_VHT_MCS;
  		break;
-@@ -619,14 +613,14 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -635,14 +629,14 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
  	case MT_PHY_TYPE_HE_TB:
  	case MT_PHY_TYPE_HE_MU:
  		if (rate.mcs > 11)
@@ -248,7 +247,7 @@
  	}
  
  	stats->tx_mode[mode]++;
-@@ -651,10 +645,37 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -667,10 +661,37 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
  	}
  	wcid->rate = rate;
  
@@ -290,10 +289,10 @@
  
  	return !!skb;
 diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 1f8e123..5f42b46 100644
+index 5b684926..63c702e0 100644
 --- a/mt7915/mac.c
 +++ b/mt7915/mac.c
-@@ -1152,13 +1152,10 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
+@@ -1153,13 +1153,10 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
  	u16 wcidx;
  	u8 pid;
  
@@ -308,7 +307,7 @@
  		return;
  
  	if (wcidx >= mt7915_wtbl_size(dev))
-@@ -1172,8 +1169,11 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
+@@ -1173,8 +1170,11 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
  
  	msta = container_of(wcid, struct mt7915_sta, wcid);
  
@@ -323,10 +322,10 @@
  		goto out;
  
 diff --git a/mt7915/main.c b/mt7915/main.c
-index cfc522f..85d6be8 100644
+index 0f872f5d..b7c6cf6a 100644
 --- a/mt7915/main.c
 +++ b/mt7915/main.c
-@@ -1042,6 +1042,20 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1049,6 +1049,20 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
  	}
  	sinfo->txrate.flags = txrate->flags;
  	sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
@@ -347,7 +346,7 @@
  }
  
  static void mt7915_sta_rc_work(void *data, struct ieee80211_sta *sta)
-@@ -1256,7 +1270,7 @@ static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
+@@ -1271,7 +1285,7 @@ static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
  	if (msta->vif->mt76.idx != wi->idx)
  		return;
  
@@ -357,7 +356,7 @@
  
  static
 diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 08ff556..080bfe7 100644
+index 1ccec14f..bb2d1c45 100644
 --- a/mt7915/mmio.c
 +++ b/mt7915/mmio.c
 @@ -92,6 +92,7 @@ static const u32 mt7915_offs[] = {
@@ -396,7 +395,7 @@
 +	phy = &dev->phy;
 +	mt76_set(dev, MT_AGG_ACR4(phy->band_idx), MT_AGG_ACR_PPDU_TXS2H);
 +
-+	phy = dev->mt76.phy2 ? dev->mt76.phy2->priv : NULL;
++	phy = dev->mt76.phys[MT_BAND1] ? dev->mt76.phys[MT_BAND1]->priv : NULL;
 +	if (phy)
 +		mt76_set(dev, MT_AGG_ACR4(phy->band_idx), MT_AGG_ACR_PPDU_TXS2H);
 +
@@ -419,17 +418,17 @@
 +	phy = &dev->phy;
 +	mt76_clear(dev, MT_AGG_ACR4(phy->band_idx), MT_AGG_ACR_PPDU_TXS2H);
 +
-+	phy = dev->mt76.phy2 ? dev->mt76.phy2->priv : NULL;
++	phy = dev->mt76.phys[MT_BAND1] ? dev->mt76.phys[MT_BAND1]->priv : NULL;
 +	if (phy)
 +		mt76_clear(dev, MT_AGG_ACR4(phy->band_idx), MT_AGG_ACR_PPDU_TXS2H);
  }
  #endif
  
 diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 22399cc..065c16c 100644
+index 01b2f681..f1b9c0d6 100644
 --- a/mt7915/mt7915.h
 +++ b/mt7915/mt7915.h
-@@ -139,8 +139,6 @@ struct mt7915_sta {
+@@ -142,8 +142,6 @@ struct mt7915_sta {
  	unsigned long jiffies;
  	unsigned long ampdu_state;
  
@@ -439,10 +438,10 @@
  
  	struct {
 diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 08bf84c..694cc56 100644
+index 36ef8a9c..dcb40181 100644
 --- a/mt7915/regs.h
 +++ b/mt7915/regs.h
-@@ -58,6 +58,7 @@ enum offs_rev {
+@@ -52,6 +52,7 @@ enum offs_rev {
  	AGG_AWSCR0,
  	AGG_PCR0,
  	AGG_ACR0,
@@ -450,7 +449,7 @@
  	AGG_MRCR,
  	AGG_ATCR1,
  	AGG_ATCR3,
-@@ -495,6 +496,9 @@ enum offs_rev {
+@@ -489,6 +490,9 @@ enum offs_rev {
  #define MT_AGG_ACR_CFEND_RATE		GENMASK(13, 0)
  #define MT_AGG_ACR_BAR_RATE		GENMASK(29, 16)
  
@@ -461,7 +460,7 @@
  #define MT_AGG_MRCR_BAR_CNT_LIMIT		GENMASK(15, 12)
  #define MT_AGG_MRCR_LAST_RTS_CTS_RN		BIT(6)
 diff --git a/mt7921/mt7921.h b/mt7921/mt7921.h
-index 4b2e974..f48295f 100644
+index 0a1f0357..96267d5b 100644
 --- a/mt7921/mt7921.h
 +++ b/mt7921/mt7921.h
 @@ -100,7 +100,6 @@ struct mt7921_sta {
@@ -473,5 +472,5 @@
  	struct mt76_connac_sta_key_conf bip;
  };
 -- 
-2.32.0
+2.18.0