[][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/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
index abecf0a..1cce8bc 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-Update-beacon-size-limitation-for-1.patch
@@ -1,7 +1,7 @@
-From 02041c431dd8866954f76bd0d57af44971e1167a Mon Sep 17 00:00:00 2001
+From 478585697afd695e4c55bc1a805523d2f7fb572c Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Thu, 23 Mar 2023 08:49:48 +0800
-Subject: [PATCH 2/6] wifi: mt76: mt7915: Update beacon size limitation for 11v
+Subject: [PATCH 1/7] wifi: mt76: mt7915: Update beacon size limitation for 11v
Separate the beacon offload command into two;
one is for beacons and the other is for inband discovery frames.
@@ -21,10 +21,10 @@
4 files changed, 45 insertions(+), 33 deletions(-)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 8ce7b1c..14930f5 100644
+index ca5631f..0d94090 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -645,11 +645,13 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
+@@ -640,11 +640,13 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
mt7915_update_bss_color(hw, vif, &info->he_bss_color);
if (changed & (BSS_CHANGED_BEACON |
@@ -42,10 +42,10 @@
}
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 7d9c46b..8ab4239 100644
+index 71eeb54..5661df4 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -1875,10 +1875,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1879,10 +1879,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
memcpy(buf + MT_TXD_SIZE, skb->data, skb->len);
}
@@ -59,7 +59,7 @@
{
#define OFFLOAD_TX_MODE_SU BIT(0)
#define OFFLOAD_TX_MODE_MU BIT(1)
-@@ -1888,14 +1887,28 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -1892,14 +1891,28 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
struct cfg80211_chan_def *chandef = &mvif->phy->mt76->chandef;
enum nl80211_band band = chandef->chan->band;
struct mt76_wcid *wcid = &dev->mt76.global_wcid;
@@ -90,7 +90,7 @@
if (changed & BSS_CHANGED_FILS_DISCOVERY &&
vif->bss_conf.fils_discovery.max_interval) {
interval = vif->bss_conf.fils_discovery.max_interval;
-@@ -1907,26 +1920,25 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -1911,26 +1924,25 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
}
if (!skb)
@@ -123,7 +123,7 @@
discov->tx_mode = OFFLOAD_TX_MODE_SU;
/* 0: UNSOL PROBE RESP, 1: FILS DISCOV */
discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
-@@ -1934,13 +1946,16 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
+@@ -1938,13 +1950,16 @@ mt7915_mcu_beacon_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vi
discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
discov->enable = true;
@@ -141,7 +141,7 @@
}
int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-@@ -1976,7 +1991,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -1980,7 +1995,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (!skb)
return -EINVAL;
@@ -150,7 +150,7 @@
dev_err(dev->mt76.dev, "Bcn size limit exceed\n");
dev_kfree_skb(skb);
return -EINVAL;
-@@ -1990,11 +2005,6 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -1994,11 +2009,6 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);
dev_kfree_skb(skb);
@@ -199,10 +199,10 @@
mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
{
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 103cd0d..9c79eff 100644
+index 0c7226b..fe46a36 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -497,6 +497,8 @@ int mt7915_mcu_add_rx_ba(struct mt7915_dev *dev,
+@@ -433,6 +433,8 @@ int mt7915_mcu_add_rx_ba(struct mt7915_dev *dev,
bool add);
int mt7915_mcu_update_bss_color(struct mt7915_dev *dev, struct ieee80211_vif *vif,
struct cfg80211_he_bss_color *he_bss_color);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
deleted file mode 100644
index b40ba17..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0001-wifi-mt76-mt7915-fix-background-radar-event-being-bl.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2247f39a4638afa622c21bb2b12f2d1744673a57 Mon Sep 17 00:00:00 2001
-From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
-Date: Wed, 15 Mar 2023 17:41:16 +0800
-Subject: [PATCH 1/6] wifi: mt76: mt7915: fix background radar event being
- blocked
-
-Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
----
- mt7915/mcu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index aa706ff..7d9c46b 100644
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -277,7 +277,7 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb)
-
- r = (struct mt7915_mcu_rdd_report *)skb->data;
-
-- if (r->band_idx > MT_BAND1)
-+ if (r->band_idx > MT_RX_SEL2)
- return;
-
- if ((r->band_idx && !dev->phy.mt76->band_idx) &&
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-the-beamformer-issue.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-fix-the-beamformer-issue.patch
similarity index 80%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-the-beamformer-issue.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-fix-the-beamformer-issue.patch
index 59a5f54..b5df657 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-the-beamformer-issue.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0002-wifi-mt76-mt7915-fix-the-beamformer-issue.patch
@@ -1,7 +1,7 @@
-From dc866136370fb7ce58bbc27ba7e5fdf40b6138d9 Mon Sep 17 00:00:00 2001
+From ba388175c8a0ecfc3264389cb4d2c49ed2c8b557 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Wed, 12 Apr 2023 15:53:42 +0800
-Subject: [PATCH 4/6] wifi: mt76: mt7915: fix the beamformer issue
+Subject: [PATCH 2/7] wifi: mt76: mt7915: fix the beamformer issue
without this patch, when ap sets the tx stream number to 2,
ap doesn't send any beamform packets.
@@ -12,10 +12,10 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8ab4239..d374465 100644
+index 5661df4..e820de6 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -1008,13 +1008,13 @@ static inline bool
+@@ -1012,13 +1012,13 @@ static inline bool
mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, bool bfee)
{
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch
similarity index 85%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch
index 253ed63..12bb6ad 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-fix-incorrect-HE-TX-GI-report.patch
@@ -1,7 +1,7 @@
-From 2692ebd0cb63c666eb7e8db099e71f5b67fcd323 Mon Sep 17 00:00:00 2001
+From a02364eee1308512fd25d3647238dd8da9cf3ae2 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Thu, 18 May 2023 18:11:37 +0800
-Subject: [PATCH 5/6] wifi: mt76: fix incorrect HE TX GI report
+Subject: [PATCH 3/7] wifi: mt76: fix incorrect HE TX GI report
Change GI reporting source from static capability to rate-tuning module.
@@ -9,15 +9,15 @@
---
mt76.h | 4 ++
mt7915/init.c | 4 ++
- mt7915/mac.c | 60 ++++++++++++------
+ mt7915/mac.c | 64 ++++++++++++-------
mt7915/main.c | 7 +++
mt7915/mcu.c | 161 ++++++++++++++++++++++++++++++++++++++++++++++++
mt7915/mcu.h | 58 +++++++++++++++++
mt7915/mt7915.h | 6 ++
- 7 files changed, 280 insertions(+), 20 deletions(-)
+ 7 files changed, 282 insertions(+), 22 deletions(-)
diff --git a/mt76.h b/mt76.h
-index 8b4635e..3f13cec 100644
+index 034ab90..1ca23c9 100644
--- a/mt76.h
+++ b/mt76.h
@@ -254,12 +254,16 @@ struct mt76_queue_ops {
@@ -38,10 +38,10 @@
MT_PHY_TYPE_HE_EXT_SU,
MT_PHY_TYPE_HE_TB,
diff --git a/mt7915/init.c b/mt7915/init.c
-index f85f7d3..abca909 100644
+index e156a3c..a47a980 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -648,6 +648,8 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
+@@ -656,6 +656,8 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
struct mt76_phy *mphy = phy->mt76;
int ret;
@@ -50,7 +50,7 @@
INIT_DELAYED_WORK(&mphy->mac_work, mt7915_mac_work);
mt7915_eeprom_parse_hw_cap(dev, phy);
-@@ -1180,6 +1182,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1188,6 +1190,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
dev->phy.dev = dev;
dev->phy.mt76 = &dev->mt76.phy;
dev->mt76.phy.priv = &dev->phy;
@@ -60,7 +60,7 @@
INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7915_mac_work);
INIT_LIST_HEAD(&dev->sta_rc_list);
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 7be1e17..a3ed4dd 100644
+index b8b0c0f..789f86a 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -173,15 +173,7 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev)
@@ -98,23 +98,26 @@
/* get signal strength of resp frames (CTS/BA/ACK) */
addr = mt7915_mac_wtbl_lmac_addr(dev, idx, 30);
val = mt76_rr(dev, addr);
-@@ -978,6 +958,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -911,6 +891,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+ info = le32_to_cpu(*cur_info);
if (info & MT_TX_FREE_PAIR) {
struct mt7915_sta *msta;
- struct mt76_wcid *wcid;
+ struct mt7915_phy *phy;
u16 idx;
idx = FIELD_GET(MT_TX_FREE_WLAN_ID, info);
-@@ -987,10 +968,17 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -920,11 +901,18 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
continue;
msta = container_of(wcid, struct mt7915_sta, wcid);
+- spin_lock_bh(&mdev->sta_poll_lock);
+ phy = msta->vif->phy;
- spin_lock_bh(&dev->sta_poll_lock);
- if (list_empty(&msta->poll_list))
- list_add_tail(&msta->poll_list, &dev->sta_poll_list);
- spin_unlock_bh(&dev->sta_poll_lock);
++ spin_lock_bh(&dev->mt76.sta_poll_lock);
+ if (list_empty(&msta->wcid.poll_list))
+ list_add_tail(&msta->wcid.poll_list,
+ &mdev->sta_poll_list);
+- spin_unlock_bh(&mdev->sta_poll_lock);
++ spin_unlock_bh(&dev->mt76.sta_poll_lock);
+
+ spin_lock_bh(&phy->stats_lock);
+ if (list_empty(&msta->stats_list))
@@ -124,7 +127,7 @@
continue;
}
-@@ -1051,6 +1039,7 @@ mt7915_mac_tx_free_v0(struct mt7915_dev *dev, void *data, int len)
+@@ -1003,6 +991,7 @@ mt7915_mac_tx_free_v0(struct mt7915_dev *dev, void *data, int len)
static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
{
struct mt7915_sta *msta = NULL;
@@ -132,9 +135,9 @@
struct mt76_wcid *wcid;
__le32 *txs_data = data;
u16 wcidx;
-@@ -1086,6 +1075,11 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
- list_add_tail(&msta->poll_list, &dev->sta_poll_list);
- spin_unlock_bh(&dev->sta_poll_lock);
+@@ -1038,6 +1027,11 @@ static void mt7915_mac_add_txs(struct mt7915_dev *dev, void *data)
+ list_add_tail(&msta->wcid.poll_list, &dev->mt76.sta_poll_list);
+ spin_unlock_bh(&dev->mt76.sta_poll_lock);
+ phy = msta->vif->phy;
+ spin_lock_bh(&phy->stats_lock);
@@ -144,7 +147,7 @@
out:
rcu_read_unlock();
}
-@@ -2012,6 +2006,27 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
+@@ -1950,6 +1944,27 @@ static void mt7915_mac_severe_check(struct mt7915_phy *phy)
phy->trb_ts = trb;
}
@@ -172,8 +175,8 @@
void mt7915_mac_sta_rc_work(struct work_struct *work)
{
struct mt7915_dev *dev = container_of(work, struct mt7915_dev, rc_work);
-@@ -2067,6 +2082,11 @@ void mt7915_mac_work(struct work_struct *work)
- mt7915_mac_severe_check(phy);
+@@ -2008,6 +2023,11 @@ void mt7915_mac_work(struct work_struct *work)
+ mt7915_mcu_muru_debug_get(phy);
}
+ if (++phy->stats_work_count == 10) {
@@ -185,18 +188,18 @@
mt76_tx_status_check(mphy->dev, false);
diff --git a/mt7915/main.c b/mt7915/main.c
-index 14930f5..1a741b8 100644
+index 0d94090..06e4291 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -682,6 +682,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -708,6 +708,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
INIT_LIST_HEAD(&msta->rc_list);
- INIT_LIST_HEAD(&msta->poll_list);
+ INIT_LIST_HEAD(&msta->wcid.poll_list);
+ INIT_LIST_HEAD(&msta->stats_list);
msta->vif = mvif;
msta->wcid.sta = 1;
msta->wcid.idx = idx;
-@@ -706,6 +707,7 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -732,6 +733,7 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
{
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
@@ -204,10 +207,10 @@
int i;
mt7915_mcu_add_sta(dev, vif, sta, false);
-@@ -722,6 +724,11 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -748,6 +750,11 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (!list_empty(&msta->rc_list))
list_del_init(&msta->rc_list);
- spin_unlock_bh(&dev->sta_poll_lock);
+ spin_unlock_bh(&mdev->sta_poll_lock);
+
+ spin_lock_bh(&phy->stats_lock);
+ if (!list_empty(&msta->stats_list))
@@ -217,10 +220,10 @@
static void mt7915_tx(struct ieee80211_hw *hw,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index d374465..8d8a203 100644
+index e820de6..87cc8d9 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3672,6 +3672,167 @@ out:
+@@ -3711,6 +3711,167 @@ out:
return ret;
}
@@ -463,19 +466,19 @@
+};
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index d1715ff..5451024 100644
+index fe46a36..6abe931 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -138,6 +138,7 @@ struct mt7915_sta {
+@@ -137,6 +137,7 @@ struct mt7915_sta {
+ struct mt7915_vif *vif;
- struct list_head poll_list;
struct list_head rc_list;
+ struct list_head stats_list;
u32 airtime_ac[8];
int ack_signal;
-@@ -273,6 +274,10 @@ struct mt7915_phy {
- struct mib_stats mib;
+@@ -210,6 +211,10 @@ struct mt7915_phy {
+ struct mt76_mib_stats mib;
struct mt76_channel_state state_ts;
+ u8 stats_work_count;
@@ -485,7 +488,7 @@
#ifdef CONFIG_NL80211_TESTMODE
struct {
u32 *reg_backup;
-@@ -544,6 +549,7 @@ int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch);
+@@ -479,6 +484,7 @@ int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch);
int mt7915_mcu_get_temperature(struct mt7915_phy *phy);
int mt7915_mcu_set_thermal_throttling(struct mt7915_phy *phy, u8 state);
int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-mt7915-disable-wfdma-tx-rx-during-SER-reco.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-mt7915-disable-wfdma-tx-rx-during-SER-reco.patch
deleted file mode 100644
index d7deb35..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0003-wifi-mt76-mt7915-disable-wfdma-tx-rx-during-SER-reco.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 98998425cb0089e60f7172552f8231814736e921 Mon Sep 17 00:00:00 2001
-From: Evelyn Tsai <evelyn.tsai@mediatek.com>
-Date: Thu, 18 May 2023 18:02:17 +0800
-Subject: [PATCH 3/6] wifi: mt76: mt7915: disable wfdma tx/rx during SER
- recovery.
-
-Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
----
- dma.c | 6 ++
- mt7915/dma.c | 148 +++++++++++++++++++++++++++---------------------
- mt7915/mac.c | 17 +++++-
- mt7915/mt7915.h | 1 +
- 4 files changed, 103 insertions(+), 69 deletions(-)
-
-diff --git a/dma.c b/dma.c
-index 465190e..05d9ab3 100644
---- a/dma.c
-+++ b/dma.c
-@@ -466,6 +466,9 @@ mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q,
- struct mt76_queue_buf buf = {};
- dma_addr_t addr;
-
-+ if (test_bit(MT76_MCU_RESET, &dev->phy.state))
-+ goto error;
-+
- if (q->queued + 1 >= q->ndesc - 1)
- goto error;
-
-@@ -507,6 +510,9 @@ mt76_dma_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
- dma_addr_t addr;
- u8 *txwi;
-
-+ if (test_bit(MT76_RESET, &dev->phy.state))
-+ goto free_skb;
-+
- t = mt76_get_txwi(dev);
- if (!t)
- goto free_skb;
-diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 86a93de..4c8cf0c 100644
---- a/mt7915/dma.c
-+++ b/mt7915/dma.c
-@@ -250,12 +250,90 @@ static void mt7915_dma_disable(struct mt7915_dev *dev, bool rst)
- }
- }
-
--static int mt7915_dma_enable(struct mt7915_dev *dev)
-+int __mt7915_dma_enable(struct mt7915_dev *dev, bool reset, bool wed_reset)
- {
- struct mt76_dev *mdev = &dev->mt76;
- u32 hif1_ofs = 0;
- u32 irq_mask;
-
-+ if (dev->hif2)
-+ hif1_ofs = MT_WFDMA0_PCIE1(0) - MT_WFDMA0(0);
-+
-+ /* enable wpdma tx/rx */
-+ if (!reset) {
-+ mt76_set(dev, MT_WFDMA0_GLO_CFG,
-+ MT_WFDMA0_GLO_CFG_TX_DMA_EN |
-+ MT_WFDMA0_GLO_CFG_RX_DMA_EN |
-+ MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
-+ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
-+
-+ if (is_mt7915(mdev))
-+ mt76_set(dev, MT_WFDMA1_GLO_CFG,
-+ MT_WFDMA1_GLO_CFG_TX_DMA_EN |
-+ MT_WFDMA1_GLO_CFG_RX_DMA_EN |
-+ MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
-+ MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
-+
-+ if (dev->hif2) {
-+ mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
-+ MT_WFDMA0_GLO_CFG_TX_DMA_EN |
-+ MT_WFDMA0_GLO_CFG_RX_DMA_EN |
-+ MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
-+ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
-+
-+ if (is_mt7915(mdev))
-+ mt76_set(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
-+ MT_WFDMA1_GLO_CFG_TX_DMA_EN |
-+ MT_WFDMA1_GLO_CFG_RX_DMA_EN |
-+ MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
-+ MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
-+
-+ mt76_set(dev, MT_WFDMA_HOST_CONFIG,
-+ MT_WFDMA_HOST_CONFIG_PDMA_BAND);
-+ }
-+ }
-+
-+ /* enable interrupts for TX/RX rings */
-+ irq_mask = MT_INT_RX_DONE_MCU |
-+ MT_INT_TX_DONE_MCU |
-+ MT_INT_MCU_CMD;
-+
-+ if (!dev->phy.mt76->band_idx)
-+ irq_mask |= MT_INT_BAND0_RX_DONE;
-+
-+ if (dev->dbdc_support || dev->phy.mt76->band_idx)
-+ irq_mask |= MT_INT_BAND1_RX_DONE;
-+
-+ if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wed_reset) {
-+ u32 wed_irq_mask = irq_mask;
-+ int ret;
-+
-+ wed_irq_mask |= MT_INT_TX_DONE_BAND0 | MT_INT_TX_DONE_BAND1;
-+ if (!is_mt798x(&dev->mt76))
-+ mt76_wr(dev, MT_INT_WED_MASK_CSR, wed_irq_mask);
-+ else
-+ mt76_wr(dev, MT_INT_MASK_CSR, wed_irq_mask);
-+
-+ ret = mt7915_mcu_wed_enable_rx_stats(dev);
-+ if (ret)
-+ return ret;
-+
-+ mtk_wed_device_start(&dev->mt76.mmio.wed, wed_irq_mask);
-+ }
-+
-+ irq_mask = reset ? MT_INT_MCU_CMD : irq_mask;
-+
-+ mt7915_irq_enable(dev, irq_mask);
-+ mt7915_irq_disable(dev, 0);
-+
-+ return 0;
-+}
-+
-+static int mt7915_dma_enable(struct mt7915_dev *dev, bool reset)
-+{
-+ struct mt76_dev *mdev = &dev->mt76;
-+ u32 hif1_ofs = 0;
-+
- if (dev->hif2)
- hif1_ofs = MT_WFDMA0_PCIE1(0) - MT_WFDMA0(0);
-
-@@ -322,69 +400,7 @@ static int mt7915_dma_enable(struct mt7915_dev *dev)
- mt76_poll(dev, MT_WFDMA_EXT_CSR_HIF_MISC,
- MT_WFDMA_EXT_CSR_HIF_MISC_BUSY, 0, 1000);
-
-- /* set WFDMA Tx/Rx */
-- mt76_set(dev, MT_WFDMA0_GLO_CFG,
-- MT_WFDMA0_GLO_CFG_TX_DMA_EN |
-- MT_WFDMA0_GLO_CFG_RX_DMA_EN |
-- MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
-- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
--
-- if (is_mt7915(mdev))
-- mt76_set(dev, MT_WFDMA1_GLO_CFG,
-- MT_WFDMA1_GLO_CFG_TX_DMA_EN |
-- MT_WFDMA1_GLO_CFG_RX_DMA_EN |
-- MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
-- MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
--
-- if (dev->hif2) {
-- mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
-- MT_WFDMA0_GLO_CFG_TX_DMA_EN |
-- MT_WFDMA0_GLO_CFG_RX_DMA_EN |
-- MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
-- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
--
-- if (is_mt7915(mdev))
-- mt76_set(dev, MT_WFDMA1_GLO_CFG + hif1_ofs,
-- MT_WFDMA1_GLO_CFG_TX_DMA_EN |
-- MT_WFDMA1_GLO_CFG_RX_DMA_EN |
-- MT_WFDMA1_GLO_CFG_OMIT_TX_INFO |
-- MT_WFDMA1_GLO_CFG_OMIT_RX_INFO);
--
-- mt76_set(dev, MT_WFDMA_HOST_CONFIG,
-- MT_WFDMA_HOST_CONFIG_PDMA_BAND);
-- }
--
-- /* enable interrupts for TX/RX rings */
-- irq_mask = MT_INT_RX_DONE_MCU |
-- MT_INT_TX_DONE_MCU |
-- MT_INT_MCU_CMD;
--
-- if (!dev->phy.mt76->band_idx)
-- irq_mask |= MT_INT_BAND0_RX_DONE;
--
-- if (dev->dbdc_support || dev->phy.mt76->band_idx)
-- irq_mask |= MT_INT_BAND1_RX_DONE;
--
-- if (mtk_wed_device_active(&dev->mt76.mmio.wed)) {
-- u32 wed_irq_mask = irq_mask;
-- int ret;
--
-- wed_irq_mask |= MT_INT_TX_DONE_BAND0 | MT_INT_TX_DONE_BAND1;
-- if (!is_mt798x(&dev->mt76))
-- mt76_wr(dev, MT_INT_WED_MASK_CSR, wed_irq_mask);
-- else
-- mt76_wr(dev, MT_INT_MASK_CSR, wed_irq_mask);
--
-- ret = mt7915_mcu_wed_enable_rx_stats(dev);
-- if (ret)
-- return ret;
--
-- mtk_wed_device_start(&dev->mt76.mmio.wed, wed_irq_mask);
-- }
--
-- mt7915_irq_enable(dev, irq_mask);
--
-- return 0;
-+ return __mt7915_dma_enable(dev, reset, true);
- }
-
- int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
-@@ -560,7 +576,7 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
- mt7915_poll_tx);
- napi_enable(&dev->mt76.tx_napi);
-
-- mt7915_dma_enable(dev);
-+ mt7915_dma_enable(dev, false);
-
- return 0;
- }
-@@ -642,7 +658,7 @@ int mt7915_dma_reset(struct mt7915_dev *dev, bool force)
- mt76_rmw(dev, MT_WFDMA0_EXT0_CFG, MT_WFDMA0_EXT0_RXWB_KEEP,
- MT_WFDMA0_EXT0_RXWB_KEEP);
-
-- mt7915_dma_enable(dev);
-+ mt7915_dma_enable(dev, !force);
-
- return 0;
- }
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index fb6bab8..7be1e17 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -1574,6 +1574,8 @@ void mt7915_mac_reset_work(struct work_struct *work)
- if (!(READ_ONCE(dev->recovery.state) & MT_MCU_CMD_STOP_DMA))
- return;
-
-+ dev_info(dev->mt76.dev,"%s L1 SER recovery start.\n",
-+ wiphy_name(dev->mt76.hw->wiphy));
- if (mtk_wed_device_active(&dev->mt76.mmio.wed)) {
- mtk_wed_device_stop(&dev->mt76.mmio.wed);
- if (!is_mt798x(&dev->mt76))
-@@ -1611,6 +1613,12 @@ void mt7915_mac_reset_work(struct work_struct *work)
- mt7915_wait_reset_state(dev, MT_MCU_CMD_RECOVERY_DONE);
- }
-
-+ mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_RESET_DONE);
-+ mt7915_wait_reset_state(dev, MT_MCU_CMD_NORMAL_STATE);
-+
-+ /* enable dma tx/rx and interrupt */
-+ __mt7915_dma_enable(dev, false, false);
-+
- clear_bit(MT76_MCU_RESET, &dev->mphy.state);
- clear_bit(MT76_RESET, &dev->mphy.state);
- if (phy2)
-@@ -1625,9 +1633,6 @@ void mt7915_mac_reset_work(struct work_struct *work)
-
- tasklet_schedule(&dev->mt76.irq_tasklet);
-
-- mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_RESET_DONE);
-- mt7915_wait_reset_state(dev, MT_MCU_CMD_NORMAL_STATE);
--
- mt76_worker_enable(&dev->mt76.tx_worker);
-
- local_bh_disable();
-@@ -1649,6 +1654,8 @@ void mt7915_mac_reset_work(struct work_struct *work)
- ieee80211_queue_delayed_work(ext_phy->hw,
- &phy2->mt76->mac_work,
- MT7915_WATCHDOG_TIME);
-+ dev_info(dev->mt76.dev,"%s L1 SER recovery completed.\n",
-+ wiphy_name(dev->mt76.hw->wiphy));
- }
-
- /* firmware coredump */
-@@ -1723,6 +1730,10 @@ skip_coredump:
-
- void mt7915_reset(struct mt7915_dev *dev)
- {
-+ dev_info(dev->mt76.dev, "%s SER recovery state: 0x%08x\n",
-+ wiphy_name(dev->mt76.hw->wiphy),
-+ READ_ONCE(dev->recovery.state));
-+
- if (!dev->recovery.hw_init_done)
- return;
-
-diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 9c79eff..d1715ff 100644
---- a/mt7915/mt7915.h
-+++ b/mt7915/mt7915.h
-@@ -472,6 +472,7 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2);
- void mt7915_dma_prefetch(struct mt7915_dev *dev);
- void mt7915_dma_cleanup(struct mt7915_dev *dev);
- int mt7915_dma_reset(struct mt7915_dev *dev, bool force);
-+int __mt7915_dma_enable(struct mt7915_dev *dev, bool reset, bool wed_reset);
- int mt7915_txbf_init(struct mt7915_dev *dev);
- void mt7915_init_txpower(struct mt7915_dev *dev,
- struct ieee80211_supported_band *sband);
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch
similarity index 86%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch
index 420aeb0..a0b17c3 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0004-wifi-mt76-mt7915-fix-DFS-CAC-tx-emission-issue-after.patch
@@ -1,7 +1,7 @@
-From c32e29ad8916241b5a0bdc5f662e766687524327 Mon Sep 17 00:00:00 2001
+From 7982b31fabc8cecdc45e7b123c76997c4a323ca8 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Wed, 17 May 2023 17:34:55 +0800
-Subject: [PATCH 6/6] wifi: mt76: mt7915: fix DFS CAC tx emission issue after
+Subject: [PATCH 4/7] wifi: mt76: mt7915: fix DFS CAC tx emission issue after
interface down up
FW's channel state is set during the first wifi interface setup. If the switch reason for
@@ -16,10 +16,10 @@
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8d8a203..9dd4e34 100644
+index 87cc8d9..4ac08d0 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2693,12 +2693,12 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
+@@ -2732,12 +2732,12 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
if (mt76_connac_spe_idx(phy->mt76->antenna_mask))
req.tx_path_num = fls(phy->mt76->antenna_mask);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch
index b646d67..3ac4b4b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0005-wifi-mt76-mt7915-add-pc-stack-dump-for-WM-s-coredump.patch
@@ -1,7 +1,7 @@
-From a15a9b160d9bb9b52cb697251777c5c39f842f24 Mon Sep 17 00:00:00 2001
+From 086a3d4b3fb679e1a138bae4c86566edfd944902 Mon Sep 17 00:00:00 2001
From: Bo Jiao <Bo.Jiao@mediatek.com>
Date: Mon, 22 May 2023 13:49:37 +0800
-Subject: [PATCH] wifi: mt76: mt7915: add pc stack dump for WM's coredump.
+Subject: [PATCH 5/7] wifi: mt76: mt7915: add pc stack dump for WM's coredump.
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
---
@@ -15,7 +15,7 @@
7 files changed, 207 insertions(+), 71 deletions(-)
diff --git a/mt76.h b/mt76.h
-index 3f13cec6..354acc09 100644
+index 1ca23c9..a4cf9b6 100644
--- a/mt76.h
+++ b/mt76.h
@@ -27,6 +27,8 @@
@@ -40,7 +40,7 @@
enum mt76_wed_type {
MT76_WED_Q_TX,
MT76_WED_Q_TXFREE,
-@@ -776,6 +784,9 @@ struct mt76_dev {
+@@ -782,6 +790,9 @@ struct mt76_dev {
struct device *dma_dev;
struct mt76_mcu mcu;
@@ -51,10 +51,10 @@
struct net_device napi_dev;
struct net_device tx_napi_dev;
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 46f69aa8..913bad95 100644
+index 0f0a519..cd6ce3c 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
-@@ -3017,6 +3017,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
+@@ -3020,6 +3020,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
goto out;
}
@@ -64,7 +64,7 @@
snprintf(dev->hw->wiphy->fw_version,
sizeof(dev->hw->wiphy->fw_version),
"%.10s-%.15s", hdr->fw_ver, hdr->build_date);
-@@ -3046,6 +3049,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
+@@ -3049,6 +3052,9 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
goto out;
}
@@ -74,7 +74,7 @@
snprintf(dev->hw->wiphy->fw_version,
sizeof(dev->hw->wiphy->fw_version),
"%.10s-%.15s", hdr->fw_ver, hdr->build_date);
-@@ -3116,6 +3122,9 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
+@@ -3119,6 +3125,9 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
@@ -85,7 +85,7 @@
struct mt76_connac2_patch_sec *sec;
u32 len, addr, mode;
diff --git a/mt7915/coredump.c b/mt7915/coredump.c
-index 5daf2258..298c1cad 100644
+index 5daf225..298c1ca 100644
--- a/mt7915/coredump.c
+++ b/mt7915/coredump.c
@@ -7,7 +7,7 @@
@@ -413,7 +413,7 @@
}
diff --git a/mt7915/coredump.h b/mt7915/coredump.h
-index 709f8e9c..809ccbdf 100644
+index 709f8e9..809ccbd 100644
--- a/mt7915/coredump.h
+++ b/mt7915/coredump.h
@@ -4,6 +4,7 @@
@@ -513,10 +513,10 @@
return NULL;
}
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index a3ed4ddf..2a87b506 100644
+index 789f86a..67e7b26 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -1653,28 +1653,31 @@ void mt7915_mac_reset_work(struct work_struct *work)
+@@ -1595,28 +1595,31 @@ void mt7915_mac_reset_work(struct work_struct *work)
}
/* firmware coredump */
@@ -554,7 +554,7 @@
if (!mem_region || !crash_data->memdump_buf_len) {
mutex_unlock(&dev->dump_mutex);
goto skip_memdump;
-@@ -1684,6 +1687,9 @@ void mt7915_mac_dump_work(struct work_struct *work)
+@@ -1626,6 +1629,9 @@ void mt7915_mac_dump_work(struct work_struct *work)
buf_len = crash_data->memdump_buf_len;
/* dumping memory content... */
@@ -564,7 +564,7 @@
memset(buf, 0, buf_len);
for (i = 0; i < num; i++) {
if (mem_region->len > buf_len) {
-@@ -1701,6 +1707,7 @@ void mt7915_mac_dump_work(struct work_struct *work)
+@@ -1643,6 +1649,7 @@ void mt7915_mac_dump_work(struct work_struct *work)
mt7915_memcpy_fromio(dev, buf, mem_region->start,
mem_region->len);
@@ -572,7 +572,7 @@
hdr->start = mem_region->start;
hdr->len = mem_region->len;
-@@ -1717,8 +1724,18 @@ void mt7915_mac_dump_work(struct work_struct *work)
+@@ -1659,8 +1666,18 @@ void mt7915_mac_dump_work(struct work_struct *work)
mutex_unlock(&dev->dump_mutex);
skip_memdump:
@@ -594,10 +594,10 @@
}
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 54510245..4fb0a375 100644
+index 6abe931..4de3e05 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -335,7 +335,7 @@ struct mt7915_dev {
+@@ -272,7 +272,7 @@ struct mt7915_dev {
struct mutex dump_mutex;
#ifdef CONFIG_DEV_COREDUMP
struct {
@@ -607,10 +607,10 @@
#endif
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 374677f7..636b12da 100644
+index 588cd87..d01b9ea 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
-@@ -1215,4 +1215,24 @@ enum offs_rev {
+@@ -1218,4 +1218,24 @@ enum offs_rev {
#define MT_MCU_WM_CIRQ_EINT_MASK_CLR_ADDR MT_MCU_WM_CIRQ(0x108)
#define MT_MCU_WM_CIRQ_EINT_SOFT_ADDR MT_MCU_WM_CIRQ(0x118)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0008-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0008-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch
index 5cca53c..fe833e5 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0008-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0006-wifi-mt76-mt7915-update-mpdu-density-in-2-5g-capabil.patch
@@ -1,7 +1,8 @@
-From 4fe047234a68854764a3dbf4cfb18ffee441961f Mon Sep 17 00:00:00 2001
+From 50f77fea3f310a623f0fc3656f1a28a7e769c598 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Wed, 24 May 2023 10:17:38 +0800
-Subject: [PATCH] wifi: mt76: mt7915: update mpdu density in 2/5g capability
+Subject: [PATCH 6/7] wifi: mt76: mt7915: update mpdu density in 2/5g
+ capability
Set mpdu density to 2 usec to meet hardware capability
and also update enhance throughput.
@@ -12,7 +13,7 @@
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/mt7915/init.c b/mt7915/init.c
-index abca9095..bf2edcc2 100644
+index a47a980..75f8d96 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
@@ -398,8 +398,12 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
similarity index 93%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
index 89cb09b..7fa9a8d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch
@@ -1,8 +1,7 @@
-From 74a8d89cbec86aa3cddf05a8ecadc65458fb4f14 Mon Sep 17 00:00:00 2001
+From ef4b8b36345cb50b5186ced6d2c09742f44e6719 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Sat, 1 Apr 2023 08:18:17 +0800
-Subject: [PATCH 0999/1033] wifi: mt76: mt7915: build pass for Linux Kernel 5.4
- fixes
+Subject: [PATCH 7/7] wifi: mt76: mt7915: build pass for Linux Kernel 5.4 fixes
---
debugfs.c | 2 ++
@@ -265,7 +264,7 @@
if (!is_valid_ether_addr(phy->macaddr)) {
eth_random_addr(phy->macaddr);
diff --git a/mac80211.c b/mac80211.c
-index 2c4a529..991d91b 100644
+index 8540738..76cb08b 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -4,7 +4,6 @@
@@ -276,7 +275,7 @@
#include "mt76.h"
#define CHAN2G(_idx, _freq) { \
-@@ -562,47 +561,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
+@@ -563,47 +562,6 @@ void mt76_unregister_phy(struct mt76_phy *phy)
}
EXPORT_SYMBOL_GPL(mt76_unregister_phy);
@@ -324,7 +323,7 @@
struct mt76_dev *
mt76_alloc_device(struct device *pdev, unsigned int size,
const struct ieee80211_ops *ops,
-@@ -1742,21 +1700,6 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
+@@ -1748,21 +1706,6 @@ void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
}
EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
@@ -359,10 +358,10 @@
struct sk_buff *
__mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
diff --git a/mt76.h b/mt76.h
-index 3f13cec..a8f26a8 100644
+index a4cf9b6..35bf19f 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -202,7 +202,7 @@ struct mt76_queue {
+@@ -210,7 +210,7 @@ struct mt76_queue {
dma_addr_t desc_dma;
struct sk_buff *rx_head;
@@ -371,7 +370,7 @@
};
struct mt76_mcu_ops {
-@@ -1324,7 +1324,6 @@ mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,
+@@ -1439,7 +1439,6 @@ mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,
return usb_bulk_msg(udev, pipe, data, len, actual_len, timeout);
}
@@ -379,7 +378,7 @@
void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
struct mt76_sta_stats *stats, bool eht);
int mt76_skb_adjust_pad(struct sk_buff *skb, int pad);
-@@ -1436,25 +1435,6 @@ void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
+@@ -1551,25 +1550,6 @@ void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
struct mt76_txwi_cache *mt76_rx_token_release(struct mt76_dev *dev, int token);
int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
struct mt76_txwi_cache *r, dma_addr_t phys);
@@ -418,7 +417,7 @@
static bool prefer_offload_fw = true;
module_param(prefer_offload_fw, bool, 0644);
diff --git a/mt76_connac.h b/mt76_connac.h
-index 77ca8f0..ca26984 100644
+index 22878f0..4560ab7 100644
--- a/mt76_connac.h
+++ b/mt76_connac.h
@@ -56,7 +56,6 @@ enum {
@@ -438,7 +437,7 @@
if (chandef->width >= ARRAY_SIZE(width_to_bw))
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 46f69aa..732a4e6 100644
+index cd6ce3c..a558c68 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -4,6 +4,7 @@
@@ -449,7 +448,7 @@
int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
{
-@@ -1329,40 +1330,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
+@@ -1332,40 +1333,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
}
EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode);
@@ -490,7 +489,7 @@
const struct ieee80211_sta_he_cap *
mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
{
-@@ -1375,18 +1342,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
+@@ -1378,18 +1345,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
}
EXPORT_SYMBOL_GPL(mt76_connac_get_he_phy_cap);
@@ -510,10 +509,10 @@
#define DEFAULT_HE_DURATION_RTS_THRES 1023
static void
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 91d98ef..ebb7f58 100644
+index fe729bb..bd0bf4b 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1883,12 +1883,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
+@@ -1887,12 +1887,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
const struct ieee80211_sta_he_cap *
mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
@@ -527,10 +526,10 @@
int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
struct mt76_connac_sta_key_conf *sta_key_conf,
diff --git a/mt7915/main.c b/mt7915/main.c
-index 1a741b8..f78f2bf 100644
+index 06e4291..251df80 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1298,22 +1298,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
+@@ -1361,22 +1361,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u32 sset, u8 *data)
{
@@ -559,16 +558,16 @@
}
static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
-@@ -1341,7 +1338,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1404,7 +1401,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+ .idx = mvif->mt76.idx,
};
- struct mib_stats *mib = &phy->mib;
/* See mt7915_ampdu_stat_read_phy, etc */
- int i, ei = 0, stats_size;
+ int i, ei = 0;
mutex_lock(&dev->mt76.mutex);
-@@ -1422,12 +1419,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1516,12 +1513,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
return;
ei += wi.worker_stat_count;
@@ -585,7 +584,7 @@
static void
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9dd4e34..dbdc48a 100644
+index 4ac08d0..6cf2a3f 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -6,6 +6,7 @@
@@ -597,10 +596,10 @@
#define fw_name(_dev, name, ...) ({ \
char *_fw; \
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 984b5f6..1bb8a4c 100644
+index fc7ace6..8d92e76 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
-@@ -596,9 +596,13 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
+@@ -570,9 +570,13 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
{
struct mt7915_dev *dev;
@@ -614,7 +613,7 @@
for (i = 0; i < dev->mt76.rx_token_size; i++) {
struct mt76_txwi_cache *t;
-@@ -606,7 +610,9 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -580,7 +584,9 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
if (!t || !t->ptr)
continue;
@@ -625,7 +624,7 @@
t->ptr = NULL;
mt76_put_rxwi(&dev->mt76, t);
-@@ -618,38 +624,47 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -592,38 +598,47 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
{
struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
@@ -691,7 +690,7 @@
goto unmap;
}
-@@ -661,8 +676,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -635,8 +650,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
return 0;
unmap:
@@ -701,10 +700,10 @@
return -ENOMEM;
}
diff --git a/mt7921/main.c b/mt7921/main.c
-index 3b6adb2..47eb38e 100644
+index 87067ac..022cd34 100644
--- a/mt7921/main.c
+++ b/mt7921/main.c
-@@ -1083,34 +1083,17 @@ static void
+@@ -1087,34 +1087,17 @@ static void
mt7921_get_et_strings(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 sset, u8 *data)
{
@@ -740,15 +739,15 @@
}
static void
-@@ -1130,7 +1113,6 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -1134,7 +1117,6 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ethtool_stats *stats, u64 *data)
{
struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
- int stats_size = ARRAY_SIZE(mt7921_gstrings_stats);
struct mt7921_phy *phy = mt7921_hw_phy(hw);
struct mt7921_dev *dev = phy->dev;
- struct mib_stats *mib = &phy->mib;
-@@ -1186,14 +1168,9 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ struct mt76_mib_stats *mib = &phy->mib;
+@@ -1190,14 +1172,9 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
return;
ei += wi.worker_stat_count;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
similarity index 99%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
index 85a5fe8..aa3146d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0999-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch
@@ -1,7 +1,8 @@
-From d7349df90b0382edfa3bbed0e48cfcc5a989e79e Mon Sep 17 00:00:00 2001
+From 99a1f11d07da770d1da5278ac751ccc3f44eb72f Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Wed, 22 Jun 2022 10:39:47 +0800
-Subject: [PATCH] wifi: mt76: mt7915: add mtk internal debug tools for mt76
+Subject: [PATCH 0999/1031] wifi: mt76: mt7915: add mtk internal debug tools
+ for mt76
---
mt76_connac_mcu.h | 6 +
@@ -22,10 +23,10 @@
create mode 100644 mt7915/mtk_mcu.c
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index ebb7f587..8d6c422b 100644
+index bd0bf4b..ab3b58e 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1148,6 +1148,7 @@ enum {
+@@ -1151,6 +1151,7 @@ enum {
MCU_EXT_CMD_SET_TX_POWER_CTRL = 0x11,
MCU_EXT_CMD_FW_LOG_2_HOST = 0x13,
MCU_EXT_CMD_TXBF_ACTION = 0x1e,
@@ -33,7 +34,7 @@
MCU_EXT_CMD_EFUSE_BUFFER_MODE = 0x21,
MCU_EXT_CMD_THERMAL_PROT = 0x23,
MCU_EXT_CMD_STA_REC_UPDATE = 0x25,
-@@ -1171,6 +1172,11 @@ enum {
+@@ -1174,6 +1175,11 @@ enum {
MCU_EXT_CMD_TX_POWER_FEATURE_CTRL = 0x58,
MCU_EXT_CMD_RXDCOC_CAL = 0x59,
MCU_EXT_CMD_GET_MIB_INFO = 0x5a,
@@ -46,7 +47,7 @@
MCU_EXT_CMD_CAL_CACHE = 0x67,
MCU_EXT_CMD_RED_ENABLE = 0x68,
diff --git a/mt7915/Makefile b/mt7915/Makefile
-index c4dca9c1..fd711416 100644
+index c4dca9c..fd71141 100644
--- a/mt7915/Makefile
+++ b/mt7915/Makefile
@@ -4,7 +4,7 @@ EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
@@ -59,7 +60,7 @@
mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
mt7915e-$(CONFIG_MT798X_WMAC) += soc.o
diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 879884ea..9fca0093 100644
+index 6c3696c..d66d104 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
@@ -8,6 +8,9 @@
@@ -72,7 +73,7 @@
/** global debugfs **/
-@@ -504,6 +507,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
+@@ -496,6 +499,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
int ret;
dev->fw.debug_wm = val ? MCU_FW_LOG_TO_HOST : 0;
@@ -82,7 +83,7 @@
if (dev->fw.debug_bin)
val = 16;
-@@ -528,6 +534,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
+@@ -520,6 +526,9 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
if (ret)
goto out;
}
@@ -92,7 +93,7 @@
/* WM CPU info record control */
mt76_clear(dev, MT_CPU_UTIL_CTRL, BIT(0));
-@@ -535,6 +544,12 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
+@@ -527,6 +536,12 @@ mt7915_fw_debug_wm_set(void *data, u64 val)
mt76_wr(dev, MT_MCU_WM_CIRQ_IRQ_MASK_CLR_ADDR, BIT(5));
mt76_wr(dev, MT_MCU_WM_CIRQ_IRQ_SOFT_ADDR, BIT(5));
@@ -105,7 +106,7 @@
out:
if (ret)
dev->fw.debug_wm = 0;
-@@ -547,7 +562,11 @@ mt7915_fw_debug_wm_get(void *data, u64 *val)
+@@ -539,7 +554,11 @@ mt7915_fw_debug_wm_get(void *data, u64 *val)
{
struct mt7915_dev *dev = data;
@@ -118,7 +119,7 @@
return 0;
}
-@@ -622,16 +641,30 @@ mt7915_fw_debug_bin_set(void *data, u64 val)
+@@ -614,16 +633,30 @@ mt7915_fw_debug_bin_set(void *data, u64 val)
};
struct mt7915_dev *dev = data;
@@ -152,7 +153,7 @@
return mt7915_fw_debug_wm_set(dev, dev->fw.debug_wm);
}
-@@ -1257,6 +1290,11 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1249,6 +1282,11 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
if (!ext_phy)
dev->debugfs_dir = dir;
@@ -164,7 +165,7 @@
return 0;
}
-@@ -1269,6 +1307,12 @@ mt7915_debugfs_write_fwlog(struct mt7915_dev *dev, const void *hdr, int hdrlen,
+@@ -1261,6 +1299,12 @@ mt7915_debugfs_write_fwlog(struct mt7915_dev *dev, const void *hdr, int hdrlen,
void *dest;
spin_lock_irqsave(&lock, flags);
@@ -177,7 +178,7 @@
dest = relay_reserve(dev->relay_fwlog, hdrlen + len + 4);
if (dest) {
*(u32 *)dest = hdrlen + len;
-@@ -1297,17 +1341,50 @@ void mt7915_debugfs_rx_fw_monitor(struct mt7915_dev *dev, const void *data, int
+@@ -1289,17 +1333,50 @@ void mt7915_debugfs_rx_fw_monitor(struct mt7915_dev *dev, const void *data, int
.msg_type = cpu_to_le16(PKT_TYPE_RX_FW_MONITOR),
};
@@ -231,7 +232,7 @@
if (dev->relay_fwlog)
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 2a87b506..a62a9bca 100644
+index 67e7b26..99cbabd 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -275,6 +275,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
@@ -245,7 +246,7 @@
memset(status, 0, sizeof(*status));
if ((rxd1 & MT_RXD1_NORMAL_BAND_IDX) && !phy->mt76->band_idx) {
-@@ -458,6 +462,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -459,6 +463,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
}
hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
@@ -256,7 +257,7 @@
if (hdr_trans && ieee80211_has_morefrags(fc)) {
struct ieee80211_vif *vif;
int err;
-@@ -795,6 +803,12 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -796,6 +804,12 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
tx_info->buf[1].skip_unmap = true;
tx_info->nbuf = MT_CT_DMA_BUF_NUM;
@@ -270,7 +271,7 @@
}
diff --git a/mt7915/main.c b/mt7915/main.c
-index f78f2bf0..699f767f 100644
+index 251df80..cc4ac94 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -73,7 +73,11 @@ int mt7915_run(struct ieee80211_hw *hw)
@@ -286,10 +287,10 @@
goto out;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index dbdc48a0..5acba67d 100644
+index 6cf2a3f..fbbd848 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -203,6 +203,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
+@@ -205,6 +205,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
else
qid = MT_MCUQ_WM;
@@ -301,7 +302,7 @@
return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
}
-@@ -2246,7 +2251,10 @@ static int mt7915_red_set_watermark(struct mt7915_dev *dev)
+@@ -2285,7 +2290,10 @@ static int mt7915_red_set_watermark(struct mt7915_dev *dev)
sizeof(req), false);
}
@@ -313,7 +314,7 @@
{
#define RED_DISABLE 0
#define RED_BY_WA_ENABLE 2
-@@ -3310,6 +3318,8 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
+@@ -3349,6 +3357,8 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
.sku_enable = enable,
};
@@ -322,8 +323,8 @@
return mt76_mcu_send_msg(&dev->mt76,
MCU_EXT_CMD(TX_POWER_FEATURE_CTRL), &req,
sizeof(req), true);
-@@ -3908,6 +3918,23 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
- &req, sizeof(req), true);
+@@ -4003,6 +4013,23 @@ out:
+ return ret;
}
+#ifdef MTK_DEBUG
@@ -346,7 +347,7 @@
int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
{
struct {
-@@ -3936,3 +3963,22 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
+@@ -4031,3 +4058,22 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
return 0;
}
@@ -370,7 +371,7 @@
+}
+#endif
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index aebacc7d..daea67f0 100644
+index aebacc7..daea67f 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -333,6 +333,10 @@ enum {
@@ -385,7 +386,7 @@
};
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 4fb0a375..88e3bb3d 100644
+index 4de3e05..b5e7c86 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -9,6 +9,7 @@
@@ -396,7 +397,7 @@
#define MT7915_MAX_INTERFACES 19
#define MT7915_WTBL_SIZE 288
#define MT7916_WTBL_SIZE 544
-@@ -370,6 +371,28 @@ struct mt7915_dev {
+@@ -305,6 +306,28 @@ struct mt7915_dev {
struct reset_control *rstc;
void __iomem *dcm;
void __iomem *sku;
@@ -425,7 +426,7 @@
};
enum {
-@@ -650,4 +673,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -585,4 +608,24 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
bool pci, int *irq);
@@ -452,7 +453,7 @@
#endif
diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
new file mode 100644
-index 00000000..fa8794fd
+index 0000000..fa8794f
--- /dev/null
+++ b/mt7915/mt7915_debug.h
@@ -0,0 +1,1418 @@
@@ -1876,7 +1877,7 @@
+#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
new file mode 100644
-index 00000000..b1f8631c
+index 0000000..70e4cb2
--- /dev/null
+++ b/mt7915/mtk_debugfs.c
@@ -0,0 +1,3624 @@
@@ -4933,7 +4934,7 @@
+ struct cos_msg_trace_t *msg_trace = NULL;
+ u32 ptr_addr = 0;
+ u32 length = 0;
-+ u32 idx = 0, i = 0;
++ u32 idx = 0;
+ u32 cnt = 0;
+ u32 msg_history_num = 0;
+
@@ -5074,14 +5075,14 @@
+ struct mt7915_dev *dev = dev_get_drvdata(s->private);
+ struct cos_program_trace_t *cos_program_trace_ptr = NULL;
+ u32 trace_ptr = 0;
-+ u32 idx = 0, i = 0;
++ u32 idx = 0;
+ u32 old_idx = 0;
+ u32 old_idx_addr = 0;
+ u32 prev_idx = 0;
+ u32 prev_time = 0;
+ u32 curr_time = 0;
+ u32 diff = 0;
-+ u32 length = 0;
++ //u32 length = 0, i = 0;
+
+ cos_program_trace_ptr = kmalloc(PROGRAM_TRACE_HISTORY_NUM * sizeof(struct cos_program_trace_t), GFP_KERNEL);
+ if (!cos_program_trace_ptr) {
@@ -5149,7 +5150,7 @@
+{
+ struct mt7915_dev *dev = dev_get_drvdata(s->private);
+ u32 macVal = 0, g_exp_type = 0, COS_Interrupt_Count = 0;
-+ u8 exp_assert_proc_entry_cnt = 0, exp_assert_state = 0, g_irq_history_num = 0;;
++ u8 exp_assert_proc_entry_cnt = 0, exp_assert_state = 0, g_irq_history_num = 0;
+ u16 processing_irqx = 0;
+ u32 processing_lisr = 0, Current_Task_Id = 0, Current_Task_Indx = 0;
+ u8 km_irq_info_idx = 0, km_eint_info_idx = 0, km_sched_info_idx = 0, g_sched_history_num = 0;
@@ -5163,7 +5164,7 @@
+ u32 g_sched_history_num_addr = 0, km_sched_trace_ptr_addr = 0;
+ u32 km_irq_trace_ptr_addr = 0, km_total_time_addr = 0, last_dequeued_msg_id = 0;
+ u32 i = 0 ,t1 = 0, t2 = 0, t3 = 0;
-+ u8 idx = 0, str[32], exp_type[64];;
++ u8 idx = 0, str[32], exp_type[64];
+ int ret;
+
+ g_exp_type_addr = 0x022050DC;
@@ -5506,7 +5507,7 @@
+#endif
diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
new file mode 100644
-index 00000000..143dae26
+index 0000000..143dae2
--- /dev/null
+++ b/mt7915/mtk_mcu.c
@@ -0,0 +1,51 @@
@@ -5562,7 +5563,7 @@
+ sizeof(req), true);
+}
diff --git a/tools/fwlog.c b/tools/fwlog.c
-index e5d4a105..3d51d9ec 100644
+index e5d4a10..3d51d9e 100644
--- a/tools/fwlog.c
+++ b/tools/fwlog.c
@@ -26,7 +26,7 @@ static const char *debugfs_path(const char *phyname, const char *file)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-csi-implement-csi-support.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-csi-implement-csi-support.patch
index 67a82bb..4bb39a5 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-csi-implement-csi-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1000-wifi-mt76-mt7915-csi-implement-csi-support.patch
@@ -1,7 +1,7 @@
-From 97b4997c04cfdae312ae7a67249422f88be91c40 Mon Sep 17 00:00:00 2001
+From dc8113e03f94a498a28d5394e71e53f479ca5bc3 Mon Sep 17 00:00:00 2001
From: Bo Jiao <Bo.Jiao@mediatek.com>
Date: Mon, 6 Jun 2022 20:13:02 +0800
-Subject: [PATCH 1001/1033] wifi: mt76: mt7915: csi: implement csi support
+Subject: [PATCH 1000/1031] wifi: mt76: mt7915: csi: implement csi support
---
mt76_connac_mcu.h | 2 +
@@ -17,18 +17,18 @@
create mode 100644 mt7915/vendor.h
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 8d6c422..4f7db5c 100644
+index ab3b58e..f6738bc 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1000,6 +1000,7 @@ enum {
- MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
+@@ -1003,6 +1003,7 @@ enum {
+ MCU_EXT_EVENT_WA_TX_STAT = 0x74,
MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
MCU_EXT_EVENT_MURU_CTRL = 0x9f,
+ MCU_EXT_EVENT_CSI_REPORT = 0xc2,
};
/* unified event table */
-@@ -1193,6 +1194,7 @@ enum {
+@@ -1196,6 +1197,7 @@ enum {
MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
@@ -54,10 +54,10 @@
mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
mt7915e-$(CONFIG_MT798X_WMAC) += soc.o
diff --git a/mt7915/init.c b/mt7915/init.c
-index abca909..1fe123d 100644
+index 75f8d96..d42d17b 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -670,6 +670,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
+@@ -686,6 +686,12 @@ mt7915_register_ext_phy(struct mt7915_dev *dev, struct mt7915_phy *phy)
/* init wiphy according to mphy and phy */
mt7915_init_wiphy(phy);
@@ -70,7 +70,7 @@
ret = mt76_register_phy(mphy, true, mt76_rates,
ARRAY_SIZE(mt76_rates));
if (ret)
-@@ -1150,6 +1156,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
+@@ -1166,6 +1172,25 @@ void mt7915_set_stream_he_caps(struct mt7915_phy *phy)
}
}
@@ -96,7 +96,7 @@
static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
{
struct mt7915_phy *phy = mt7915_ext_phy(dev);
-@@ -1158,6 +1183,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
+@@ -1174,6 +1199,10 @@ static void mt7915_unregister_ext_phy(struct mt7915_dev *dev)
if (!phy)
return;
@@ -107,7 +107,7 @@
mt7915_unregister_thermal(phy);
mt76_unregister_phy(mphy);
ieee80211_free_hw(mphy->hw);
-@@ -1170,6 +1199,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
+@@ -1186,6 +1215,10 @@ static void mt7915_stop_hardware(struct mt7915_dev *dev)
mt7915_dma_cleanup(dev);
tasklet_disable(&dev->mt76.irq_tasklet);
@@ -118,7 +118,7 @@
if (is_mt798x(&dev->mt76))
mt7986_wmac_disable(dev);
}
-@@ -1212,6 +1245,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
+@@ -1226,6 +1259,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
dev->mt76.test_ops = &mt7915_testmode_ops;
#endif
@@ -132,7 +132,7 @@
ARRAY_SIZE(mt76_rates));
if (ret)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5acba67..b3fdcdf 100644
+index fbbd848..4ef5190 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -40,6 +40,10 @@ static bool sr_scene_detect = true;
@@ -146,7 +146,7 @@
static u8
mt7915_mcu_get_sta_nss(u16 mcs_map)
{
-@@ -375,6 +379,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -377,6 +381,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
case MCU_EXT_EVENT_FW_LOG_2_HOST:
mt7915_mcu_rx_log_message(dev, skb);
break;
@@ -158,8 +158,8 @@
case MCU_EXT_EVENT_BCC_NOTIFY:
mt7915_mcu_rx_bcc_notify(dev, skb);
break;
-@@ -3918,6 +3927,108 @@ int mt7915_mcu_twt_agrt_update(struct mt7915_dev *dev,
- &req, sizeof(req), true);
+@@ -4013,6 +4022,108 @@ out:
+ return ret;
}
+#ifdef CONFIG_MTK_VENDOR
@@ -354,10 +354,10 @@
+
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 29394b6..43705fb 100644
+index b5e7c86..c2ac60c 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -292,6 +292,20 @@ struct mt7915_phy {
+@@ -229,6 +229,20 @@ struct mt7915_phy {
u8 spe_idx;
} test;
#endif
@@ -378,7 +378,7 @@
};
struct mt7915_dev {
-@@ -673,6 +687,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -608,6 +622,12 @@ void mt7915_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
bool pci, int *irq);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-air-monitor-support.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-air-monitor-support.patch
index fc76eb5..ee5db05 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1001-wifi-mt76-mt7915-air-monitor-support.patch
@@ -1,7 +1,7 @@
-From 85e642f5fbd701ab10c29b24113ca354dd0e9345 Mon Sep 17 00:00:00 2001
+From 0f97cca7ee69e2c599504be05757e6897cd49982 Mon Sep 17 00:00:00 2001
From: Bo Jiao <Bo.Jiao@mediatek.com>
Date: Tue, 11 Jan 2022 12:03:23 +0800
-Subject: [PATCH 1002/1033] wifi: mt76: mt7915: air monitor support
+Subject: [PATCH 1001/1031] wifi: mt76: mt7915: air monitor support
---
mt76_connac_mcu.h | 2 +
@@ -13,10 +13,10 @@
6 files changed, 442 insertions(+)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 4f7db5c..6174505 100644
+index f6738bc..c24fa8e 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1194,6 +1194,8 @@ enum {
+@@ -1197,6 +1197,8 @@ enum {
MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
MCU_EXT_CMD_DPD_PRE_CAL_INFO = 0xac,
MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
@@ -26,10 +26,10 @@
};
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index b5805bb..ff4e1dd 100644
+index 99cbabd..462fe6c 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -523,6 +523,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -524,6 +524,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
qos_ctl = *ieee80211_get_qos_ctl(hdr);
}
@@ -41,10 +41,10 @@
status->flag |= RX_FLAG_8023;
mt7915_wed_check_ppe(dev, &dev->mt76.q_rx[q], msta, skb,
diff --git a/mt7915/main.c b/mt7915/main.c
-index 699f767..4438e7b 100644
+index cc4ac94..fcddb36 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -703,6 +703,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -729,6 +729,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (ret)
return ret;
@@ -55,10 +55,10 @@
}
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 43705fb..51d7f34 100644
+index c2ac60c..7a9752f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -244,6 +244,35 @@ struct mt7915_hif {
+@@ -181,6 +181,35 @@ struct mt7915_hif {
int irq;
};
@@ -94,7 +94,7 @@
struct mt7915_phy {
struct mt76_phy *mt76;
struct mt7915_dev *dev;
-@@ -305,6 +334,8 @@ struct mt7915_phy {
+@@ -242,6 +271,8 @@ struct mt7915_phy {
u32 interval;
u32 last_record;
} csi;
@@ -103,7 +103,7 @@
#endif
};
-@@ -691,6 +722,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -626,6 +657,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
void mt7915_vendor_register(struct mt7915_phy *phy);
int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
u8 cfg, u8 v1, u32 v2, u8 *mac_addr);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
index eea919e..7787604 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-add-support-for-muru_onoff-via.patch
@@ -1,7 +1,7 @@
-From e308945d818a93dd553f5f311865b1eff33954f2 Mon Sep 17 00:00:00 2001
+From c79fc4ca594e0c4506d8601243523476b47a13eb Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Tue, 4 Apr 2023 02:23:57 +0800
-Subject: [PATCH 1003/1033] wifi: mt76: mt7915: add support for muru_onoff via
+Subject: [PATCH 1002/1031] wifi: mt76: mt7915: add support for muru_onoff via
---
mt7915/init.c | 2 ++
@@ -12,10 +12,10 @@
5 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/mt7915/init.c b/mt7915/init.c
-index 1fe123d..7250998 100644
+index d42d17b..41f137c 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -449,6 +449,8 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+@@ -457,6 +457,8 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
mphy->leds.cdev.brightness_set = mt7915_led_set_brightness;
mphy->leds.cdev.blink_set = mt7915_led_set_blink;
}
@@ -25,10 +25,10 @@
static void
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index b3fdcdf..68e3583 100644
+index 4ef5190..a4a8194 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -866,6 +866,7 @@ static void
+@@ -870,6 +870,7 @@ static void
mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
struct ieee80211_sta *sta, struct ieee80211_vif *vif)
{
@@ -36,7 +36,7 @@
struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
struct sta_rec_muru *muru;
struct tlv *tlv;
-@@ -878,13 +879,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -882,13 +883,18 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
muru = (struct sta_rec_muru *)tlv;
@@ -73,20 +73,20 @@
+
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 51d7f34..7613e60 100644
+index 7a9752f..2befa44 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -301,6 +301,8 @@ struct mt7915_phy {
+@@ -238,6 +238,8 @@ struct mt7915_phy {
u32 rx_ampdu_ts;
u32 ampdu_ref;
+ u8 muru_onoff;
+
- struct mib_stats mib;
+ struct mt76_mib_stats mib;
struct mt76_channel_state state_ts;
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 4bbb410..1db1d87 100644
+index 70e4cb2..e5fb2ce 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -2558,6 +2558,38 @@ static int mt7915_token_txd_read(struct seq_file *s, void *data)
@@ -128,7 +128,7 @@
static int mt7915_amsduinfo_read(struct seq_file *s, void *data)
{
struct mt7915_dev *dev = dev_get_drvdata(s->private);
-@@ -3538,6 +3570,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3554,6 +3586,7 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
mt7915_mcu_fw_log_2_host(dev, MCU_FW_LOG_WM, 0);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-certification-patches.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-certification-patches.patch
index 1849dcc..ca89de1 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-certification-patches.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1003-wifi-mt76-mt7915-certification-patches.patch
@@ -1,7 +1,7 @@
-From 87ac75bc1a347093b56c35111cf0bfd210314785 Mon Sep 17 00:00:00 2001
+From 63fe4d2540b6acd65461bcaea5cb5492b881b55f 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 1004/1033] wifi: mt76: mt7915: certification patches
+Subject: [PATCH 1003/1031] wifi: mt76: mt7915: certification patches
---
mt76_connac_mcu.h | 1 +
@@ -16,10 +16,10 @@
9 files changed, 954 insertions(+), 5 deletions(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 6174505..978a4d0 100644
+index c24fa8e..7b96feb 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1196,6 +1196,7 @@ enum {
+@@ -1199,6 +1199,7 @@ enum {
MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
/* for vendor csi and air monitor */
MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -28,7 +28,7 @@
};
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index ff4e1dd..5c7a47c 100644
+index 462fe6c..3773cdc 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -8,6 +8,7 @@
@@ -39,7 +39,7 @@
#define to_rssi(field, rcpi) ((FIELD_GET(field, rcpi) - 220) / 2)
-@@ -2045,6 +2046,21 @@ static void mt7915_mac_sta_stats_work(struct mt7915_phy *phy)
+@@ -2000,6 +2001,21 @@ static void mt7915_mac_sta_stats_work(struct mt7915_phy *phy)
spin_unlock_bh(&phy->stats_lock);
}
@@ -50,25 +50,25 @@
+ struct mt7915_dev *dev = msta->vif->phy->dev;
+ u32 *changed = data;
+
-+ spin_lock_bh(&dev->sta_poll_lock);
++ spin_lock_bh(&dev->mt76.sta_poll_lock);
+ msta->changed |= *changed;
+ if (list_empty(&msta->rc_list))
+ list_add_tail(&msta->rc_list, &dev->sta_rc_list);
-+ spin_unlock_bh(&dev->sta_poll_lock);
++ spin_unlock_bh(&dev->mt76.sta_poll_lock);
+}
+#endif
+
void mt7915_mac_sta_rc_work(struct work_struct *work)
{
struct mt7915_dev *dev = container_of(work, struct mt7915_dev, rc_work);
-@@ -2067,6 +2083,13 @@ void mt7915_mac_sta_rc_work(struct work_struct *work)
+@@ -2022,6 +2038,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);
+#ifdef CONFIG_MTK_VENDOR
+ if (changed & CAPI_RFEATURE_CHANGED) {
+ mt7915_mcu_set_rfeature_starec(&changed, dev, vif, sta);
-+ spin_lock_bh(&dev->sta_poll_lock);
++ spin_lock_bh(&dev->mt76.sta_poll_lock);
+ continue;
+ }
+#endif
@@ -76,10 +76,10 @@
IEEE80211_RC_NSS_CHANGED |
IEEE80211_RC_BW_CHANGED))
diff --git a/mt7915/main.c b/mt7915/main.c
-index 4438e7b..e7523c1 100644
+index fcddb36..5e7dcae 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -678,6 +678,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -704,6 +704,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
bool ext_phy = mvif->phy != &dev->phy;
@@ -89,7 +89,7 @@
int ret, idx;
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
-@@ -706,7 +709,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -732,7 +735,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
#ifdef CONFIG_MTK_VENDOR
mt7915_vendor_amnt_sta_remove(mvif->phy, sta);
#endif
@@ -107,10 +107,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 68e3583..8ee1d48 100644
+index a4a8194..3c3ea73 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4033,6 +4033,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -4128,6 +4128,472 @@ mt7915_mcu_report_csi(struct mt7915_dev *dev, struct sk_buff *skb)
return 0;
}
@@ -818,10 +818,10 @@
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 7613e60..60364f0 100644
+index 2befa44..3cff377 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -721,6 +721,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -656,6 +656,19 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
bool pci, int *irq);
#ifdef CONFIG_MTK_VENDOR
@@ -842,7 +842,7 @@
int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
u8 cfg, u8 v1, u32 v2, u8 *mac_addr);
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 1db1d87..fc148d4 100644
+index e5fb2ce..0149706 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -2564,7 +2564,8 @@ static int mt7915_muru_onoff_get(void *data, u64 *val)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
similarity index 78%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
index 151e20d..b36974e 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1004-wifi-mt76-mt7915-add-support-for-runtime-set-in-band.patch
@@ -1,7 +1,7 @@
-From aad666a7107ef807bf965d02ea2699447d7a738c Mon Sep 17 00:00:00 2001
+From 014d2a853950d9ca5ea5b450abf082f36ca6ed7b Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Thu, 23 Mar 2023 09:55:50 +0800
-Subject: [PATCH 1005/1033] wifi: mt76: mt7915: add support for runtime set
+Subject: [PATCH 1004/1031] wifi: mt76: mt7915: add support for runtime set
in-band discovery
Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
@@ -10,10 +10,10 @@
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 8ee1d48..922ae18 100644
+index 3c3ea73..c21f30e 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -1930,8 +1930,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1934,8 +1934,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
bcn = (struct bss_info_bcn *)tlv;
bcn->enable = true;
@@ -23,7 +23,7 @@
interval = vif->bss_conf.fils_discovery.max_interval;
skb = ieee80211_get_fils_discovery_tmpl(hw, vif);
} else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP &&
-@@ -1965,7 +1964,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1969,7 +1968,7 @@ mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
discov->tx_interval = interval;
discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
similarity index 94%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
index a621d88..3644ebe 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1005-wifi-mt76-mt7915-add-mt76-vendor-muru-onoff-command.patch
@@ -1,7 +1,7 @@
-From fb010c2d8e8e547bc52e8485840c4821f9e49d4c Mon Sep 17 00:00:00 2001
+From 9aa0bf50b22e4c6951cf3859c344a1e2caedb08d Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Tue, 4 Apr 2023 02:27:44 +0800
-Subject: [PATCH 1006/1033] wifi: mt76: mt7915: add mt76 vendor muru onoff
+Subject: [PATCH 1005/1031] wifi: mt76: mt7915: add mt76 vendor muru onoff
command
---
@@ -12,10 +12,10 @@
4 files changed, 63 insertions(+)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 922ae18..5a68bb7 100644
+index c21f30e..8c4ed60 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4052,6 +4052,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
+@@ -4147,6 +4147,13 @@ void mt7915_set_wireless_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
if (val == 0)
phy->muru_onoff = MUMIMO_DL_CERT | MUMIMO_DL;
break;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-drop-undefined-action-frame.patch
similarity index 77%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-drop-undefined-action-frame.patch
index 1d7ea79..465c631 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-mt7915-drop-undefined-action-frame.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1006-wifi-mt76-mt7915-drop-undefined-action-frame.patch
@@ -1,17 +1,17 @@
-From 24c4b9c1156af2f9edb0d880a506ce1e3e2d599d Mon Sep 17 00:00:00 2001
+From 3496d9a51ede8540e8378dc783535229aeebbc7e Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Thu, 14 Apr 2022 15:18:02 +0800
-Subject: [PATCH 1007/1033] wifi: mt76: mt7915: drop undefined action frame
+Subject: [PATCH 1006/1031] wifi: mt76: mt7915: drop undefined action frame
---
mt7915/mac.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 5c7a47c..25acb97 100644
+index 3773cdc..f26f949 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -736,6 +736,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -737,6 +737,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
struct mt76_tx_info *tx_info)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx_info->skb->data;
@@ -20,7 +20,7 @@
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
struct ieee80211_key_conf *key = info->control.hw_key;
-@@ -766,6 +768,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+@@ -767,6 +769,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
t = (struct mt76_txwi_cache *)(txwi + mdev->drv->txwi_size);
t->skb = tx_info->skb;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-testmode-rework-testmode-init-registers.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-testmode-rework-testmode-init-registers.patch
index e9a09e4..744fa72 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-rework-testmode-init-registers.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1007-wifi-mt76-testmode-rework-testmode-init-registers.patch
@@ -1,7 +1,7 @@
-From 4a809f8898c4009e88370959802bfd38e2eb94f3 Mon Sep 17 00:00:00 2001
+From 6e755239f1f0ed9bd8357cf0a0160d253ca70abd Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Mon, 6 Jun 2022 19:46:26 +0800
-Subject: [PATCH 1009/1033] wifi: mt76: testmode: rework testmode init
+Subject: [PATCH 1007/1031] wifi: mt76: testmode: rework testmode init
registers
---
@@ -18,10 +18,10 @@
10 files changed, 164 insertions(+), 35 deletions(-)
diff --git a/mac80211.c b/mac80211.c
-index 991d91b..115bb05 100644
+index 76cb08b..4e75e7f 100644
--- a/mac80211.c
+++ b/mac80211.c
-@@ -784,7 +784,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
+@@ -787,7 +787,8 @@ void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
}
#ifdef CONFIG_NL80211_TESTMODE
@@ -32,10 +32,10 @@
if (status->flag & RX_FLAG_FAILED_FCS_CRC)
phy->test.rx_stats.fcs_error[q]++;
diff --git a/mt76.h b/mt76.h
-index 3425159..492fe42 100644
+index 35bf19f..c2ad06a 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -648,6 +648,8 @@ struct mt76_testmode_ops {
+@@ -659,6 +659,8 @@ struct mt76_testmode_ops {
int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
};
@@ -44,7 +44,7 @@
struct mt76_testmode_data {
enum mt76_testmode_state state;
-@@ -679,6 +681,8 @@ struct mt76_testmode_data {
+@@ -690,6 +692,8 @@ struct mt76_testmode_data {
u8 addr[3][ETH_ALEN];
@@ -53,7 +53,7 @@
u32 tx_pending;
u32 tx_queued;
u16 tx_queued_limit;
-@@ -686,6 +690,7 @@ struct mt76_testmode_data {
+@@ -697,6 +701,7 @@ struct mt76_testmode_data {
struct {
u64 packets[__MT_RXQ_MAX];
u64 fcs_error[__MT_RXQ_MAX];
@@ -62,10 +62,10 @@
};
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 978a4d0..d6165a3 100644
+index 7b96feb..92e0b91 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1190,6 +1190,7 @@ enum {
+@@ -1193,6 +1193,7 @@ enum {
MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
MCU_EXT_CMD_SET_RDD_TH = 0x9d,
MCU_EXT_CMD_MURU_CTRL = 0x9f,
@@ -86,7 +86,7 @@
MCU_ATE_CLEAN_TXQUEUE = 0x1c,
};
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 1bb8a4c..b97aca7 100644
+index 8d92e76..b23679a 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -120,6 +120,7 @@ static const u32 mt7986_reg[] = {
@@ -106,7 +106,7 @@
[TMAC_ODTR] = 0x0cc,
[TMAC_ATCR] = 0x00c,
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 374677f..e7bc181 100644
+index d01b9ea..038596c 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
@@ -48,6 +48,7 @@ enum reg_rev {
@@ -117,7 +117,7 @@
TMAC_CDTR,
TMAC_ODTR,
TMAC_ATCR,
-@@ -198,6 +199,12 @@ enum offs_rev {
+@@ -201,6 +202,12 @@ enum offs_rev {
#define MT_TRB_RXPSR0_RX_WTBL_PTR GENMASK(25, 16)
#define MT_TRB_RXPSR0_RX_RMAC_PTR GENMASK(9, 0)
@@ -130,7 +130,7 @@
/* TMAC: band 0(0x820e4000), band 1(0x820f4000) */
#define MT_WF_TMAC_BASE(_band) ((_band) ? 0x820f4000 : 0x820e4000)
#define MT_WF_TMAC(_band, ofs) (MT_WF_TMAC_BASE(_band) + (ofs))
-@@ -206,6 +213,9 @@ enum offs_rev {
+@@ -209,6 +216,9 @@ enum offs_rev {
#define MT_TMAC_TCR0_TX_BLINK GENMASK(7, 6)
#define MT_TMAC_TCR0_TBTT_STOP_CTRL BIT(25)
@@ -140,7 +140,7 @@
#define MT_TMAC_CDTR(_band) MT_WF_TMAC(_band, __OFFS(TMAC_CDTR))
#define MT_TMAC_ODTR(_band) MT_WF_TMAC(_band, __OFFS(TMAC_ODTR))
#define MT_TIMEOUT_VAL_PLCP GENMASK(15, 0)
-@@ -485,8 +495,10 @@ enum offs_rev {
+@@ -488,8 +498,10 @@ enum offs_rev {
#define MT_AGG_PCR0_VHT_PROT BIT(13)
#define MT_AGG_PCR0_PTA_WIN_DIS BIT(15)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-testmode-additional-supports.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-testmode-additional-supports.patch
index 7902ebc..11eb9ae 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-additional-supports.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1008-wifi-mt76-testmode-additional-supports.patch
@@ -1,7 +1,7 @@
-From c311d022536c9c6be72f8e4a134f9dbaed13cd6d Mon Sep 17 00:00:00 2001
+From 0f770281dfd6cb89550134c85e5ac36e41e5517c Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Thu, 21 Apr 2022 15:43:19 +0800
-Subject: [PATCH 1010/1014] wifi: mt76: testmode: additional supports
+Subject: [PATCH 1008/1031] wifi: mt76: testmode: additional supports
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -43,7 +43,7 @@
#endif
diff --git a/mac80211.c b/mac80211.c
-index 115bb05..75e2ffe 100644
+index 4e75e7f..966d8d0 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -55,6 +55,13 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
@@ -60,10 +60,10 @@
CHAN5G(100, 5500),
CHAN5G(104, 5520),
CHAN5G(108, 5540),
-@@ -75,6 +82,11 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
- CHAN5G(165, 5825),
+@@ -76,6 +83,11 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
CHAN5G(169, 5845),
CHAN5G(173, 5865),
+ CHAN5G(177, 5885),
+
+ CHAN5G(184, 4920),
+ CHAN5G(188, 4940),
@@ -73,10 +73,10 @@
static const struct ieee80211_channel mt76_channels_6ghz[] = {
diff --git a/mt76.h b/mt76.h
-index 492fe42..3191626 100644
+index c2ad06a..a5908de 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -646,6 +646,21 @@ struct mt76_testmode_ops {
+@@ -657,6 +657,21 @@ struct mt76_testmode_ops {
int (*set_params)(struct mt76_phy *phy, struct nlattr **tb,
enum mt76_testmode_state new_state);
int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
@@ -98,7 +98,7 @@
};
#define MT_TM_FW_RX_COUNT BIT(0)
-@@ -654,16 +669,11 @@ struct mt76_testmode_data {
+@@ -665,16 +680,11 @@ struct mt76_testmode_data {
enum mt76_testmode_state state;
u32 param_set[DIV_ROUND_UP(NUM_MT76_TM_ATTRS, 32)];
@@ -115,7 +115,7 @@
u8 tx_rate_stbc;
u8 tx_ltf;
-@@ -679,10 +689,37 @@ struct mt76_testmode_data {
+@@ -690,10 +700,37 @@ struct mt76_testmode_data {
u8 tx_power[4];
u8 tx_power_control;
@@ -154,7 +154,7 @@
u32 tx_pending;
u32 tx_queued;
u16 tx_queued_limit;
-@@ -1147,6 +1184,59 @@ static inline bool mt76_testmode_enabled(struct mt76_phy *phy)
+@@ -1258,6 +1295,59 @@ static inline bool mt76_testmode_enabled(struct mt76_phy *phy)
#endif
}
@@ -214,7 +214,7 @@
static inline bool mt76_is_testmode_skb(struct mt76_dev *dev,
struct sk_buff *skb,
struct ieee80211_hw **hw)
-@@ -1157,7 +1247,8 @@ static inline bool mt76_is_testmode_skb(struct mt76_dev *dev,
+@@ -1268,7 +1358,8 @@ static inline bool mt76_is_testmode_skb(struct mt76_dev *dev,
for (i = 0; i < ARRAY_SIZE(dev->phys); i++) {
struct mt76_phy *phy = dev->phys[i];
@@ -224,7 +224,7 @@
*hw = dev->phys[i]->hw;
return true;
}
-@@ -1259,7 +1350,8 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -1370,7 +1461,8 @@ int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *skb,
struct netlink_callback *cb, void *data, int len);
int mt76_testmode_set_state(struct mt76_phy *phy, enum mt76_testmode_state state);
@@ -235,7 +235,7 @@
static inline void mt76_testmode_reset(struct mt76_phy *phy, bool disable)
{
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 1cdef36..15ed126 100644
+index a558c68..74b63f0 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -395,6 +395,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
@@ -257,18 +257,18 @@
return;
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index d6165a3..79416e6 100644
+index 92e0b91..e3980c3 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -996,6 +996,7 @@ enum {
+@@ -998,6 +998,7 @@ enum {
MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
MCU_EXT_EVENT_ASSERT_DUMP = 0x23,
+ MCU_EXT_EVENT_BF_STATUS_READ = 0x35,
MCU_EXT_EVENT_RDD_REPORT = 0x3a,
MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
- MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
-@@ -1197,6 +1198,7 @@ enum {
+ MCU_EXT_EVENT_WA_TX_STAT = 0x74,
+@@ -1200,6 +1201,7 @@ enum {
MCU_EXT_CMD_PHY_STAT_INFO = 0xad,
/* for vendor csi and air monitor */
MCU_EXT_CMD_SMESH_CTRL = 0xae,
@@ -290,10 +290,10 @@
return ret;
}
diff --git a/mt7915/init.c b/mt7915/init.c
-index 7250998..8eacf34 100644
+index 41f137c..09ee080 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -701,7 +701,7 @@ static void mt7915_init_work(struct work_struct *work)
+@@ -717,7 +717,7 @@ static void mt7915_init_work(struct work_struct *work)
struct mt7915_dev *dev = container_of(work, struct mt7915_dev,
init_work);
@@ -303,10 +303,10 @@
mt7915_init_txpower(dev, &dev->mphy.sband_2g.sband);
mt7915_init_txpower(dev, &dev->mphy.sband_5g.sband);
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 25acb97..ee33850 100644
+index f26f949..98c433f 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -603,16 +603,38 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -604,16 +604,38 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
{
#ifdef CONFIG_NL80211_TESTMODE
struct mt76_testmode_data *td = &phy->mt76->test;
@@ -348,7 +348,7 @@
switch (td->tx_rate_mode) {
case MT76_TM_TX_MODE_HT:
-@@ -643,7 +665,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -644,7 +666,7 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
rate_idx += 4;
r = &phy->mt76->hw->wiphy->bands[band]->bitrates[rate_idx];
@@ -357,7 +357,7 @@
mode = val >> 8;
rate_idx = val & 0xff;
-@@ -702,13 +724,14 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -703,13 +725,14 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
if (mode >= MT_PHY_TYPE_HE_SU)
val |= FIELD_PREP(MT_TXD6_HELTF, td->tx_ltf);
@@ -375,7 +375,7 @@
#endif
}
-@@ -1469,7 +1492,7 @@ mt7915_mac_restart(struct mt7915_dev *dev)
+@@ -1415,7 +1438,7 @@ mt7915_mac_restart(struct mt7915_dev *dev)
goto out;
/* set the necessary init items */
@@ -385,7 +385,7 @@
goto out;
diff --git a/mt7915/main.c b/mt7915/main.c
-index e7523c1..798eaa8 100644
+index 5e7dcae..2e3d2f6 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -238,7 +238,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
@@ -398,10 +398,10 @@
mvif->mt76.wmm_idx += 2;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5a68bb7..5cea513 100644
+index 8c4ed60..2f716f3 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -387,6 +387,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -389,6 +389,11 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
case MCU_EXT_EVENT_BCC_NOTIFY:
mt7915_mcu_rx_bcc_notify(dev, skb);
break;
@@ -413,15 +413,15 @@
default:
break;
}
-@@ -418,6 +423,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
- rxd->ext_eid == MCU_EXT_EVENT_ASSERT_DUMP ||
- rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC ||
- rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY ||
-+ rxd->ext_eid == MCU_EXT_EVENT_BF_STATUS_READ ||
- !rxd->seq)
- mt7915_mcu_rx_unsolicited_event(dev, skb);
- else
-@@ -2713,7 +2719,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
+@@ -420,6 +425,7 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
+ rxd->ext_eid == MCU_EXT_EVENT_ASSERT_DUMP ||
+ rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC ||
+ rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY ||
++ rxd->ext_eid == MCU_EXT_EVENT_BF_STATUS_READ ||
+ !rxd->seq) &&
+ !(rxd->eid == MCU_CMD_EXT_CID &&
+ rxd->ext_eid == MCU_EXT_EVENT_WA_TX_STAT))
+@@ -2752,7 +2758,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
}
#endif
@@ -431,7 +431,7 @@
req.tx_path_num = fls(phy->mt76->antenna_mask);
if (dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
-@@ -2781,21 +2788,21 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
+@@ -2820,21 +2827,21 @@ static int mt7915_mcu_set_eeprom_flash(struct mt7915_dev *dev)
return 0;
}
@@ -456,7 +456,7 @@
{
struct mt7915_mcu_eeprom_info req = {
.addr = cpu_to_le32(round_down(offset,
-@@ -2804,7 +2811,7 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
+@@ -2843,7 +2850,7 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
struct mt7915_mcu_eeprom_info *res;
struct sk_buff *skb;
int ret;
@@ -465,7 +465,7 @@
ret = mt76_mcu_send_and_get_msg(&dev->mt76,
MCU_EXT_QUERY(EFUSE_ACCESS),
-@@ -2813,8 +2820,11 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
+@@ -2852,8 +2859,11 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
return ret;
res = (struct mt7915_mcu_eeprom_info *)skb->data;
@@ -537,7 +537,7 @@
enum {
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index b97aca7..fd5722b 100644
+index b23679a..6505d76 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -134,6 +134,7 @@ static const u32 mt7915_offs[] = {
@@ -557,10 +557,10 @@
[AGG_PCR0] = 0x040,
[AGG_ACR0] = 0x054,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 60364f0..83743cd 100644
+index 3cff377..84f75e7 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -321,6 +321,9 @@ struct mt7915_phy {
+@@ -258,6 +258,9 @@ struct mt7915_phy {
u8 last_snr;
u8 spe_idx;
@@ -570,7 +570,7 @@
} test;
#endif
-@@ -419,6 +422,14 @@ struct mt7915_dev {
+@@ -354,6 +357,14 @@ struct mt7915_dev {
void __iomem *dcm;
void __iomem *sku;
@@ -585,7 +585,7 @@
#ifdef MTK_DEBUG
u16 wlan_idx;
struct {
-@@ -591,8 +602,8 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -526,8 +537,8 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
void *data, u32 field);
@@ -596,7 +596,7 @@
int mt7915_mcu_get_eeprom_free_block(struct mt7915_dev *dev, u8 *block_num);
int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
bool hdr_trans);
-@@ -630,6 +641,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -566,6 +577,7 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -605,7 +605,7 @@
static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
{
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index e7bc181..b6f36f5 100644
+index 038596c..428f482 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
@@ -62,6 +62,7 @@ enum offs_rev {
@@ -616,7 +616,7 @@
AGG_AWSCR0,
AGG_PCR0,
AGG_ACR0,
-@@ -482,6 +483,8 @@ enum offs_rev {
+@@ -485,6 +486,8 @@ enum offs_rev {
#define MT_WF_AGG_BASE(_band) ((_band) ? 0x820f2000 : 0x820e2000)
#define MT_WF_AGG(_band, ofs) (MT_WF_AGG_BASE(_band) + (ofs))
@@ -626,7 +626,7 @@
(_n) * 4))
#define MT_AGG_PCR0(_band, _n) MT_WF_AGG(_band, (__OFFS(AGG_PCR0) + \
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 4693919..62ef4db 100644
+index 4693919..1e72bf2 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
@@ -9,6 +9,9 @@
@@ -887,7 +887,7 @@
+
+ /* prevent from starting tx ba session */
+ for (tid = 0; tid < 8; tid++)
-+ set_bit(tid, &msta->ampdu_state);
++ set_bit(tid, &msta->wcid.ampdu_state);
+
+ list_add_tail(&msta->wcid.list, &td->tm_entry_list);
+ td->entry_num++;
@@ -3083,10 +3083,10 @@
};
diff --git a/tx.c b/tx.c
-index 72b3ec7..94f0d82 100644
+index 6cc26cc..5d7bf34 100644
--- a/tx.c
+++ b/tx.c
-@@ -252,8 +252,7 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
+@@ -259,8 +259,7 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
if (mt76_is_testmode_skb(dev, skb, &hw)) {
struct mt76_phy *phy = hw->priv;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-add-pre-cal-support.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-add-pre-cal-support.patch
index 82e8e7d..a0bbf2c 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-pre-cal-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1009-wifi-mt76-testmode-add-pre-cal-support.patch
@@ -1,7 +1,7 @@
-From b933c76718db1c21ecaaf0cddfa4d598617153ea Mon Sep 17 00:00:00 2001
+From 2471603cc433dfe9d5d9ba9f22e4692e4170a6a8 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Wed, 31 Aug 2022 20:06:52 +0800
-Subject: [PATCH 1011/1014] wifi: mt76: testmode: add pre-cal support
+Subject: [PATCH 1009/1031] wifi: mt76: testmode: add pre-cal support
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -36,10 +36,10 @@
out_put_node:
diff --git a/mt76.h b/mt76.h
-index 3191626..c632852 100644
+index a5908de..7d83d40 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -647,6 +647,7 @@ struct mt76_testmode_ops {
+@@ -658,6 +658,7 @@ struct mt76_testmode_ops {
enum mt76_testmode_state new_state);
int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
int (*set_eeprom)(struct mt76_phy *phy, u32 offset, u8 *val, u8 action);
@@ -48,10 +48,10 @@
struct mt76_testmode_entry_data {
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 79416e6..df7e50b 100644
+index e3980c3..acbc07d 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -992,6 +992,7 @@ enum {
+@@ -994,6 +994,7 @@ enum {
/* ext event table */
enum {
@@ -113,10 +113,10 @@
#endif
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 5cea513..2a515e3 100644
+index 2f716f3..91a3710 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -391,6 +391,9 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -393,6 +393,9 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
case MCU_EXT_EVENT_BF_STATUS_READ:
mt7915_tm_txbf_status_read(dev, skb);
break;
@@ -126,7 +126,7 @@
#endif
default:
break;
-@@ -2888,7 +2891,7 @@ int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
+@@ -2927,7 +2930,7 @@ int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
u8 idx = 0, *cal = dev->cal, *eep = dev->mt76.eeprom.data;
u32 total = MT_EE_CAL_GROUP_SIZE;
@@ -135,7 +135,7 @@
return 0;
/*
-@@ -2968,11 +2971,29 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
+@@ -3007,11 +3010,29 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
{
struct mt7915_dev *dev = phy->dev;
struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
@@ -168,10 +168,10 @@
idx = mt7915_dpd_freq_idx(center_freq, chandef->width);
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 83743cd..54e8944 100644
+index 84f75e7..fcfe53f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -406,6 +406,10 @@ struct mt7915_dev {
+@@ -341,6 +341,10 @@ struct mt7915_dev {
struct rchan *relay_fwlog;
void *cal;
@@ -182,7 +182,7 @@
struct {
u8 debug_wm;
-@@ -642,6 +646,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
+@@ -578,6 +582,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
void mt7915_mcu_exit(struct mt7915_dev *dev);
int mt7915_tm_txbf_status_read(struct mt7915_dev *dev, struct sk_buff *skb);
@@ -191,7 +191,7 @@
static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
{
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 62ef4db..b2d26ff 100644
+index 1e72bf2..7d285eb 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
@@ -5,6 +5,7 @@
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-add-iBF-command-mode-support.patch
similarity index 98%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-add-iBF-command-mode-support.patch
index fb2113a..acba084 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-command-mode-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1010-wifi-mt76-testmode-add-iBF-command-mode-support.patch
@@ -1,7 +1,7 @@
-From e44d59d15e90c11b1466b12ac9401922c11504f6 Mon Sep 17 00:00:00 2001
+From d2566732630e8562709f3dc24069335fd551f821 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Mon, 12 Sep 2022 18:16:54 +0800
-Subject: [PATCH 1012/1014] wifi: mt76: testmode: add iBF command mode support
+Subject: [PATCH 1010/1031] wifi: mt76: testmode: add iBF command mode support
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -12,7 +12,7 @@
4 files changed, 85 insertions(+), 7 deletions(-)
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index b2d26ff..40a3a06 100644
+index 7d285eb..f735cae 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
@@ -720,6 +720,7 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
similarity index 97%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
index f920fd6..1875c93 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1011-wifi-mt76-testmode-add-ZWDFS-test-mode-support.patch
@@ -1,7 +1,7 @@
-From ee654a359005c8f5e48cc34a42dc76a6550d7e7f Mon Sep 17 00:00:00 2001
+From 9067741d5a3b3ec88618912e243c192c419d518f Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 27 Oct 2022 17:42:07 +0800
-Subject: [PATCH 1013/1014] wifi: mt76: testmode: add ZWDFS test mode support
+Subject: [PATCH 1011/1031] wifi: mt76: testmode: add ZWDFS test mode support
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -18,10 +18,10 @@
10 files changed, 508 insertions(+), 1 deletion(-)
diff --git a/mt76.h b/mt76.h
-index c632852..f4412a2 100644
+index 7d83d40..75b2874 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -730,6 +730,15 @@ struct mt76_testmode_data {
+@@ -741,6 +741,15 @@ struct mt76_testmode_data {
u64 fcs_error[__MT_RXQ_MAX];
u64 len_mismatch;
} rx_stats;
@@ -38,10 +38,10 @@
struct mt76_vif {
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index df7e50b..7663522 100644
+index acbc07d..e55e548 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1192,6 +1192,7 @@ enum {
+@@ -1195,6 +1195,7 @@ enum {
MCU_EXT_CMD_OFFCH_SCAN_CTRL = 0x9a,
MCU_EXT_CMD_SET_RDD_TH = 0x9d,
MCU_EXT_CMD_MURU_CTRL = 0x9f,
@@ -49,7 +49,7 @@
MCU_EXT_CMD_RX_STAT = 0xa4,
MCU_EXT_CMD_SET_SPR = 0xa8,
MCU_EXT_CMD_GROUP_PRE_CAL_INFO = 0xab,
-@@ -1202,6 +1203,7 @@ enum {
+@@ -1205,6 +1206,7 @@ enum {
MCU_EXT_CMD_RX_STAT_USER_CTRL = 0xb3,
MCU_EXT_CMD_CERT_CFG = 0xb7,
MCU_EXT_CMD_CSI_CTRL = 0xc2,
@@ -58,10 +58,10 @@
enum {
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2a515e3..cb70af5 100644
+index 91a3710..8203006 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2619,6 +2619,7 @@ mt7915_mcu_background_chain_ctrl(struct mt7915_phy *phy,
+@@ -2658,6 +2658,7 @@ mt7915_mcu_background_chain_ctrl(struct mt7915_phy *phy,
req.monitor_chan = chandef->chan->hw_value;
req.monitor_central_chan =
ieee80211_frequency_to_channel(chandef->center_freq1);
@@ -69,7 +69,7 @@
req.band_idx = phy->mt76->band_idx;
req.scan_mode = 2;
break;
-@@ -4602,3 +4603,68 @@ int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable)
+@@ -4697,3 +4698,68 @@ int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable)
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MEC_CTRL), &req, sizeof(req), true);
}
#endif
@@ -196,18 +196,18 @@
#define OFDMA_DL BIT(0)
#define OFDMA_UL BIT(1)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 54e8944..e9fc92a 100644
+index fcfe53f..cdd1833 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -305,6 +305,7 @@ struct mt7915_phy {
+@@ -242,6 +242,7 @@ struct mt7915_phy {
- struct mib_stats mib;
+ struct mt76_mib_stats mib;
struct mt76_channel_state state_ts;
+ struct delayed_work ipi_work;
u8 stats_work_count;
struct list_head stats_list;
-@@ -759,6 +760,9 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
+@@ -694,6 +695,9 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
struct ieee80211_sta *sta);
#endif
@@ -218,10 +218,10 @@
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/mt7915/regs.h b/mt7915/regs.h
-index b6f36f5..a7e8598 100644
+index 428f482..482b3fe 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
-@@ -1205,6 +1205,8 @@ enum offs_rev {
+@@ -1208,6 +1208,8 @@ enum offs_rev {
#define MT_WF_IRPI_NSS(phy, nss) MT_WF_IRPI(0x6000 + ((phy) << 20) + ((nss) << 16))
#define MT_WF_IRPI_NSS_MT7916(phy, nss) MT_WF_IRPI(0x1000 + ((phy) << 20) + ((nss) << 16))
@@ -231,7 +231,7 @@
#define MT_WF_PHY_BASE 0x83080000
#define MT_WF_PHY(ofs) (MT_WF_PHY_BASE + (ofs))
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index 40a3a06..b98aaaa 100644
+index f735cae..2e51dcd 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
@@ -13,6 +13,12 @@ enum {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
similarity index 92%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
index 1163a02..defa03f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1012-wifi-mt76-testmode-add-iBF-eBF-cal-and-cert-commands.patch
@@ -1,8 +1,8 @@
-From 44b3c5fed9a9c63e7da34004d265669f241a2886 Mon Sep 17 00:00:00 2001
+From 4e08b1f0bd72662d736b536b42ffe3221e1f0f3f Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 15 Dec 2022 19:45:18 +0800
-Subject: [PATCH] wifi: mt76: testmode: add iBF/eBF cal and cert commands with
- golden
+Subject: [PATCH 1012/1031] wifi: mt76: testmode: add iBF/eBF cal and cert
+ commands with golden
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
@@ -25,10 +25,10 @@
16 files changed, 856 insertions(+), 324 deletions(-)
diff --git a/mt76.h b/mt76.h
-index 29164534..0e29248d 100644
+index 75b2874..af29bde 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -700,6 +700,7 @@ struct mt76_testmode_data {
+@@ -703,6 +703,7 @@ struct mt76_testmode_data {
struct list_head tm_entry_list;
struct mt76_wcid *cur_entry;
@@ -36,7 +36,7 @@
u8 entry_num;
union {
struct mt76_testmode_entry_data ed;
-@@ -728,6 +729,9 @@ struct mt76_testmode_data {
+@@ -731,6 +732,9 @@ struct mt76_testmode_data {
u8 txbf_act;
u16 txbf_param[8];
@@ -47,10 +47,10 @@
u32 tx_pending;
u32 tx_queued;
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index 0f52b456..2aea5cf4 100644
+index 74b63f0..e6b468c 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
-@@ -2764,6 +2764,7 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
+@@ -2767,6 +2767,7 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
u32 type = vif->p2p ? NETWORK_P2P : NETWORK_INFRA;
struct bss_info_basic *bss;
struct tlv *tlv;
@@ -58,7 +58,7 @@
tlv = mt76_connac_mcu_add_tlv(skb, BSS_INFO_BASIC, sizeof(*bss));
bss = (struct bss_info_basic *)tlv;
-@@ -2823,6 +2824,8 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
+@@ -2826,6 +2827,8 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
bss->dtim_period = vif->bss_conf.dtim_period;
bss->phy_mode = mt76_connac_get_phy_mode(phy, vif,
chandef->chan->band, NULL);
@@ -68,10 +68,10 @@
memcpy(bss->bssid, phy->macaddr, ETH_ALEN);
}
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 5b907c95..02a369d2 100644
+index 98c433f..4dfbc0c 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -728,8 +728,10 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
+@@ -729,8 +729,10 @@ mt7915_mac_write_txwi_tm(struct mt7915_phy *phy, __le32 *txwi,
val |= MT_TXD6_LDPC;
txwi[3] &= ~cpu_to_le32(MT_TXD3_SN_VALID);
@@ -84,7 +84,7 @@
txwi[6] |= cpu_to_le32(val);
#endif
diff --git a/mt7915/main.c b/mt7915/main.c
-index 798eaa85..a9cbaed8 100644
+index 2e3d2f6..bd49b21 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -205,46 +205,37 @@ static void mt7915_init_bitrate_mask(struct ieee80211_vif *vif)
@@ -175,10 +175,10 @@
return ret;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2432e578..bc284541 100644
+index 8203006..8d8255e 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -197,6 +197,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
+@@ -199,6 +199,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
int ret;
ret = mt76_connac2_mcu_fill_message(mdev, skb, cmd, wait_seq);
@@ -186,7 +186,7 @@
if (ret)
return ret;
-@@ -387,10 +388,12 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -389,10 +390,12 @@ mt7915_mcu_rx_ext_event(struct mt7915_dev *dev, struct sk_buff *skb)
case MCU_EXT_EVENT_BCC_NOTIFY:
mt7915_mcu_rx_bcc_notify(dev, skb);
break;
@@ -201,7 +201,7 @@
case MCU_EXT_EVENT_RF_TEST:
mt7915_tm_rf_test_event(dev, skb);
break;
-@@ -677,11 +680,22 @@ int mt7915_mcu_add_bss_info(struct mt7915_phy *phy,
+@@ -681,11 +684,22 @@ int mt7915_mcu_add_bss_info(struct mt7915_phy *phy,
if (enable)
mt76_connac_mcu_bss_omac_tlv(skb, vif);
@@ -227,7 +227,7 @@
if (enable) {
mt7915_mcu_bss_rfch_tlv(skb, vif, phy);
-@@ -3389,6 +3403,7 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3429,6 +3443,7 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
{
@@ -235,7 +235,7 @@
struct {
u8 action;
union {
-@@ -3415,7 +3430,6 @@ int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
+@@ -3455,7 +3470,6 @@ int mt7915_mcu_set_txbf(struct mt7915_dev *dev, u8 action)
.action = action,
};
@@ -243,7 +243,7 @@
switch (action) {
case MT_BF_SOUNDING_ON:
req.snd.snd_mode = MT_BF_PROCESSING;
-@@ -4494,6 +4508,9 @@ int mt7915_mcu_set_txbf_sound_info(struct mt7915_phy *phy, u8 action,
+@@ -4590,6 +4604,9 @@ int mt7915_mcu_set_txbf_sound_info(struct mt7915_phy *phy, u8 action,
req.he_opt = v2;
req.glo_opt = v3;
break;
@@ -254,7 +254,7 @@
return -EINVAL;
}
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index d361f63e..7f13f3b0 100644
+index d361f63..7f13f3b 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -531,10 +531,12 @@ enum {
@@ -448,7 +448,7 @@
MURU_SET_ARB_OP_MODE = 14,
MURU_SET_PLATFORM_TYPE = 25,
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index fd5722b9..d5198eb5 100644
+index 6505d76..25c3fe2 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -133,6 +133,7 @@ static const u32 mt7915_offs[] = {
@@ -468,10 +468,10 @@
[AGG_AALCR0] = 0x028,
[AGG_AWSCR0] = 0x030,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 37949f23..67efe9d8 100644
+index cdd1833..7bb7153 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -323,7 +323,6 @@ struct mt7915_phy {
+@@ -260,7 +260,6 @@ struct mt7915_phy {
u8 spe_idx;
@@ -479,7 +479,7 @@
bool bf_ever_en;
} test;
#endif
-@@ -427,7 +426,7 @@ struct mt7915_dev {
+@@ -362,7 +361,7 @@ struct mt7915_dev {
void __iomem *dcm;
void __iomem *sku;
@@ -488,15 +488,15 @@
struct {
void *txbf_phase_cal;
void *txbf_pfmu_data;
-@@ -565,6 +564,7 @@ void mt7915_dma_cleanup(struct mt7915_dev *dev);
+@@ -500,6 +499,7 @@ void mt7915_dma_cleanup(struct mt7915_dev *dev);
int mt7915_dma_reset(struct mt7915_dev *dev, bool force);
- int __mt7915_dma_enable(struct mt7915_dev *dev, bool reset, bool wed_reset);
+ int mt7915_dma_start(struct mt7915_dev *dev, bool reset, bool wed_reset);
int mt7915_txbf_init(struct mt7915_dev *dev);
+int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_en);
void mt7915_init_txpower(struct mt7915_dev *dev,
struct ieee80211_supported_band *sband);
void mt7915_reset(struct mt7915_dev *dev);
-@@ -646,8 +646,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
+@@ -582,8 +582,10 @@ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
void mt7915_mcu_exit(struct mt7915_dev *dev);
@@ -508,7 +508,7 @@
static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev)
{
-@@ -783,4 +785,10 @@ enum {
+@@ -718,4 +720,10 @@ enum {
#endif
@@ -520,7 +520,7 @@
+
#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index a1e9afcd..be279f7b 100644
+index 0149706..63b4ae0 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -2892,6 +2892,36 @@ mt7915_txpower_level_set(void *data, u64 val)
@@ -573,7 +573,7 @@
return 0;
diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
-index 143dae26..906c8725 100644
+index 143dae2..906c872 100644
--- a/mt7915/mtk_mcu.c
+++ b/mt7915/mtk_mcu.c
@@ -1,9 +1,10 @@
@@ -836,7 +836,7 @@
+}
+#endif
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index a7e8598..5d91b80 100644
+index 482b3fe..44da7b8 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
@@ -61,6 +61,7 @@ enum offs_rev {
@@ -847,7 +847,7 @@
RMAC_MIB_AIRTIME14,
AGG_AALCR0,
AGG_AWSCR0,
-@@ -530,6 +531,9 @@ enum offs_rev {
+@@ -533,6 +534,9 @@ enum offs_rev {
#define MT_ARB_DRNGR0(_band, _n) MT_WF_ARB(_band, (__OFFS(ARB_DRNGR0) + \
(_n) * 4))
@@ -858,7 +858,7 @@
#define MT_WF_RMAC_BASE(_band) ((_band) ? 0x820f5000 : 0x820e5000)
#define MT_WF_RMAC(_band, ofs) (MT_WF_RMAC_BASE(_band) + (ofs))
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index b98aaaa..5665da7 100644
+index 2e51dcd..fafe909 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
@@ -53,6 +53,8 @@ struct reg_band {
@@ -870,8 +870,8 @@
static u8 mt7915_tm_chan_bw(enum nl80211_chan_width width)
{
-@@ -73,6 +75,25 @@ static u8 mt7915_tm_chan_bw(enum nl80211_chan_width width)
- return width_to_bw[width];
+@@ -92,6 +94,25 @@ mt7915_tm_check_antenna(struct mt7915_phy *phy)
+ return 0;
}
+static u8 mt7915_tm_rate_to_phy(u8 tx_rate_mode)
@@ -896,7 +896,7 @@
static void
mt7915_tm_update_channel(struct mt7915_phy *phy)
{
-@@ -273,17 +294,33 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -292,17 +313,33 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
struct mt7915_dev *dev = phy->dev;
@@ -937,7 +937,7 @@
skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76,
&msta->wcid);
-@@ -299,8 +336,11 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -318,8 +355,11 @@ mt7915_tm_add_txbf(struct mt7915_phy *phy, struct ieee80211_vif *vif,
bf->ncol = nc;
bf->nrow = nr;
bf->ndp_rate = ndp_rate;
@@ -950,7 +950,7 @@
if (ebf) {
bf->mem[0].row = 0;
-@@ -353,11 +393,8 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
+@@ -372,11 +412,8 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
}
memcpy(sta->addr, ed->addr[0], ETH_ALEN);
@@ -964,7 +964,7 @@
if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
memcpy(&sta->deflink.ht_cap, &sband->ht_cap, sizeof(sta->deflink.ht_cap));
-@@ -382,6 +419,14 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
+@@ -401,6 +438,14 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
list_add_tail(&msta->wcid.list, &td->tm_entry_list);
td->entry_num++;
@@ -979,7 +979,7 @@
return 0;
}
-@@ -451,7 +496,7 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
+@@ -470,7 +515,7 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
struct mt76_testmode_entry_data *ed, tmp;
struct mt76_wcid *wcid, *last;
@@ -988,7 +988,7 @@
return;
memcpy(&tmp, &td->ed, sizeof(tmp));
-@@ -472,20 +517,30 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
+@@ -491,20 +536,30 @@ mt7915_tm_update_entry(struct mt7915_phy *phy)
static int
mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
{
@@ -1022,7 +1022,7 @@
MAX_PHASE_GROUP_NUM,
GFP_KERNEL);
if (!phase_cal)
-@@ -495,7 +550,10 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
+@@ -514,7 +569,10 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
}
if (!dev->test.txbf_pfmu_data) {
@@ -1034,7 +1034,7 @@
if (!pfmu_data)
return -ENOMEM;
-@@ -504,21 +562,77 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
+@@ -523,21 +581,77 @@ mt7915_tm_txbf_init(struct mt7915_phy *phy, u16 *val)
if (!dev->test.txbf_pfmu_tag) {
pfmu_tag = devm_kzalloc(dev->mt76.dev,
@@ -1118,7 +1118,7 @@
return mt7915_tm_set_trx(phy, TM_MAC_TX, true);
}
-@@ -545,8 +659,7 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
+@@ -564,8 +678,7 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
.read_from_e2p = val[3],
.disable = val[4],
};
@@ -1128,7 +1128,7 @@
wait_event_timeout(dev->mt76.tx_wait, phase[val[2]].status != 0, HZ);
memcpy(req.buf, &phase[val[2]].phase, sizeof(req.buf));
-@@ -559,32 +672,9 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
+@@ -578,32 +691,9 @@ mt7915_tm_txbf_phase_comp(struct mt7915_phy *phy, u16 *val)
sizeof(req), true);
}
@@ -1162,7 +1162,7 @@
{
struct mt7915_dev *dev = phy->dev;
struct {
-@@ -611,8 +701,6 @@ static int
+@@ -630,8 +720,6 @@ static int
mt7915_tm_txbf_apply_tx(struct mt7915_phy *phy, u16 wlan_idx, bool ebf,
bool ibf, bool phase_cal)
{
@@ -1171,7 +1171,7 @@
struct mt7915_dev *dev = phy->dev;
struct {
u8 category;
-@@ -641,14 +729,15 @@ static int mt7915_tm_txbf_set_rate(struct mt7915_phy *phy,
+@@ -660,14 +748,15 @@ static int mt7915_tm_txbf_set_rate(struct mt7915_phy *phy,
{
struct mt7915_dev *dev = phy->dev;
struct mt76_testmode_entry_data *ed = mt76_testmode_entry_data(phy->mt76, wcid);
@@ -1189,7 +1189,7 @@
rate.nss = ed->tx_rate_nss;
rate.mcs = ed->tx_rate_idx;
rate.ldpc = (rate.bw || ed->tx_rate_ldpc) * GENMASK(2, 0);
-@@ -662,13 +751,14 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -681,13 +770,14 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
{
bool bf_on = val[0], update = val[3];
/* u16 wlan_idx = val[2]; */
@@ -1206,7 +1206,7 @@
tag->t1.invalid_prof = false;
mt7915_tm_txbf_profile_tag_write(phy, 2, tag);
-@@ -683,7 +773,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -702,7 +792,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
} else {
phy->test.bf_ever_en = false;
@@ -1215,7 +1215,7 @@
tag->t1.invalid_prof = true;
mt7915_tm_txbf_profile_tag_write(phy, 2, tag);
}
-@@ -698,6 +788,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
+@@ -717,6 +807,7 @@ mt7915_tm_txbf_set_tx(struct mt7915_phy *phy, u16 *val)
static int
mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
{
@@ -1223,7 +1223,7 @@
static const u8 mode_to_lm[] = {
[MT76_TM_TX_MODE_CCK] = 0,
[MT76_TM_TX_MODE_OFDM] = 0,
-@@ -711,7 +802,8 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -730,7 +821,8 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
struct mt76_testmode_data *td = &phy->mt76->test;
struct mt76_wcid *wcid;
struct ieee80211_vif *vif = phy->monitor_vif;
@@ -1233,7 +1233,7 @@
u8 pfmu_idx = val[0], nc = val[2], nr;
bool is_atenl = val[6];
int ret;
-@@ -729,18 +821,22 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -748,18 +840,22 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
tag->t1.nr = nr;
tag->t1.nc = nc;
tag->t1.invalid_prof = true;
@@ -1262,7 +1262,7 @@
} else {
tag->t1.row_id1 = 4;
tag->t1.row_id2 = 5;
-@@ -761,6 +857,19 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
+@@ -780,6 +876,19 @@ mt7915_tm_txbf_profile_update(struct mt7915_phy *phy, u16 *val, bool ebf)
if (ret)
return ret;
@@ -1282,7 +1282,7 @@
if (!ebf && is_atenl)
return mt7915_tm_txbf_apply_tx(phy, 1, false, true, true);
-@@ -778,7 +887,7 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -797,7 +906,7 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
u8 category;
u8 group_l_m_n;
u8 group;
@@ -1291,7 +1291,7 @@
u8 cal_type;
u8 lna_gain_level;
u8 _rsv[2];
-@@ -786,12 +895,12 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -805,12 +914,12 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
.category = MT_BF_PHASE_CAL,
.group = val[0],
.group_l_m_n = val[1],
@@ -1307,7 +1307,7 @@
phase[req.group].status = 0;
-@@ -799,53 +908,10 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
+@@ -818,53 +927,10 @@ mt7915_tm_txbf_phase_cal(struct mt7915_phy *phy, u16 *val)
sizeof(req), true);
}
@@ -1362,7 +1362,7 @@
struct mt76_testmode_data *td = &phy->mt76->test;
u16 pfmu_idx = val[0];
u16 subc_id = val[1];
-@@ -854,9 +920,9 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -873,9 +939,9 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
u16 angle31 = val[4];
u16 angle41 = val[5];
s16 phi11 = 0, phi21 = 0, phi31 = 0;
@@ -1374,7 +1374,7 @@
return -EINVAL;
if (td->tx_antenna_mask == 2) {
-@@ -870,7 +936,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -889,7 +955,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
phi31 = (s16)(angle41 - angle31);
}
@@ -1383,7 +1383,7 @@
pfmu_data = &pfmu_data[subc_id];
if (subc_id < 32)
-@@ -880,21 +946,21 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -899,21 +965,21 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
pfmu_data->phi11 = cpu_to_le16(phi11);
pfmu_data->phi21 = cpu_to_le16(phi21);
pfmu_data->phi31 = cpu_to_le16(phi31);
@@ -1408,7 +1408,7 @@
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TXBF_ACTION),
&req, sizeof(req), true);
-@@ -906,7 +972,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
+@@ -925,7 +991,7 @@ mt7915_tm_txbf_profile_update_all(struct mt7915_phy *phy, u16 *val)
static int
mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
{
@@ -1417,7 +1417,7 @@
struct mt7915_dev *dev = phy->dev;
u8 *eeprom = dev->mt76.eeprom.data;
u16 offset;
-@@ -916,7 +982,7 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
+@@ -935,7 +1001,7 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
is_7976 = mt7915_check_adie(dev, false) || is_mt7916(&dev->mt76);
offset = is_7976 ? 0x60a : 0x651;
@@ -1426,7 +1426,7 @@
for (i = 0; i < MAX_PHASE_GROUP_NUM; i++) {
p = &phase[i];
-@@ -931,17 +997,75 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
+@@ -950,17 +1016,75 @@ mt7915_tm_txbf_e2p_update(struct mt7915_phy *phy)
return 0;
}
@@ -1504,7 +1504,7 @@
return mt7915_tm_txbf_init(phy, val);
case MT76_TM_TXBF_ACT_UPDATE_CH:
mt7915_tm_update_channel(phy);
-@@ -967,6 +1091,36 @@ mt7915_tm_set_txbf(struct mt7915_phy *phy)
+@@ -986,6 +1110,36 @@ mt7915_tm_set_txbf(struct mt7915_phy *phy)
return mt7915_tm_txbf_apply_tx(phy, wlan_idx, ebf, ibf, phase_cal);
}
@@ -1541,7 +1541,7 @@
default:
break;
};
-@@ -1186,9 +1340,10 @@ mt7915_tm_set_ipi(struct mt7915_phy *phy)
+@@ -1261,9 +1415,10 @@ mt7915_tm_set_ipi(struct mt7915_phy *phy)
static int
mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
@@ -1554,7 +1554,7 @@
struct mt7915_mcu_tx req = {
.valid = true,
.mode = tx_cmd,
-@@ -1196,6 +1351,9 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
+@@ -1271,6 +1426,9 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
};
struct edca *e = &req.edca[0];
@@ -1564,7 +1564,7 @@
e->queue = qid + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS;
e->set = WMM_PARAM_SET;
-@@ -1208,17 +1366,19 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
+@@ -1283,17 +1441,19 @@ mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min,
}
static int
@@ -1585,7 +1585,7 @@
u8 band = phy->mt76->band_idx;
u32 i2t_time, tr2t_time, txv_time;
u16 cw = 0;
-@@ -1232,6 +1392,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode)
+@@ -1307,6 +1467,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode)
ipg -= sig_ext;
if (ipg <= (TM_MAX_SIFS + slot_time)) {
@@ -1593,7 +1593,7 @@
sifs = ipg - slot_time;
} else {
u32 val = (ipg + slot_time) / slot_time;
-@@ -1267,10 +1428,12 @@ done:
+@@ -1342,10 +1503,12 @@ done:
mt7915_tm_set_slot_time(phy, slot_time, sifs);
@@ -1608,7 +1608,7 @@
}
static int
-@@ -1469,7 +1632,7 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
+@@ -1544,7 +1707,7 @@ mt7915_tm_init(struct mt7915_phy *phy, bool en)
phy->mt76->test.aid = 0;
phy->mt76->test.tx_mpdu_len = 0;
@@ -1617,7 +1617,7 @@
mt7915_tm_set_entry(phy);
} else {
INIT_DELAYED_WORK(&phy->ipi_work, mt7915_tm_ipi_work);
-@@ -1654,7 +1817,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1729,7 +1892,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
u32 tx_time = td->tx_time, ipg = td->tx_ipg;
u8 duty_cycle = td->tx_duty_cycle;
@@ -1626,7 +1626,7 @@
mt7915_tm_update_channel(phy);
if (td->tx_spe_idx)
-@@ -1669,7 +1832,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1744,7 +1907,7 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
if (duty_cycle < 100)
tx_time = duty_cycle * ipg / (100 - duty_cycle);
}
@@ -1635,7 +1635,7 @@
mt7915_tm_set_tx_len(phy, tx_time);
if (ipg)
-@@ -1688,6 +1851,9 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
+@@ -1763,6 +1926,9 @@ mt7915_tm_set_tx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_tx_frames_mu(phy, en);
mt7915_tm_set_trx(phy, TM_MAC_TX, en);
@@ -1645,7 +1645,7 @@
}
static int
-@@ -1779,7 +1945,7 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
+@@ -1854,7 +2020,7 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, false);
if (en) {
@@ -1654,7 +1654,7 @@
mt7915_tm_update_channel(phy);
if (td->aid)
mt7915_tm_set_rx_user_idx(phy, td->aid);
-@@ -1796,6 +1962,9 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
+@@ -1871,6 +2037,9 @@ mt7915_tm_set_rx_frames(struct mt7915_phy *phy, bool en)
mt7915_tm_set_muru_aid(phy, en ? td->aid : 0xf800);
mt7915_tm_set_trx(phy, TM_MAC_RX_RXV, en);
@@ -1664,7 +1664,7 @@
}
static int
-@@ -1855,34 +2024,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
+@@ -1930,34 +2099,7 @@ mt7915_tm_set_tx_cont(struct mt7915_phy *phy, bool en)
rate_idx = sband->bitrates[idx].hw_value & 0xff;
}
@@ -1885,7 +1885,7 @@
/* keep last */
NUM_MT76_TM_TXBF_ACT,
diff --git a/tools/fields.c b/tools/fields.c
-index fc01043e..7caacb94 100644
+index fc01043..7caacb9 100644
--- a/tools/fields.c
+++ b/tools/fields.c
@@ -33,7 +33,10 @@ static const char * const testmode_tx_mode[] = {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
similarity index 72%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
index 5a6e92f..72ea192 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1013-wifi-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
@@ -1,7 +1,7 @@
-From 0ec1b67bab3908a2990b9698093f5307535ee697 Mon Sep 17 00:00:00 2001
+From dfdfc04bade216097db573acdeab7a0bdb17ed0a Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Sun, 24 Apr 2022 10:07:00 +0800
-Subject: [PATCH 1015/1033] wifi: mt76: mt7915: init rssi in WTBL when add
+Subject: [PATCH 1013/1031] wifi: mt76: mt7915: init rssi in WTBL when add
station
---
@@ -9,10 +9,10 @@
1 file changed, 4 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
-index a9cbaed..972cd1a 100644
+index bd49b21..70ceb5d 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -692,6 +692,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -718,6 +718,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
#endif
int ret, idx;
@@ -20,7 +20,7 @@
idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA);
if (idx < 0)
-@@ -716,6 +717,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -742,6 +743,9 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (ret)
return ret;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
similarity index 71%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
index b5fa9d4..8b75f3d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1014-wifi-mt76-connac-airtime-fairness-feature-off-in-mac.patch
@@ -1,7 +1,7 @@
-From fc4243228375ae6b3b27dc6bd73b16bc86cd5482 Mon Sep 17 00:00:00 2001
+From 58af0b3d79b19bb572121c089f40aa74c5262f20 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 6 May 2022 15:58:42 +0800
-Subject: [PATCH 1016/1033] wifi: mt76: connac: airtime fairness feature off in
+Subject: [PATCH 1014/1031] wifi: mt76: connac: airtime fairness feature off in
mac80211
---
@@ -9,10 +9,10 @@
1 file changed, 1 deletion(-)
diff --git a/mac80211.c b/mac80211.c
-index 75e2ffe..fb0aea6 100644
+index 966d8d0..ddc13dd 100644
--- a/mac80211.c
+++ b/mac80211.c
-@@ -436,7 +436,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
+@@ -437,7 +437,6 @@ mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
WIPHY_FLAG_AP_UAPSD;
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
similarity index 93%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
index 0a2cb92..978fb5d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1015-wifi-mt76-mt7915-add-mt7986-and-mt7916-pre-calibrati.patch
@@ -1,7 +1,7 @@
-From cd68747e751a5efef46b66675568ba16050d84d2 Mon Sep 17 00:00:00 2001
+From 6ed8355ed9d1e4e8bd15c9ed3b1799ed25358240 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 20 May 2022 19:19:25 +0800
-Subject: [PATCH 1017/1033] wifi: mt76: mt7915: add mt7986 and mt7916
+Subject: [PATCH 1015/1031] wifi: mt76: mt7915: add mt7986 and mt7916
pre-calibration
Add pre-calibration for mt7986 and mt7916. It has different data size
@@ -63,10 +63,10 @@
MT_EE_RATE_DELTA_5G = 0x29d,
MT_EE_TX0_POWER_2G = 0x2fc,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index bc28454..fcd07ed 100644
+index 8d8255e..1bbcf42 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2903,7 +2903,8 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
+@@ -2943,7 +2943,8 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
int mt7915_mcu_apply_group_cal(struct mt7915_dev *dev)
{
u8 idx = 0, *cal = dev->cal, *eep = dev->mt76.eeprom.data;
@@ -76,7 +76,7 @@
if (!(eep[offs] & MT_EE_WIFI_CAL_GROUP))
return 0;
-@@ -2941,9 +2942,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
+@@ -2981,9 +2982,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
return -1;
}
@@ -88,7 +88,7 @@
5180, 5200, 5220, 5240,
5260, 5280, 5300, 5320,
5500, 5520, 5540, 5560,
-@@ -2951,34 +2952,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
+@@ -2991,34 +2992,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
5660, 5680, 5700, 5745,
5765, 5785, 5805, 5825
};
@@ -168,7 +168,7 @@
}
int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
-@@ -3010,24 +3046,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
+@@ -3050,24 +3086,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
if (!(eep[offs] & dpd_mask))
return 0;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
index f373601..e6bf515 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1016-wifi-mt76-mt7915-add-phy-capability-vendor-command.patch
@@ -1,7 +1,7 @@
-From 5b4357f01aa42091e84846490bbb453e97e2cf40 Mon Sep 17 00:00:00 2001
+From 2dce2d65b1a25c230c82d45f9e809cf9c8526a8a Mon Sep 17 00:00:00 2001
From: Yi-Chia Hsieh <Yi-Chia.Hsieh@mediatek.com>
Date: Tue, 12 Jul 2022 10:04:35 -0700
-Subject: [PATCH 1018/1033] wifi: mt76: mt7915: add phy capability vendor
+Subject: [PATCH 1016/1031] wifi: mt76: mt7915: add phy capability vendor
command
---
@@ -11,7 +11,7 @@
3 files changed, 78 insertions(+)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 3bfd611..fdedacf 100644
+index 7bb7153..d4e85cd 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -11,6 +11,7 @@
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
index ead4458..d272113 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1017-wifi-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable.patch
@@ -1,7 +1,7 @@
-From 6b3ebcfbfb1252a3c203c4f6c6309909020b4be2 Mon Sep 17 00:00:00 2001
+From 0ad1449e3a5826799a8446a3b3082943bde83247 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 1019/1033] wifi: mt76: mt7915: add vendor subcmd EDCCA ctrl
+Subject: [PATCH 1017/1031] wifi: mt76: mt7915: add vendor subcmd EDCCA ctrl
enable/threshold/compensation
Change-Id: I06a3f94d5e444be894200e2b6588d76ed38d09d0
@@ -16,10 +16,10 @@
7 files changed, 265 insertions(+), 1 deletion(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 7663522..35fb252 100644
+index e55e548..da2f5dd 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1202,6 +1202,7 @@ enum {
+@@ -1205,6 +1205,7 @@ enum {
MCU_EXT_CMD_SMESH_CTRL = 0xae,
MCU_EXT_CMD_RX_STAT_USER_CTRL = 0xb3,
MCU_EXT_CMD_CERT_CFG = 0xb7,
@@ -28,7 +28,7 @@
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
};
diff --git a/mt7915/main.c b/mt7915/main.c
-index 972cd1a..260385e 100644
+index 70ceb5d..4b2c4d9 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -477,6 +477,9 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
@@ -42,10 +42,10 @@
ret = mt7915_set_channel(phy);
if (ret)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index fcd07ed..9cde484 100644
+index 1bbcf42..a43543c 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4720,3 +4720,76 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
+@@ -4816,3 +4816,76 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
return 0;
}
@@ -155,10 +155,10 @@
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index fdedacf..2409bf5 100644
+index d4e85cd..59a2e4f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -762,7 +762,8 @@ void mt7915_vendor_amnt_fill_rx(struct mt7915_phy *phy, struct sk_buff *skb);
+@@ -697,7 +697,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
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-implement-bin-file-mode.patch
similarity index 92%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-implement-bin-file-mode.patch
index f747ddc..723a881 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-implement-bin-file-mode.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1018-wifi-mt76-mt7915-implement-bin-file-mode.patch
@@ -1,7 +1,7 @@
-From 819b0590e6b8ef9e44e3f0a01c3db33eb236f463 Mon Sep 17 00:00:00 2001
+From 03d79a9399ab4dab4f2624d07d79902224563938 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] wifi: mt76: mt7915: implement bin file mode
+Subject: [PATCH 1018/1031] wifi: mt76: mt7915: implement bin file mode
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
@@ -15,7 +15,7 @@
6 files changed, 111 insertions(+), 3 deletions(-)
diff --git a/eeprom.c b/eeprom.c
-index aa889258..412740f0 100644
+index aa88925..412740f 100644
--- a/eeprom.c
+++ b/eeprom.c
@@ -104,6 +104,26 @@ out_put_node:
@@ -46,10 +46,10 @@
mt76_eeprom_override(struct mt76_phy *phy)
{
diff --git a/mt76.h b/mt76.h
-index 0e29248d..b49590d5 100644
+index af29bde..b4e3429 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -916,6 +916,9 @@ struct mt76_dev {
+@@ -925,6 +925,9 @@ struct mt76_dev {
struct mt76_usb usb;
struct mt76_sdio sdio;
};
@@ -58,8 +58,8 @@
+ const char *bin_file_name;
};
- struct mt76_power_limits {
-@@ -1052,6 +1055,7 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str,
+ /* per-phy stats. */
+@@ -1156,6 +1159,7 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str,
int mt76_eeprom_init(struct mt76_dev *dev, int len);
void mt76_eeprom_override(struct mt76_phy *phy);
int mt76_get_of_eeprom(struct mt76_dev *dev, void *data, int offset, int len);
@@ -68,7 +68,7 @@
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 a5c99a5e..fd08d42a 100644
+index a5c99a5..fd08d42 100644
--- a/mt7915/eeprom.c
+++ b/mt7915/eeprom.c
@@ -47,8 +47,11 @@ static int mt7915_check_eeprom(struct mt7915_dev *dev)
@@ -149,7 +149,7 @@
if (ret)
return ret;
diff --git a/mt7915/eeprom.h b/mt7915/eeprom.h
-index fdae347e..9056d786 100644
+index fdae347..9056d78 100644
--- a/mt7915/eeprom.h
+++ b/mt7915/eeprom.h
@@ -108,6 +108,13 @@ enum mt7915_sku_rate_group {
@@ -167,10 +167,10 @@
mt7915_get_channel_group_5g(int channel, bool is_7976)
{
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b22990a5..f2ee80e9 100644
+index 59a2e4f..becd065 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -400,6 +400,8 @@ struct mt7915_dev {
+@@ -335,6 +335,8 @@ struct mt7915_dev {
bool dbdc_support;
bool flash_mode;
@@ -179,7 +179,7 @@
bool muru_debug;
bool ibf;
-@@ -775,6 +777,7 @@ void mt7915_dump_tmac_info(u8 *tmac_info);
+@@ -710,6 +712,7 @@ void mt7915_dump_tmac_info(u8 *tmac_info);
int mt7915_mcu_set_txpower_level(struct mt7915_phy *phy, u8 drop_level);
void mt7915_packet_log_to_host(struct mt7915_dev *dev, const void *data, int len, int type, int des_len);
int mt7915_mcu_set_amsdu_algo(struct mt7915_dev *dev, u16 wcid, u8 enable);
@@ -188,7 +188,7 @@
#define PKT_BIN_DEBUG_MAGIC 0xc8763123
enum {
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index be279f7b..809dff3f 100644
+index 63b4ae0..f98667f 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3,6 +3,7 @@
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-Add-mu-dump-support.patch
similarity index 94%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-Add-mu-dump-support.patch
index 747cbf2..1a7fb1f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-Add-mu-dump-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1019-wifi-mt76-mt7915-Add-mu-dump-support.patch
@@ -1,7 +1,7 @@
-From 95f591a8dcc2d3517b85147928677b60f5c9e015 Mon Sep 17 00:00:00 2001
+From 92a5b059b029f74daa27c746f170f98cc8576a30 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Thu, 11 Aug 2022 18:09:45 -0700
-Subject: [PATCH 1022/1033] wifi: mt76: mt7915: Add mu dump support
+Subject: [PATCH 1019/1031] wifi: mt76: mt7915: Add mu dump support
Change-Id: I521214f3feb6f0d528a9f550255050ffd1ec96d2
---
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
index 2d62615..3a2702d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1020-wifi-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ct.patch
@@ -1,7 +1,7 @@
-From ceaf2875e70fba9ac5c4a65f6cfa13c447a2cf0d Mon Sep 17 00:00:00 2001
+From 8c471e9dbac0f144255da57bfe937eb8f17be9f0 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 1023/1033] wifi: mt76: mt7915: add vendor subcmd three wire
+Subject: [PATCH 1020/1031] wifi: mt76: mt7915: add vendor subcmd three wire
(PTA) ctrl
Change-Id: Ic1044698f294455594a0c6254f55326fdab90580
@@ -16,10 +16,10 @@
6 files changed, 111 insertions(+), 29 deletions(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 35fb252..661d790 100644
+index da2f5dd..daeec01 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1201,7 +1201,7 @@ enum {
+@@ -1204,7 +1204,7 @@ enum {
/* for vendor csi and air monitor */
MCU_EXT_CMD_SMESH_CTRL = 0xae,
MCU_EXT_CMD_RX_STAT_USER_CTRL = 0xb3,
@@ -29,10 +29,10 @@
MCU_EXT_CMD_CSI_CTRL = 0xc2,
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9cde484..7603bd8 100644
+index a43543c..ee951bc 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4419,37 +4419,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
+@@ -4515,37 +4515,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
&req, sizeof(req), false);
}
@@ -134,10 +134,10 @@
#define OFDMA_DL BIT(0)
#define OFDMA_UL BIT(1)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 25f92e1..b3a0f2a 100644
+index becd065..f22d796 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -756,6 +756,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
+@@ -691,6 +691,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable);
int mt7915_mcu_set_mu_edca(struct mt7915_phy *phy, u8 val);
void mt7915_mcu_set_cert(struct mt7915_phy *phy, u8 type);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
index 29dbd3b..3ae5f48 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-add-ibf-control-vendor-cmd.patch
@@ -1,7 +1,7 @@
-From d85a245c188aaad1fbc08a45c147e2328ac33922 Mon Sep 17 00:00:00 2001
+From 67cc264ada370e3eaf488b3dcee1beae96d00ec4 Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:01:29 -0700
-Subject: [PATCH 1024/1033] wifi: mt76: mt7915: add ibf control vendor cmd
+Subject: [PATCH 1021/1031] wifi: mt76: mt7915: add ibf control vendor cmd
Signed-off-by: mtk27835 <shurong.wen@mediatek.com>
---
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
deleted file mode 100644
index 16954d3..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1021-wifi-mt76-mt7915-initialize-wcid.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3351af0e260216cb75d03db85982bf4bc9308f7d 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 1021/1033] wifi: mt76: mt7915: initialize wcid
-
-Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
----
- mt7915/mac.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index af90e19..e5ecb5b 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -1007,7 +1007,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
- info = le32_to_cpu(*cur_info);
- if (info & MT_TX_FREE_PAIR) {
- struct mt7915_sta *msta;
-- struct mt76_wcid *wcid;
-+ struct mt76_wcid *wcid = NULL;
- struct mt7915_phy *phy;
- u16 idx;
-
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
index 04e6733..7b5979c 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1022-wifi-mt76-mt7915-add-E3-re-bonding-for-low-yield-rat.patch
@@ -1,7 +1,7 @@
-From db8ca122f32340716f8f130485f7df58cc0d436a Mon Sep 17 00:00:00 2001
+From 8e91f74ba88b15f031d49d6af05334516f4fb767 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 30 Mar 2023 15:12:37 +0800
-Subject: [PATCH 1025/1033] wifi: mt76: mt7915: add E3 re-bonding for low yield
+Subject: [PATCH 1022/1031] wifi: mt76: mt7915: add E3 re-bonding for low yield
rate issue
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
@@ -57,10 +57,10 @@
if (ret)
return ret;
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b3a0f2a..e2f196b 100644
+index f22d796..5e70b66 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -554,6 +554,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
+@@ -489,6 +489,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);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
similarity index 85%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
index 99dfad3..5e25d7b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1023-wifi-mt76-mt7915-support-on-off-SW-ACI-through-debug.patch
@@ -1,7 +1,7 @@
-From 4127f1f3a388e72e8271f032dc081301a79bfba5 Mon Sep 17 00:00:00 2001
+From 5aea18aadf208d42c34ffae42839f7b9d564d446 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 1026/1033] wifi: mt76: mt7915: support on off SW ACI through
+Subject: [PATCH 1023/1031] wifi: mt76: mt7915: support on off SW ACI through
debugfs
Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
@@ -12,10 +12,10 @@
2 files changed, 22 insertions(+)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 661d790..1fdbc1c 100644
+index daeec01..8228bbb 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1203,6 +1203,7 @@ enum {
+@@ -1206,6 +1206,7 @@ enum {
MCU_EXT_CMD_RX_STAT_USER_CTRL = 0xb3,
MCU_EXT_CMD_SET_CFG = 0xb7,
MCU_EXT_CMD_EDCCA = 0xba,
@@ -24,7 +24,7 @@
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
};
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 2cccebe..acff7ce 100644
+index f98667f..c8b677d 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3644,6 +3644,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
@@ -53,7 +53,7 @@
int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
{
struct mt7915_dev *dev = phy->dev;
-@@ -3733,6 +3752,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3732,6 +3751,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);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
similarity index 92%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
index bce4a14..17a1e96 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1024-wifi-mt76-mt7915-add-bf-backoff-limit-table-support.patch
@@ -1,7 +1,7 @@
-From cd39ff8dad3bfea4c0ec7ac7e71b92158cfa11b5 Mon Sep 17 00:00:00 2001
+From 960329a1e103dd6ce72f5c866c8f925b905cca76 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Mon, 5 Dec 2022 18:21:51 +0800
-Subject: [PATCH 1027/1033] wifi: mt76: mt7915: add bf backoff limit table
+Subject: [PATCH 1024/1031] wifi: mt76: mt7915: add bf backoff limit table
support
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
@@ -58,10 +58,10 @@
}
EXPORT_SYMBOL_GPL(mt76_get_rate_power_limits);
diff --git a/mt76.h b/mt76.h
-index 668ab2b..ea43716 100644
+index b4e3429..2f801de 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -918,6 +918,14 @@ struct mt76_power_limits {
+@@ -1030,6 +1030,14 @@ struct mt76_power_limits {
s8 ofdm[8];
s8 mcs[4][10];
s8 ru[7][12];
@@ -77,10 +77,10 @@
struct mt76_ethtool_worker_info {
diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 9fca009..a122457 100644
+index d66d104..2b63e56 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
-@@ -1027,7 +1027,7 @@ mt7915_rate_txpower_get(struct file *file, char __user *user_buf,
+@@ -1019,7 +1019,7 @@ mt7915_rate_txpower_get(struct file *file, char __user *user_buf,
if (!buf)
return -ENOMEM;
@@ -89,7 +89,7 @@
if (ret)
goto out;
-@@ -1137,7 +1137,7 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf,
+@@ -1129,7 +1129,7 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf,
mutex_lock(&dev->mt76.mutex);
ret = mt7915_mcu_get_txpower_sku(phy, req.txpower_sku,
@@ -98,7 +98,7 @@
if (ret)
goto out;
-@@ -1179,7 +1179,7 @@ out:
+@@ -1171,7 +1171,7 @@ out:
return ret ? ret : count;
}
@@ -107,7 +107,7 @@
.write = mt7915_rate_txpower_set,
.read = mt7915_rate_txpower_get,
.open = simple_open,
-@@ -1187,6 +1187,69 @@ static const struct file_operations mt7915_rate_txpower_fops = {
+@@ -1179,6 +1179,69 @@ static const struct file_operations mt7915_rate_txpower_fops = {
.llseek = default_llseek,
};
@@ -177,7 +177,7 @@
static int
mt7915_twt_stats(struct seq_file *s, void *data)
{
-@@ -1273,7 +1336,9 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1265,7 +1328,9 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
debugfs_create_file("implicit_txbf", 0600, dir, dev,
&fops_implicit_txbf);
debugfs_create_file("txpower_sku", 0400, dir, phy,
@@ -189,10 +189,10 @@
mt7915_twt_stats);
debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 7603bd8..0bec0bc 100644
+index ee951bc..9e64337 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3260,7 +3260,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3300,7 +3300,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
int ret;
s8 txpower_sku[MT7915_SKU_RATE_NUM];
@@ -202,7 +202,7 @@
if (ret)
return ret;
-@@ -3302,51 +3303,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3342,51 +3343,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy)
{
@@ -326,7 +326,7 @@
struct mt7915_dev *dev = phy->dev;
struct {
u8 format_id;
-@@ -3355,10 +3403,9 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3395,10 +3443,9 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
u8 _rsv;
} __packed req = {
.format_id = TX_POWER_LIMIT_INFO,
@@ -338,7 +338,7 @@
struct sk_buff *skb;
int ret, i;
-@@ -3368,9 +3415,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3408,9 +3455,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
if (ret)
return ret;
@@ -357,7 +357,7 @@
dev_kfree_skb(skb);
-@@ -3412,9 +3465,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
+@@ -3452,9 +3505,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
.band_idx = phy->mt76->band_idx,
.sku_enable = enable,
};
@@ -400,7 +400,7 @@
SPR_ENABLE = 0x1,
SPR_ENABLE_SD = 0x3,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e2f196b..b4644f6 100644
+index 5e70b66..7584d1f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -72,6 +72,7 @@
@@ -411,7 +411,7 @@
#define MT7915_MAX_TWT_AGRT 16
#define MT7915_MAX_STA_TWT_AGRT 8
-@@ -621,7 +622,8 @@ int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
+@@ -556,7 +557,8 @@ int mt7915_mcu_set_test_param(struct mt7915_dev *dev, u8 param, bool test_mode,
int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band);
int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable);
int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
similarity index 84%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
index 0f0a54f..731ee05 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1025-wifi-mt76-mt7915-amsdu-set-and-get-control.patch
@@ -1,27 +1,24 @@
-From 433251f722c4efb2b14e19619a19ee85fe58c026 Mon Sep 17 00:00:00 2001
+From 7815bd8d3b07c67262190fb085ad123e3b402d63 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Wed, 14 Dec 2022 00:44:07 -0800
-Subject: [PATCH 1028/1033] wifi: mt76: mt7915: amsdu set and get control
+Subject: [PATCH 1025/1031] wifi: mt76: mt7915: amsdu set and get control
---
- mt7915/mac.c | 10 ++++++++++
+ mt7915/mac.c | 7 +++++++
mt7915/mt7915.h | 1 +
- mt7915/vendor.c | 31 +++++++++++++++++++++++++++++++
+ mt7915/vendor.c | 30 ++++++++++++++++++++++++++++++
mt7915/vendor.h | 12 ++++++++++++
- 4 files changed, 54 insertions(+)
+ 4 files changed, 50 insertions(+)
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index e5ecb5b..1301b61 100644
+index 4dfbc0c..436fc31 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -2077,6 +2077,16 @@ static void mt7915_mac_sta_stats_work(struct mt7915_phy *phy)
+@@ -2032,6 +2032,13 @@ static void mt7915_mac_sta_stats_work(struct mt7915_phy *phy)
spin_unlock_bh(&phy->stats_lock);
}
+void mt7915_set_wireless_amsdu(struct ieee80211_hw *hw, u8 en) {
-+ struct mt76_phy *mphy = hw->priv;
-+ struct mt76_dev *mdev = mphy->dev;
-+
+ if (en)
+ ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
+ else
@@ -32,10 +29,10 @@
void mt7915_capi_sta_rc_work(void *data, struct ieee80211_sta *sta)
{
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b4644f6..b0743c0 100644
+index 7584d1f..10c1cba 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -747,6 +747,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -682,6 +682,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
bool pci, int *irq);
#ifdef CONFIG_MTK_VENDOR
@@ -44,7 +41,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 b661ea4..3d1984b 100644
+index b661ea4..0105d2f 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -30,10 +30,16 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -64,7 +61,7 @@
static const struct nla_policy
mu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_MU_CTRL] = {
[MTK_VENDOR_ATTR_MU_CTRL_ONOFF] = {.type = NLA_U8 },
-@@ -985,11 +991,35 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
+@@ -985,11 +991,34 @@ static int mt7915_vendor_wireless_ctrl(struct wiphy *wiphy,
val8 = nla_get_u8(tb[MTK_VENDOR_ATTR_WIRELESS_CTRL_CERT]);
mt7915_mcu_set_cfg(phy, CFGINFO_CERT_CFG, val8); /* Cert Enable for OMI */
mt7915_mcu_set_bypass_smthint(phy, val8); /* Cert bypass smooth interpolation */
@@ -82,9 +79,8 @@
+ 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;
+ int len = 0;
++
+ if (*storage == 1)
+ return -ENOENT;
+ *storage = 1;
@@ -100,7 +96,7 @@
static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
-@@ -1288,6 +1318,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1288,6 +1317,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = mt7915_vendor_wireless_ctrl,
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
index d28ba31..3f4be8f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1026-wifi-mt76-mt7915-Add-vendor-command-attribute-for-RT.patch
@@ -1,7 +1,7 @@
-From 680ee306a830525879b8d972f8cd894b01514225 Mon Sep 17 00:00:00 2001
+From f5f0d7a46738a626f93a76979e1cc99e7b6a21fb 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 1029/1033] wifi: mt76: mt7915: Add vendor command attribute
+Subject: [PATCH 1026/1031] wifi: mt76: mt7915: Add vendor command attribute
for RTS BW signaling.
Signed-off-by: himanshu.goyal <himanshu.goyal@mediatek.com>
@@ -13,10 +13,10 @@
4 files changed, 20 insertions(+)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 0bec0bc..3939768 100644
+index 9e64337..db4642c 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4497,6 +4497,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
+@@ -4593,6 +4593,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;
@@ -62,7 +62,7 @@
};
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 3d1984b..6bbdc6f 100644
+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] = {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
index 1d9d84a..4e62abc 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1027-wifi-mt76-mt7915-add-vendor-cmd-to-get-available-col.patch
@@ -1,7 +1,7 @@
-From 6f671ea083717d2e0d9578239c761d4fe55e4d74 Mon Sep 17 00:00:00 2001
+From 25137db002576b18fff8eef3ef30f5049a4af036 Mon Sep 17 00:00:00 2001
From: Yi-Chia Hsieh <yi-chia.hsieh@mediatek.com>
Date: Thu, 26 Jan 2023 08:50:47 +0800
-Subject: [PATCH 1030/1033] wifi: mt76: mt7915: add vendor cmd to get available
+Subject: [PATCH 1027/1031] wifi: mt76: mt7915: add vendor cmd to get available
color bitmap
Add a vendor cmd to notify user space available color bitmap.
@@ -14,7 +14,7 @@
2 files changed, 48 insertions(+)
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 6bbdc6f..af60880 100644
+index fb2fe82..94c4aad 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -98,6 +98,11 @@ ibf_ctrl_policy[NUM_MTK_VENDOR_ATTRS_IBF_CTRL] = {
@@ -29,7 +29,7 @@
struct csi_null_tone {
u8 start;
u8 end;
-@@ -1277,6 +1282,27 @@ mt7915_vendor_ibf_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+@@ -1276,6 +1281,27 @@ mt7915_vendor_ibf_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
return 1;
}
@@ -57,7 +57,7 @@
static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
{
-@@ -1383,6 +1409,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1382,6 +1408,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.dumpit = mt7915_vendor_ibf_ctrl_dump,
.policy = ibf_ctrl_policy,
.maxattr = MTK_VENDOR_ATTR_IBF_CTRL_MAX,
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
similarity index 87%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
index 5e89b94..ea19201 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1028-wifi-mt76-mt7915-disable-SW-ACI-by-default.patch
@@ -1,7 +1,7 @@
-From 12591211de7e8688434cc1cc93143871e3403507 Mon Sep 17 00:00:00 2001
+From ca0e38bced7648a60d967c0826ae3175b4a21fcd Mon Sep 17 00:00:00 2001
From: Howard Hsu <howard-yh.hsu@mediatek.com>
Date: Fri, 24 Feb 2023 16:29:42 +0800
-Subject: [PATCH 1031/1033] wifi: mt76: mt7915: disable SW-ACI by default
+Subject: [PATCH 1028/1031] wifi: mt76: mt7915: disable SW-ACI by default
Support to enable/disable SW-ACI by module parameter "sw_aci_enable".
SW-ACI feature is disable by default.
@@ -13,7 +13,7 @@
4 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 260385e..8d1120c 100644
+index 4b2c4d9..95b15a2 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -8,6 +8,10 @@
@@ -39,10 +39,10 @@
if (phy != &dev->phy) {
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 3939768..13e5a54 100644
+index db4642c..cf8d249 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4857,3 +4857,18 @@ int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value)
+@@ -4953,3 +4953,18 @@ int mt7915_mcu_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value)
return 0;
}
@@ -62,10 +62,10 @@
+ sizeof(req), NULL);
+}
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index b0743c0..82d632b 100644
+index 10c1cba..0d3c67b 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -771,6 +771,7 @@ int mt7915_vendor_amnt_sta_remove(struct mt7915_phy *phy,
+@@ -706,6 +706,7 @@ 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_get_edcca(struct mt7915_phy *phy, u8 mode, s8 *value);
@@ -74,7 +74,7 @@
int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool wait_resp);
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index acff7ce..4629f6b 100644
+index c8b677d..336f38e 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3647,16 +3647,12 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1033-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch
similarity index 86%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1033-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch
index dac7194..308cf52 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1033-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1029-wifi-mt76-mt7915-add-muru-user-number-debug-command.patch
@@ -1,7 +1,7 @@
-From e3d526b4c7a48f8b220899020e96c1e110f492ca Mon Sep 17 00:00:00 2001
+From 51808db9d3edb7e76fc1d2de5a3cbd7e01d4b3e4 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Thu, 27 Apr 2023 15:37:33 +0800
-Subject: [PATCH 1033/1033] wifi: mt76: mt7915: add muru user number debug
+Subject: [PATCH 1029/1031] wifi: mt76: mt7915: add muru user number debug
command
---
@@ -11,10 +11,10 @@
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 82d632b..45a5254 100644
+index 0d3c67b..8fafbb1 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -635,6 +635,7 @@ int mt7915_mcu_set_pulse_th(struct mt7915_dev *dev,
+@@ -570,6 +570,7 @@ int mt7915_mcu_set_pulse_th(struct mt7915_dev *dev,
int mt7915_mcu_set_radar_th(struct mt7915_dev *dev, int index,
const struct mt7915_dfs_pattern *pattern);
int mt7915_mcu_set_muru_ctrl(struct mt7915_dev *dev, u32 cmd, u32 val);
@@ -23,7 +23,7 @@
int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy);
int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch);
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index af60880..a2f3f45 100644
+index 94c4aad..b450808 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -45,6 +45,8 @@ static const struct nla_policy
@@ -35,7 +35,7 @@
};
static const struct nla_policy
-@@ -1035,9 +1037,10 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
+@@ -1034,9 +1036,10 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
int data_len)
{
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
@@ -47,7 +47,7 @@
u32 val32 = 0;
err = nla_parse(tb, MTK_VENDOR_ATTR_MU_CTRL_MAX, data, data_len,
-@@ -1051,6 +1054,16 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
+@@ -1050,6 +1053,16 @@ static int mt7915_vendor_mu_ctrl(struct wiphy *wiphy,
FIELD_PREP(RATE_CFG_VAL, val8);
ieee80211_iterate_active_interfaces_atomic(hw, IEEE80211_IFACE_ITER_RESUME_ALL,
mt7915_set_wireless_vif, &val32);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1034-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1034-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch
index d030805..bb8dbf1 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1034-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1030-wifi-mt76-mt7915-add-debugfs-for-fw-coredump.patch
@@ -1,7 +1,7 @@
-From 4eb61cd26244aca09e163a7a013b3190cab35ced Mon Sep 17 00:00:00 2001
+From eb4ee3779dde8b15d03c32516d89c87bd19381c1 Mon Sep 17 00:00:00 2001
From: Bo Jiao <Bo.Jiao@mediatek.com>
Date: Mon, 22 May 2023 15:30:21 +0800
-Subject: [PATCH] wifi: mt76: mt7915: add debugfs for fw coredump.
+Subject: [PATCH 1030/1031] wifi: mt76: mt7915: add debugfs for fw coredump.
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
---
@@ -12,7 +12,7 @@
4 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index a122457e..8dd79d8f 100644
+index 2b63e56..99ce0a9 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
@@ -82,8 +82,10 @@ mt7915_sys_recovery_set(struct file *file, const char __user *user_buf,
@@ -67,10 +67,10 @@
/* SER statistics */
desc += scnprintf(buff + desc, bufsz - desc,
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 4e3c869c..498c3984 100644
+index 436fc31..f930c50 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -1783,10 +1783,34 @@ void mt7915_mac_dump_work(struct work_struct *work)
+@@ -1725,10 +1725,34 @@ void mt7915_mac_dump_work(struct work_struct *work)
dev = container_of(work, struct mt7915_dev, dump_work);
@@ -107,7 +107,7 @@
}
void mt7915_reset(struct mt7915_dev *dev)
-@@ -1809,7 +1833,7 @@ void mt7915_reset(struct mt7915_dev *dev)
+@@ -1747,7 +1771,7 @@ void mt7915_reset(struct mt7915_dev *dev)
wiphy_name(dev->mt76.hw->wiphy));
mt7915_irq_disable(dev, MT_INT_MCU_CMD);
@@ -117,7 +117,7 @@
}
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 8ac70e56..7febe658 100644
+index 8ac70e5..7febe65 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -745,8 +745,12 @@ enum {
@@ -135,7 +135,7 @@
SER_ENABLE = 2,
SER_RECOVER
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 677856b4..cb2afeeb 100644
+index 8fafbb1..b7fa1a4 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -91,6 +91,13 @@ struct mt7915_sta;
@@ -152,7 +152,7 @@
enum mt7915_txq_id {
MT7915_TXQ_FWDL = 16,
MT7915_TXQ_MCU_WM,
-@@ -386,6 +393,7 @@ struct mt7915_dev {
+@@ -323,6 +330,7 @@ struct mt7915_dev {
/* protects coredump data */
struct mutex dump_mutex;
@@ -160,7 +160,7 @@
#ifdef CONFIG_DEV_COREDUMP
struct {
struct mt7915_crash_data *crash_data[__MT76_RAM_TYPE_MAX];
-@@ -573,6 +581,7 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
+@@ -508,6 +516,7 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
void mt7915_init_txpower(struct mt7915_dev *dev,
struct ieee80211_supported_band *sband);
void mt7915_reset(struct mt7915_dev *dev);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1035-wifi-mt76-mt7915-remove-BW160-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch
similarity index 62%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/1035-wifi-mt76-mt7915-remove-BW160-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch
index aa0efc4..77ad7f1 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1035-wifi-mt76-mt7915-remove-BW160-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1031-wifi-mt76-mt7915-remove-BW160-support.patch
@@ -1,46 +1,50 @@
-From 22ffda45e657edd08380a24b3615d8e924775af8 Mon Sep 17 00:00:00 2001
+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] wifi: mt76: mt7915: remove BW160 support
+Subject: [PATCH 1031/1031] wifi: mt76: mt7915: remove BW160 support
Remove BW160 capability in mt7915.
---
- mt7915/init.c | 24 +++++-------------------
- 1 file changed, 5 insertions(+), 19 deletions(-)
+ mt7915/init.c | 29 +++++++----------------------
+ 1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/mt7915/init.c b/mt7915/init.c
-index 8eacf34..527cbac 100644
+index 09ee080..bc16f17 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -416,12 +416,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+@@ -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;
+- 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 {
- vht_cap->cap |=
- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
-@@ -870,12 +864,9 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
+ 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 */
-+ /* mt7915 doesn't support bw160 */
- if (is_mt7915(&dev->mt76)) {
+- 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
-@@ -956,15 +947,10 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+ 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;
@@ -60,5 +64,5 @@
for (i = 0; i < 8; i++) {
--
-2.39.0
+2.18.0
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1032-wifi-mt76-mt7915-Add-5G-UNII4-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1032-wifi-mt76-mt7915-Add-5G-UNII4-support.patch
deleted file mode 100644
index af92dad..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1032-wifi-mt76-mt7915-Add-5G-UNII4-support.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From ebee8109eb2d0dba82518e3b1ceae58580b65b69 Mon Sep 17 00:00:00 2001
-From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
-Date: Tue, 2 May 2023 15:08:42 +0800
-Subject: [PATCH 1032/1033] wifi: mt76: mt7915: Add 5G UNII4 support.
-
----
- mac80211.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mac80211.c b/mac80211.c
-index fb0aea6..553d901 100644
---- a/mac80211.c
-+++ b/mac80211.c
-@@ -82,6 +82,7 @@ static const struct ieee80211_channel mt76_channels_5ghz[] = {
- CHAN5G(165, 5825),
- CHAN5G(169, 5845),
- CHAN5G(173, 5865),
-+ CHAN5G(177, 5885),
-
- CHAN5G(184, 4920),
- CHAN5G(188, 4940),
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
similarity index 77%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
index cc09bac..e843ab7 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2000-wifi-mt76-mt7915-wed-add-wed-tx-support.patch
@@ -1,19 +1,19 @@
-From 30912b07f4f8a8e3c6639c4d61326fe872ba8ce5 Mon Sep 17 00:00:00 2001
+From 3659e82e8fa99a3a5be9e22c9941ca20d035e1fe Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 10:38:53 +0800
-Subject: [PATCH 3000/3012] wifi: mt76: mt7915: wed: add wed tx support
+Subject: [PATCH 2000/2009] wifi: mt76: mt7915: wed: add wed tx support
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
mt76_connac.h | 1 +
- mt7915/mac.c | 11 +++++++----
+ mt7915/mac.c | 10 +++++++---
mt7915/main.c | 4 ++--
mt7915/mmio.c | 5 +++--
mt7915/mt7915.h | 2 +-
- 5 files changed, 14 insertions(+), 9 deletions(-)
+ 5 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/mt76_connac.h b/mt76_connac.h
-index ca26984..fc453e5 100644
+index 4560ab7..431e4d7 100644
--- a/mt76_connac.h
+++ b/mt76_connac.h
@@ -130,6 +130,7 @@ struct mt76_connac_sta_key_conf {
@@ -25,10 +25,10 @@
struct mt76_connac_fw_txp {
__le16 flags;
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 1301b61..26b5e15 100644
+index f930c50..a0d1f89 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
-@@ -866,9 +866,9 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id)
+@@ -867,9 +867,9 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id)
txp->token = cpu_to_le16(token_id);
txp->nbuf = 1;
@@ -40,7 +40,7 @@
}
static void
-@@ -984,6 +984,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -918,6 +918,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
LIST_HEAD(free_list);
void *end = data + len;
bool v3, wake = false;
@@ -48,17 +48,17 @@
u16 total, count = 0;
u32 txd = le32_to_cpu(free->txd);
__le32 *cur_info;
-@@ -1047,12 +1048,14 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
+@@ -999,12 +1000,15 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
txwi = mt76_token_release(mdev, msdu, &wake);
if (!txwi)
continue;
+ else
+ with_txwi = false;
- mt7915_txwi_free(dev, txwi, sta, &free_list);
+ mt76_connac2_txwi_free(mdev, txwi, sta, &free_list);
}
}
--
+
- mt7915_mac_tx_free_done(dev, &free_list, wake);
+ if (!with_txwi)
+ mt7915_mac_tx_free_done(dev, &free_list, wake);
@@ -66,10 +66,10 @@
static void
diff --git a/mt7915/main.c b/mt7915/main.c
-index 8d1120c..59e879b 100644
+index 95b15a2..e0b1643 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1546,14 +1546,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1640,14 +1640,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
if (!mtk_wed_device_active(wed))
return -ENODEV;
@@ -87,7 +87,7 @@
ctx->dev = NULL;
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index d5198eb..3f4749b 100644
+index 25c3fe2..e5e005e 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -13,7 +13,7 @@
@@ -99,16 +99,16 @@
module_param(wed_enable, bool, 0644);
MODULE_PARM_DESC(wed_enable, "Enable Wireless Ethernet Dispatch support");
-@@ -584,7 +584,7 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
+@@ -569,7 +569,7 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
spin_lock_bh(&dev->mt76.token_lock);
- dev->mt76.token_size = MT7915_TOKEN_SIZE;
+ dev->mt76.token_size = wed->wlan.token_start;//MT7915_TOKEN_SIZE
spin_unlock_bh(&dev->mt76.token_lock);
+ }
- /* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than
-@@ -838,6 +838,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -812,6 +812,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
*irq = wed->irq;
dev->mt76.dma_dev = wed->dev;
@@ -117,7 +117,7 @@
ret = dma_set_mask(wed->dev, DMA_BIT_MASK(32));
if (ret)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 45a5254..d0ae42f 100644
+index b7fa1a4..f4e60b2 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -62,7 +62,7 @@
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
similarity index 90%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
index be9a604..e785db3 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2001-wifi-mt76-mt7915-wed-add-wds-support-when-wed-is-ena.patch
@@ -1,7 +1,7 @@
-From 7d1859d341a5c77b206b6b72c8a3d06dcef60042 Mon Sep 17 00:00:00 2001
+From 7727bc30f1fea1174cf1c6ea853a7092d4dae2c9 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Tue, 13 Dec 2022 17:51:26 +0800
-Subject: [PATCH 3001/3012] wifi: mt76: mt7915: wed: add wds support when wed
+Subject: [PATCH 2001/2009] wifi: mt76: mt7915: wed: add wds support when wed
is enabled
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -15,10 +15,10 @@
6 files changed, 82 insertions(+), 10 deletions(-)
diff --git a/mt76.h b/mt76.h
-index ea43716..3d36913 100644
+index 2f801de..e315fc1 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -60,6 +60,12 @@ enum mt76_wed_type {
+@@ -68,6 +68,12 @@ enum mt76_wed_type {
MT76_WED_Q_RX,
};
@@ -32,10 +32,10 @@
u32 (*rr)(struct mt76_dev *dev, u32 offset);
void (*wr)(struct mt76_dev *dev, u32 offset, u32 val);
diff --git a/mt7915/main.c b/mt7915/main.c
-index 59e879b..13e797f 100644
+index e0b1643..c70b9d6 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -704,8 +704,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -730,8 +730,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
#endif
int ret, idx;
u32 addr;
@@ -52,7 +52,7 @@
if (idx < 0)
return -ENOSPC;
-@@ -1182,6 +1189,13 @@ static void mt7915_sta_set_4addr(struct ieee80211_hw *hw,
+@@ -1209,6 +1216,13 @@ static void mt7915_sta_set_4addr(struct ieee80211_hw *hw,
else
clear_bit(MT_WCID_FLAG_4ADDR, &msta->wcid.flags);
@@ -66,7 +66,7 @@
mt76_connac_mcu_wtbl_update_hdr_trans(&dev->mt76, vif, sta);
}
-@@ -1553,8 +1567,12 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1647,8 +1661,12 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
path->dev = ctx->dev;
path->mtk_wdma.wdma_idx = wed->wdma_idx;
path->mtk_wdma.bss = mvif->mt76.idx;
@@ -81,10 +81,10 @@
ctx->dev = NULL;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 13e5a54..e9bc4b1 100644
+index cf8d249..ca472c2 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2346,10 +2346,18 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
+@@ -2385,10 +2385,18 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
if (ret)
return ret;
@@ -108,7 +108,7 @@
ret = mt7915_mcu_set_mwds(dev, 1);
if (ret)
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index 8ac70e5..c533a7d 100644
+index 7febe65..82b0847 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -339,6 +339,7 @@ enum {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
similarity index 79%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
index a39c895..b9d24ec 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2002-wifi-mt76-mt7915-wed-add-fill-receive-path-to-report.patch
@@ -1,7 +1,7 @@
-From 73eb4f4af78b3158592dfeb97e15196f471bf4c1 Mon Sep 17 00:00:00 2001
+From a8a74f9dbc766d0a517d1311d901e46c62dbc1c6 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 19 May 2023 07:05:22 +0800
-Subject: [PATCH 3002/3012] wifi: mt76: mt7915: wed: add fill receive path to
+Subject: [PATCH 2002/2009] wifi: mt76: mt7915: wed: add fill receive path to
report wed idx
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -10,10 +10,10 @@
1 file changed, 18 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 13e797f..275c6a0 100644
+index c70b9d6..97c90ec 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1579,6 +1579,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1673,6 +1673,23 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
return 0;
}
@@ -37,7 +37,7 @@
static int
mt7915_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct net_device *netdev, enum tc_setup_type type,
-@@ -1644,6 +1661,7 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1740,6 +1757,7 @@ const struct ieee80211_ops mt7915_ops = {
.set_radar_background = mt7915_set_radar_background,
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
.net_fill_forward_path = mt7915_net_fill_forward_path,
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
similarity index 91%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
index fcfae5a..2b35208 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2003-wifi-mt76-mt7915-wed-find-rx-token-by-physical-addre.patch
@@ -1,7 +1,7 @@
-From 354522be19efd1be1c35b765ebcc5d9ea11bd465 Mon Sep 17 00:00:00 2001
+From 457cb9380e3c1f875991bf551db68e638d4be95d Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 25 Nov 2022 14:32:35 +0800
-Subject: [PATCH 3003/3012] wifi: mt76: mt7915: wed: find rx token by physical
+Subject: [PATCH 2003/2009] wifi: mt76: mt7915: wed: find rx token by physical
address
The token id in RxDMAD may be incorrect when it is not the last frame due to
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
similarity index 96%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
index a8a355e..c1fd5b0 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2004-wifi-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
@@ -1,7 +1,7 @@
-From 5f06d232336902dee12f67fad58ac6b637ef89ec Mon Sep 17 00:00:00 2001
+From 52823aad02634b30aa18c4e27d5e5df08b7d52e7 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 3004/3012] wifi: mt76: mt7915: wed: HW ATF support for mt7986
+Subject: [PATCH 2004/2009] wifi: mt76: mt7915: wed: HW ATF support for mt7986
Signed-off-by: Lian Chen <lian.chen@mediatek.com>
---
@@ -15,10 +15,10 @@
7 files changed, 826 insertions(+), 1 deletion(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 1fdbc1c..fd5aecb 100644
+index 8228bbb..1257dfa 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1161,6 +1161,7 @@ enum {
+@@ -1164,6 +1164,7 @@ enum {
MCU_EXT_CMD_THERMAL_CTRL = 0x2c,
MCU_EXT_CMD_WTBL_UPDATE = 0x32,
MCU_EXT_CMD_SET_DRR_CTRL = 0x36,
@@ -26,7 +26,7 @@
MCU_EXT_CMD_SET_RDD_CTRL = 0x3a,
MCU_EXT_CMD_ATE_CTRL = 0x3d,
MCU_EXT_CMD_PROTECT_CTRL = 0x3e,
-@@ -1170,6 +1171,7 @@ enum {
+@@ -1173,6 +1174,7 @@ enum {
MCU_EXT_CMD_MUAR_UPDATE = 0x48,
MCU_EXT_CMD_BCN_OFFLOAD = 0x49,
MCU_EXT_CMD_RX_AIRTIME_CTRL = 0x4a,
@@ -35,7 +35,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 a122457..e44ac9a 100644
+index 99ce0a9..73e132b 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
@@ -12,6 +12,10 @@
@@ -49,7 +49,7 @@
/** global debugfs **/
struct hw_queue_map {
-@@ -211,6 +215,406 @@ static const struct file_operations mt7915_sys_recovery_ops = {
+@@ -223,6 +227,406 @@ static const struct file_operations mt7915_sys_recovery_ops = {
.llseek = default_llseek,
};
@@ -456,7 +456,7 @@
static int
mt7915_radar_trigger(void *data, u64 val)
{
-@@ -1342,6 +1746,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
+@@ -1346,6 +1750,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
debugfs_create_devm_seqfile(dev->mt76.dev, "twt_stats", dir,
mt7915_twt_stats);
debugfs_create_file("rf_regval", 0600, dir, dev, &fops_rf_regval);
@@ -465,10 +465,10 @@
if (!dev->dbdc_support || phy->mt76->band_idx) {
debugfs_create_u32("dfs_hw_pattern", 0400, dir,
diff --git a/mt7915/init.c b/mt7915/init.c
-index 8eacf34..8684d7a 100644
+index bc16f17..cf576ed 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -575,10 +575,46 @@ mt7915_init_led_mux(struct mt7915_dev *dev)
+@@ -583,10 +583,46 @@ mt7915_init_led_mux(struct mt7915_dev *dev)
}
}
@@ -515,7 +515,7 @@
/* config pse qid6 wfdma port selection */
if (!is_mt7915(&dev->mt76) && dev->hif2)
-@@ -600,6 +636,9 @@ void mt7915_mac_init(struct mt7915_dev *dev)
+@@ -610,6 +646,9 @@ void mt7915_mac_init(struct mt7915_dev *dev)
mt7915_mac_init_band(dev, i);
mt7915_init_led_mux(dev);
@@ -526,7 +526,7 @@
int mt7915_txbf_init(struct mt7915_dev *dev)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 275c6a0..2ba36da 100644
+index 97c90ec..7b34162 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -217,6 +217,7 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
@@ -547,7 +547,7 @@
return ret;
}
-@@ -699,6 +703,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -725,6 +729,7 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
bool ext_phy = mvif->phy != &dev->phy;
@@ -555,7 +555,7 @@
#ifdef CONFIG_MTK_VENDOR
struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
#endif
-@@ -749,6 +754,16 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -775,6 +780,16 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (phy->muru_onoff & MUMIMO_DL_CERT)
mt7915_mcu_set_mimo(phy, 0);
#endif
@@ -573,10 +573,10 @@
}
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e9bc4b1..3b0ba5c 100644
+index ca472c2..7472825 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3507,6 +3507,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3547,6 +3547,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
&req, sizeof(req), false);
}
@@ -749,10 +749,10 @@
{
#define MT_BF_PROCESSING 4
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index d0ae42f..fddca24 100644
+index f4e60b2..0621684 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -134,6 +134,58 @@ struct mt7915_twt_flow {
+@@ -141,6 +141,58 @@ struct mt7915_twt_flow {
DECLARE_EWMA(avg_signal, 10, 8)
@@ -811,7 +811,7 @@
struct mt7915_sta {
struct mt76_wcid wcid; /* must be first */
-@@ -156,6 +208,7 @@ struct mt7915_sta {
+@@ -161,6 +213,7 @@ struct mt7915_sta {
u8 flowid_mask;
struct mt7915_twt_flow flow[MT7915_MAX_STA_TWT_AGRT];
} twt;
@@ -819,7 +819,7 @@
};
struct mt7915_vif {
-@@ -459,6 +512,8 @@ struct mt7915_dev {
+@@ -402,6 +455,8 @@ struct mt7915_dev {
} dbg;
const struct mt7915_dbg_reg_desc *dbg_reg;
#endif
@@ -828,7 +828,7 @@
};
enum {
-@@ -491,6 +546,15 @@ enum mt7915_rdd_cmd {
+@@ -434,6 +489,15 @@ enum mt7915_rdd_cmd {
RDD_IRQ_OFF,
};
@@ -844,7 +844,7 @@
static inline struct mt7915_phy *
mt7915_hw_phy(struct ieee80211_hw *hw)
{
-@@ -620,6 +684,10 @@ int mt7915_mcu_set_mac(struct mt7915_dev *dev, int band, bool enable,
+@@ -564,6 +628,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);
@@ -856,7 +856,7 @@
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 4629f6b..361b50c 100644
+index 336f38e..3eeb921 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -1368,7 +1368,6 @@ static EMPTY_QUEUE_INFO_T ple_txcmd_queue_empty_info[] = {
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
similarity index 92%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
index dc542aa..6f2380f 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2005-wifi-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rr.patch
@@ -1,7 +1,7 @@
-From dbd501e7d4570588f1bae9cd53177e83d3f5f81e Mon Sep 17 00:00:00 2001
+From 59b6df9977582f53ba8434189091a8a3c3012e20 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 6 Jan 2023 18:18:50 +0800
-Subject: [PATCH 3005/3012] wifi: mt76: mt7915: wed: add rxwi for further in
+Subject: [PATCH 2005/2009] wifi: mt76: mt7915: wed: add rxwi for further in
chip rro
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -244,7 +244,7 @@
unmap:
for (n--; n > 0; n--)
diff --git a/mac80211.c b/mac80211.c
-index 553d901..4a0f333 100644
+index ddc13dd..52c552b 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -603,7 +603,6 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
@@ -255,7 +255,7 @@
mutex_init(&dev->mutex);
init_waitqueue_head(&dev->tx_wait);
-@@ -634,6 +633,7 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
+@@ -636,6 +635,7 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
INIT_LIST_HEAD(&dev->txwi_cache);
INIT_LIST_HEAD(&dev->rxwi_cache);
dev->token_size = dev->drv->token_size;
@@ -264,10 +264,10 @@
for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++)
skb_queue_head_init(&dev->rx_skb[i]);
diff --git a/mt76.h b/mt76.h
-index 3d36913..b178b95 100644
+index e315fc1..6c488bd 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -165,6 +165,7 @@ struct mt76_queue_entry {
+@@ -173,6 +173,7 @@ struct mt76_queue_entry {
};
union {
struct mt76_txwi_cache *txwi;
@@ -275,7 +275,7 @@
struct urb *urb;
int buf_sz;
};
-@@ -360,10 +361,15 @@ struct mt76_txwi_cache {
+@@ -371,10 +372,15 @@ struct mt76_txwi_cache {
struct list_head list;
dma_addr_t dma_addr;
@@ -295,7 +295,7 @@
};
struct mt76_rx_tid {
-@@ -449,6 +455,7 @@ struct mt76_driver_ops {
+@@ -460,6 +466,7 @@ struct mt76_driver_ops {
u16 txwi_size;
u16 token_size;
u8 mcs_rates;
@@ -303,7 +303,7 @@
void (*update_survey)(struct mt76_phy *phy);
-@@ -819,7 +826,6 @@ struct mt76_dev {
+@@ -833,7 +840,6 @@ struct mt76_dev {
struct ieee80211_hw *hw;
@@ -311,7 +311,7 @@
spinlock_t lock;
spinlock_t cc_lock;
-@@ -1411,8 +1417,8 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
+@@ -1523,8 +1529,8 @@ mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
}
void mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t);
@@ -322,7 +322,7 @@
void mt76_free_pending_rxwi(struct mt76_dev *dev);
void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
struct napi_struct *napi);
-@@ -1564,9 +1570,9 @@ struct mt76_txwi_cache *
+@@ -1676,9 +1682,9 @@ struct mt76_txwi_cache *
mt76_token_release(struct mt76_dev *dev, int token, bool *wake);
int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi);
void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
@@ -335,7 +335,7 @@
static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
{
diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 4c8cf0c..3784b7b 100644
+index 59a44d7..326c8c8 100644
--- a/mt7915/dma.c
+++ b/mt7915/dma.c
@@ -509,7 +509,6 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -355,10 +355,10 @@
/* rx data queue for band1 */
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 3f4749b..1c416bc 100644
+index e5e005e..4151af0 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
-@@ -610,18 +610,18 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -584,18 +584,18 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
sizeof(struct skb_shared_info));
for (i = 0; i < dev->mt76.rx_token_size; i++) {
@@ -384,7 +384,7 @@
}
mt76_free_pending_rxwi(&dev->mt76);
-@@ -639,18 +639,18 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -613,18 +613,18 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
sizeof(struct skb_shared_info));
for (i = 0; i < size; i++) {
@@ -406,7 +406,7 @@
goto unmap;
}
-@@ -660,17 +660,17 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -634,17 +634,17 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
DMA_TO_DEVICE);
if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
__free_pages(page, get_order(length));
@@ -427,7 +427,7 @@
goto unmap;
}
-@@ -831,7 +831,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
+@@ -805,7 +805,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
wed->wlan.reset = mt7915_mmio_wed_reset;
wed->wlan.reset_complete = mt7915_mmio_wed_reset_complete;
@@ -436,7 +436,7 @@
if (mtk_wed_device_attach(wed))
return 0;
-@@ -1038,6 +1038,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
+@@ -1012,6 +1012,7 @@ struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
SURVEY_INFO_TIME_RX |
SURVEY_INFO_TIME_BSS_RX,
.token_size = MT7915_TOKEN_SIZE,
@@ -445,7 +445,7 @@
.tx_complete_skb = mt76_connac_tx_complete_skb,
.rx_skb = mt7915_queue_rx_skb,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index fddca24..646f3e8 100644
+index 0621684..0153e5f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -64,6 +64,7 @@
@@ -457,10 +457,10 @@
#define MT7915_CFEND_RATE_DEFAULT 0x49 /* OFDM 24M */
#define MT7915_CFEND_RATE_11B 0x03 /* 11B LP, 11M */
diff --git a/tx.c b/tx.c
-index 94f0d82..a87e361 100644
+index 5d7bf34..2594a62 100644
--- a/tx.c
+++ b/tx.c
-@@ -760,16 +760,16 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
+@@ -774,16 +774,16 @@ int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
EXPORT_SYMBOL_GPL(mt76_token_consume);
int mt76_rx_token_consume(struct mt76_dev *dev, void *ptr,
@@ -481,7 +481,7 @@
}
spin_unlock_bh(&dev->rx_token_lock);
-@@ -806,15 +806,15 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
+@@ -820,15 +820,15 @@ mt76_token_release(struct mt76_dev *dev, int token, bool *wake)
}
EXPORT_SYMBOL_GPL(mt76_token_release);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3007-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2006-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
similarity index 78%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3007-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2006-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
index 9e29a40..482d43a 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3007-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2006-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
@@ -1,7 +1,7 @@
-From 7624f0f425a72927b29178227f92d9bb88d5202c Mon Sep 17 00:00:00 2001
+From 558ea0b82f413e4774e1357e4bb5717fb3bd81a0 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Wed, 11 Jan 2023 10:56:27 +0800
-Subject: [PATCH 3007/3012] wifi: mt76: get tx count and tx failed from mcu
+Subject: [PATCH 2006/2009] wifi: mt76: get tx count and tx failed from mcu
command
---
@@ -15,10 +15,10 @@
7 files changed, 136 insertions(+), 6 deletions(-)
diff --git a/mt76.h b/mt76.h
-index 4794b6a..e0bb41e 100644
+index 6c488bd..a02d304 100644
--- a/mt76.h
+++ b/mt76.h
-@@ -289,6 +289,7 @@ struct mt76_sta_stats {
+@@ -297,6 +297,7 @@ struct mt76_sta_stats {
u64 tx_bytes;
/* WED TX */
u32 tx_packets; /* unit: MSDU */
@@ -27,10 +27,10 @@
u32 tx_failed;
/* WED RX */
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index ee37fe5..6cd8c27 100644
+index ee5177f..5edf912 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
-@@ -612,8 +612,6 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -614,8 +614,6 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
stats->tx_bytes +=
le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE) -
le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_BYTE);
@@ -40,10 +40,10 @@
le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_CNT);
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 97d732a..b299a54 100644
+index 1257dfa..cfdee7c 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1160,6 +1160,7 @@ enum {
+@@ -1162,6 +1162,7 @@ enum {
MCU_EXT_CMD_EDCA_UPDATE = 0x27,
MCU_EXT_CMD_DEV_INFO_UPDATE = 0x2A,
MCU_EXT_CMD_THERMAL_CTRL = 0x2c,
@@ -52,22 +52,18 @@
MCU_EXT_CMD_SET_DRR_CTRL = 0x36,
MCU_EXT_CMD_SET_FEATURE_CTRL = 0x38,
diff --git a/mt7915/main.c b/mt7915/main.c
-index ccdb148..c377ef2 100644
+index 7b34162..5db7e6a 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1116,9 +1116,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
+@@ -1155,12 +1155,14 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+ }
+ }
-- sinfo->tx_failed = msta->wcid.stats.tx_failed;
-- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
+- sinfo->tx_failed = msta->wcid.stats.tx_failed;
+- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
-
- sinfo->tx_retries = msta->wcid.stats.tx_retries;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
-
-@@ -1136,6 +1133,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
- }
+ sinfo->tx_retries = msta->wcid.stats.tx_retries;
+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
+ if (!mt7915_get_tx_stat(phy, msta->wcid.idx)) {
+ sinfo->tx_failed = msta->wcid.stats.tx_failed;
@@ -78,11 +74,11 @@
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index c27b8f9..2c6dddc 100644
+index 7472825..26d2964 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4224,6 +4224,114 @@ out:
- return ret;
+@@ -4214,6 +4214,114 @@ int mt7915_mcu_get_tx_rate(struct mt7915_phy *phy, u16 wcidx)
+ return mt7915_mcu_get_tx_rate_v2(phy, wcidx);
}
+static int mt7915_mcu_get_tx_stat_v1(struct mt7915_phy *phy,
@@ -197,10 +193,10 @@
struct cfg80211_he_bss_color *he_bss_color)
{
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index eca028b..c712dbb 100644
+index 82b0847..d684979 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
-@@ -797,7 +797,8 @@ mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
+@@ -790,7 +790,8 @@ mt7915_get_power_bound(struct mt7915_phy *phy, s8 txpower)
}
enum {
@@ -210,7 +206,7 @@
};
#ifdef CONFIG_MTK_VENDOR
-@@ -1076,6 +1077,24 @@ struct mt7915_muru {
+@@ -1069,6 +1070,24 @@ struct mt7915_muru {
/* DL&UL User config */
#define MURU_USER_CNT BIT(4)
@@ -236,17 +232,17 @@
CAPI_SU,
CAPI_MU,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index ef9b0e1..52cf748 100644
+index 0153e5f..85c5c95 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -715,6 +715,7 @@ int mt7915_mcu_get_tx_rate(struct mt7915_phy *phy, u16 wcidx);
- int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta, struct rate_info *rate);
- int mt7915_mcu_get_tx_stat_wa(struct mt7915_dev *dev, u16 wcid);
-+int mt7915_get_tx_stat(struct mt7915_phy *phy, u16 wlan_idx);
+@@ -661,6 +661,7 @@ int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
int mt7915_mcu_rdd_background_enable(struct mt7915_phy *phy,
struct cfg80211_chan_def *chandef);
+ int mt7915_mcu_wed_wa_tx_stats(struct mt7915_dev *dev, u16 wcid);
++int mt7915_get_tx_stat(struct mt7915_phy *phy, u16 wlan_idx);
int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set);
+ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3);
+ int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl);
--
2.18.0
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2007-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
similarity index 89%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2007-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
index 3142884..b15dbb5 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3010-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2007-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
@@ -1,7 +1,7 @@
-From 629de725ea7db82076de9c1d23e84b24c64dc64b Mon Sep 17 00:00:00 2001
+From 003f6e852b6d09adae4dc9b86c93abeaaa9463c1 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Mon, 30 Jan 2023 11:36:32 +0800
-Subject: [PATCH 3010/3012] wifi: mt76: update debugfs knob for reset counter
+Subject: [PATCH 2007/2009] wifi: mt76: update debugfs knob for reset counter
and get tx packet error rate
---
@@ -9,7 +9,7 @@
1 file changed, 62 insertions(+)
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 361b50c..f896e53 100644
+index 3eeb921..d17f6a2 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3790,6 +3790,66 @@ mt7915_sw_aci_set(void *data, u64 val)
@@ -23,7 +23,7 @@
+ struct mt76_wcid *wcid;
+
+ /* Clear the firmware counters */
-+ mt7915_mcu_get_tx_stat_wa(dev, dev->wlan_idx);
++ mt7915_mcu_wed_wa_tx_stats(dev, dev->wlan_idx);
+ mt7915_get_tx_stat(phy, dev->wlan_idx);
+
+ rcu_read_lock();
@@ -79,7 +79,7 @@
int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
{
struct mt7915_dev *dev = phy->dev;
-@@ -3881,6 +3941,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
+@@ -3880,6 +3940,8 @@ int mt7915_mtk_init_debugfs(struct mt7915_phy *phy, struct dentry *dir)
mt7915_show_eeprom_mode);
debugfs_create_file("sw_aci", 0600, dir, dev,
&fops_sw_aci);
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2008-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch
similarity index 88%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2008-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch
index d62d58a..bc755ff 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3011-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2008-wifi-mt76-mt7915-add-ctxd-support-for-mt7916.patch
@@ -1,7 +1,7 @@
-From 3ad0a83922b0778c06201d453f42b25e60c32fef Mon Sep 17 00:00:00 2001
+From 48b21966878b9b47925ce65008614d52117e2dba Mon Sep 17 00:00:00 2001
From: "sujuan.chen" <sujuan.chen@mediatek.com>
Date: Thu, 6 Apr 2023 17:50:52 +0800
-Subject: [PATCH 3011/3012] wifi: mt76: mt7915: add ctxd support for mt7916
+Subject: [PATCH 2008/2009] wifi: mt76: mt7915: add ctxd support for mt7916
Signed-off-by: sujuan.chen <sujuan.chen@mediatek.com>
---
@@ -10,7 +10,7 @@
2 files changed, 35 insertions(+)
diff --git a/mt7915/dma.c b/mt7915/dma.c
-index 3784b7b..daa01fd 100644
+index 326c8c8..f71ec55 100644
--- a/mt7915/dma.c
+++ b/mt7915/dma.c
@@ -433,6 +433,26 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -18,7 +18,7 @@
mt76_rmw(dev, MT_WFDMA0_EXT0_CFG, MT_WFDMA0_EXT0_RXWB_KEEP,
MT_WFDMA0_EXT0_RXWB_KEEP);
+ else {
-+ if (mt76_rr(dev, MT_CBTOP_RESV) & 0xff == 2) {
++ if ((mt76_rr(dev, MT_CBTOP_RESV) & 0xff) == 2) {
+ mt76_set(dev, MT_WFDMA0_GLO_CFG, MT_WFDMA0_GLO_CFG_DUMMY_REG);
+ mt76_set(dev, MT_WFDMA0_CTXD_CFG, FIELD_PREP(MT_WFDMA0_CTXD_TIMEOUT, 0xa));
+ } else {
@@ -41,10 +41,10 @@
} else {
mt76_clear(dev, MT_WFDMA_HOST_CONFIG, MT_WFDMA_HOST_CONFIG_WED);
diff --git a/mt7915/regs.h b/mt7915/regs.h
-index 7955d01..2f32a00 100644
+index 44da7b8..bc963ac 100644
--- a/mt7915/regs.h
+++ b/mt7915/regs.h
-@@ -603,6 +603,7 @@ enum offs_rev {
+@@ -606,6 +606,7 @@ enum offs_rev {
#define MT_WFDMA0_GLO_CFG MT_WFDMA0(0x208)
#define MT_WFDMA0_GLO_CFG_TX_DMA_EN BIT(0)
#define MT_WFDMA0_GLO_CFG_RX_DMA_EN BIT(2)
@@ -52,7 +52,7 @@
#define MT_WFDMA0_GLO_CFG_OMIT_TX_INFO BIT(28)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO BIT(27)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 BIT(21)
-@@ -612,6 +613,17 @@ enum offs_rev {
+@@ -615,6 +616,17 @@ enum offs_rev {
#define MT_WFDMA0_EXT0_CFG MT_WFDMA0(0x2b0)
#define MT_WFDMA0_EXT0_RXWB_KEEP BIT(10)
@@ -70,7 +70,7 @@
#define MT_WFDMA0_PRI_DLY_INT_CFG0 MT_WFDMA0(0x2f0)
#define MT_WFDMA0_PRI_DLY_INT_CFG1 MT_WFDMA0(0x2f4)
#define MT_WFDMA0_PRI_DLY_INT_CFG2 MT_WFDMA0(0x2f8)
-@@ -655,6 +667,8 @@ enum offs_rev {
+@@ -658,6 +670,8 @@ enum offs_rev {
#define MT_WFDMA_WED_RING_CONTROL_TX1 GENMASK(12, 8)
#define MT_WFDMA_WED_RING_CONTROL_RX1 GENMASK(20, 16)
@@ -79,7 +79,7 @@
#define MT_WFDMA_EXT_CSR_HIF_MISC MT_WFDMA_EXT_CSR_PHYS(0x44)
#define MT_WFDMA_EXT_CSR_HIF_MISC_BUSY BIT(0)
-@@ -1183,6 +1197,7 @@ enum offs_rev {
+@@ -1186,6 +1200,7 @@ enum offs_rev {
#define MT_HW_BOUND 0x70010020
#define MT_HW_REV 0x70010204
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/2009-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
similarity index 95%
rename from autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
rename to autobuild_mac80211_release/package/kernel/mt76/patches/2009-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
index 93b297d..95d4013 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3012-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/2009-wifi-mt76-connac-wed-add-wed-rx-copy-skb.patch
@@ -1,7 +1,7 @@
-From c06020d2384a5d5cd773bdd8a1975ebe12cb1135 Mon Sep 17 00:00:00 2001
+From 70b5d2b88e048a9e24f4f509df5385d3246c7105 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Thu, 5 Jan 2023 16:43:57 +0800
-Subject: [PATCH 3012/3012] wifi: mt76: connac: wed: add wed rx copy skb
+Subject: [PATCH 2009/2009] wifi: mt76: connac: wed: add wed rx copy skb
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
@@ -158,10 +158,10 @@
static void
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index bbaaa33..4113ab2 100644
+index 4151af0..25893bd 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
-@@ -581,6 +581,7 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
+@@ -576,6 +576,7 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
{
struct mt7915_dev *dev;
@@ -169,7 +169,7 @@
u32 length;
int i;
-@@ -597,13 +598,33 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -592,13 +593,33 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
wed->wlan.rx_size, DMA_FROM_DEVICE);
@@ -204,7 +204,7 @@
}
static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
-@@ -620,35 +641,33 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -615,35 +636,33 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
for (i = 0; i < size; i++) {
struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
dma_addr_t phy_addr;
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3006-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3006-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
deleted file mode 100644
index 1b26803..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3006-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-From 13f5dc38354525add94b7c60ee289fd011ae5dbc Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Wed, 18 Jan 2023 16:37:22 +0800
-Subject: [PATCH 3006/3012] wifi: mt76: mt7915: add wa command to get tx msdu
- count
-
----
- mt76.h | 2 +-
- mt76_connac2_mac.h | 1 +
- mt76_connac_mac.c | 9 +++----
- mt76_connac_mcu.h | 1 +
- mt7915/main.c | 8 ++++---
- mt7915/mcu.c | 58 ++++++++++++++++++++++++++++++++++++++++++----
- mt7915/mcu.h | 11 +++++++++
- mt7915/mt7915.h | 1 +
- 8 files changed, 79 insertions(+), 12 deletions(-)
-
-diff --git a/mt76.h b/mt76.h
-index b178b95..4794b6a 100644
---- a/mt76.h
-+++ b/mt76.h
-@@ -288,7 +288,7 @@ struct mt76_sta_stats {
- u64 tx_mcs[16]; /* mcs idx */
- u64 tx_bytes;
- /* WED TX */
-- u32 tx_packets;
-+ u32 tx_packets; /* unit: MSDU */
- u32 tx_retries;
- u32 tx_failed;
- /* WED RX */
-diff --git a/mt76_connac2_mac.h b/mt76_connac2_mac.h
-index a5ec0f6..e7a4019 100644
---- a/mt76_connac2_mac.h
-+++ b/mt76_connac2_mac.h
-@@ -174,6 +174,7 @@ enum {
-
- #define MT_TXS6_MPDU_FAIL_CNT GENMASK(31, 23)
-
-+#define MT_TXS7_MPDU_RETRY_BYTE GENMASK(22, 0)
- #define MT_TXS7_MPDU_RETRY_CNT GENMASK(31, 23)
-
- /* RXD DW0 */
-diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index ee0fbfc..ee37fe5 100644
---- a/mt76_connac_mac.c
-+++ b/mt76_connac_mac.c
-@@ -523,7 +523,9 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
-
- /* counting non-offloading skbs */
- wcid->stats.tx_bytes += skb->len;
-- wcid->stats.tx_packets++;
-+
-+ if (is_mt7915(dev))
-+ wcid->stats.tx_packets++;
- }
-
- val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + sz_txd) |
-@@ -608,9 +610,8 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
- /* PPDU based reporting */
- if (FIELD_GET(MT_TXS0_TXS_FORMAT, txs) > 1) {
- stats->tx_bytes +=
-- le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE);
-- stats->tx_packets +=
-- le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_CNT);
-+ le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE) -
-+ le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_BYTE);
- stats->tx_failed +=
- le32_get_bits(txs_data[6], MT_TXS6_MPDU_FAIL_CNT);
- stats->tx_retries +=
-diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index fd5aecb..97d732a 100644
---- a/mt76_connac_mcu.h
-+++ b/mt76_connac_mcu.h
-@@ -1000,6 +1000,7 @@ enum {
- MCU_EXT_EVENT_BF_STATUS_READ = 0x35,
- MCU_EXT_EVENT_RDD_REPORT = 0x3a,
- MCU_EXT_EVENT_CSA_NOTIFY = 0x4f,
-+ MCU_EXT_EVENT_WA_TX_STAT = 0x74,
- MCU_EXT_EVENT_BCC_NOTIFY = 0x75,
- MCU_EXT_EVENT_MURU_CTRL = 0x9f,
- MCU_EXT_EVENT_CSI_REPORT = 0xc2,
-diff --git a/mt7915/main.c b/mt7915/main.c
-index 2ba36da..ccdb148 100644
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -1116,9 +1116,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
-
-- sinfo->tx_packets = msta->wcid.stats.tx_packets;
-- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
--
- sinfo->tx_failed = msta->wcid.stats.tx_failed;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
-
-@@ -1134,6 +1131,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- }
- }
-
-+ if (!mt7915_mcu_get_tx_stat_wa(phy->dev, msta->wcid.idx)) {
-+ sinfo->tx_packets = msta->wcid.stats.tx_packets;
-+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
-+ }
-+
- sinfo->ack_signal = (s8)msta->ack_signal;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
-
-diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 3b0ba5c..c27b8f9 100644
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -172,7 +172,9 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
- }
-
- rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
-- if (seq != rxd->seq)
-+
-+ if (seq != rxd->seq &&
-+ !(rxd->eid == MCU_CMD_EXT_CID && rxd->ext_eid == MCU_EXT_EVENT_WA_TX_STAT))
- return -EAGAIN;
-
- if (cmd == MCU_CMD(PATCH_SEM_CONTROL)) {
-@@ -424,13 +426,14 @@ void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb)
- struct mt76_connac2_mcu_rxd *rxd;
-
- rxd = (struct mt76_connac2_mcu_rxd *)skb->data;
-- if (rxd->ext_eid == MCU_EXT_EVENT_THERMAL_PROTECT ||
-+ if ((rxd->ext_eid == MCU_EXT_EVENT_THERMAL_PROTECT ||
- rxd->ext_eid == MCU_EXT_EVENT_FW_LOG_2_HOST ||
- rxd->ext_eid == MCU_EXT_EVENT_ASSERT_DUMP ||
- rxd->ext_eid == MCU_EXT_EVENT_PS_SYNC ||
- rxd->ext_eid == MCU_EXT_EVENT_BCC_NOTIFY ||
- rxd->ext_eid == MCU_EXT_EVENT_BF_STATUS_READ ||
-- !rxd->seq)
-+ !rxd->seq) &&
-+ !(rxd->eid == MCU_CMD_EXT_CID && rxd->ext_eid == MCU_EXT_EVENT_WA_TX_STAT))
- mt7915_mcu_rx_unsolicited_event(dev, skb);
- else
- mt76_mcu_rx_event(&dev->mt76, skb);
-@@ -4139,7 +4142,7 @@ int mt7915_mcu_get_tx_rate_v2(struct mt7915_phy *phy, u16 wcidx)
- };
-
- ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_QUERY(GET_TX_STAT),
-- &req, sizeof(req), true, &skb);
-+ &req, sizeof(req), true, &skb);
- if (ret)
- return ret;
-
-@@ -4174,6 +4177,53 @@ int mt7915_mcu_get_tx_rate(struct mt7915_phy *phy, u16 wcidx)
- return mt7915_mcu_get_tx_rate_v2(phy, wcidx);
- }
-
-+int mt7915_mcu_get_tx_stat_wa(struct mt7915_dev *dev, u16 wlan_idx)
-+{
-+ struct {
-+ __le32 cmd;
-+ __le32 num;
-+ __le32 __rsv;
-+ __le16 wlan_idx;
-+ } req = {
-+ .cmd = cpu_to_le32(MCU_WA_QUERY_GET_TX_STAT),
-+ .num = cpu_to_le32(1),
-+ .wlan_idx = cpu_to_le16(wlan_idx),
-+ };
-+ struct mt7915_mcu_wa_tx_stat *res;
-+ struct mt76_wcid *wcid;
-+ struct sk_buff *skb;
-+ int ret;
-+
-+ ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_WA_PARAM_CMD(QUERY),
-+ &req, sizeof(req), true, &skb);
-+ if (ret)
-+ return ret;
-+
-+ if (!is_mt7915(&dev->mt76))
-+ skb_pull(skb, 4);
-+
-+ res = (struct mt7915_mcu_wa_tx_stat *)skb->data;
-+
-+ if (le16_to_cpu(res->wlan_idx) != wlan_idx) {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-+
-+ rcu_read_lock();
-+
-+ wcid = rcu_dereference(dev->mt76.wcid[wlan_idx]);
-+ if (wcid)
-+ wcid->stats.tx_packets += le32_to_cpu(res->tx_msdu_cnt);
-+ else
-+ ret = -EINVAL;
-+
-+ rcu_read_unlock();
-+out:
-+ dev_kfree_skb(skb);
-+
-+ return ret;
-+}
-+
- int mt7915_mcu_update_bss_color(struct mt7915_dev *dev, struct ieee80211_vif *vif,
- struct cfg80211_he_bss_color *he_bss_color)
- {
-diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index c533a7d..eca028b 100644
---- a/mt7915/mcu.h
-+++ b/mt7915/mcu.h
-@@ -347,6 +347,17 @@ enum {
- MCU_WA_PARAM_RED_SETTING = 0x40,
- };
-
-+enum {
-+ MCU_WA_QUERY_GET_TX_STAT = 0x15,
-+};
-+
-+struct mt7915_mcu_wa_tx_stat {
-+ __le16 wlan_idx;
-+ u8 __rsv2[2];
-+ __le32 tx_bytes;
-+ __le32 tx_msdu_cnt;
-+};
-+
- enum mcu_mmps_mode {
- MCU_MMPS_STATIC,
- MCU_MMPS_DYNAMIC,
-diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 646f3e8..ef9b0e1 100644
---- a/mt7915/mt7915.h
-+++ b/mt7915/mt7915.h
-@@ -714,6 +714,7 @@ int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
- int mt7915_mcu_get_tx_rate(struct mt7915_phy *phy, u16 wcidx);
- int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta, struct rate_info *rate);
-+int mt7915_mcu_get_tx_stat_wa(struct mt7915_dev *dev, u16 wcid);
- int mt7915_mcu_rdd_background_enable(struct mt7915_phy *phy,
- struct cfg80211_chan_def *chandef);
- int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set);
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
deleted file mode 100644
index 63744a8..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3008-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 475282f29cf4364626cf6146d78da23640ea7dfd Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Wed, 18 Jan 2023 11:50:38 +0800
-Subject: [PATCH 3008/3012] wifi: mt76: mt7915: enable PPDU-TxS to host when
- wed enable
-
-Calculate tx bytes and tx retries from PPDU-TxS
----
- mt76_connac_mac.c | 2 --
- mt7915/init.c | 6 ++++++
- mt7915/mmio.c | 21 ---------------------
- tx.c | 21 +++++++++++++++++++++
- 4 files changed, 27 insertions(+), 23 deletions(-)
-
-diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index 6cd8c27..8b77e93 100644
---- a/mt76_connac_mac.c
-+++ b/mt76_connac_mac.c
-@@ -522,8 +522,6 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
- mt76_connac_lmac_mapping(skb_get_queue_mapping(skb));
-
- /* counting non-offloading skbs */
-- wcid->stats.tx_bytes += skb->len;
--
- if (is_mt7915(dev))
- wcid->stats.tx_packets++;
- }
-diff --git a/mt7915/init.c b/mt7915/init.c
-index 8684d7a..9036f44 100644
---- a/mt7915/init.c
-+++ b/mt7915/init.c
-@@ -507,6 +507,12 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
- set = FIELD_PREP(MT_WTBLOFF_TOP_RSCR_RCPI_MODE, 0) |
- FIELD_PREP(MT_WTBLOFF_TOP_RSCR_RCPI_PARAM, 0x3);
- mt76_rmw(dev, MT_WTBLOFF_TOP_RSCR(band), mask, set);
-+
-+ /* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than
-+ * MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set.
-+ */
-+ if (mtk_wed_device_active(&dev->mt76.mmio.wed))
-+ mt76_set(dev, MT_AGG_ACR4(band), MT_AGG_ACR_PPDU_TXS2H);
- }
-
- static void
-diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 1c416bc..bbaaa33 100644
---- a/mt7915/mmio.c
-+++ b/mt7915/mmio.c
-@@ -551,7 +551,6 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
- static int mt7915_mmio_wed_offload_enable(struct mtk_wed_device *wed)
- {
- struct mt7915_dev *dev;
-- struct mt7915_phy *phy;
- int ret;
-
- dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
-@@ -565,38 +564,18 @@ static int mt7915_mmio_wed_offload_enable(struct mtk_wed_device *wed)
- if (!ret)
- return -EAGAIN;
-
-- phy = &dev->phy;
-- mt76_set(dev, MT_AGG_ACR4(phy->mt76->band_idx), MT_AGG_ACR_PPDU_TXS2H);
--
-- phy = dev->mt76.phys[MT_BAND1] ? dev->mt76.phys[MT_BAND1]->priv : NULL;
-- if (phy)
-- mt76_set(dev, MT_AGG_ACR4(phy->mt76->band_idx),
-- MT_AGG_ACR_PPDU_TXS2H);
--
- return 0;
- }
-
- static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
- {
- struct mt7915_dev *dev;
-- struct mt7915_phy *phy;
-
- dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
-
- spin_lock_bh(&dev->mt76.token_lock);
- dev->mt76.token_size = wed->wlan.token_start;//MT7915_TOKEN_SIZE
- spin_unlock_bh(&dev->mt76.token_lock);
--
-- /* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than
-- * MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set.
-- */
-- phy = &dev->phy;
-- mt76_clear(dev, MT_AGG_ACR4(phy->mt76->band_idx), MT_AGG_ACR_PPDU_TXS2H);
--
-- phy = dev->mt76.phys[MT_BAND1] ? dev->mt76.phys[MT_BAND1]->priv : NULL;
-- if (phy)
-- mt76_clear(dev, MT_AGG_ACR4(phy->mt76->band_idx),
-- MT_AGG_ACR_PPDU_TXS2H);
- }
-
- static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
-diff --git a/tx.c b/tx.c
-index a87e361..335ddb5 100644
---- a/tx.c
-+++ b/tx.c
-@@ -122,6 +122,7 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
- struct sk_buff *skb)
- {
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
- struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
- int pid;
-
-@@ -133,6 +134,11 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
- if (info->flags & IEEE80211_TX_CTL_NO_ACK)
- return MT_PACKET_ID_NO_ACK;
-
-+ if (mtk_wed_device_active(&dev->mmio.wed) &&
-+ ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) ||
-+ ieee80211_is_data(hdr->frame_control)))
-+ return MT_PACKET_ID_WED;
-+
- if (!(info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS |
- IEEE80211_TX_CTL_RATE_CTRL_PROBE)))
- return MT_PACKET_ID_NO_SKB;
-@@ -262,8 +268,23 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
- #endif
-
- if (cb->pktid < MT_PACKET_ID_FIRST) {
-+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-+ struct ieee80211_rate_status rs = {};
-+
- hw = mt76_tx_status_get_hw(dev, skb);
- status.sta = wcid_to_sta(wcid);
-+ if (mtk_wed_device_active(&dev->mmio.wed) &&
-+ (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
-+ info->status.rates[0].idx = -1;
-+
-+ if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
-+ rs.rate_idx = wcid->rate;
-+ status.rates = &rs;
-+ status.n_rates = 1;
-+ } else {
-+ status.n_rates = 0;
-+ }
-+ }
- spin_lock_bh(&dev->rx_lock);
- ieee80211_tx_status_ext(hw, &status);
- spin_unlock_bh(&dev->rx_lock);
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
deleted file mode 100644
index e4e0343..0000000
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/3009-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 7fad725b238b5b94403b9c4457aa0c3c0acdd576 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Tue, 17 Jan 2023 21:15:00 +0800
-Subject: [PATCH 3009/3012] wifi: mt76: mt7915: get tx retries from tx free
- done event for sw path
-
----
- mt76_connac2_mac.h | 2 ++
- mt7915/mac.c | 14 +++++++++++---
- mt7915/mac.h | 3 ++-
- mt7915/main.c | 6 +++---
- 4 files changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/mt76_connac2_mac.h b/mt76_connac2_mac.h
-index e7a4019..e6170ea 100644
---- a/mt76_connac2_mac.h
-+++ b/mt76_connac2_mac.h
-@@ -38,6 +38,8 @@ enum {
- /* 0: success, others: dropped */
- #define MT_TX_FREE_STATUS GENMASK(14, 13)
- #define MT_TX_FREE_MSDU_ID GENMASK(30, 16)
-+#define MT_TX_FREE_TX_COUNT GENMASK(12, 0)
-+#define MT_TX_FREE_TX_COUNT_V3 GENMASK(27, 24)
- #define MT_TX_FREE_PAIR BIT(31)
- /* will support this field in further revision */
- #define MT_TX_FREE_RATE GENMASK(13, 0)
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 26b5e15..0994ce1 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -981,6 +981,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
- struct mt76_dev *mdev = &dev->mt76;
- struct mt76_txwi_cache *txwi;
- struct ieee80211_sta *sta = NULL;
-+ struct mt76_wcid *wcid = NULL;
- LIST_HEAD(free_list);
- void *end = data + len;
- bool v3, wake = false;
-@@ -995,7 +996,7 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
- v3 = (FIELD_GET(MT_TX_FREE_VER, txd) == 0x4);
-
- for (cur_info = tx_info; count < total; cur_info++) {
-- u32 msdu, info;
-+ u32 msdu, info, retries = 0;
- u8 i;
-
- if (WARN_ON_ONCE((void *)cur_info >= end))
-@@ -1008,7 +1009,6 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
- info = le32_to_cpu(*cur_info);
- if (info & MT_TX_FREE_PAIR) {
- struct mt7915_sta *msta;
-- struct mt76_wcid *wcid = NULL;
- struct mt7915_phy *phy;
- u16 idx;
-
-@@ -1033,7 +1033,15 @@ mt7915_mac_tx_free(struct mt7915_dev *dev, void *data, int len)
- continue;
- }
-
-- if (v3 && (info & MT_TX_FREE_MPDU_HEADER))
-+ if (v3 && (info & MT_TX_FREE_MPDU_HEADER_V3))
-+ retries = u32_get_bits(info, MT_TX_FREE_TX_COUNT_V3) - 1;
-+ else if (!v3 && (info & MT_TX_FREE_MPDU_HEADER))
-+ retries = u32_get_bits(info, MT_TX_FREE_TX_COUNT) - 1;
-+
-+ if (!mtk_wed_device_active(&mdev->mmio.wed) && wcid)
-+ wcid->stats.tx_retries += retries;
-+
-+ if (v3 && (info & MT_TX_FREE_MPDU_HEADER_V3))
- continue;
-
- for (i = 0; i < 1 + v3; i++) {
-diff --git a/mt7915/mac.h b/mt7915/mac.h
-index ce94f87..859298d 100644
---- a/mt7915/mac.h
-+++ b/mt7915/mac.h
-@@ -9,7 +9,8 @@
- #define MT_TX_FREE_VER GENMASK(18, 16)
- #define MT_TX_FREE_MSDU_CNT_V0 GENMASK(6, 0)
- /* 0: success, others: dropped */
--#define MT_TX_FREE_MPDU_HEADER BIT(30)
-+#define MT_TX_FREE_MPDU_HEADER BIT(15)
-+#define MT_TX_FREE_MPDU_HEADER_V3 BIT(30)
- #define MT_TX_FREE_MSDU_ID_V3 GENMASK(14, 0)
-
- #define MT_TXS5_F0_FINAL_MPDU BIT(31)
-diff --git a/mt7915/main.c b/mt7915/main.c
-index c377ef2..f836aa8 100644
---- a/mt7915/main.c
-+++ b/mt7915/main.c
-@@ -1116,9 +1116,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- sinfo->tx_bytes = msta->wcid.stats.tx_bytes;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES64);
-
-- sinfo->tx_retries = msta->wcid.stats.tx_retries;
-- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
--
- if (mtk_wed_get_rx_capa(&phy->dev->mt76.mmio.wed)) {
- sinfo->rx_bytes = msta->wcid.stats.rx_bytes;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_BYTES64);
-@@ -1128,6 +1125,9 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
- }
- }
-
-+ sinfo->tx_retries = msta->wcid.stats.tx_retries;
-+ sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
-+
- if (!mt7915_mcu_get_tx_stat_wa(phy->dev, msta->wcid.idx)) {
- sinfo->tx_packets = msta->wcid.stats.tx_packets;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
---
-2.18.0
-
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
index a22d9b3..2cf9c0d 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/9999-mt76-revert-for-backports-5.15-wireless-stack.patch
@@ -1,4 +1,4 @@
-From db40f94c0f681cb7f36efcee47997a9755c63325 Mon Sep 17 00:00:00 2001
+From f433ab08414bf574d03a362ef997918cd98e696e Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Wed, 5 Apr 2023 08:29:19 +0800
Subject: [PATCH] mt76: revert for backports-5.15 wireless stack
@@ -10,18 +10,19 @@
mt7615/dma.c | 4 +-
mt7615/main.c | 6 +-
mt7615/mcu.c | 8 +-
+ mt76_connac_mac.c | 2 +-
mt76_connac_mcu.c | 108 +++++++++---------
mt76x02_mac.c | 6 +-
mt7915/debugfs.c | 4 +-
mt7915/dma.c | 4 +-
mt7915/init.c | 3 +-
- mt7915/mac.c | 2 +-
- mt7915/main.c | 11 +-
+ mt7915/main.c | 17 ++-
mt7915/mcu.c | 273 ++++++++++++++++++++++++++++++----------------
+ mt7915/mmio.c | 2 +-
mt7915/mt7915.h | 14 +++
mt7915/testmode.c | 8 +-
- tx.c | 26 ++---
- 16 files changed, 282 insertions(+), 201 deletions(-)
+ tx.c | 22 ++--
+ 17 files changed, 286 insertions(+), 201 deletions(-)
diff --git a/dma.c b/dma.c
index 4daa64d..220e684 100644
@@ -37,10 +38,10 @@
napi_enable(&dev->napi[i]);
}
diff --git a/mac80211.c b/mac80211.c
-index 4a0f333..b3058e0 100644
+index 52c552b..b5cee8c 100644
--- a/mac80211.c
+++ b/mac80211.c
-@@ -1519,7 +1519,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power);
+@@ -1521,7 +1521,7 @@ EXPORT_SYMBOL_GPL(mt76_get_sar_power);
static void
__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
@@ -49,7 +50,7 @@
ieee80211_csa_finish(vif);
}
-@@ -1541,7 +1541,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
+@@ -1543,7 +1543,7 @@ __mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
struct mt76_dev *dev = priv;
@@ -74,7 +75,7 @@
mt76_poll(dev, MT_WPDMA_GLO_CFG,
diff --git a/mt7615/main.c b/mt7615/main.c
-index dadb13f..2c61c36 100644
+index 200b175..53f30a0 100644
--- a/mt7615/main.c
+++ b/mt7615/main.c
@@ -473,7 +473,7 @@ static int mt7615_config(struct ieee80211_hw *hw, u32 changed)
@@ -86,7 +87,7 @@
const struct ieee80211_tx_queue_params *params)
{
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
-@@ -555,7 +555,7 @@ static void mt7615_configure_filter(struct ieee80211_hw *hw,
+@@ -581,7 +581,7 @@ mt7615_update_mu_group(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info,
@@ -95,15 +96,15 @@
{
struct mt7615_dev *dev = mt7615_hw_dev(hw);
struct mt7615_phy *phy = mt7615_hw_phy(hw);
-@@ -598,7 +598,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
+@@ -624,7 +624,7 @@ static void mt7615_bss_info_changed(struct ieee80211_hw *hw,
}
if (changed & BSS_CHANGED_ASSOC)
- mt7615_mac_set_beacon_filter(phy, vif, vif->cfg.assoc);
+ mt7615_mac_set_beacon_filter(phy, vif, info->assoc);
- mt7615_mutex_release(dev);
- }
+ if (changed & BSS_CHANGED_MU_GROUPS)
+ mt7615_update_mu_group(hw, vif, info);
diff --git a/mt7615/mcu.c b/mt7615/mcu.c
index 86061e9..a79308b 100644
--- a/mt7615/mcu.c
@@ -144,8 +145,21 @@
.dtim_period = vif->bss_conf.dtim_period,
.bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int),
};
+diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
+index 5edf912..44c5221 100644
+--- a/mt76_connac_mac.c
++++ b/mt76_connac_mac.c
+@@ -1118,7 +1118,7 @@ void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
+ u32 val;
+
+ if (!sta ||
+- !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
++ !(sta->ht_cap.ht_supported || sta->he_cap.has_he))
+ return;
+
+ tid = le32_get_bits(txwi[1], MT_TXD1_TID);
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
-index d228312..665de18 100644
+index e6b468c..220c133 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -197,7 +197,7 @@ int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif)
@@ -435,7 +449,7 @@
flags |= MT_WTBL_W5_SHORT_GI_160;
}
raw = (struct wtbl_raw *)tlv;
-@@ -1294,9 +1294,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
+@@ -1297,9 +1297,9 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
return 0x38;
if (sta) {
@@ -448,7 +462,7 @@
} else {
struct ieee80211_supported_band *sband;
-@@ -1616,7 +1616,6 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
+@@ -1619,7 +1619,6 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
for (i = 0; i < sreq->n_ssids; i++) {
if (!sreq->ssids[i].ssid_len)
continue;
@@ -456,7 +470,7 @@
req->ssids[i].ssid_len = cpu_to_le32(sreq->ssids[i].ssid_len);
memcpy(req->ssids[i].ssid, sreq->ssids[i].ssid,
sreq->ssids[i].ssid_len);
-@@ -1756,7 +1755,6 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
+@@ -1759,7 +1758,6 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
memcpy(req->ssids[i].ssid, ssid->ssid, ssid->ssid_len);
req->ssids[i].ssid_len = cpu_to_le32(ssid->ssid_len);
}
@@ -464,7 +478,7 @@
req->match_num = sreq->n_match_sets;
for (i = 0; i < req->match_num; i++) {
match = &sreq->match_sets[i];
-@@ -2243,10 +2241,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
+@@ -2246,10 +2244,8 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
struct mt76_vif *vif,
struct ieee80211_bss_conf *info)
{
@@ -476,7 +490,7 @@
IEEE80211_BSS_ARP_ADDR_LIST_LEN);
struct {
struct {
-@@ -2274,7 +2270,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
+@@ -2277,7 +2273,7 @@ int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
skb_put_data(skb, &req_hdr, sizeof(req_hdr));
for (i = 0; i < len; i++)
@@ -511,10 +525,10 @@
if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
ba_size = 0;
diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index e44ac9a..e841d1e 100644
+index 73e132b..5345ff7 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
-@@ -1911,8 +1911,8 @@ static ssize_t mt7915_sta_fixed_rate_set(struct file *file,
+@@ -1915,8 +1915,8 @@ static ssize_t mt7915_sta_fixed_rate_set(struct file *file,
phy.ldpc = (phy.bw || phy.ldpc) * GENMASK(2, 0);
for (i = 0; i <= phy.bw; i++) {
@@ -526,7 +540,7 @@
field = RATE_PARAM_FIXED;
diff --git a/mt7915/dma.c b/mt7915/dma.c
-index daa01fd..5b8426a 100644
+index f71ec55..b4e231b 100644
--- a/mt7915/dma.c
+++ b/mt7915/dma.c
@@ -590,8 +590,8 @@ int mt7915_dma_init(struct mt7915_dev *dev, struct mt7915_phy *phy2)
@@ -541,10 +555,10 @@
mt7915_dma_enable(dev, false);
diff --git a/mt7915/init.c b/mt7915/init.c
-index 9036f44..f5d5adb 100644
+index cf576ed..ad5f788 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -1145,8 +1145,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+@@ -1140,8 +1140,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
mt76_connac_gen_ppe_thresh(he_cap->ppe_thres, nss);
} else {
he_cap_elem->phy_cap_info[9] |=
@@ -554,21 +568,8 @@
}
if (band == NL80211_BAND_6GHZ) {
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 0994ce1..e9156af 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -878,7 +878,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
- u16 fc, tid;
- u32 val;
-
-- if (!sta || !(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he))
-+ if (!sta || !(sta->ht_cap.ht_supported || sta->he_cap.has_he))
- return;
-
- tid = le32_get_bits(txwi[1], MT_TXD1_TID);
diff --git a/mt7915/main.c b/mt7915/main.c
-index f836aa8..653dffe 100644
+index 5db7e6a..d90bdaf 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -273,6 +273,7 @@ int mt7915_init_vif(struct mt7915_phy *phy, struct ieee80211_vif *vif, bool bf_e
@@ -606,10 +607,30 @@
if (changed & BSS_CHANGED_ERP_CTS_PROT)
mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot);
-@@ -1240,10 +1241,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw,
+@@ -680,8 +681,7 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
+ }
+
+ static int
+-mt7915_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+- struct ieee80211_bss_conf *link_conf)
++mt7915_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
struct mt7915_phy *phy = mt7915_hw_phy(hw);
struct mt7915_dev *dev = mt7915_hw_dev(hw);
+@@ -700,8 +700,7 @@ out:
+ }
+
+ static void
+-mt7915_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+- struct ieee80211_bss_conf *link_conf)
++mt7915_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+ {
+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
+
+@@ -1265,10 +1264,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw,
+ {
+ struct mt7915_phy *phy = mt7915_hw_phy(hw);
+ struct mt7915_dev *dev = mt7915_hw_dev(hw);
- s16 txpower = sta->deflink.txpwr.power;
+ s16 txpower = sta->txpwr.power;
int ret;
@@ -620,7 +641,7 @@
mutex_lock(&dev->mt76.mutex);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 2c6dddc..94c3215 100644
+index 26d2964..cf80d77 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -67,7 +67,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
@@ -692,7 +713,7 @@
return;
ieee80211_color_change_finish(vif);
-@@ -750,13 +750,14 @@ static void
+@@ -751,13 +751,14 @@ static void
mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
struct ieee80211_vif *vif)
{
@@ -709,7 +730,7 @@
return;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he));
-@@ -783,7 +784,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+@@ -784,7 +785,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G))
cap |= STA_REC_HE_CAP_BW20_RU242_SUPPORT;
@@ -718,7 +739,7 @@
(elem->phy_cap_info[1] &
IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD))
cap |= STA_REC_HE_CAP_LDPC;
-@@ -842,8 +843,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+@@ -843,8 +844,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
he->he_cap = cpu_to_le32(cap);
@@ -729,7 +750,7 @@
case IEEE80211_STA_RX_BW_160:
if (elem->phy_cap_info[0] &
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
-@@ -892,8 +893,9 @@ static void
+@@ -893,8 +894,9 @@ static void
mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
struct ieee80211_sta *sta, struct ieee80211_vif *vif)
{
@@ -740,7 +761,7 @@
struct sta_rec_muru *muru;
struct tlv *tlv;
-@@ -905,9 +907,9 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -906,9 +908,9 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
muru = (struct sta_rec_muru *)tlv;
@@ -753,7 +774,7 @@
!!(phy->muru_onoff & MUMIMO_DL);
if (!is_mt7915(&dev->mt76))
muru->cfg.mimo_ul_en = true;
-@@ -917,11 +919,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -918,11 +920,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
muru->cfg.ofdma_dl_en = !!(phy->muru_onoff & OFDMA_DL);
muru->cfg.ofdma_ul_en = !!(phy->muru_onoff & OFDMA_UL);
@@ -768,7 +789,7 @@
return;
muru->mimo_dl.partial_bw_dl_mimo =
-@@ -955,13 +957,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+@@ -956,13 +958,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
struct sta_rec_ht *ht;
struct tlv *tlv;
@@ -784,7 +805,7 @@
}
static void
-@@ -970,15 +972,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+@@ -971,15 +973,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
struct sta_rec_vht *vht;
struct tlv *tlv;
@@ -804,7 +825,7 @@
}
static void
-@@ -993,7 +995,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -994,7 +996,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
vif->type != NL80211_IFTYPE_AP)
return;
@@ -813,7 +834,7 @@
return;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
-@@ -1002,7 +1004,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1003,7 +1005,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
amsdu->amsdu_en = true;
msta->wcid.amsdu = true;
@@ -822,7 +843,7 @@
case IEEE80211_MAX_MPDU_LEN_VHT_11454:
if (!is_mt7915(&dev->mt76)) {
amsdu->max_mpdu_size =
-@@ -1045,8 +1047,8 @@ mt7915_mcu_sta_wtbl_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1046,8 +1048,8 @@ mt7915_mcu_sta_wtbl_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
mt76_connac_mcu_wtbl_hdr_trans_tlv(skb, vif, wcid, tlv, wtbl_hdr);
if (sta)
mt76_connac_mcu_wtbl_ht_tlv(&dev->mt76, skb, sta, tlv,
@@ -833,7 +854,7 @@
return 0;
}
-@@ -1055,6 +1057,7 @@ static inline bool
+@@ -1056,6 +1058,7 @@ static inline bool
mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, bool bfee)
{
@@ -841,7 +862,7 @@
int sts = hweight16(phy->mt76->chainmask);
if (vif->type != NL80211_IFTYPE_STATION &&
-@@ -1064,25 +1067,25 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -1065,25 +1068,25 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
if (!bfee && sts < 2)
return false;
@@ -875,7 +896,7 @@
(cap & IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE);
}
-@@ -1102,7 +1105,7 @@ static void
+@@ -1103,7 +1106,7 @@ static void
mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
struct sta_rec_bf *bf)
{
@@ -884,7 +905,7 @@
u8 n = 0;
bf->tx_mode = MT_PHY_TYPE_HT;
-@@ -1127,7 +1130,7 @@ static void
+@@ -1128,7 +1131,7 @@ static void
mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
struct sta_rec_bf *bf, bool explicit)
{
@@ -893,7 +914,7 @@
struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap;
u16 mcs_map = le16_to_cpu(pc->vht_mcs.rx_mcs_map);
u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map);
-@@ -1148,14 +1151,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
+@@ -1149,14 +1152,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
bf->ncol = min_t(u8, nss_mcs, bf->nrow);
bf->ibf_ncol = bf->ncol;
@@ -910,7 +931,7 @@
bf->ibf_nrow = 1;
}
}
-@@ -1164,7 +1167,7 @@ static void
+@@ -1165,7 +1168,7 @@ static void
mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
struct mt7915_phy *phy, struct sta_rec_bf *bf)
{
@@ -919,7 +940,7 @@
struct ieee80211_he_cap_elem *pe = &pc->he_cap_elem;
const struct ieee80211_sta_he_cap *vc =
mt76_connac_get_he_phy_cap(phy->mt76, vif);
-@@ -1189,7 +1192,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
+@@ -1190,7 +1193,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
bf->ncol = min_t(u8, nss_mcs, bf->nrow);
bf->ibf_ncol = bf->ncol;
@@ -928,7 +949,7 @@
return;
/* go over for 160MHz and 80p80 */
-@@ -1237,7 +1240,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1238,7 +1241,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
};
bool ebf;
@@ -937,7 +958,7 @@
return;
ebf = mt7915_is_ebf_supported(phy, vif, sta, false);
-@@ -1251,21 +1254,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1252,21 +1255,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
* vht: support eBF and iBF
* ht: iBF only, since mac80211 lacks of eBF support
*/
@@ -965,7 +986,7 @@
bf->ibf_timeout = 0x48;
else
bf->ibf_timeout = 0x18;
-@@ -1275,7 +1278,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1276,7 +1279,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
else
bf->mem_20m = matrix[bf->nrow][bf->ncol];
@@ -974,7 +995,7 @@
case IEEE80211_STA_RX_BW_160:
case IEEE80211_STA_RX_BW_80:
bf->mem_total = bf->mem_20m * 2;
-@@ -1300,7 +1303,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1301,7 +1304,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
struct tlv *tlv;
u8 nrow = 0;
@@ -983,7 +1004,7 @@
return;
if (!mt7915_is_ebf_supported(phy, vif, sta, true))
-@@ -1309,13 +1312,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1310,13 +1313,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_BFEE, sizeof(*bfee));
bfee = (struct sta_rec_bfee *)tlv;
@@ -1001,7 +1022,7 @@
nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
pc->cap);
-@@ -1371,7 +1374,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -1372,7 +1375,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
ra->phy = *phy;
break;
case RATE_PARAM_MMPS_UPDATE:
@@ -1010,7 +1031,7 @@
break;
case RATE_PARAM_SPE_UPDATE:
ra->spe_idx = *(u8 *)data;
-@@ -1446,7 +1449,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1447,7 +1450,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
do { \
u8 i, gi = mask->control[band]._gi; \
gi = (_he) ? gi : gi == NL80211_TXRATE_FORCE_SGI; \
@@ -1019,7 +1040,7 @@
phy.sgi |= gi << (i << (_he)); \
phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\
} \
-@@ -1460,11 +1463,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1461,11 +1464,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
} \
} while (0)
@@ -1034,7 +1055,7 @@
__sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0);
} else {
nrates = hweight32(mask->control[band].legacy);
-@@ -1498,7 +1501,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1499,7 +1502,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
* actual txrate hardware sends out.
*/
addr = mt7915_mac_wtbl_lmac_addr(dev, msta->wcid.idx, 7);
@@ -1043,7 +1064,7 @@
mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi);
else
mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi);
-@@ -1531,7 +1534,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1532,7 +1535,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
enum nl80211_band band = chandef->chan->band;
struct sta_rec_ra *ra;
struct tlv *tlv;
@@ -1052,7 +1073,7 @@
u32 cap = sta->wme ? STA_CAP_WMM : 0;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra));
-@@ -1541,9 +1544,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1542,9 +1545,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
ra->auto_rate = true;
ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta);
ra->channel = chandef->chan->hw_value;
@@ -1065,7 +1086,7 @@
if (supp_rate) {
supp_rate &= mask->control[band].legacy;
-@@ -1563,22 +1566,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1564,22 +1567,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
}
}
@@ -1097,7 +1118,7 @@
cap |= STA_CAP_LDPC;
mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs,
-@@ -1586,37 +1589,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1587,37 +1590,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs;
}
@@ -1146,7 +1167,7 @@
IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
}
-@@ -1825,7 +1828,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
+@@ -1826,7 +1829,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
if (!offs->cntdwn_counter_offs[0])
return;
@@ -1155,7 +1176,7 @@
tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info),
&bcn->sub_ntlv, &bcn->len);
info = (struct bss_info_bcn_cntdwn *)tlv;
-@@ -1910,9 +1913,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1911,9 +1914,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
if (offs->cntdwn_counter_offs[0]) {
u16 offset = offs->cntdwn_counter_offs[0];
@@ -1167,7 +1188,7 @@
cont->bcc_ofs = cpu_to_le16(offset - 3);
}
-@@ -1922,6 +1925,85 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1923,6 +1926,85 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
memcpy(buf + MT_TXD_SIZE, skb->data, skb->len);
}
@@ -1253,7 +1274,7 @@
int
mt7915_mcu_add_inband_discov(struct mt7915_dev *dev, struct ieee80211_vif *vif,
u32 changed)
-@@ -2033,7 +2115,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -2034,7 +2116,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (!en)
goto out;
@@ -1262,7 +1283,7 @@
if (!skb)
return -EINVAL;
-@@ -2046,6 +2128,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -2047,6 +2129,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
info = IEEE80211_SKB_CB(skb);
info->hw_queue = FIELD_PREP(MT_TX_HW_QUEUE_PHY, ext_phy);
@@ -1270,7 +1291,7 @@
mt7915_mcu_beacon_cntdwn(vif, rskb, skb, bcn, &offs);
mt7915_mcu_beacon_mbss(rskb, skb, vif, bcn, &offs);
mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);
-@@ -3283,17 +3366,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3320,17 +3403,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
if (txpower) {
u32 offs, len, i;
@@ -1291,11 +1312,24 @@
offs += len + sku_len[SKU_HE_RU26] * 3;
len = sku_len[SKU_HE_RU242] * 4;
}
+diff --git a/mt7915/mmio.c b/mt7915/mmio.c
+index 25893bd..2d849d5 100644
+--- a/mt7915/mmio.c
++++ b/mt7915/mmio.c
+@@ -651,7 +651,7 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+ phy_addr = dma_map_single(dev->mt76.dma_dev, ptr,
+ wed->wlan.rx_size,
+ DMA_TO_DEVICE);
+-
++
+ if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
+ skb_free_frag(ptr);
+ mt76_put_rxwi(&dev->mt76, r);
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 52cf748..fcd10b3 100644
+index 85c5c95..04fc539 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -212,9 +212,23 @@ struct mt7915_sta {
+@@ -217,9 +217,23 @@ struct mt7915_sta {
struct mt7915_vow_sta_cfg vow_sta_cfg;
};
@@ -1320,10 +1354,10 @@
struct mt7915_phy *phy;
diff --git a/mt7915/testmode.c b/mt7915/testmode.c
-index b99bed5..8b9813b 100644
+index fafe909..b10dec5 100644
--- a/mt7915/testmode.c
+++ b/mt7915/testmode.c
-@@ -397,12 +397,12 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
+@@ -416,12 +416,12 @@ mt7915_tm_entry_add(struct mt7915_phy *phy, u8 aid)
memcpy(sta->addr, td->addr[0], ETH_ALEN);
if (td->tx_rate_mode >= MT76_TM_TX_MODE_HT)
@@ -1341,7 +1375,7 @@
sta->wme = 1;
diff --git a/tx.c b/tx.c
-index 335ddb5..445469e 100644
+index 2594a62..26fa665 100644
--- a/tx.c
+++ b/tx.c
@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
@@ -1368,7 +1402,7 @@
}
hw = mt76_tx_status_get_hw(dev, skb);
-@@ -238,6 +233,7 @@ mt76_tx_check_non_aql(struct mt76_dev *dev, struct mt76_wcid *wcid,
+@@ -239,6 +234,7 @@ mt76_tx_check_non_aql(struct mt76_dev *dev, struct mt76_wcid *wcid,
void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *skb,
struct list_head *free_list)
{
@@ -1376,31 +1410,26 @@
struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb);
struct ieee80211_tx_status status = {
.skb = skb,
-@@ -268,21 +264,13 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
+@@ -269,15 +265,13 @@ void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid_idx, struct sk_buff *
#endif
if (cb->pktid < MT_PACKET_ID_FIRST) {
-- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct ieee80211_rate_status rs = {};
-
hw = mt76_tx_status_get_hw(dev, skb);
status.sta = wcid_to_sta(wcid);
- if (mtk_wed_device_active(&dev->mmio.wed) &&
- (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
-- info->status.rates[0].idx = -1;
--
-- if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
-- rs.rate_idx = wcid->rate;
-- status.rates = &rs;
-- status.n_rates = 1;
-- } else {
-- status.n_rates = 0;
-+ if (status.sta) {
-+ info->status.rates[0].idx = -1;
-+ status.rate = &wcid->rate;
- }
+- if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) {
+- rs.rate_idx = wcid->rate;
+- status.rates = &rs;
+- status.n_rates = 1;
++ if (status.sta) {
++ info->status.rates[0].idx = -1;
++ status.rate = &wcid->rate;
}
++
spin_lock_bh(&dev->rx_lock);
+ ieee80211_tx_status_ext(hw, &status);
+ spin_unlock_bh(&dev->rx_lock);
--
2.18.0