From ffd0074694722a919333e0a8283ac58929457af0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 16 May 2024 14:06:12 +0200 Subject: [PATCH] mt76: update to Git HEAD (2024-02-03) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit a9693e1979c2 linux-firmware: add firmware for MT7996 0258dc90e3a1 wifi: mt76: mt7603: fix reading target power from eeprom 3e81173d9e2b wifi: mt76: mt7603: initialize chainmask 786a339bac36 wifi: mt76: mt7996: fix fortify warning bc37a7ebc267 wifi: mt76: mt7996: fix fw loading timeout 027bab6a88a3 wifi: mt76: usb: create a dedicated queue for psd traffic e8909c610c3b wifi: mt76: usb: store usb endpoint in mt76_queue 8b3d96fa4ead wifi: mt76: mt792xu: enable dmashdl support 7864d7ad0ed0 wifi: mt76: mt76x2u: add netgear wdna3100v3 to device table 27c81f7c1480 wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band b7443c63069a wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band bab721a65f5a wifi: mt76: mt7925: fix mcu query command fail 1f0f71ed81e8 wifi: mt76: mt7925: fix wmm queue mapping bcfe2ad966f3 wifi: mt76: mt7925: fix fw download fail f982c3d67a29 wifi: mt76: mt7925: fix WoW failed in encrypted mode 6a72716ec213 wifi: mt76: mt7925: fix the wrong header translation config 50928b7e1359 wifi: mt76: mt7925: add flow to avoid chip bt function fail 762ab4530e8f wifi: mt76: mt7925: add support to set ifs time by mcu command 87deaf82efa4 wifi: mt76: mt7925: update PCIe DMA settings c190c1576522 wifi: mt76: mt7925: support temperature sensor 025d5734caba wifi: mt76: mt7996: check txs format before getting skb by pid 4768bfa2baca wifi: mt76: mt7996: fix TWT issues a65e3eced907 wifi: mt76: mt7996: disable AMSDU for non-data frames d71716d93aee wifi: mt76: mt7996: fix incorrect interpretation of EHT MCS caps f21728f3f4bd wifi: mt76: mt7996: ensure 4-byte alignment for beacon commands 68dad7dacd2a wifi: mt76: mt7996: fix HE beamformer phy cap for station vif 66a28f340cdc wifi: mt76: mt7996: mark GCMP IGTK unsupported b47ad8a7764e wifi: mt76: mt7996: fix efuse reading issue c2fc7dae7b72 wifi: mt76: mt7996: remove TXS queue setting e0f1ed168ed5 wifi: mt76: mt7996: add locking for accessing mapped registers d0cc92c1fd08 wifi: mt76: connac: set correct muar_idx for mt799x chipsets ae0c62279adc wifi: mt76: mt7996: fix HIF_TXD_V2_1 value ecc14276af54 wifi: mt76: mt792x: fix ethtool warning 9827df56b241 wifi: mt76: move wed common utilities in wed.c dccbd2598505 wifi: mt76: mt7925: fix the wrong data type for scan command 9907f4f20261 wifi: mt76: mt792x: add the illegal value check for mtcl table of acpi 1b088a7ac06d wifi: mt76: mt7921e: fix use-after-free in free_irq() f3c5b4820d7f wifi: mt76: mt7925e: fix use-after-free in free_irq() d75eac9f5531 wifi: mt76: mt7921: fix incorrect type conversion for CLC command 7bd5401f5bb1 wifi: mt76: mt792x: fix a potential loading failure of the 6Ghz channel config from ACPI ea55196bc4a0 wifi: mt76: mt792x: update the country list of EU for ACPI SAR 6124ea9135ed wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend Signed-off-by: Felix Fietkau (cherry picked from commit 114190d8ae61fb3a7671852fbd7f0ca3279a5625) [rmilecki: add patches/fixes for regressions from this commit] Signed-off-by: Rafał Miłecki --- package/kernel/mt76/Makefile | 24 +++++++- ...-issue-of-missing-txpwr-settings-fr.patch} | 2 +- ...996-fix-size-of-txpower-MCU-command.patch} | 6 +- ...wifi-mt76-mt7996-fix-fortify-warning.patch | 26 -------- ...fix-uninitialized-variable-in-mt799.patch} | 2 +- ...i-mt76-mt7996-fix-fw-loading-timeout.patch | 38 ------------ ...fix-potential-memory-leakage-when-r.patch} | 4 +- ...-check-for-null-before-dereferencing.patch | 27 +++++++++ ...-check-txs-format-before-getting-skb.patch | 60 ------------------- ...-use-muar-idx-0xe-for-non-mt799x-as-.patch | 25 ++++++++ ...-fix-incorrect-type-conversion-for-C.patch | 38 ------------ 11 files changed, 80 insertions(+), 172 deletions(-) rename package/kernel/mt76/patches/{0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch => 0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch} (94%) rename package/kernel/mt76/patches/{0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch => 0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch} (89%) delete mode 100644 package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch rename package/kernel/mt76/patches/{0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch => 0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch} (94%) delete mode 100644 package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch rename package/kernel/mt76/patches/{0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch => 0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch} (90%) create mode 100644 package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch delete mode 100644 package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch create mode 100644 package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch delete mode 100644 package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 1fea3bd0e9..4f0fb5f69d 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-01-18 -PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0 -PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0 +PKG_SOURCE_DATE:=2024-02-03 +PKG_SOURCE_VERSION:=6124ea9135ed512671933f5520c46842906c78bc +PKG_MIRROR_HASH:=acc326d7b15c9c72b494ed601300be329553f896e65c7f045e6a09327304c34a PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 @@ -323,6 +323,12 @@ define KernelPackage/mt7996e AUTOLOAD:=$(call AutoProbe,mt7996e) endef +define KernelPackage/mt7996-firmware + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7996 firmware + DEPENDS+=+kmod-mt7996e +endef + define KernelPackage/mt7925-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7925 wireless driver common code @@ -610,6 +616,17 @@ define KernelPackage/mt7922-firmware/install $(1)/lib/firmware/mediatek endef +define KernelPackage/mt7996-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 + cp \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ + $(1)/lib/firmware/mediatek/mt7996 +endef + define Package/mt76-test/install mkdir -p $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin @@ -654,5 +671,6 @@ $(eval $(call KernelPackage,mt7921e)) $(eval $(call KernelPackage,mt7925u)) $(eval $(call KernelPackage,mt7925e)) $(eval $(call KernelPackage,mt7996e)) +$(eval $(call KernelPackage,mt7996-firmware)) $(eval $(call KernelPackage,mt76)) $(eval $(call BuildPackage,mt76-test)) diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch similarity index 94% rename from package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch rename to package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch index 380bdfac38..ef7816a1a7 100644 --- a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch +++ b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/mt76_connac_mcu.c +++ b/mt76_connac_mcu.c -@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct +@@ -2104,7 +2104,7 @@ mt76_connac_mcu_rate_txpower_band(struct int j, msg_len, num_ch; struct sk_buff *skb; diff --git a/package/kernel/mt76/patches/0008-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 similarity index 89% rename from package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch rename to package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch index f1d3af80b8..f3d824558d 100644 --- a/package/kernel/mt76/patches/0008-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 @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mcu.c +++ b/mt7996/mcu.c -@@ -4456,7 +4456,7 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -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), @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau .power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL, .power_limit_type = TX_POWER_LIMIT_TABLE_RATE, .band_idx = phy->mt76->band_idx, -@@ -4471,7 +4471,7 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -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, @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau if (!skb) return -ENOMEM; -@@ -4495,6 +4495,9 @@ int mt7996_mcu_set_txpower_sku(struct mt +@@ -4503,6 +4503,9 @@ int mt7996_mcu_set_txpower_sku(struct mt /* eht */ skb_put_data(skb, &la.eht[0], sizeof(la.eht)); diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch deleted file mode 100644 index f3cf9c10fa..0000000000 --- a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 786a339bac36d8e53eb8b540e79221d20011ab2a Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Sat, 3 Feb 2024 14:21:58 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix fortify warning - -Copy cck and ofdm separately in order to avoid __read_overflow2_field -warning. - -Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") -Signed-off-by: Felix Fietkau ---- - mt7996/mcu.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/mt7996/mcu.c -+++ b/mt7996/mcu.c -@@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt - - skb_put_data(skb, &req, sizeof(req)); - /* cck and ofdm */ -- skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm)); -+ skb_put_data(skb, &la.cck, sizeof(la.cck)); -+ skb_put_data(skb, &la.ofdm, sizeof(la.ofdm)); - /* ht20 */ - skb_put_data(skb, &la.mcs[0], 8); - /* ht40 */ diff --git a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch similarity index 94% rename from package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch rename to package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch index b0b7a78e3c..c121bec972 100644 --- a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch +++ b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mmio.c +++ b/mt7996/mmio.c -@@ -499,7 +499,7 @@ static void mt7996_irq_tasklet(struct ta +@@ -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; diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch deleted file mode 100644 index 9c2247b0c2..0000000000 --- a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch +++ /dev/null @@ -1,38 +0,0 @@ -From bc37a7ebc267e400fc4e9886b7197b4b866763d1 Mon Sep 17 00:00:00 2001 -From: Lorenzo Bianconi -Date: Thu, 21 Dec 2023 10:41:18 +0100 -Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout - -Fix the following firmware loading error due to a wrong dma register -configuration if wed is disabled. - -[ 8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128 -[ 8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002) -[ 8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering -[ 8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126 -[ 8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002) -[ 8.274551] mt7996e 0000:01:00.0: enabling bus mastering -[ 28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout -[ 28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore -[ 29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11 - -Suggested-by: Sujuan Chen" -Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM") -Signed-off-by: Lorenzo Bianconi -Signed-off-by: Felix Fietkau ---- - mt7996/dma.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/mt7996/dma.c -+++ b/mt7996/dma.c -@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev - MT_WFDMA0_GLO_CFG_TX_DMA_EN | - MT_WFDMA0_GLO_CFG_RX_DMA_EN | - MT_WFDMA0_GLO_CFG_OMIT_TX_INFO | -- MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2); -+ MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 | -+ MT_WFDMA0_GLO_CFG_EXT_EN); - - if (dev->hif2) - mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs, diff --git a/package/kernel/mt76/patches/0010-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 similarity index 90% rename from package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch rename to package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch index a0d62dc5af..421ace147e 100644 --- a/package/kernel/mt76/patches/0010-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 @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/mt7996/mcu.c +++ b/mt7996/mcu.c -@@ -3721,6 +3721,7 @@ int mt7996_mcu_get_temperature(struct mt +@@ -3729,6 +3729,7 @@ int mt7996_mcu_get_temperature(struct mt } __packed * res; struct sk_buff *skb; int ret; @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL), &req, sizeof(req), true, &skb); -@@ -3728,8 +3729,10 @@ int mt7996_mcu_get_temperature(struct mt +@@ -3736,8 +3737,10 @@ int mt7996_mcu_get_temperature(struct mt return ret; res = (void *)skb->data; 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 new file mode 100644 index 0000000000..a5c6fdb16b --- /dev/null +++ b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch @@ -0,0 +1,27 @@ +From 725f531c14597f20645321d8a900796f5a68e135 Mon Sep 17 00:00:00 2001 +From: Muhammad Usama Anjum +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 +Reviewed-by: AngeloGioacchino Del Regno +Signed-off-by: Felix Fietkau +--- + 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/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch deleted file mode 100644 index f72c76ec66..0000000000 --- a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 025d5734caba6fa1fd96b57c19c61e42e601815b Mon Sep 17 00:00:00 2001 -From: Peter Chiu -Date: Fri, 26 Jan 2024 17:09:12 +0800 -Subject: [PATCH] wifi: mt76: mt7996: check txs format before getting skb by - pid - -The PPDU TXS does not include the error bit so it cannot use to report -status to mac80211. This patch fixes issue that STA wrongly detects if AP -is still alive. - -Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host") -Signed-off-by: Peter Chiu -Signed-off-by: Shayne Chen -Signed-off-by: Felix Fietkau ---- - mt7996/mac.c | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - ---- a/mt7996/mac.c -+++ b/mt7996/mac.c -@@ -1188,25 +1188,28 @@ mt7996_mac_add_txs_skb(struct mt7996_dev - struct ieee80211_tx_info *info; - struct sk_buff_head list; - struct rate_info rate = {}; -- struct sk_buff *skb; -+ struct sk_buff *skb = NULL; - bool cck = false; - u32 txrate, txs, mode, stbc; - - txs = le32_to_cpu(txs_data[0]); - - mt76_tx_status_lock(mdev, &list); -- skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); - -- if (skb) { -- info = IEEE80211_SKB_CB(skb); -- if (!(txs & MT_TXS0_ACK_ERROR_MASK)) -- info->flags |= IEEE80211_TX_STAT_ACK; -- -- info->status.ampdu_len = 1; -- info->status.ampdu_ack_len = -- !!(info->flags & IEEE80211_TX_STAT_ACK); -+ /* only report MPDU TXS */ -+ if (le32_get_bits(txs_data[0], MT_TXS0_TXS_FORMAT) == 0) { -+ skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list); -+ if (skb) { -+ info = IEEE80211_SKB_CB(skb); -+ if (!(txs & MT_TXS0_ACK_ERROR_MASK)) -+ info->flags |= IEEE80211_TX_STAT_ACK; -+ -+ info->status.ampdu_len = 1; -+ info->status.ampdu_ack_len = -+ !!(info->flags & IEEE80211_TX_STAT_ACK); - -- info->status.rates[0].idx = -1; -+ info->status.rates[0].idx = -1; -+ } - } - - if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) { 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 new file mode 100644 index 0000000000..6aa47d9c62 --- /dev/null +++ b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch @@ -0,0 +1,25 @@ +From 1e336a8582dce2ef32ddd440d423e9afef961e71 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +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 +--- + 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/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch deleted file mode 100644 index a85dfb7f72..0000000000 --- a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d75eac9f5531e484fbbabf2652922976e15a7a7a Mon Sep 17 00:00:00 2001 -From: Ming Yen Hsieh -Date: Tue, 16 Jan 2024 10:48:54 +0800 -Subject: [PATCH] wifi: mt76: mt7921: fix incorrect type conversion for CLC - command - -clc->len is defined as 32 bits in length, so it must also be -operated on with 32 bits, not 16 bits. - -Fixes: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC") -Signed-off-by: Ming Yen Hsieh -Reported-by: kernel test robot -Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp@intel.com/ -Signed-off-by: Felix Fietkau ---- - mt7921/mcu.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/mt7921/mcu.c -+++ b/mt7921/mcu.c -@@ -1272,7 +1272,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d - .mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2), - }; - int ret, valid_cnt = 0; -- u16 buf_len = 0; -+ u32 buf_len = 0; - u8 *pos; - - if (!clc) -@@ -1283,7 +1283,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d - if (mt76_find_power_limits_node(&dev->mt76)) - req.cap |= CLC_CAP_DTS_EN; - -- buf_len = le16_to_cpu(clc->len) - sizeof(*clc); -+ buf_len = le32_to_cpu(clc->len) - sizeof(*clc); - pos = clc->data; - while (buf_len > 16) { - struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos; -- 2.30.2