[openwrt/openwrt] mt76: update to Git HEAD (2024-04-03)

LEDE Commits lede-commits at lists.infradead.org
Wed Jul 3 01:24:25 PDT 2024


rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/f64576f367eb21f6f968af181001ab395a9c00d0

commit f64576f367eb21f6f968af181001ab395a9c00d0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu May 16 22:15:09 2024 +0200

    mt76: update to Git HEAD (2024-04-03)
    
    605624a4e17b mt76: fix path to page_pool helper include
    e4de3592c4e3 wifi: mt76: mt7603: fix tx queue of loopback packets
    446f652c967c wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset
    669aba47a145 wifi: mt76: mt7915: fix HE PHY capability regression
    5914ea57a31f wifi: mt76: mt7915: workaround dubious x | !y warning
    e8b5991f7dac wifi: mt76: mt7915: workaround too long expansion sparse warnings
    e507b4e32ead wifi: mt76: mt7921: fix fw used for offload check for mt7922
    725f531c1459 wifi: mt76: connac: check for null before dereferencing
    b108dda7e201 wifi: mt76: mt7996: fix size of txpower MCU command
    5b7616491f07 wifi: mt76: mt7921: introduce mt7920 PCIe support
    0436995feca9 wifi: mt76: mt7921s: fix potential hung tasks during chip recovery
    75759dca73d5 wifi: mt76: mt7925: ensure 4-byte alignment for suspend & wow command
    b96ab5e62010 wifi: mt76: mt7996: fix uninitialized variable in mt7996_irq_tasklet()
    7ff11c7259a3 wifi: mt76: sdio: move mcu queue size check inside critical section
    02846a5d0f0f wifi: mt76: mt7915: Remove unused of_gpio.h
    cb8df32e0475 wifi: mt76: mt7996: disable rx header translation for BMC entry
    a4c4b550512e wifi: mt76: connac: use peer address for station BMC entry
    260c5b7c3ba0 wifi: mt76: mt7996: set RCPI value in rate control command
    0b7e645db9c2 wifi: mt76: connac: enable HW CSO module for mt7996
    f19035fe0b4d wifi: mt76: mt7996: fix non-main BSS no beacon issue for MBSS scenario
    424e9df466ce wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature
    f70cb4f0508e wifi: mt76: connac: enable critical packet mode support for mt7992
    5f1bf8865247 wifi: mt76: mt7996: add sanity checks for background radar trigger
    1e336a8582dc wifi: mt76: connac: use muar idx 0xe for non-mt799x as well
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit a10a6fbac794b30885d65ec817ebdcfe9f94d78a)
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       |  8 +-
 ...76-mt7996-fix-size-of-txpower-MCU-command.patch | 56 ------------
 ...t7996-fix-uninitialized-variable-in-mt799.patch | 27 ------
 ...t7996-fix-potential-memory-leakage-when-r.patch | 39 ---------
 ...onnac-check-for-null-before-dereferencing.patch | 27 ------
 ...onnac-use-muar-idx-0xe-for-non-mt799x-as-.patch | 25 ------
 ...6-mt7603-fix-tx-queue-of-loopback-packets.patch | 99 ----------------------
 ...t7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch | 24 ------
 8 files changed, 4 insertions(+), 301 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index cb71d9eeae..3f48c76faa 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,16 +1,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=3
