3e25f2bc33af wifi: mt76: mt7925: introduce MLO capability control
ce3622257026 wifi: mt76: mt7925: fix fails to enter low power mode in suspend state
dfdb8e975718 wifi: mt76: mt7915: fix possible integer overflows in mt7915_muru_stats_show()
29f0ad5a439a wifi: mt76: mt7925: ensure wow pattern command align fw format
5eab65bb5473 wifi: mt76: mt7925: fix country count limitation for CLC
d6a197dbc9a2 wifi: mt76: Add check for devm_kstrdup()
901492c4621a wifi: mt76: mt7925: Remove unnecessary if-check
24062ce4fa0f wifi: mt76: mt7925: Simplify HIF suspend handling to avoid suspend fail
56c0beddbed8 wifi: mt76: mt7921: fix kernel panic due to null pointer dereference
11bacfcce3b9 Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"
2823c50b1c15 wifi: mt76: mt7925: fix the wrong link_idx when has p2p_device
f54ff3cabab6 wifi: mt76: mt7925: fix the wrong simultaneous cap for MLO
aa7d366ccf40 wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure
d25359e8bb83 wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd
25a0285d8ee3 wifi: mt76: mt7925: update the power-saving flow
5910f0806c05 wifi: mt76: mt7925: load the appropriate CLC data based on hardware type
454a69cbb718 wifi: mt76: mt7925: add EHT control support based on the CLC data
bdc09b8f2321 wifi: mt76: mt7925: update the channel usage when the regd domain changed
772dcb4b4e61 wifi: mt76: mt7925: remove unused acpi function for clc
b94b025490ef wifi: mt76: mt792x: extend MTCL of APCI to version3 for EHT control
9ff2afce5fef wifi: mt76: mt7925: add MTCL support to enhance the regulatory compliance
f11807364258 wifi: mt76: add mt76_get_power_bound helper function
ffd1cbfc485e wifi: mt76: mt7921: fix returned txpower
687e2fdfbf40 wifi: mt76: mt7925: fix returned txpower
43aaa62fbc55 wifi: mt76: mt7915: cleanup mt7915_get_power_bound
a4be3fc9ed4b wifi: mt76: mt7996: cleanup mt7996_get_power_bound
0ba7a69f8927 wifi: mt76: move napi_enable() from under BH
1b370c689a2f wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain
e931cecc45de mt76: mt792x: fix unused variable warning
539e7e711a15 Revert "wifi: mt76: mt7925: fix returned txpower"
67c724cc60b1 Revert "wifi: mt76: mt7921: fix returned txpower"
52f51a398e7e wifi: mt76: mt7996: Add change_vif_links stub
b3b61abd733f wifi: mt76: mt7996: Introduce mt7996_sta_link container
915938e83c35 wifi: mt76: mt7996: Add mt7996_sta_link struct in mt7996_vif_link
3e06380a43a4 wifi: mt76: mt7996: Add vif_cfg_changed callback
f419c62e9198 wifi: mt76: mt7996: Add link_info_changed callback
3082c9edbe35 wifi: mt76: mt7996: Add mt7996_sta_state routine
46e20e5d7455 wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks
1de180821525 wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callback
2efb26f1fc10 wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()
2e249744bc12 wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()
0eee20d3e388 wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support
200ce414fe61 wifi: mt76: mt7996: Rely on mt7996_vif_link in mt7996_mcu_twt_agrt_update signature
d195324131ba wifi: mt76: mt7996: Rely on mt7996_vif/sta_link in twt teardown
7757e7c140f7 wifi: mac80211: call rate_control_rate_update() for link STA
a3b651aeb551 wifi: mt76: mt7996: Update mt7996_mcu_add_rate_ctrl to MLO
2a005953dc49 wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()
58e8b71782fc wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouine
e0b422f2acaf wifi: mt76: mt7996: rework mt7996_mac_write_txwi() for MLO support
21aa0c288470 wifi: mt76: mt7996: Rely on wcid_to_sta in mt7996_mac_add_txs_skb()
87c437fa8b43 wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLO
9b4de3ce7fc7 wifi: mt76: mt7996: rework mt7996_sta_set_4addr and mt7996_sta_set_decap_offload to support MLO
a369b0c14d25 wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature
9c6ec015afbb wifi: mt76: mt7996: rework mt7996_set_hw_key to support MLO
60967d28a5e0 wifi: mt76: mt7996: rework mt7996_sta_hw_queue_read to support MLO
3668d57795e3 wifi: mt76: mt7996: remove mt7996_mac_enable_rtscts()
275e6a681bac wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO
057822770ca5 wifi: mt76: mt7996: rework mt7996_mac_sta_poll to support MLO
b9682a51c109 wifi: mt76: mt7996: rework mt7996_update_mu_group to support MLO
d1a5a0afa6d6 wifi: mt76: mt7996: rework mt7996_net_fill_forward_path to support MLO
56529041b364 wifi: mt76: mt7996: rework mt7996_mcu_add_obss_spr to support MLO
c788d5748dc8 wifi: mt76: mt7996: rework mt7996_mcu_beacon_inband_discov to support MLO
974e6c2df98b wifi: mt76: mt7996: set vif default link_id adding/removing vif links
70717b761af2 wifi: mt76: mt7996: rework set/get_tsf callabcks to support MLO
d01b9d300eaa wifi: mt76: mt7996: rework mt7996_ampdu_action to support MLO
d5cddf65f7a7 wifi: mt76: mt7996: Update mt7996_tx to MLO support
a1ed21a66913 wifi: mt76: mt792x: re-register CHANCTX_STA_CSA only for the mt7921 series
a826fc287483 wifi: mt76: mt7925: update MLO cleanup flow during disconnection
0994f0af632e wifi: mt76: mt7925: fix the incomplete revert of [tx,rx]_ba for MLO
5169d4e8669b wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table
46f3a10a9f0f mt76: mt7925: sync with upstream cleanups
de635e1e3adc wifi: mt76: mt7996: fix locking in mt7996_mac_sta_rc_work()
63a4edf1cb74 wifi: mt76: mt7996: add macros for pci decive id
a2dd2f7896f7 wifi: mt76: connac: add support to load firmware for mt7990
3908cf04aa39 wifi: mt76: mt7996: rework WA mcu command for mt7990
6243414a4e80 wifi: mt76: mt7996: rework DMA configuration for mt7990
a8def214d736 wifi: mt76: mt7996: rework register mapping for mt7990
51db7a2d57f6 wifi: mt76: mt7996: add eeprom support for mt7990
d0799f3303e9 wifi: mt76: mt7996: adjust HW capabilities for mt7990
10c3ea97a86d wifi: mt76: connac: rework TX descriptor and TX free for mt7990
bc588ac3d104 wifi: mt76: mt7996: rework background radar check for mt7990
f8c3dd3677dd wifi: mt76: mt7996: add PCI device id for mt7990
3cec186474c4 wifi: mt76: mt7915: set correct background radar capability
9bacdb2bf2c3 wifi: mt76: mt7915: rework radar HWRDD idx
a19543c7e05e wifi: mt76: mt7996: rework radar HWRDD idx
b0cf33e76a3a wifi: mt76: mt7925: Fix logical vs bitwise typo
0433adc883c9 wifi: mt76: mt7925: add EHT preamble puncturing
be28ef77e330 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init
55218e636092 Revert "wifi: mt76: mt7996: fill txd by host driver"
fdfe9eca6401 wifi: mt76: disable napi on driver removal
d7a070e11de4 wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
29363a669195 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
e285cb42be03 wifi: mt76: Remove an unneeded local variable in mt76x02_dma_init()
3dee73c357cf wifi: mt76x2: Add support for LiteOn WN4516R,WN4519R
73f9582f92b6 wifi: mt76: mt7925: introduce thermal protection
cf8522c5eea8 wifi: mt76: mt7925: fix host interrupt register initialization
8a24527e6c63 wifi: mt76: mt7921: add 160 MHz AP for mt7922 device
d0ef73122e8b wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor()
7fdbe4cb5c8d wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy()
925d156dab3d wifi: mt76: mt7996: fix uninitialized symbol warning
a403590fd464 Revert "wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()"
ca76c1bcede4 wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
b70a4a619538 wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check
2247afffc734 wifi: mt76: add mt76_connac_mcu_build_rnr_scan_param routine
460aa7da0ef6 wifi: mt76: mt7925: add RNR scan support for 6GHz
a68584ddf98e wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
025c1d19b55a wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
c20015bdc88b wifi: mt76: mt7925: prevent multiple scan commands
832387a1f876 wifi: mt76: mt7925: refine the sniffer commnad
7bf6a2914a54 wifi: mt76: mt7925: ensure all MCU commands wait for response
1bd4dbd48281 wifi: mt76: mt7925: extend MCU support for testmode
0ca6ed4e2724 wifi: mt76: mt7925: add test mode support
a2838480f805 wifi: mt76: remove capability of partial bandwidth UL MU-MIMO
1865f5ea80ea wifi: mt76: mt7996: fix beamformee SS field
3bda39f1465e wifi: mt76: mt7996: set EHT max ampdu length capability
7d30840e5b21 wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
bf22595a1d8a wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
b9f01d7c368c wifi: mt76: mt7996: change max beacon size
8808d7c4eed7 wifi: mt76: mt7996: fix RX buffer size of MCU event
36e0b90e47ff wifi: mt76: fix available_antennas setting
da2c23bec426 wifi: mt76: support power delta calculation for 5 TX paths
3e161d0cf3c7 wifi: mt76: mt7925: add rfkill_poll for hardware rfkill
ee6dac9b6b76 wifi: mt76: mt7915: mcu: increase eeprom command timeout
0534761b76e1 wifi: mt76: mt7915: mcu: lower default timeout
79dd14f2e816 wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch
f2943046881d wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context
656eb209ec42 wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field()
4f47d90943a3 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed()
189532e383c1 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl()
5603bd03d56a wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work()
ca24f0794e94 wifi: mt76: mt7925: fix the wrong config for tx interrupt
63f18baa5bb6 wifi: mt76: mt7925: fix invalid array index in ssid assignment during hw scan
4bdc4c5f26e0 wifi: mt76: mt7925: fix incorrect scan probe IE handling for hw_scan
321ae47a7439 wifi: mt76: mt7925: fix off by one in mt7925_mcu_hw_scan()
3699df4e85ec wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_sta_set_decap_offload()
a17fbd3d8598 wifi: mt76: mt7921: prevent decap offload config before STA initialization
6df761e0e6c7 mt76: fix signature of platform_driver remove funtions for newer kernels
5724be1a6b12 wifi: mt76: Replace strlcpy() with strscpy()
c4a114e2b8c9 wifi: mt76: fix queue assignment for deauth packets
243e572d89fc wifi: mt76: add a wrapper for wcid access with validation
e41c7785589f wifi: mac80211: get tx power per link
d70f62b8f1c7 wifi: mt76: fix vif link allocation
7b3cd3274a24 wifi: mt76: mt7996: Fix secondary link lookup in mt7996_mcu_sta_mld_setup_tlv()
cf89b6218043 wifi: mt76: mt7996: Rely on for_each_sta_active_link() in mt7996_mcu_sta_mld_setup_tlv()
d71108eedab1 wifi: mt76: mt7996: Do not set wcid.sta to 1 in mt7996_mac_sta_event()
32f8c5849ed1 wifi: mt76: mt7996: Fix mlink lookup in mt7996_tx_prepare_skb
ffff9f71e29d wifi: mt76: mt7996: Fix possible OOB access in mt7996_tx()
afe63e758196 wifi: mt76: mt7996: Fix valid_links bitmask in mt7996_mac_sta_{add,remove}
68dd28b99dad wifi: mt76: mt7996: Add MLO support to mt7996_tx_check_aggr()
293778652452 wifi: mt76: mt7996: Move num_sta accounting in mt7996_mac_sta_{add,remove}_links
a94166b21e20 wifi: mt76: Get rid of dma_sync_single_for_device() for MMIO devices
87873d854e51 wifi: mt76: mt7925: Fix null-ptr-deref in mt7925_thermal_init()
06ba3d5e91f4 wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel
b9f4e0df317d wifi: mt76: mt792x: improve monitor interface handling
ec95319fd3fb wifi: mt76: mt7921s: Introduce SDIO WiFi/BT combo module card reset
dd2d862251cb firmware: add missing mt7990 eeprom files
05eaa56bc7a4 firmware: update mt7992 firmware to
20250328
32ca2b6db354 firmware: update mt7996 firmware to
20250328
00275548ba8f wifi: mt76: mt7996: Overwrite unspecified link_id in mt7996_tx()
2601bb91e078 wifi: mt76: mt7996: Fix mt7996_mcu_sta_ba wcid configuration
110ecc331123 wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine
449a1aca9f72 wifi: mt76: mt7996: Initialize hdr before passing to skb_put_data()
1de707e73fc7 wifi: mt76: mt7921: don't disconnect when CSA to DFS chan
fce683dbcfc9 wifi: mt76: mt7925: fix locking in mt7925_change_vif_links()
11f721bce235 wifi: mt76: mt7925: fix the wrong bss cleanup for SAP
b3613d9a317d wifi: mt76: mt7996: Set def_wcid pointer in mt7996_mac_sta_init_link()
d1a2900a390d wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()
56990ce9289a wifi: mt76: mt7925u: Add VID/PID for Netgear A9000
e796542a0585 wifi: mt76: mt7925: add MBSSID support
e35e4f8fcf8a wifi: mt76: fix potential memory leak in mt76_wmac_probe()
aa2f13c3be79 wifi: mt76: mt7996: disable beacons when going offchannel
630e166c958d wifi: mt76: prevent non-offchannel mgmt tx during scan/roc
d3e7c2051aae wifi: mt76: mt7996: use the correct vif link for scanning/roc
903a7e0ace79 wifi: mt76: mt7921: add MBSSID support
Sync with commit
4010984db9e63369dce50dd5fd34e9ad31f6f32d
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
PKG_USE_NINJA:=0
--- /dev/null
+--- 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,
+++ /dev/null
-From ee6dac9b6b765e8aab5727688463880c52f6193d Mon Sep 17 00:00:00 2001
-From: David Bauer <mail@david-bauer.net>
-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 <mail@david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-2-mail@david-bauer.net
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- 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;
- }
+++ /dev/null
-From 0534761b76e1b2e3390b345e524ce959f3fa50fb Mon Sep 17 00:00:00 2001
-From: David Bauer <mail@david-bauer.net>
-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 <mail@david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-1-mail@david-bauer.net
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- 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;
-
+++ /dev/null
-From 79dd14f2e8161b656341b6653261779199aedbe4 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail@david-bauer.net>
-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 <mail@david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-3-mail@david-bauer.net
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- 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));