[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
16b7683 [mac80211][mt76][Fix wtbl CR and fix memory leak]
787e2c4 [MAC80211][core][remove duplicated patches]
f2532a8 [MAC80211][core][refine backports patches]
4827f0a [MAC80211][wed][fix fe reset hang issue]
472b001 [MAC80211][hostapd][refine hostapd patches]
[Release-log]
Change-Id: I1c2669521173b1977eed191945f505792fb6cca6
diff --git a/recipes-wifi/linux-mt76/files/5000-mt76-add-internal-wed_tiny-header-file.patch b/recipes-wifi/linux-mt76/files/5000-mt76-add-internal-wed_tiny-header-file.patch
index f5fa448..59c861a 100644
--- a/recipes-wifi/linux-mt76/files/5000-mt76-add-internal-wed_tiny-header-file.patch
+++ b/recipes-wifi/linux-mt76/files/5000-mt76-add-internal-wed_tiny-header-file.patch
@@ -131,7 +131,7 @@
+
+#define mtk_wed_device_detach(_dev) do {} while (0)
+#define mtk_wed_device_start(_dev, _mask) do {} while (0)
-+#define mtk_wed_device_stop(_dev, _reset) do {} while (0)
++#define mtk_wed_device_stop(_dev) do {} while (0)
+#define mtk_wed_device_tx_ring_setup(_dev, _ring, _regs, _reset) -ENODEV
+#define mtk_wed_device_txfree_ring_setup(_dev, _ring, _regs) -ENODEV
+#define mtk_wed_device_rx_ring_setup(_dev, _ring, _regs, _reset) -ENODEV
diff --git a/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch b/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
index a6336d6..492a5de 100644
--- a/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1001-mt76-mt7915-add-mtk-internal-debug-tools-for-mt76.patch
@@ -1,7 +1,7 @@
-From ecececeedd9e0b8ed6589ed4e25d5fdf6789a59b Mon Sep 17 00:00:00 2001
+From 0585e668ca5e848c1b30f6f492ba0897ddb4071b 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 1001/1009] mt76: mt7915: add mtk internal debug tools for mt76
+Subject: [PATCH] mt76: mt7915: add mtk internal debug tools for mt76
---
mt76_connac_mcu.h | 6 +
@@ -22,7 +22,7 @@
create mode 100644 mt7915/mtk_mcu.c
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index a5e6ee4..cbe0c52 100644
+index a5e6ee4d..cbe0c52a 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
@@ -1151,6 +1151,7 @@ enum {
@@ -46,7 +46,7 @@
MCU_EXT_CMD_CAL_CACHE = 0x67,
MCU_EXT_CMD_RED_ENABLE = 0x68,
diff --git a/mt7915/Makefile b/mt7915/Makefile
-index f033116..cbcb64b 100644
+index f033116c..cbcb64be 100644
--- a/mt7915/Makefile
+++ b/mt7915/Makefile
@@ -4,7 +4,7 @@ EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
@@ -59,7 +59,7 @@
mt7915e-$(CONFIG_NL80211_TESTMODE) += testmode.o
mt7915e-$(CONFIG_MT7986_WMAC) += soc.o
diff --git a/mt7915/debugfs.c b/mt7915/debugfs.c
-index 5a46813..f1f3f2f 100644
+index 5a46813a..f1f3f2f3 100644
--- a/mt7915/debugfs.c
+++ b/mt7915/debugfs.c
@@ -8,6 +8,9 @@
@@ -203,7 +203,7 @@
if (dev->relay_fwlog)
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 97ca55d..1ba4096 100644
+index 97ca55d2..1ba4096d 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -299,6 +299,10 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb,
@@ -242,7 +242,7 @@
}
diff --git a/mt7915/main.c b/mt7915/main.c
-index 3bbccbd..94ecded 100644
+index 3bbccbdf..94ecded5 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -73,7 +73,11 @@ int mt7915_run(struct ieee80211_hw *hw)
@@ -258,7 +258,7 @@
goto out;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index f151ce8..ff718f7 100644
+index f151ce86..ff718f78 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -199,6 +199,11 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
@@ -342,7 +342,7 @@
+}
+#endif
diff --git a/mt7915/mcu.h b/mt7915/mcu.h
-index b9ea297..da86360 100644
+index b9ea297f..da863601 100644
--- a/mt7915/mcu.h
+++ b/mt7915/mcu.h
@@ -278,6 +278,10 @@ enum {
@@ -357,7 +357,7 @@
};
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 3cbfb9b..5fcc8ac 100644
+index 3cbfb9b6..5fcc8ace 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -9,6 +9,7 @@
@@ -424,7 +424,7 @@
#endif
diff --git a/mt7915/mt7915_debug.h b/mt7915/mt7915_debug.h
new file mode 100644
-index 0000000..ca553dc
+index 00000000..ca553dca
--- /dev/null
+++ b/mt7915/mt7915_debug.h
@@ -0,0 +1,1363 @@
@@ -1793,7 +1793,7 @@
+#endif
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
new file mode 100644
-index 0000000..4fb845b
+index 00000000..530bde1a
--- /dev/null
+++ b/mt7915/mtk_debugfs.c
@@ -0,0 +1,3003 @@
@@ -2310,8 +2310,8 @@
+ UWTBL_LEN_IN_DW, uwtbl);
+ seq_printf(s, "Dump WTBL info of WLAN_IDX:%d\n", dev->wlan_idx);
+ seq_printf(s, "UMAC WTBL Addr: group:0x%x=0x%x addr: 0x%lx\n",
-+ MT_DBG_WTBLON_TOP_WDUCR,
-+ mt76_rr(dev, MT_DBG_WTBLON_TOP_WDUCR),
++ MT_DBG_UWTBL_TOP_WDUCR,
++ mt76_rr(dev, MT_DBG_UWTBL_TOP_BASE),
+ UWTBL_IDX2BASE(dev->wlan_idx, 0));
+ for (x = 0; x < UWTBL_LEN_IN_DW; x++) {
+ seq_printf(s, "DW%02d: %02x %02x %02x %02x\n",
@@ -2404,8 +2404,8 @@
+ mt7915_wtbl_read_raw(dev, keyloc0, WTBL_TYPE_KEY,
+ 0, ONE_KEY_ENTRY_LEN_IN_DW, keytbl);
+ seq_printf(s, "KEY WTBL Addr: group:0x%x=0x%x addr: 0x%lx\n",
-+ MT_DBG_WTBLON_TOP_WDUCR,
-+ mt76_rr(dev, MT_DBG_WTBLON_TOP_WDUCR),
++ MT_DBG_UWTBL_TOP_WDUCR,
++ mt76_rr(dev, MT_DBG_UWTBL_TOP_BASE),
+ KEYTBL_IDX2BASE(keyloc0, 0));
+
+ for (x = 0; x < ONE_KEY_ENTRY_LEN_IN_DW; x++) {
@@ -2423,8 +2423,8 @@
+ mt7915_wtbl_read_raw(dev, keyloc1, WTBL_TYPE_KEY,
+ 0, ONE_KEY_ENTRY_LEN_IN_DW, keytbl);
+ seq_printf(s, "KEY WTBL Addr: group:0x%x=0x%x addr: 0x%lx\n",
-+ MT_DBG_WTBLON_TOP_WDUCR,
-+ mt76_rr(dev, MT_DBG_WTBLON_TOP_WDUCR),
++ MT_DBG_UWTBL_TOP_WDUCR,
++ mt76_rr(dev, MT_DBG_UWTBL_TOP_BASE),
+ KEYTBL_IDX2BASE(keyloc1, 0));
+
+ for (x = 0; x < ONE_KEY_ENTRY_LEN_IN_DW; x++) {
@@ -4802,7 +4802,7 @@
+#endif
diff --git a/mt7915/mtk_mcu.c b/mt7915/mtk_mcu.c
new file mode 100644
-index 0000000..143dae2
+index 00000000..143dae26
--- /dev/null
+++ b/mt7915/mtk_mcu.c
@@ -0,0 +1,51 @@
@@ -4858,7 +4858,7 @@
+ sizeof(req), true);
+}
diff --git a/tools/fwlog.c b/tools/fwlog.c
-index e5d4a10..3d51d9e 100644
+index e5d4a105..3d51d9ec 100644
--- a/tools/fwlog.c
+++ b/tools/fwlog.c
@@ -26,7 +26,7 @@ static const char *debugfs_path(const char *phyname, const char *file)
@@ -4972,5 +4972,5 @@
return ret;
}
--
-2.39.0
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch b/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
index f79abb9..04e2217 100644
--- a/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1117-mt76-mt7915-init-rssi-in-WTBL-when-add-station.patch
@@ -12,7 +12,7 @@
--- 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,
- struct mt7915_phy *phy;
+ struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
#endif
int ret, idx;
+ u32 addr;
diff --git a/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch b/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
index a7990a2..27f8787 100644
--- a/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1118-mt76-connac-airtime-fairness-feature-off-in-mac80211.patch
@@ -1,4 +1,4 @@
-From 1372e9f58ca9e818746afdd4f4693ef175dc1af5 Mon Sep 17 00:00:00 2001
+From d0a0b51c3aea4e3a948e70aef7d137a5c4b235f3 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 1118/1133] mt76: connac: airtime fairness feature off in
diff --git a/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch b/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
index e1e65a1..c754c64 100644
--- a/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1119-mt76-mt7915-add-mt7986-and-mt7916-pre-calibration.patch
@@ -1,4 +1,4 @@
-From fd1a769323cb64ed9d21d0f291beb3dfcb9adb35 Mon Sep 17 00:00:00 2001
+From 1d8b96957fe7ad695caf20a1525118bd48cf34f3 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 1119/1133] mt76: mt7915: add mt7986 and mt7916 pre-calibration
@@ -62,10 +62,10 @@
MT_EE_RATE_DELTA_5G = 0x29d,
MT_EE_TX0_POWER_2G = 0x2fc,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e82b7e14..28698d37 100644
+index d8a1b00e..185b6495 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2966,7 +2966,8 @@ static int mt7915_mcu_set_pre_cal(struct mt7915_dev *dev, u8 idx,
+@@ -2967,7 +2967,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;
@@ -75,7 +75,7 @@
if (!(eep[offs] & MT_EE_WIFI_CAL_GROUP))
return 0;
-@@ -3004,9 +3005,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
+@@ -3005,9 +3006,9 @@ static int mt7915_find_freq_idx(const u16 *freqs, int n_freqs, u16 cur)
return -1;
}
@@ -87,7 +87,7 @@
5180, 5200, 5220, 5240,
5260, 5280, 5300, 5320,
5500, 5520, 5540, 5560,
-@@ -3014,34 +3015,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
+@@ -3015,34 +3016,69 @@ static int mt7915_dpd_freq_idx(u16 freq, u8 bw)
5660, 5680, 5700, 5745,
5765, 5785, 5805, 5825
};
@@ -167,7 +167,7 @@
}
int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
-@@ -3073,24 +3109,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
+@@ -3074,24 +3110,24 @@ int mt7915_mcu_apply_tx_dpd(struct mt7915_phy *phy)
if (!(eep[offs] & dpd_mask))
return 0;
diff --git a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
index b5eb864..d9f1eec 100644
--- a/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1120-mt76-mt7915-add-phy-capability-vendor-command.patch
@@ -1,4 +1,4 @@
-From fff425467fb14ecb03f48ab95802d49412b15fe6 Mon Sep 17 00:00:00 2001
+From 99d36c925c886a383d62fb3e9d009265161cf62a 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 1120/1133] mt76: mt7915: add phy capability vendor command
@@ -10,7 +10,7 @@
3 files changed, 78 insertions(+)
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index ae06a7c6..9d98633c 100644
+index bb9c374f..f6b7241d 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -11,6 +11,7 @@
@@ -22,7 +22,7 @@
#define MT7916_WTBL_SIZE 544
#define MT7915_WTBL_RESERVED (mt7915_wtbl_size(dev) - 1)
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index c7551848..77d71e48 100644
+index 5acbd2d7..526eb6b2 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -50,6 +50,18 @@ rfeature_ctrl_policy[NUM_MTK_VENDOR_ATTRS_RFEATURE_CTRL] = {
diff --git a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
index e58ee25..9472892 100644
--- a/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1121-mt76-mt7915-add-vendor-subcmd-EDCCA-ctrl-enable-thre.patch
@@ -1,19 +1,19 @@
-From b9f5dab1bd609a933fab9d7e962a3db1d6e91c29 Mon Sep 17 00:00:00 2001
+From 9f4ef5f8637f597acf5fc876d40f9159e051e512 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 1121/1133] mt76: mt7915: add vendor subcmd EDCCA ctrl
+Subject: [PATCH] mt76: mt7915: add vendor subcmd EDCCA ctrl
enable/threshold/compensation
Change-Id: I06a3f94d5e444be894200e2b6588d76ed38d09d0
---
mt76_connac_mcu.h | 1 +
mt7915/main.c | 3 ++
- mt7915/mcu.c | 72 +++++++++++++++++++++++++
+ mt7915/mcu.c | 73 +++++++++++++++++++++++++
mt7915/mcu.h | 21 ++++++++
mt7915/mt7915.h | 3 +-
mt7915/vendor.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++
mt7915/vendor.h | 33 ++++++++++++
- 7 files changed, 264 insertions(+), 1 deletion(-)
+ 7 files changed, 265 insertions(+), 1 deletion(-)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
index 5cef308a..65863a0d 100644
@@ -28,7 +28,7 @@
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
};
diff --git a/mt7915/main.c b/mt7915/main.c
-index c32df9b1..96236f4c 100644
+index d1135d9f..0d01d880 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -479,6 +479,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 28698d37..46f29021 100644
+index 185b6495..85bb60c9 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4622,3 +4622,75 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
+@@ -4623,3 +4623,76 @@ int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool w
return 0;
}
@@ -118,6 +118,7 @@
+ *value++ = res->info[0];
+ *value++ = res->info[1];
+ *value = res->info[2];
++ dev_kfree_skb(skb);
+
+ return 0;
+}
@@ -154,10 +155,10 @@
#endif
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 9d98633c..8418c7dc 100644
+index f6b7241d..582887d4 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);
+@@ -763,7 +763,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
@@ -168,7 +169,7 @@
int mt7915_mcu_ipi_hist_scan(struct mt7915_phy *phy, void *data, u8 mode, bool wait_resp);
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index 77d71e48..2484e25f 100644
+index 526eb6b2..f712d67c 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -62,6 +62,24 @@ phy_capa_dump_policy[NUM_MTK_VENDOR_ATTRS_PHY_CAPA_DUMP] = {
diff --git a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch b/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
index 2a2dcaf..fdd6c4d 100644
--- a/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1122-mt76-mt7915-implement-bin-file-mode.patch
@@ -1,4 +1,4 @@
-From 7e48b460bf9584a3ad9e03cad8ee7344fa8b8a82 Mon Sep 17 00:00:00 2001
+From 8a6c47c698f273485f749c8aa2c3fd2b6a946c86 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 1122/1133] mt76: mt7915: implement bin file mode
@@ -15,7 +15,7 @@
6 files changed, 110 insertions(+), 6 deletions(-)
diff --git a/eeprom.c b/eeprom.c
-index cb6ff17a..05b6dfaa 100644
+index 263e5089..1ba84cab 100644
--- a/eeprom.c
+++ b/eeprom.c
@@ -104,6 +104,26 @@ out_put_node:
@@ -169,7 +169,7 @@
mt7915_get_channel_group_5g(int channel, bool is_7976)
{
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 8418c7dc..db7e42db 100644
+index 582887d4..03a27ff3 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -42,9 +42,9 @@
@@ -185,7 +185,7 @@
#define MT7986_EEPROM_MT7975_DEFAULT "mediatek/mt7986_eeprom_mt7975.bin"
#define MT7986_EEPROM_MT7975_DUAL_DEFAULT "mediatek/mt7986_eeprom_mt7975_dual.bin"
#define MT7986_EEPROM_MT7976_DEFAULT "mediatek/mt7986_eeprom_mt7976.bin"
-@@ -401,6 +401,8 @@ struct mt7915_dev {
+@@ -403,6 +403,8 @@ struct mt7915_dev {
bool dbdc_support;
bool flash_mode;
@@ -194,7 +194,7 @@
bool muru_debug;
bool ibf;
-@@ -775,6 +777,7 @@ void mt7915_dump_tmac_info(u8 *tmac_info);
+@@ -776,6 +778,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);
@@ -203,7 +203,7 @@
#define PKT_BIN_DEBUG_MAGIC 0xc8763123
enum {
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 867d52d1..0f2795d5 100644
+index da444f38..5f34afc7 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3,6 +3,7 @@
diff --git a/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch b/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch
index 820ec00..066630e 100644
--- a/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1123-mt76-mt7915-initialize-wcid.patch
@@ -1,4 +1,4 @@
-From 93e76d8cf97dfe08679e24c4db3e0630fdfceb73 Mon Sep 17 00:00:00 2001
+From 9758ae301b7a08ace837a88d9534c7f22e4fef7f 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 1123/1133] mt76: mt7915: initialize wcid
diff --git a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
index eaa50d3..0fcde9d 100644
--- a/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1124-mt76-mt7915-Add-hemu-dump-support.patch
@@ -1,4 +1,4 @@
-From 805623e9a7556fc147bd167a50bfe5538e924c7b Mon Sep 17 00:00:00 2001
+From dc1ea53db698073c61765925cdb17d28043c6f2d Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Thu, 11 Aug 2022 18:09:45 -0700
Subject: [PATCH 1124/1133] mt76: mt7915: Add hemu dump support
@@ -10,7 +10,7 @@
2 files changed, 25 insertions(+)
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index f712d67..83f38e0 100644
+index f712d67c..83f38e07 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -37,6 +37,7 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -59,7 +59,7 @@
.maxattr = MTK_VENDOR_ATTR_HEMU_CTRL_MAX,
},
diff --git a/mt7915/vendor.h b/mt7915/vendor.h
-index 7231971..c19ffe7 100644
+index 72319717..c19ffe72 100644
--- a/mt7915/vendor.h
+++ b/mt7915/vendor.h
@@ -72,6 +72,7 @@ enum mtk_vendor_attr_hemu_ctrl {
@@ -71,5 +71,5 @@
/* keep last */
NUM_MTK_VENDOR_ATTRS_HEMU_CTRL,
--
-2.39.0
+2.18.0
diff --git a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch b/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
index 804084b..370bbcf 100644
--- a/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1125-mt76-mt7915-add-vendor-subcmd-three-wire-PTA-ctrl.patch
@@ -1,4 +1,4 @@
-From f1fcf78c95d186f5ee4c52d3e3509eee0ba53e05 Mon Sep 17 00:00:00 2001
+From 6d68ed1f6ead694289dc9d2a98ef3d49dcb778dd 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 1125/1133] mt76: mt7915: add vendor subcmd three wire (PTA)
@@ -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 46f29021..9cd51d95 100644
+index 3408555e..ebe00300 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4321,37 +4321,33 @@ void mt7915_mcu_set_dynalgo(struct mt7915_phy *phy, u8 enable)
+@@ -4322,37 +4322,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 db7e42db..e4422d94 100644
+index 03a27ff3..fbe68ef9 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -756,6 +756,7 @@ void mt7915_mcu_set_mimo(struct mt7915_phy *phy, u8 direction);
+@@ -757,6 +757,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);
@@ -146,7 +146,7 @@
void mt7915_vendor_register(struct mt7915_phy *phy);
int mt7915_mcu_set_csi(struct mt7915_phy *phy, u8 mode,
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index f7becce9..fb760e17 100644
+index 83f38e07..48d124e0 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -40,6 +40,11 @@ hemu_ctrl_policy[NUM_MTK_VENDOR_ATTRS_HEMU_CTRL] = {
@@ -170,7 +170,7 @@
mt7915_mcu_set_bypass_smthint(phy, val8); /* Cert bypass smooth interpolation */
}
-@@ -1116,6 +1121,7 @@ static int mt7915_vendor_edcca_ctrl(struct wiphy *wiphy,
+@@ -1115,6 +1120,7 @@ static int mt7915_vendor_edcca_ctrl(struct wiphy *wiphy,
return 0;
}
@@ -178,7 +178,7 @@
static int
mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
struct sk_buff *skb, const void *data, int data_len,
-@@ -1159,6 +1165,31 @@ mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
+@@ -1158,6 +1164,31 @@ mt7915_vendor_edcca_ctrl_dump(struct wiphy *wiphy, struct wireless_dev *wdev,
return len;
}
@@ -210,7 +210,7 @@
static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
{
.info = {
-@@ -1240,6 +1271,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1239,6 +1270,17 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.dumpit = mt7915_vendor_edcca_ctrl_dump,
.policy = edcca_ctrl_policy,
.maxattr = MTK_VENDOR_ATTR_EDCCA_CTRL_MAX,
diff --git a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
index 2276d62..899c849 100644
--- a/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1126-mt76-mt7915-add-ibf-control-vendor-cmd.patch
@@ -1,4 +1,4 @@
-From 7a747cdaec4b7093433fe2e3894c545874c3e0c1 Mon Sep 17 00:00:00 2001
+From 169a6fe9914e6480b9981f5cd6a3911e8700e46c Mon Sep 17 00:00:00 2001
From: mtk27835 <shurong.wen@mediatek.com>
Date: Wed, 7 Sep 2022 14:01:29 -0700
Subject: [PATCH 1126/1133] mt76: mt7915: add ibf control vendor cmd
@@ -10,7 +10,7 @@
2 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/mt7915/vendor.c b/mt7915/vendor.c
-index fb760e17..22af66d5 100644
+index 48d124e0..9cd6e811 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -86,6 +86,11 @@ edcca_dump_policy[NUM_MTK_VENDOR_ATTRS_EDCCA_DUMP] = {
@@ -25,7 +25,7 @@
struct csi_null_tone {
u8 start;
u8 end;
-@@ -1189,6 +1194,54 @@ static int mt7915_vendor_3wire_ctrl(struct wiphy *wiphy,
+@@ -1188,6 +1193,54 @@ static int mt7915_vendor_3wire_ctrl(struct wiphy *wiphy,
return mt7915_mcu_set_cfg(phy, CFGINFO_3WIRE_EN_CFG, three_wire_mode);
}
@@ -80,7 +80,7 @@
static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
{
-@@ -1282,6 +1335,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1281,6 +1334,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.doit = mt7915_vendor_3wire_ctrl,
.policy = three_wire_ctrl_policy,
.maxattr = MTK_VENDOR_ATTR_3WIRE_CTRL_MAX,
diff --git a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch b/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
index 22b9452..b06c540 100644
--- a/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1127-mt76-mt7915-add-E3-re-bonding-for-low-yield-rate-iss.patch
@@ -1,4 +1,4 @@
-From bc8e0a4dfa04ec0bf2cec39241329bca4c4f2b6d Mon Sep 17 00:00:00 2001
+From 2cd8e8385970f43311305c6849b31cd86cc40f5a Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 13 Oct 2022 13:22:05 +0800
Subject: [PATCH 1127/1133] mt76: mt7915: add E3 re-bonding for low yield rate
@@ -64,10 +64,10 @@
if (ret)
return ret;
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 9cd51d95..e8b8bc8d 100644
+index ebe00300..292351fb 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2885,7 +2885,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
+@@ -2886,7 +2886,7 @@ int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode)
&req, sizeof(req), true);
}
@@ -76,7 +76,7 @@
{
struct mt7915_mcu_eeprom_info req = {
.addr = cpu_to_le32(round_down(offset,
-@@ -2903,8 +2903,15 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
+@@ -2904,8 +2904,15 @@ int mt7915_mcu_get_eeprom(struct mt7915_dev *dev, u32 offset)
return ret;
res = (struct mt7915_mcu_eeprom_info *)skb->data;
@@ -95,10 +95,10 @@
return 0;
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index e4422d94..538896e5 100644
+index fbe68ef9..332f63b5 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -557,6 +557,7 @@ u32 mt7915_wed_init_buf(void *ptr, dma_addr_t phys, int token_id);
+@@ -558,6 +558,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);
@@ -106,7 +106,7 @@
int mt7915_eeprom_init(struct mt7915_dev *dev);
void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
struct mt7915_phy *phy);
-@@ -611,7 +612,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -612,7 +613,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
struct ieee80211_sta *sta,
void *data, u32 field);
int mt7915_mcu_set_eeprom(struct mt7915_dev *dev, bool flash_mode);
diff --git a/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch b/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
index fb10c3a..3fc342b 100644
--- a/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1128-mt76-mt7915-support-on-off-SW-ACI-through-debugfs.patch
@@ -1,4 +1,4 @@
-From 3cc965c29077d7631327bf60f75cc23808a025e4 Mon Sep 17 00:00:00 2001
+From 7cc147efe8e493d163b9670b8b737fd3bf8d59e0 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 1128/1133] mt76: mt7915: support on off SW ACI through debugfs
@@ -23,7 +23,7 @@
MCU_EXT_CMD_IPI_HIST_SCAN = 0xc5,
};
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 0f2795d5..576995dc 100644
+index 5f34afc7..b99519dd 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3040,6 +3040,25 @@ static int mt7915_show_eeprom_mode(struct seq_file *s, void *data)
diff --git a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch b/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
index b65f733..c916131 100644
--- a/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1129-mt76-mt7915-add-bf-backoff-limit-table-support.patch
@@ -1,4 +1,4 @@
-From 5cfacdb63a2c3b8105b0e8a131f306073085ce59 Mon Sep 17 00:00:00 2001
+From cd6e64e5bdea2ee410c1cc8e83f78322bf9f3982 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 1129/1133] mt76: mt7915: add bf backoff limit table support
@@ -14,10 +14,10 @@
6 files changed, 203 insertions(+), 37 deletions(-)
diff --git a/eeprom.c b/eeprom.c
-index 05b6dfaa..d1612641 100644
+index 1ba84cab..6e6d84e3 100644
--- a/eeprom.c
+++ b/eeprom.c
-@@ -310,7 +310,8 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
+@@ -311,7 +311,8 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
if (!mcs_rates)
mcs_rates = 10;
@@ -27,7 +27,7 @@
if (!IS_ENABLED(CONFIG_OF))
return target_power;
-@@ -363,6 +364,28 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
+@@ -364,6 +365,28 @@ s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
ARRAY_SIZE(dest->ru), val, len,
target_power, txs_delta, &max_power);
@@ -188,10 +188,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 e8b8bc8d..e3686f88 100644
+index 292351fb..ff309294 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3330,7 +3330,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3331,7 +3331,8 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
int ret;
s8 txpower_sku[MT7915_SKU_RATE_NUM];
@@ -201,7 +201,7 @@
if (ret)
return ret;
-@@ -3372,51 +3373,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3373,51 +3374,98 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
int mt7915_mcu_set_txpower_sku(struct mt7915_phy *phy)
{
@@ -325,7 +325,7 @@
struct mt7915_dev *dev = phy->dev;
struct {
u8 format_id;
-@@ -3425,10 +3473,9 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3426,10 +3474,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,
@@ -337,7 +337,7 @@
struct sk_buff *skb;
int ret, i;
-@@ -3438,9 +3485,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
+@@ -3439,9 +3486,15 @@ int mt7915_mcu_get_txpower_sku(struct mt7915_phy *phy, s8 *txpower, int len)
if (ret)
return ret;
@@ -356,7 +356,7 @@
dev_kfree_skb(skb);
-@@ -3482,9 +3535,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
+@@ -3483,9 +3536,18 @@ int mt7915_mcu_set_sku_en(struct mt7915_phy *phy, bool enable)
.band_idx = phy->mt76->band_idx,
.sku_enable = enable,
};
@@ -399,7 +399,7 @@
SPR_ENABLE = 0x1,
SPR_ENABLE_SD = 0x3,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 538896e5..85c88bdd 100644
+index 332f63b5..20b0496f 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -65,6 +65,7 @@
@@ -410,7 +410,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,
+@@ -622,7 +623,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/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch b/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
index 2548262..6db0006 100644
--- a/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1130-mt76-mt7915-amsdu-set-and-get-control.patch
@@ -1,4 +1,4 @@
-From 6f923c7b8315b6ca8c2308970f8c1e0794421116 Mon Sep 17 00:00:00 2001
+From 3991eb6b59ffaf4f30815206fb451bc32e2e2af6 Mon Sep 17 00:00:00 2001
From: TomLiu <tomml.liu@mediatek.com>
Date: Wed, 14 Dec 2022 00:44:07 -0800
Subject: [PATCH 1130/1133] mt76: mt7915: amsdu set and get control
@@ -32,10 +32,10 @@
void mt7915_capi_sta_rc_work(void *data, struct ieee80211_sta *sta)
{
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 85c88bdd..eb24b45f 100644
+index 20b0496f..c14d13ae 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,
+@@ -748,6 +748,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
bool pci, int *irq);
#ifdef CONFIG_MTK_VENDOR
@@ -44,7 +44,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 22af66d5..a1f526c9 100644
+index 9cd6e811..766fa595 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
@@ -30,10 +30,16 @@ wireless_ctrl_policy[NUM_MTK_VENDOR_ATTRS_WIRELESS_CTRL] = {
@@ -100,7 +100,7 @@
static int mt7915_vendor_hemu_ctrl(struct wiphy *wiphy,
struct wireless_dev *wdev,
const void *data,
-@@ -1287,6 +1317,7 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -1286,6 +1316,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/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch b/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
index a1495be..ef0375b 100644
--- a/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1131-wifi-mt76-mt7915-add-support-for-he-ldpc-control-fro.patch
@@ -1,4 +1,4 @@
-From 49134453f2edb6f7724f6cc047db7e963909f1f4 Mon Sep 17 00:00:00 2001
+From 1fb0932ca2be712c94a8f57be5a7069541266201 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Thu, 12 Jan 2023 15:15:42 +0800
Subject: [PATCH 1131/1133] wifi: mt76: mt7915: add support for he ldpc control
@@ -9,10 +9,10 @@
1 file changed, 1 insertion(+)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e3686f88..ad5ac120 100644
+index ff309294..2cfad0a3 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -1982,6 +1982,7 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -1983,6 +1983,7 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
he = (void *)(ie + 3);
vc->he_ldpc =
diff --git a/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch b/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
index 40b6813..6a891bf 100644
--- a/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1132-mt76-mt7915-Add-vendor-command-attribute-for-RTS-BW-.patch
@@ -1,4 +1,4 @@
-From 7932d63acfca9abe1b7e27c25e7e23015e0f39f7 Mon Sep 17 00:00:00 2001
+From 610518420411975d6d4cb88c722a8abf645c88f2 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 1132/1133] mt76: mt7915: Add vendor command attribute for RTS
@@ -13,10 +13,10 @@
4 files changed, 20 insertions(+)
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index ad5ac120..fc5bf5b7 100644
+index 2cfad0a3..4f1d2fe6 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4407,6 +4407,12 @@ int mt7915_mcu_set_cfg(struct mt7915_phy *phy, u8 cfg_info, u8 type)
+@@ -4408,6 +4408,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 a1f526c9..b54fee72 100644
+index 766fa595..7fbf67d6 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/recipes-wifi/linux-mt76/files/patches/1133-mt76-mt7915-Allow-AP-to-change-channel-width-for-40M.patch b/recipes-wifi/linux-mt76/files/patches/1133-mt76-mt7915-Allow-AP-to-change-channel-width-for-40M.patch
index c2d6298..5f558ea 100644
--- a/recipes-wifi/linux-mt76/files/patches/1133-mt76-mt7915-Allow-AP-to-change-channel-width-for-40M.patch
+++ b/recipes-wifi/linux-mt76/files/patches/1133-mt76-mt7915-Allow-AP-to-change-channel-width-for-40M.patch
@@ -1,4 +1,4 @@
-From 657b01e6ed24b9b7f6fd0d52768e9674c0382828 Mon Sep 17 00:00:00 2001
+From 48e04e1209ec16bdb258c13a2939ad48f29deec1 Mon Sep 17 00:00:00 2001
From: "himanshu.goyal" <himanshu.goyal@mediatek.com>
Date: Mon, 30 Jan 2023 17:47:06 +0800
Subject: [PATCH 1133/1133] mt76: mt7915: Allow AP to change channel width for
diff --git a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
index f35915c..500ec0f 100644
--- a/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3001-mt76-mt7915-wed-add-wed-tx-support.patch
@@ -1,7 +1,7 @@
-From 2a80e06e9d9e76ecb7c3d8de983a692bb58e8f62 Mon Sep 17 00:00:00 2001
+From 783c715b2271209d23b965517d97e5a834fcfa76 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 3001/3010] mt76: mt7915: wed: add wed tx support
+Subject: [PATCH 3001/3015] mt76: mt7915: wed: add wed tx support
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
@@ -65,10 +65,10 @@
static void
diff --git a/mt7915/main.c b/mt7915/main.c
-index 96236f4c..06a72197 100644
+index 0d01d880..020a6d2d 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1539,14 +1539,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1537,14 +1537,14 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
if (!mtk_wed_device_active(wed))
return -ENODEV;
diff --git a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
index 5d1cd12..46fbf0c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3002-mt76-mt7915-wed-add-wds-support-when-wed-is-enabled.patch
@@ -1,7 +1,7 @@
-From cbc0a7e53a836bb19b4eb407143a86400c78c814 Mon Sep 17 00:00:00 2001
+From 443b9ce1fa3d69fbfdbb6051c4ed46029556083d 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 3002/3010] mt76: mt7915: wed: add wds support when wed is
+Subject: [PATCH 3002/3015] mt76: mt7915: wed: add wds support when wed is
enabled
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -32,7 +32,7 @@
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 06a72197..9ae8694a 100644
+index 020a6d2d..b9c17b9b 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -696,8 +696,15 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
@@ -52,7 +52,7 @@
if (idx < 0)
return -ENOSPC;
-@@ -1169,6 +1176,13 @@ static void mt7915_sta_set_4addr(struct ieee80211_hw *hw,
+@@ -1167,6 +1174,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);
}
-@@ -1546,8 +1560,12 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1544,8 +1558,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 fc5bf5b7..64789b80 100644
+index 4f1d2fe6..d046ce0f 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2415,8 +2415,17 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
+@@ -2416,8 +2416,17 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
if (ret)
return ret;
diff --git a/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch b/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
index 4910330..528c44c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3003-mt76-mt7915-wed-add-fill-receive-path-to-report-wed-.patch
@@ -1,7 +1,7 @@
-From 51ef6c501ddd6262d00daaaf95015db71fe90de2 Mon Sep 17 00:00:00 2001
+From b52fb2adf7b44ed323983b10721612347b86b569 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Thu, 19 May 2022 13:44:42 +0800
-Subject: [PATCH 3003/3010] mt76: mt7915: wed: add fill receive path to report
+Subject: [PATCH 3003/3015] 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, 19 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
-index 9ae8694a..9a5dac91 100644
+index b9c17b9b..7d25a93f 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1571,6 +1571,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
+@@ -1569,6 +1569,24 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
return 0;
}
@@ -38,7 +38,7 @@
#endif
const struct ieee80211_ops mt7915_ops = {
-@@ -1623,5 +1641,6 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1621,5 +1639,6 @@ 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/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch b/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
index ea151cb..21367e9 100644
--- a/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3004-mt76-mt7915-wed-find-rx-token-by-physical-address.patch
@@ -1,7 +1,7 @@
-From e27abd8471cfe265afd0061cc86f85cce5b37773 Mon Sep 17 00:00:00 2001
+From fc10309ea47b4d34ace30e6f4e7ff0c0ffa71db2 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 3004/3010] mt76: mt7915: wed: find rx token by physical
+Subject: [PATCH 3004/3015] 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/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch b/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
index 8e62cd5..4f5d2c6 100644
--- a/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3005-mt76-mt7915-wed-drop-scatter-and-gather-frame.patch
@@ -1,7 +1,7 @@
-From aa7dfb5e157381545a798a7333a0332858bb9cbf Mon Sep 17 00:00:00 2001
+From d99756a5e6b4b3d1d520aba763fddeadff53a529 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 25 Nov 2022 14:37:58 +0800
-Subject: [PATCH 3005/3010] mt76: mt7915: wed: drop scatter and gather frame
+Subject: [PATCH 3005/3015] mt76: mt7915: wed: drop scatter and gather frame
The scatter and gather frame may be incorrect because WED and WO may
send frames to host driver interleaved.
diff --git a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
index 2dffdc4..c22106c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3006-mt76-mt7915-wed-HW-ATF-support-for-mt7986.patch
@@ -468,7 +468,7 @@
index 19447ad1..92977b98 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -557,10 +557,46 @@ mt7915_init_led_mux(struct mt7915_dev *dev)
+@@ -559,10 +559,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)
-@@ -582,6 +618,9 @@ void mt7915_mac_init(struct mt7915_dev *dev)
+@@ -584,6 +620,9 @@ void mt7915_mac_init(struct mt7915_dev *dev)
mt7915_mac_init_band(dev, i);
mt7915_init_led_mux(dev);
@@ -553,11 +553,11 @@
bool ext_phy = mvif->phy != &dev->phy;
+ struct wiphy *wiphy = dev->phy.mt76->hw->wiphy;
#ifdef CONFIG_MTK_VENDOR
- struct mt7915_phy *phy;
+ struct mt7915_phy *phy = ext_phy ? mt7915_ext_phy(dev) : &dev->phy;
#endif
-@@ -742,6 +747,16 @@ int mt7915_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
+@@ -740,6 +745,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
+ if (mt7915_is_atf_default_on(wiphy, dev)) {
+ msta->vow_sta_cfg.dwrr_quantum[IEEE80211_AC_VO] = 2;
@@ -576,7 +576,7 @@
index 64789b80..e3b7d824 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -3579,6 +3579,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
+@@ -3580,6 +3580,171 @@ int mt7915_mcu_set_ser(struct mt7915_dev *dev, u8 action, u8 set, u8 band)
&req, sizeof(req), false);
}
@@ -819,7 +819,7 @@
};
struct mt7915_vif_cap {
-@@ -461,6 +514,8 @@ struct mt7915_dev {
+@@ -462,6 +515,8 @@ struct mt7915_dev {
} dbg;
const struct mt7915_dbg_reg_desc *dbg_reg;
#endif
@@ -828,7 +828,7 @@
};
enum {
-@@ -493,6 +548,15 @@ enum mt7915_rdd_cmd {
+@@ -494,6 +549,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,
+@@ -621,6 +685,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);
diff --git a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
index 92760dc..4917bae 100644
--- a/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3007-mt76-mt7915-wed-add-mt7916-2-pcie-support-when-wed-o.patch
@@ -1,7 +1,7 @@
-From b4091a26e5e6ac5b80a587afdbfd8a54251d050f Mon Sep 17 00:00:00 2001
+From 76a6c0fd812fa4682abca05d94594f063808d815 Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Fri, 2 Dec 2022 17:17:06 +0800
-Subject: [PATCH 3007/3010] mt76: mt7915: wed: add mt7916 2 pcie support when
+Subject: [PATCH 3007/3015] mt76: mt7915: wed: add mt7916 2 pcie support when
wed on
It should use bit 23 in interrupt mask for wfdma band1 data
@@ -34,10 +34,10 @@
MT7916_RXQ_MCU_WA_MAIN);
TXQ_CONFIG(0, WFDMA0, MT_INT_WED_TX_DONE_BAND0,
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index e3b7d824..b5a0967b 100644
+index 134dc5cb..7301ec1d 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -2416,7 +2416,8 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
+@@ -2417,7 +2417,8 @@ int mt7915_mcu_init_firmware(struct mt7915_dev *dev)
return ret;
if (mtk_wed_device_active(&dev->mt76.mmio.wed)) {
diff --git a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
index 0e6a4bf..78e257d 100644
--- a/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3008-mt76-mt7915-wed-add-rxwi-for-further-in-chip-rro.patch
@@ -1,7 +1,7 @@
-From 664c9ad764c5ec77923ec6a70623e7b294a4bf60 Mon Sep 17 00:00:00 2001
+From 8d7faa4d207c13487196d09de0c1c452703f1b84 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 3008/3010] mt76: mt7915: wed: add rxwi for further in chip rro
+Subject: [PATCH 3008/3015] mt76: mt7915: wed: add rxwi for further in chip rro
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
---
@@ -438,7 +438,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 a1ef8359..594dfcd5 100644
+index 0fbc1047..dd6b673b 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
@@ -57,6 +57,7 @@
diff --git a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
index d672e1b..d5bbee7 100644
--- a/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3009-mt76-mt7915-add-mt7915_net_setup_tc-to-support-wifi2.patch
@@ -1,7 +1,7 @@
-From 8084e069b66a729e756e8bf4d8b283043990aa44 Mon Sep 17 00:00:00 2001
+From b3a12a2a257355951c1f1a5902eb793a982bc23c Mon Sep 17 00:00:00 2001
From: Sujuan Chen <sujuan.chen@mediatek.com>
Date: Tue, 27 Dec 2022 09:45:14 +0800
-Subject: [PATCH 3009/3010] mt76: mt7915: add mt7915_net_setup_tc to support
+Subject: [PATCH 3009/3015] mt76: mt7915: add mt7915_net_setup_tc to support
wifi2wifi offload
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com>
@@ -10,10 +10,10 @@
1 file changed, 16 insertions(+)
diff --git a/mt7915/main.c b/mt7915/main.c
-index a9980e70..8ebea612 100644
+index c549a183..22d293e9 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1604,6 +1604,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
+@@ -1602,6 +1602,21 @@ mt7915_net_fill_receive_path(struct ieee80211_hw *hw,
return 0;
}
@@ -35,7 +35,7 @@
#endif
const struct ieee80211_ops mt7915_ops = {
-@@ -1657,5 +1672,6 @@ const struct ieee80211_ops mt7915_ops = {
+@@ -1655,5 +1670,6 @@ const struct ieee80211_ops mt7915_ops = {
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
.net_fill_forward_path = mt7915_net_fill_forward_path,
.net_fill_receive_path = mt7915_net_fill_receive_path,
diff --git a/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch b/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
index d76e753..85d97b1 100644
--- a/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3010-wifi-mt76-mt7915-add-wa-command-to-get-tx-msdu-count.patch
@@ -1,4 +1,4 @@
-From aecf943a183c8b1e0ea7d503e406b88ebed57d06 Mon Sep 17 00:00:00 2001
+From dbd25fa4a361f77c713e2f95e11c3806c490877e 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 3010/3015] wifi: mt76: mt7915: add wa command to get tx msdu
@@ -41,7 +41,7 @@
/* RXD DW1 */
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index 614df85e..57e02aec 100644
+index aed4ee95..2643f5aa 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
@@ -491,7 +491,9 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
@@ -80,10 +80,10 @@
MCU_EXT_EVENT_MURU_CTRL = 0x9f,
MCU_EXT_EVENT_CSI_REPORT = 0xc2,
diff --git a/mt7915/main.c b/mt7915/main.c
-index 8ebea612..dca93cd8 100644
+index 22d293e9..eba0caa6 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1101,9 +1101,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);
@@ -93,7 +93,7 @@
sinfo->tx_failed = msta->wcid.stats.tx_failed;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
-@@ -1121,6 +1118,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1119,6 +1116,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
}
}
@@ -106,7 +106,7 @@
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index b5a0967b..07681902 100644
+index 7301ec1d..3e0c3ab1 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -168,7 +168,9 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
@@ -137,7 +137,7 @@
mt7915_mcu_rx_unsolicited_event(dev, skb);
else
mt76_mcu_rx_event(&dev->mt76, skb);
-@@ -4086,6 +4089,53 @@ out:
+@@ -4087,6 +4090,53 @@ out:
return ret;
}
@@ -214,10 +214,10 @@
MCU_MMPS_STATIC,
MCU_MMPS_DYNAMIC,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 594dfcd5..d76ca390 100644
+index dd6b673b..6536285c 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -712,6 +712,7 @@ int mt7915_mcu_set_thermal_throttling(struct mt7915_phy *phy, u8 state);
+@@ -713,6 +713,7 @@ int mt7915_mcu_set_thermal_throttling(struct mt7915_phy *phy, u8 state);
int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, struct rate_info *rate);
diff --git a/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch b/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
index 64f073e..617ee6c 100644
--- a/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3011-wifi-mt76-get-tx-count-and-tx-failed-from-mcu-comman.patch
@@ -1,4 +1,4 @@
-From 08fd3173f9a7e7b7ae1112f43358068ea83faa56 Mon Sep 17 00:00:00 2001
+From 2a8cadb17c7c31806a41c5af0e97d76aed47fd94 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 3011/3015] wifi: mt76: get tx count and tx failed from mcu
@@ -27,7 +27,7 @@
u32 tx_failed;
/* WED RX */
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index 57e02aec..05a7a215 100644
+index 2643f5aa..05ba5f26 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
@@ -579,8 +579,6 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
@@ -52,10 +52,10 @@
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 dca93cd8..51129341 100644
+index eba0caa6..94b1ca61 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1101,9 +1101,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);
@@ -65,7 +65,7 @@
sinfo->tx_retries = msta->wcid.stats.tx_retries;
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
-@@ -1123,6 +1120,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1121,6 +1118,11 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
}
@@ -78,10 +78,10 @@
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 07681902..e9856c1b 100644
+index 3e0c3ab1..16a82e92 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
-@@ -4136,6 +4136,114 @@ out:
+@@ -4137,6 +4137,114 @@ out:
return ret;
}
@@ -230,10 +230,10 @@
CAPI_SU,
CAPI_MU,
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index d76ca390..ac019270 100644
+index 6536285c..5366b7bb 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -713,6 +713,7 @@ int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
+@@ -714,6 +714,7 @@ int mt7915_mcu_set_thermal_protect(struct mt7915_phy *phy);
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);
diff --git a/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch b/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
index 666f277..4dcba32 100644
--- a/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3012-wifi-mt76-mt7915-enable-PPDU-TxS-to-host-when-wed-en.patch
@@ -1,4 +1,4 @@
-From 8af0601319706314171a8f9ed9117dd3fada484f Mon Sep 17 00:00:00 2001
+From 3c70695fbf551ae8eaf90fa92f08ab45199f69e4 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 3012/3015] wifi: mt76: mt7915: enable PPDU-TxS to host when
@@ -13,7 +13,7 @@
4 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
-index 05a7a215..d7cca351 100644
+index 05ba5f26..4e24c492 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
@@ -490,8 +490,6 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
@@ -26,10 +26,10 @@
wcid->stats.tx_packets++;
}
diff --git a/mt7915/init.c b/mt7915/init.c
-index 92977b98..f24c45f6 100644
+index c3b186c8..a1be5b7d 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -489,6 +489,12 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band)
+@@ -491,6 +491,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);
diff --git a/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch b/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
index 3a1ba99..b2560bb 100644
--- a/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3013-wifi-mt76-mt7915-get-tx-retries-from-tx-free-done-ev.patch
@@ -1,4 +1,4 @@
-From 2d87b4aa84333ffdf4d42c16f5b13bc6c349285c Mon Sep 17 00:00:00 2001
+From 28eed1babbb1cc80d74d5d7fa433ee9d7acd1287 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 3013/3015] wifi: mt76: mt7915: get tx retries from tx free
@@ -74,10 +74,10 @@
/* will support this field in further revision */
diff --git a/mt7915/main.c b/mt7915/main.c
-index 51129341..ef1cf20c 100644
+index 94b1ca61..a4d1b816 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1103,9 +1103,6 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1101,9 +1101,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);
@@ -87,7 +87,7 @@
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);
-@@ -1115,6 +1112,9 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
+@@ -1113,6 +1110,9 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw,
}
}
diff --git a/recipes-wifi/linux-mt76/files/patches/3014-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch b/recipes-wifi/linux-mt76/files/patches/3014-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
index 3707c51..96c308b 100644
--- a/recipes-wifi/linux-mt76/files/patches/3014-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3014-wifi-mt76-update-debugfs-knob-for-reset-counter-and-.patch
@@ -1,4 +1,4 @@
-From 5cdb0e4160589abdd04c2a5bdc3bad935e7dbf32 Mon Sep 17 00:00:00 2001
+From 5b02de4f8b414de462c2c2df61aed85e745d5999 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 3014/3015] wifi: mt76: update debugfs knob for reset counter
@@ -9,7 +9,7 @@
1 file changed, 62 insertions(+)
diff --git a/mt7915/mtk_debugfs.c b/mt7915/mtk_debugfs.c
-index 5e64fe91..dbbf7ecc 100644
+index d203facf..479da4a0 100644
--- a/mt7915/mtk_debugfs.c
+++ b/mt7915/mtk_debugfs.c
@@ -3190,6 +3190,66 @@ mt7915_sw_aci_set(void *data, u64 val)
diff --git a/recipes-wifi/linux-mt76/files/patches/3015-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch b/recipes-wifi/linux-mt76/files/patches/3015-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
index 64743b6..883312e 100644
--- a/recipes-wifi/linux-mt76/files/patches/3015-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
+++ b/recipes-wifi/linux-mt76/files/patches/3015-mt76-connac-wed-add-wed-rx-copy-skb-and-revert-page_.patch
@@ -1,4 +1,4 @@
-From 6c1940b9974057133ad6a27509d21547937d2ab6 Mon Sep 17 00:00:00 2001
+From a8e76b8635c6daf65fb029ea4476ef777768c092 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 3015/3015] mt76: connac: wed: add wed rx copy skb and revert
@@ -10,10 +10,10 @@
mac80211.c | 57 ---------------------
mt76.h | 22 +-------
mt7915/main.c | 26 ++++------
- mt7915/mmio.c | 77 ++++++++++++++++++++--------
+ mt7915/mmio.c | 74 +++++++++++++++++++--------
mt7921/main.c | 31 ++----------
usb.c | 42 +++++++--------
- 7 files changed, 183 insertions(+), 210 deletions(-)
+ 7 files changed, 180 insertions(+), 210 deletions(-)
diff --git a/dma.c b/dma.c
index 76af6506..79da538c 100644
@@ -448,10 +448,10 @@
static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
{
diff --git a/mt7915/main.c b/mt7915/main.c
-index ef1cf20c..0a64ef01 100644
+index a4d1b816..21caddbe 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -1361,22 +1361,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
+@@ -1359,22 +1359,19 @@ void mt7915_get_et_strings(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u32 sset, u8 *data)
{
@@ -480,7 +480,7 @@
}
static void mt7915_ethtool_worker(void *wi_data, struct ieee80211_sta *sta)
-@@ -1404,7 +1401,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1402,7 +1399,7 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
};
struct mib_stats *mib = &phy->mib;
/* See mt7915_ampdu_stat_read_phy, etc */
@@ -489,7 +489,7 @@
mutex_lock(&dev->mt76.mutex);
-@@ -1485,12 +1482,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
+@@ -1483,12 +1480,9 @@ void mt7915_get_et_stats(struct ieee80211_hw *hw,
return;
ei += wi.worker_stat_count;
@@ -506,7 +506,7 @@
static void
diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 87cff5d4..0709f5bc 100644
+index 87cff5d4..b6adfd0b 100644
--- a/mt7915/mmio.c
+++ b/mt7915/mmio.c
@@ -581,9 +581,14 @@ static void mt7915_mmio_wed_offload_disable(struct mtk_wed_device *wed)
@@ -524,14 +524,14 @@
for (i = 0; i < dev->mt76.rx_token_size; i++) {
struct mt76_rxwi_cache *r;
-@@ -591,50 +596,82 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
+@@ -591,50 +596,79 @@ static void mt7915_mmio_wed_release_rx_buf(struct mtk_wed_device *wed)
if (!r || !r->ptr)
continue;
- mt76_put_page_pool_buf(r->ptr, false);
+ dma_unmap_single(dev->mt76.dma_dev, r->dma_addr,
+ wed->wlan.rx_size, DMA_FROM_DEVICE);
-+ __free_pages(virt_to_page(r->ptr), get_order(length));
++ skb_free_frag(r->ptr);
r->ptr = NULL;
mt76_put_rxwi(&dev->mt76, r);
@@ -540,10 +540,9 @@
mt76_free_pending_rxwi(&dev->mt76);
+
+ mt76_for_each_q_rx(&dev->mt76, i) {
-+ if (FIELD_GET(MT_QFLAG_WED_TYPE,
-+ dev->mt76.q_rx[i].flags) == MT76_WED_Q_RX) {
-+ struct mt76_queue *q = &dev->mt76.q_rx[i];
++ struct mt76_queue *q = &dev->mt76.q_rx[i];
+
++ if (mt76_queue_is_wed_rx(q)) {
+ if (!q->rx_page.va)
+ continue;
+
@@ -583,7 +582,6 @@
- u32 offset;
+ struct mt76_rxwi_cache *r = mt76_get_rxwi(&dev->mt76);
+ dma_addr_t phy_addr;
-+ struct page *page;
int token;
- void *buf;
+ void *ptr;
@@ -594,8 +592,8 @@
- buf = mt76_get_page_pool_buf(q, &offset, q->buf_size);
- if (!buf)
-+ page = __dev_alloc_pages(GFP_KERNEL, get_order(length));
-+ if (!page) {
++ ptr = page_frag_alloc(&wed->rx_buf_ring.rx_page, length, GFP_ATOMIC);
++ if (!ptr) {
+ mt76_put_rxwi(&dev->mt76, r);
goto unmap;
+ }
@@ -603,15 +601,14 @@
- addr = page_pool_get_dma_addr(virt_to_head_page(buf)) + offset;
- dir = page_pool_get_dma_dir(q->page_pool);
- dma_sync_single_for_device(dev->mt76.dma_dev, addr, len, dir);
-
-- desc->buf0 = cpu_to_le32(addr);
-- token = mt76_rx_token_consume(&dev->mt76, buf, r, addr);
-+ ptr = page_address(page);
+ phy_addr = dma_map_single(dev->mt76.dma_dev, ptr,
+ wed->wlan.rx_size,
+ DMA_TO_DEVICE);
+
+- desc->buf0 = cpu_to_le32(addr);
+- token = mt76_rx_token_consume(&dev->mt76, buf, r, addr);
+ if (unlikely(dma_mapping_error(dev->mt76.dev, phy_addr))) {
-+ __free_pages(page, get_order(length));
++ skb_free_frag(ptr);
+ mt76_put_rxwi(&dev->mt76, r);
+ goto unmap;
+ }
@@ -621,12 +618,12 @@
- mt76_put_page_pool_buf(buf, false);
+ dma_unmap_single(dev->mt76.dma_dev, phy_addr,
+ wed->wlan.rx_size, DMA_TO_DEVICE);
-+ __free_pages(page, get_order(length));
++ skb_free_frag(ptr);
+ mt76_put_rxwi(&dev->mt76, r);
goto unmap;
}
-@@ -646,8 +683,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+@@ -646,8 +680,6 @@ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
return 0;
unmap:
diff --git a/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch b/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch
index 6aba23f..143f279 100644
--- a/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch
+++ b/recipes-wifi/linux-mt76/files/patches/4001-mt76-revert-get_of_mac_addr.patch
@@ -1,7 +1,7 @@
From d5719b44dcc2f6ef728a63f523dbbe9f089a2eaf Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Tue, 13 Dec 2022 10:51:46 +0800
-Subject: [PATCH 4001/4006] mt76: revert get_of_mac_addr
+Subject: [PATCH 4001/4005] mt76: revert get_of_mac_addr
---
eeprom.c | 8 +++++++-
diff --git a/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch b/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch
index d1611f9..509b828 100644
--- a/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch
+++ b/recipes-wifi/linux-mt76/files/patches/4002-mt76-include-header-files-for-module-param.patch
@@ -1,7 +1,7 @@
From 83be679b14eb071b0eb1cedac9d004901322b2f3 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Tue, 13 Dec 2022 10:38:13 +0800
-Subject: [PATCH 4002/4006] mt76: include header files for module param
+Subject: [PATCH 4002/4005] mt76: include header files for module param
---
mcu.c | 1 +
diff --git a/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch b/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
index 6845b0f..d7d40c2 100644
--- a/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
+++ b/recipes-wifi/linux-mt76/files/patches/4003-mt76-revert-kernel-api-for-kernel-5.4.patch
@@ -1,7 +1,7 @@
From 1796376cd4aedff17a93f6a28c5b321d678ebf95 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 30 Dec 2022 11:11:59 +0800
-Subject: [PATCH 4003/4006] mt76: revert kernel api for kernel 5.4
+Subject: [PATCH 4003/4005] mt76: revert kernel api for kernel 5.4
---
debugfs.c | 2 ++
diff --git a/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch b/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
index 20fc039..1059763 100644
--- a/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
+++ b/recipes-wifi/linux-mt76/files/patches/4004-mt76-revert-for-backports-5.15-wireless-stack.patch
@@ -1,7 +1,7 @@
From fb3205686d76d409b1cdd4a25c2dd526fda4b2e4 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Fri, 30 Dec 2022 11:12:07 +0800
-Subject: [PATCH 4004/4006] mt76: revert for backports-5.15 wireless stack
+Subject: [PATCH 4004/4005] mt76: revert for backports-5.15 wireless stack
---
dma.c | 2 +-
@@ -539,10 +539,10 @@
mt7915_dma_enable(dev);
diff --git a/mt7915/init.c b/mt7915/init.c
-index 92977b98..25aa44f6 100644
+index a1be5b7d..9e8003d7 100644
--- a/mt7915/init.c
+++ b/mt7915/init.c
-@@ -1132,8 +1132,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
+@@ -1139,8 +1139,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
mt7915_gen_ppe_thresh(he_cap->ppe_thres, nss);
} else {
he_cap_elem->phy_cap_info[9] |=
@@ -553,7 +553,7 @@
if (band == NL80211_BAND_6GHZ) {
diff --git a/mt7915/mac.c b/mt7915/mac.c
-index 175498b1..c2e3048c 100644
+index b7559182..26eb211a 100644
--- a/mt7915/mac.c
+++ b/mt7915/mac.c
@@ -902,7 +902,7 @@ mt7915_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
@@ -566,7 +566,7 @@
tid = le32_get_bits(txwi[1], MT_TXD1_TID);
diff --git a/mt7915/main.c b/mt7915/main.c
-index 5307e15d..ac62f0be 100644
+index 21caddbe..fd62a659 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -523,7 +523,7 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
@@ -596,7 +596,7 @@
if (changed & BSS_CHANGED_ERP_CTS_PROT)
mt7915_mac_enable_rtscts(dev, vif, info->use_cts_prot);
-@@ -1223,10 +1223,10 @@ static int mt7915_sta_set_txpwr(struct ieee80211_hw *hw,
+@@ -1225,10 +1225,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);
@@ -610,7 +610,7 @@
mutex_lock(&dev->mt76.mutex);
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index f4867ea7..9005ce2b 100644
+index 003e33be..a7d3adc2 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -64,7 +64,7 @@ mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,
@@ -664,7 +664,7 @@
}
static int
-@@ -231,7 +231,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
+@@ -233,7 +233,7 @@ int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3)
static void
mt7915_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
@@ -673,7 +673,7 @@
ieee80211_csa_finish(vif);
}
-@@ -332,7 +332,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
+@@ -334,7 +334,7 @@ mt7915_mcu_rx_log_message(struct mt7915_dev *dev, struct sk_buff *skb)
static void
mt7915_mcu_cca_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
@@ -682,7 +682,7 @@
return;
ieee80211_color_change_finish(vif);
-@@ -745,13 +745,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+@@ -748,13 +748,13 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
struct ieee80211_vif *vif)
{
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
@@ -698,7 +698,7 @@
return;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HE, sizeof(*he));
-@@ -837,8 +837,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
+@@ -840,8 +840,8 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta,
he->he_cap = cpu_to_le32(cap);
@@ -709,16 +709,16 @@
case IEEE80211_STA_RX_BW_160:
if (elem->phy_cap_info[0] &
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
-@@ -888,7 +888,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
- struct ieee80211_sta *sta, struct ieee80211_vif *vif)
+@@ -892,7 +892,7 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
{
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
- struct mt7915_phy *phy = mvif->phy;
+ struct mt7915_phy *phy = mvif->phy;
- struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;
+ struct ieee80211_he_cap_elem *elem = &sta->he_cap.he_cap_elem;
struct sta_rec_muru *muru;
struct tlv *tlv;
-@@ -912,11 +912,11 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+
+@@ -916,11 +916,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);
@@ -733,7 +733,7 @@
return;
muru->mimo_dl.partial_bw_dl_mimo =
-@@ -950,13 +950,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+@@ -954,13 +954,13 @@ mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
struct sta_rec_ht *ht;
struct tlv *tlv;
@@ -749,7 +749,7 @@
}
static void
-@@ -965,15 +965,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
+@@ -969,15 +969,15 @@ mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta)
struct sta_rec_vht *vht;
struct tlv *tlv;
@@ -769,7 +769,7 @@
}
static void
-@@ -988,7 +988,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -992,7 +992,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
vif->type != NL80211_IFTYPE_AP)
return;
@@ -778,7 +778,7 @@
return;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_HW_AMSDU, sizeof(*amsdu));
-@@ -997,7 +997,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1001,7 +1001,7 @@ mt7915_mcu_sta_amsdu_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
amsdu->amsdu_en = true;
msta->wcid.amsdu = true;
@@ -787,7 +787,7 @@
case IEEE80211_MAX_MPDU_LEN_VHT_11454:
if (!is_mt7915(&dev->mt76)) {
amsdu->max_mpdu_size =
-@@ -1060,8 +1060,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -1064,8 +1064,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
if (!bfee && tx_ant < 2)
return false;
@@ -798,7 +798,7 @@
if (bfee)
return mvif->cap.he_su_ebfee &&
-@@ -1071,8 +1071,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
+@@ -1075,8 +1075,8 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,
HE_PHY(CAP4_SU_BEAMFORMEE, pe->phy_cap_info[4]);
}
@@ -809,7 +809,7 @@
if (bfee)
return mvif->cap.vht_su_ebfee &&
-@@ -1098,7 +1098,7 @@ static void
+@@ -1102,7 +1102,7 @@ static void
mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
struct sta_rec_bf *bf)
{
@@ -818,7 +818,7 @@
u8 n = 0;
bf->tx_mode = MT_PHY_TYPE_HT;
-@@ -1123,7 +1123,7 @@ static void
+@@ -1127,7 +1127,7 @@ static void
mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
struct sta_rec_bf *bf, bool explicit)
{
@@ -827,7 +827,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);
-@@ -1144,14 +1144,14 @@ mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy,
+@@ -1148,14 +1148,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;
@@ -844,7 +844,7 @@
bf->ibf_nrow = 1;
}
}
-@@ -1160,7 +1160,7 @@ static void
+@@ -1164,7 +1164,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)
{
@@ -853,7 +853,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);
-@@ -1185,7 +1185,7 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif,
+@@ -1189,7 +1189,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;
@@ -862,7 +862,7 @@
return;
/* go over for 160MHz and 80p80 */
-@@ -1233,7 +1233,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1237,7 +1237,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
};
bool ebf;
@@ -871,7 +871,7 @@
return;
ebf = mt7915_is_ebf_supported(phy, vif, sta, false);
-@@ -1247,21 +1247,21 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1251,21 +1251,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
*/
@@ -899,7 +899,7 @@
bf->ibf_timeout = 0x48;
else
bf->ibf_timeout = 0x18;
-@@ -1271,7 +1271,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1275,7 +1275,7 @@ mt7915_mcu_sta_bfer_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
else
bf->mem_20m = matrix[bf->nrow][bf->ncol];
@@ -908,7 +908,7 @@
case IEEE80211_STA_RX_BW_160:
case IEEE80211_STA_RX_BW_80:
bf->mem_total = bf->mem_20m * 2;
-@@ -1296,7 +1296,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1300,7 +1300,7 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
struct tlv *tlv;
u8 nrow = 0;
@@ -917,7 +917,7 @@
return;
if (!mt7915_is_ebf_supported(phy, vif, sta, true))
-@@ -1305,13 +1305,13 @@ mt7915_mcu_sta_bfee_tlv(struct mt7915_dev *dev, struct sk_buff *skb,
+@@ -1309,13 +1309,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;
@@ -935,7 +935,7 @@
nrow = FIELD_GET(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK,
pc->cap);
-@@ -1367,7 +1367,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
+@@ -1371,7 +1371,7 @@ int mt7915_mcu_set_fixed_rate_ctrl(struct mt7915_dev *dev,
ra->phy = *phy;
break;
case RATE_PARAM_MMPS_UPDATE:
@@ -944,7 +944,7 @@
break;
case RATE_PARAM_SPE_UPDATE:
ra->spe_idx = *(u8 *)data;
-@@ -1442,7 +1442,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1446,7 +1446,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; \
@@ -953,7 +953,7 @@
phy.sgi |= gi << (i << (_he)); \
phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\
} \
-@@ -1456,11 +1456,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1460,11 +1460,11 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
} \
} while (0)
@@ -968,7 +968,7 @@
__sta_phy_bitrate_mask_check(ht_mcs, gi, 1, 0);
} else {
nrates = hweight32(mask->control[band].legacy);
-@@ -1494,7 +1494,7 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev,
+@@ -1498,7 +1498,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);
@@ -977,7 +977,7 @@
mt76_rmw_field(dev, addr, GENMASK(31, 24), phy.sgi);
else
mt76_rmw_field(dev, addr, GENMASK(15, 12), phy.sgi);
-@@ -1527,7 +1527,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1531,7 +1531,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;
@@ -986,7 +986,7 @@
u32 cap = sta->wme ? STA_CAP_WMM : 0;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_RA, sizeof(*ra));
-@@ -1537,9 +1537,9 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1541,9 +1541,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;
@@ -999,7 +999,7 @@
if (supp_rate) {
supp_rate &= mask->control[band].legacy;
-@@ -1559,22 +1559,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1563,22 +1563,22 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
}
}
@@ -1030,7 +1030,7 @@
cap |= STA_CAP_LDPC;
mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs,
-@@ -1582,37 +1582,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
+@@ -1586,37 +1586,37 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,
ra->supp_ht_mcs = *(__le32 *)ra->ht_mcs;
}
@@ -1078,7 +1078,7 @@
IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP);
}
-@@ -1821,7 +1821,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
+@@ -1825,7 +1825,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee80211_vif *vif, struct sk_buff *rskb,
if (!offs->cntdwn_counter_offs[0])
return;
@@ -1087,7 +1087,7 @@
tlv = mt7915_mcu_add_nested_subtlv(rskb, sub_tag, sizeof(*info),
&bcn->sub_ntlv, &bcn->len);
info = (struct bss_info_bcn_cntdwn *)tlv;
-@@ -1906,9 +1906,9 @@ mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
+@@ -1910,9 +1910,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];
@@ -1099,7 +1099,7 @@
cont->bcc_ofs = cpu_to_le16(offset - 3);
}
-@@ -2093,7 +2093,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+@@ -2097,7 +2097,7 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (!en)
goto out;
@@ -1108,7 +1108,7 @@
if (!skb)
return -EINVAL;
-@@ -3354,17 +3354,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
+@@ -3358,17 +3358,17 @@ int mt7915_mcu_set_txpower_frame(struct mt7915_phy *phy,
if (txpower) {
u32 offs, len, i;
@@ -1151,7 +1151,7 @@
sta->wme = 1;
diff --git a/tx.c b/tx.c
-index a72b7779..04b6f2e7 100644
+index 36b0f486..6b590b27 100644
--- a/tx.c
+++ b/tx.c
@@ -60,20 +60,15 @@ mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
diff --git a/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch b/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch
index 1b4049d..8404f7b 100644
--- a/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch
+++ b/recipes-wifi/linux-mt76/files/patches/4005-wifi-mt76-revert-EHT-definitions.patch
@@ -1,7 +1,7 @@
From b655964b1f68678a665f30a68c13a73feeffaa73 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 3 Feb 2023 17:09:55 +0800
-Subject: [PATCH 4005/4006] wifi: mt76: revert EHT definitions
+Subject: [PATCH 4005/4005] wifi: mt76: revert EHT definitions
Revert the following patches
* 68b17a24 wifi: mt76: connac: add helpers for EHT capability
@@ -99,10 +99,10 @@
#define DEFAULT_HE_DURATION_RTS_THRES 1023
static void
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
-index 130a8d25..2faef32b 100644
+index 747ae7e9..3d4322d1 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
-@@ -1895,12 +1895,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
+@@ -1897,12 +1897,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);
diff --git a/recipes-wifi/linux-mt76/files/patches/4006-wifi-mt76-revert-ser-patches.patch b/recipes-wifi/linux-mt76/files/patches/4006-wifi-mt76-revert-ser-patches.patch
deleted file mode 100644
index ac71e70..0000000
--- a/recipes-wifi/linux-mt76/files/patches/4006-wifi-mt76-revert-ser-patches.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 21960def41a69264aadbd66be033ac32820e1909 Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu@mediatek.com>
-Date: Fri, 3 Feb 2023 15:41:59 +0800
-Subject: [PATCH 4006/4006] wifi: mt76: revert ser patches
-
----
- mt7915/mac.c | 2 +-
- mt7915/mmio.c | 30 +++---------------------------
- 2 files changed, 4 insertions(+), 28 deletions(-)
-
-diff --git a/mt7915/mac.c b/mt7915/mac.c
-index c2e3048c..f1a21422 100644
---- a/mt7915/mac.c
-+++ b/mt7915/mac.c
-@@ -1632,7 +1632,7 @@ void mt7915_mac_reset_work(struct work_struct *work)
- return;
-
- if (mtk_wed_device_active(&dev->mt76.mmio.wed)) {
-- mtk_wed_device_stop(&dev->mt76.mmio.wed);
-+ mtk_wed_device_stop(&dev->mt76.mmio.wed, true);
- if (!is_mt7986(&dev->mt76))
- mt76_wr(dev, MT_INT_WED_MASK_CSR, 0);
- }
-diff --git a/mt7915/mmio.c b/mt7915/mmio.c
-index 6b9752b2..33231599 100644
---- a/mt7915/mmio.c
-+++ b/mt7915/mmio.c
-@@ -733,40 +733,17 @@ static void mt7915_mmio_wed_update_rx_stats(struct mtk_wed_device *wed,
- rcu_read_unlock();
- }
-
--static int mt7915_mmio_wed_reset(struct mtk_wed_device *wed)
-+static void mt7915_mmio_wed_reset(struct mtk_wed_device *wed)
- {
- struct mt76_dev *mdev = container_of(wed, struct mt76_dev, mmio.wed);
- struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
- struct mt76_phy *mphy = &dev->mphy;
- int ret;
-
-- ASSERT_RTNL();
--
-- if (test_and_set_bit(MT76_STATE_WED_RESET, &mphy->state))
-- return -EBUSY;
--
- ret = mt7915_mcu_set_ser(dev, SER_RECOVER, SER_SET_RECOVER_L1,
- mphy->band_idx);
-- if (ret)
-- goto out;
--
-- rtnl_unlock();
-- if (!wait_for_completion_timeout(&mdev->mmio.wed_reset, 20 * HZ)) {
-- dev_err(mdev->dev, "wed reset timeout\n");
-- ret = -ETIMEDOUT;
-- }
-- rtnl_lock();
--out:
-- clear_bit(MT76_STATE_WED_RESET, &mphy->state);
--
-- return ret;
--}
--
--static void mt7915_mmio_wed_reset_complete(struct mtk_wed_device *wed)
--{
-- struct mt76_dev *dev = container_of(wed, struct mt76_dev, mmio.wed);
-
-- complete(&dev->mmio.wed_reset_complete);
-+ return;
- }
- #endif
-
-@@ -850,8 +827,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
- wed->wlan.init_rx_buf = mt7915_mmio_wed_init_rx_buf;
- wed->wlan.release_rx_buf = mt7915_mmio_wed_release_rx_buf;
- wed->wlan.update_wo_rx_stats = mt7915_mmio_wed_update_rx_stats;
-- wed->wlan.reset = mt7915_mmio_wed_reset;
-- wed->wlan.reset_complete = mt7915_mmio_wed_reset_complete;
-+ wed->wlan.ser_trigger = mt7915_mmio_wed_reset;
-
- dev->mt76.rx_token_size += wed->wlan.rx_npkt;
-
---
-2.18.0
-
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index 9484ae8..84cafb7 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -53,5 +53,4 @@
file://4003-mt76-revert-kernel-api-for-kernel-5.4.patch \
file://4004-mt76-revert-for-backports-5.15-wireless-stack.patch \
file://4005-wifi-mt76-revert-EHT-definitions.patch \
- file://4006-wifi-mt76-revert-ser-patches.patch \
"