+PKG_RELEASE=1
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-03-18
-PKG_SOURCE_VERSION:=2135e201e7a9339e018d4e2d4a33c73266e674d7
-PKG_MIRROR_HASH:=810f636c60c86e6a426c676c3bf7aaea2f711feb31f4a66889d485112b612745
+PKG_SOURCE_DATE:=2024-04-03
+PKG_SOURCE_VERSION:=1e336a8582dce2ef32ddd440d423e9afef961e71
+PKG_MIRROR_HASH:=f3801af80d5f9c1aa266c9401d4dfa2d501df0382c81fd249150e17dddc70936
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
deleted file mode 100644
index f3d824558d..0000000000
--- a/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b108dda7e201994f10c885362b07ff3b6e1e843d Mon Sep 17 00:00:00 2001
-From: Chad Monroe <chad at monroe.io>
-Date: Tue, 5 Mar 2024 17:55:35 +0000
-Subject: [PATCH] wifi: mt76: mt7996: fix size of txpower MCU command
-
-Fixes issues with scanning and low power output at some rates.
-
-Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
-Signed-off-by: Chad Monroe <chad at monroe.io>
-Signed-off-by: Ryder Lee <ryder.lee at mediatek.com>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/mcu.c    | 7 +++++--
- mt7996/mt7996.h | 1 +
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
---- a/mt7996/mcu.c
-+++ b/mt7996/mcu.c
-@@ -4464,7 +4464,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
- 		u8 band_idx;
- 	} __packed req = {
- 		.tag = cpu_to_le16(UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL),
--		.len = cpu_to_le16(sizeof(req) + MT7996_SKU_RATE_NUM - 4),
-+		.len = cpu_to_le16(sizeof(req) + MT7996_SKU_PATH_NUM - 4),
- 		.power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL,
- 		.power_limit_type = TX_POWER_LIMIT_TABLE_RATE,
- 		.band_idx = phy->mt76->band_idx,
-@@ -4479,7 +4479,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
- 	mphy->txpower_cur = tx_power;
- 
- 	skb = mt76_mcu_msg_alloc(&dev->mt76, NULL,
--				 sizeof(req) + MT7996_SKU_RATE_NUM);
-+				 sizeof(req) + MT7996_SKU_PATH_NUM);
- 	if (!skb)
- 		return -ENOMEM;
- 
-@@ -4503,6 +4503,9 @@ int mt7996_mcu_set_txpower_sku(struct mt
- 	/* eht */
- 	skb_put_data(skb, &la.eht[0], sizeof(la.eht));
- 
-+	/* padding */
-+	skb_put_zero(skb, MT7996_SKU_PATH_NUM - MT7996_SKU_RATE_NUM);
-+
- 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
- 				     MCU_WM_UNI_CMD(TXPOWER), true);
- }
---- a/mt7996/mt7996.h
-+++ b/mt7996/mt7996.h
-@@ -50,6 +50,7 @@
- #define MT7996_CFEND_RATE_11B		0x03	/* 11B LP, 11M */
- 
- #define MT7996_SKU_RATE_NUM		417
-+#define MT7996_SKU_PATH_NUM		494
- 
- #define MT7996_MAX_TWT_AGRT		16
- #define MT7996_MAX_STA_TWT_AGRT		8
diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
deleted file mode 100644
index c121bec972..0000000000
--- a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b96ab5e62010887a8abee43dbcccf6f4b3fcb269 Mon Sep 17 00:00:00 2001
-From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Tue, 19 Mar 2024 13:05:36 +0100
-Subject: [PATCH] wifi: mt76: mt7996: fix uninitialized variable in
- mt7996_irq_tasklet()
-
-Set intr1 to 0 in mt7996_irq_tasklet() in order to avoid possible
-uninitialized variable usage if wed is not active for hif2.
-
-Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support")
-Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/mmio.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/mt7996/mmio.c
-+++ b/mt7996/mmio.c
-@@ -519,7 +519,7 @@ static void mt7996_irq_tasklet(struct ta
- 	struct mt7996_dev *dev = from_tasklet(dev, t, mt76.irq_tasklet);
- 	struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
- 	struct mtk_wed_device *wed_hif2 = &dev->mt76.mmio.wed_hif2;
--	u32 i, intr, mask, intr1;
-+	u32 i, intr, mask, intr1 = 0;
- 
- 	if (dev->hif2 && mtk_wed_device_active(wed_hif2)) {
- 		mtk_wed_device_irq_set_mask(wed_hif2, 0);
diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
deleted file mode 100644
index 421ace147e..0000000000
--- a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 424e9df466cea3bb39a1e92bf95f3efe65472c27 Mon Sep 17 00:00:00 2001
-From: Howard Hsu <howard-yh.hsu at mediatek.com>
-Date: Wed, 20 Mar 2024 19:09:14 +0800
-Subject: [PATCH] wifi: mt76: mt7996: fix potential memory leakage when reading
- chip temperature
-
-Without this commit, reading chip temperature will cause memory leakage.
-
-Fixes: 6879b2e94172 ("wifi: mt76: mt7996: add thermal sensor device support")
-Reported-by: Ryder Lee <ryder.lee at mediatek.com>
-Signed-off-by: Howard Hsu <howard-yh.hsu at mediatek.com>
-Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/mcu.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/mt7996/mcu.c
-+++ b/mt7996/mcu.c
-@@ -3729,6 +3729,7 @@ int mt7996_mcu_get_temperature(struct mt
- 	} __packed * res;
- 	struct sk_buff *skb;
- 	int ret;
-+	u32 temp;
- 
- 	ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL),
- 					&req, sizeof(req), true, &skb);
-@@ -3736,8 +3737,10 @@ int mt7996_mcu_get_temperature(struct mt
- 		return ret;
- 
- 	res = (void *)skb->data;
-+	temp = le32_to_cpu(res->temperature);
-+	dev_kfree_skb(skb);
- 
--	return le32_to_cpu(res->temperature);
-+	return temp;
- }
- 
- int mt7996_mcu_set_thermal_throttling(struct mt7996_phy *phy, u8 state)
diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch
deleted file mode 100644
index a5c6fdb16b..0000000000
--- a/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 725f531c14597f20645321d8a900796f5a68e135 Mon Sep 17 00:00:00 2001
-From: Muhammad Usama Anjum <usama.anjum at collabora.com>
-Date: Fri, 1 Mar 2024 19:44:06 +0500
-Subject: [PATCH] wifi: mt76: connac: check for null before dereferencing
-
-The wcid can be NULL. It should be checked for validity before
-dereferencing it to avoid crash.
-
-Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
-Signed-off-by: Muhammad Usama Anjum <usama.anjum at collabora.com>
-Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt76_connac_mcu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/mt76_connac_mcu.c
-+++ b/mt76_connac_mcu.c
-@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m
- 	};
- 	struct sk_buff *skb;
- 
--	if (is_mt799x(dev) && !wcid->sta)
-+	if (is_mt799x(dev) && wcid && !wcid->sta)
- 		hdr.muar_idx = 0xe;
- 
- 	mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo,
diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch
deleted file mode 100644
index 6aa47d9c62..0000000000
--- a/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1e336a8582dce2ef32ddd440d423e9afef961e71 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 3 Apr 2024 13:01:01 +0200
-Subject: [PATCH] wifi: mt76: connac: use muar idx 0xe for non-mt799x as well
-
-This is expected by the firmware of older chipsets as well, though it may
-not have been as strongly required as on mt799x
-
-Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt76_connac_mcu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/mt76_connac_mcu.c
-+++ b/mt76_connac_mcu.c
-@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m
- 	};
- 	struct sk_buff *skb;
- 
--	if (is_mt799x(dev) && wcid && !wcid->sta)
-+	if (wcid && !wcid->sta)
- 		hdr.muar_idx = 0xe;
- 
- 	mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo,
diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch b/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch
deleted file mode 100644
index 56a2aea6f6..0000000000
--- a/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From e4de3592c4e3baa82142eff583cb5a761f790709 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Tue, 2 Apr 2024 20:14:34 +0200
-Subject: [PATCH] wifi: mt76: mt7603: fix tx queue of loopback packets
-
-Use the correct WMM AC queue instead of the MGMT one to fix potential issues
-with aggregation sequence number tracking. Drop non-bufferable packets.
-
-Fixes: fca9615f1a43 ("mt76: mt7603: fix up hardware queue index for PS filtered packets")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7603/dma.c | 46 ++++++++++++++++++++++++++++++++--------------
- 1 file changed, 32 insertions(+), 14 deletions(-)
-
---- a/mt7603/dma.c
-+++ b/mt7603/dma.c
-@@ -4,6 +4,13 @@
- #include "mac.h"
- #include "../dma.h"
- 
-+static const u8 wmm_queue_map[] = {
-+	[IEEE80211_AC_BK] = 0,
-+	[IEEE80211_AC_BE] = 1,
-+	[IEEE80211_AC_VI] = 2,
-+	[IEEE80211_AC_VO] = 3,
-+};
-+
- static void
- mt7603_rx_loopback_skb(struct mt7603_dev *dev, struct sk_buff *skb)
- {
-@@ -22,10 +29,10 @@ mt7603_rx_loopback_skb(struct mt7603_dev
- 	struct ieee80211_sta *sta;
- 	struct mt7603_sta *msta;
- 	struct mt76_wcid *wcid;
-+	u8 tid = 0, hwq = 0;
- 	void *priv;
- 	int idx;
- 	u32 val;
--	u8 tid = 0;
- 
- 	if (skb->len < MT_TXD_SIZE + sizeof(struct ieee80211_hdr))
- 		goto free;
-@@ -42,19 +49,36 @@ mt7603_rx_loopback_skb(struct mt7603_dev
- 		goto free;
- 
- 	priv = msta = container_of(wcid, struct mt7603_sta, wcid);
--	val = le32_to_cpu(txd[0]);
--	val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX);
--	val |= FIELD_PREP(MT_TXD0_Q_IDX, MT_TX_HW_QUEUE_MGMT);
--	txd[0] = cpu_to_le32(val);
- 
- 	sta = container_of(priv, struct ieee80211_sta, drv_priv);
- 	hdr = (struct ieee80211_hdr *)&skb->data[MT_TXD_SIZE];
--	if (ieee80211_is_data_qos(hdr->frame_control))
-+
-+	hwq = wmm_queue_map[IEEE80211_AC_BE];
-+	if (ieee80211_is_data_qos(hdr->frame_control)) {
- 		tid = *ieee80211_get_qos_ctl(hdr) &
--		      IEEE80211_QOS_CTL_TAG1D_MASK;
--	skb_set_queue_mapping(skb, tid_to_ac[tid]);
-+			 IEEE80211_QOS_CTL_TAG1D_MASK;
-+		u8 qid = tid_to_ac[tid];
-+		hwq = wmm_queue_map[qid];
-+		skb_set_queue_mapping(skb, qid);
-+	} else if (ieee80211_is_data(hdr->frame_control)) {
-+		skb_set_queue_mapping(skb, IEEE80211_AC_BE);
-+		hwq = wmm_queue_map[IEEE80211_AC_BE];
-+	} else {
-+		skb_pull(skb, MT_TXD_SIZE);
-+		if (!ieee80211_is_bufferable_mmpdu(skb))
-+			goto free;
-+		skb_push(skb, MT_TXD_SIZE);
-+		skb_set_queue_mapping(skb, MT_TXQ_PSD);
-+		hwq = MT_TX_HW_QUEUE_MGMT;
-+	}
-+
- 	ieee80211_sta_set_buffered(sta, tid, true);
- 
-+	val = le32_to_cpu(txd[0]);
-+	val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX);
-+	val |= FIELD_PREP(MT_TXD0_Q_IDX, hwq);
-+	txd[0] = cpu_to_le32(val);
-+
- 	spin_lock_bh(&dev->ps_lock);
- 	__skb_queue_tail(&msta->psq, skb);
- 	if (skb_queue_len(&msta->psq) >= 64) {
-@@ -151,12 +175,6 @@ static int mt7603_poll_tx(struct napi_st
- 
- int mt7603_dma_init(struct mt7603_dev *dev)
- {
--	static const u8 wmm_queue_map[] = {
--		[IEEE80211_AC_BK] = 0,
--		[IEEE80211_AC_BE] = 1,
--		[IEEE80211_AC_VI] = 2,
--		[IEEE80211_AC_VO] = 3,
--	};
- 	int ret;
- 	int i;
- 
diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch b/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch
deleted file mode 100644
index 31c4de4a0f..0000000000
--- a/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 446f652c967c11d50d9005e2acec97f8b577bb92 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 3 Apr 2024 11:11:54 +0200
-Subject: [PATCH] wifi: mt76: mt7603: add wpdma tx eof flag for PSE client
- reset
-
-This flag is needed for the PSE client reset. Fixes watchdog reset issues.
-
-Fixes: c677dda16523 ("wifi: mt76: mt7603: improve watchdog reset reliablity")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7603/mac.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/mt7603/mac.c
-+++ b/mt7603/mac.c
-@@ -1393,6 +1393,7 @@ void mt7603_pse_client_reset(struct mt76
- 		   MT_CLIENT_RESET_TX_R_E_2_S);
- 
- 	/* Start PSE client TX abort */
-+	mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_FORCE_TX_EOF);
- 	mt76_set(dev, addr, MT_CLIENT_RESET_TX_R_E_1);
- 	mt76_poll_msec(dev, addr, MT_CLIENT_RESET_TX_R_E_1_S,
- 		       MT_CLIENT_RESET_TX_R_E_1_S, 500);




More information about the lede-commits mailing list