diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index ca7fe6c159..026218e478 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:=2025-02-14 -PKG_SOURCE_VERSION:=e5fef138524e63314cb96ff8314048d175294e95 -PKG_MIRROR_HASH:=4d6ea8669b3034c97f5b341a5473facf4fe21262a2fde71257b57c4d1c86be5e +PKG_SOURCE_DATE:=2025-08-13 +PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b +PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 diff --git a/package/kernel/mt76/patches/100-api_compat.patch b/package/kernel/mt76/patches/100-api_compat.patch new file mode 100644 index 0000000000..3dd4e1f799 --- /dev/null +++ b/package/kernel/mt76/patches/100-api_compat.patch @@ -0,0 +1,84 @@ +--- a/mt7915/main.c ++++ b/mt7915/main.c +@@ -1224,10 +1224,9 @@ static void mt7915_sta_rc_work(void *dat + + static void mt7915_sta_rc_update(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, +- struct ieee80211_link_sta *link_sta, ++ struct ieee80211_sta *sta, + u32 changed) + { +- struct ieee80211_sta *sta = link_sta->sta; + struct mt7915_phy *phy = mt7915_hw_phy(hw); + struct mt7915_dev *dev = phy->dev; + struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; +@@ -1771,7 +1770,7 @@ const struct ieee80211_ops mt7915_ops = + .stop_ap = mt7915_stop_ap, + .sta_state = mt76_sta_state, + .sta_pre_rcu_remove = mt76_sta_pre_rcu_remove, +- .link_sta_rc_update = mt7915_sta_rc_update, ++ .sta_rc_update = mt7915_sta_rc_update, + .set_key = mt7915_set_key, + .ampdu_action = mt7915_ampdu_action, + .set_rts_threshold = mt7915_set_rts_threshold, +--- a/mt7996/main.c ++++ b/mt7996/main.c +@@ -715,8 +715,7 @@ static void mt7996_configure_filter(stru + } + + static int +-mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, int *dbm) ++mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm) + { + struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv; + struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink); +@@ -1714,13 +1713,12 @@ out: + rcu_read_unlock(); + } + +-static void mt7996_link_sta_rc_update(struct ieee80211_hw *hw, +- struct ieee80211_vif *vif, +- struct ieee80211_link_sta *link_sta, +- u32 changed) ++static void mt7996_sta_rc_update(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta, ++ u32 changed) + { + struct mt7996_dev *dev = mt7996_hw_dev(hw); +- struct ieee80211_sta *sta = link_sta->sta; + + mt7996_link_rate_ctrl_update(&changed, sta); + ieee80211_queue_work(hw, &dev->rc_work); +@@ -2213,7 +2211,7 @@ const struct ieee80211_ops mt7996_ops = + .link_info_changed = mt7996_link_info_changed, + .sta_state = mt7996_sta_state, + .sta_pre_rcu_remove = mt76_sta_pre_rcu_remove, +- .link_sta_rc_update = mt7996_link_sta_rc_update, ++ .sta_rc_update = mt7996_sta_rc_update, + .set_key = mt7996_set_key, + .ampdu_action = mt7996_ampdu_action, + .set_rts_threshold = mt7996_set_rts_threshold, +--- a/mac80211.c ++++ b/mac80211.c +@@ -1704,7 +1704,7 @@ s8 mt76_get_power_bound(struct mt76_phy + EXPORT_SYMBOL_GPL(mt76_get_power_bound); + + int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, int *dbm) ++ int *dbm) + { + struct mt76_phy *phy = mt76_vif_phy(hw, vif); + int n_chains, delta; +--- a/mt76.h ++++ b/mt76.h +@@ -1520,7 +1520,7 @@ int mt76_get_min_avg_rssi(struct mt76_de + s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower); + + int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- unsigned int link_id, int *dbm); ++ int *dbm); + int mt76_init_sar_power(struct ieee80211_hw *hw, + const struct cfg80211_sar_specs *sar); + int mt76_get_sar_power(struct mt76_phy *phy, diff --git a/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch b/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch deleted file mode 100644 index e618e536e6..0000000000 --- a/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ee6dac9b6b765e8aab5727688463880c52f6193d Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Wed, 2 Apr 2025 02:45:26 +0200 -Subject: [PATCH] wifi: mt76: mt7915: mcu: increase eeprom command timeout - -Increase the timeout for MCU_EXT_CMD_EFUSE_BUFFER_MODE command. - -Regular retries upon hardware-recovery have been observed. Increasing -the timeout slightly remedies this problem. - -Signed-off-by: David Bauer -Link: https://patch.msgid.link/20250402004528.1036715-2-mail@david-bauer.net -Signed-off-by: Felix Fietkau ---- - mt7915/mcu.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/mt7915/mcu.c -+++ b/mt7915/mcu.c -@@ -208,6 +208,9 @@ mt7915_mcu_set_timeout(struct mt76_dev * - case MCU_EXT_CMD_BSS_INFO_UPDATE: - mdev->mcu.timeout = 2 * HZ; - return; -+ case MCU_EXT_CMD_EFUSE_BUFFER_MODE: -+ mdev->mcu.timeout = 10 * HZ; -+ return; - default: - break; - } diff --git a/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch b/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch deleted file mode 100644 index a624fcfa0a..0000000000 --- a/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0534761b76e1b2e3390b345e524ce959f3fa50fb Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Wed, 2 Apr 2025 02:45:25 +0200 -Subject: [PATCH] wifi: mt76: mt7915: mcu: lower default timeout - -The default timeout set in mt76_connac2_mcu_fill_message of 20 seconds -leads to excessive stalling in case messages are lost. - -Testing showed that a smaller timeout of 5 seconds is sufficient in -normal operation. - -Signed-off-by: David Bauer -Link: https://patch.msgid.link/20250402004528.1036715-1-mail@david-bauer.net -Signed-off-by: Felix Fietkau ---- - mt7915/mcu.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/mt7915/mcu.c -+++ b/mt7915/mcu.c -@@ -197,6 +197,8 @@ mt7915_mcu_parse_response(struct mt76_de - static void - mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd) - { -+ mdev->mcu.timeout = 5 * HZ; -+ - if ((cmd & __MCU_CMD_FIELD_ID) != MCU_CMD_EXT_CID) - return; - diff --git a/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch b/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch deleted file mode 100644 index 76d005fc21..0000000000 --- a/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 79dd14f2e8161b656341b6653261779199aedbe4 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Wed, 2 Apr 2025 02:45:27 +0200 -Subject: [PATCH] wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch - -Restart the MCU and release the patch semaphore before loading the MCU -patch firmware from the host. - -This fixes failures upon error recovery in case the semaphore was -previously taken and never released by the host. - -This happens from time to time upon triggering a full-chip error -recovery. Under this circumstance, the hardware restart fails and the -radio is rendered inoperational. - -Signed-off-by: David Bauer -Link: https://patch.msgid.link/20250402004528.1036715-3-mail@david-bauer.net -Signed-off-by: Felix Fietkau ---- - mt7915/mcu.c | 25 +++++++++++++++---------- - 1 file changed, 15 insertions(+), 10 deletions(-) - ---- a/mt7915/mcu.c -+++ b/mt7915/mcu.c -@@ -2097,16 +2097,21 @@ static int mt7915_load_firmware(struct m - { - int ret; - -- /* make sure fw is download state */ -- if (mt7915_firmware_state(dev, false)) { -- /* restart firmware once */ -- mt76_connac_mcu_restart(&dev->mt76); -- ret = mt7915_firmware_state(dev, false); -- if (ret) { -- dev_err(dev->mt76.dev, -- "Firmware is not ready for download\n"); -- return ret; -- } -+ /* Release Semaphore if taken by previous failed attempt */ -+ ret = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false); -+ if (ret != PATCH_REL_SEM_SUCCESS) { -+ dev_err(dev->mt76.dev, "Could not release semaphore\n"); -+ /* Continue anyways */ -+ } -+ -+ /* Always restart MCU firmware */ -+ mt76_connac_mcu_restart(&dev->mt76); -+ -+ /* Check if MCU is ready */ -+ ret = mt7915_firmware_state(dev, false); -+ if (ret) { -+ dev_err(dev->mt76.dev, "Firmware did not enter download state\n"); -+ return ret; - } - - ret = mt76_connac2_load_patch(&dev->mt76, fw_name_var(dev, ROM_PATCH));