wifi: mt76: mt7925: add MCU command error handling#1031
Open
zbowling wants to merge 3 commits intoopenwrt:masterfrom
Open
wifi: mt76: mt7925: add MCU command error handling#1031zbowling wants to merge 3 commits intoopenwrt:masterfrom
zbowling wants to merge 3 commits intoopenwrt:masterfrom
Conversation
Check return values of mt7925_mcu_uni_rx_ba() and mt7925_mcu_uni_tx_ba() in mt7925_ampdu_action() and propagate errors to the caller. Previously, failures in these MCU commands were silently ignored, which could leave block aggregation in an inconsistent state between the driver and firmware. For IEEE80211_AMPDU_TX_STOP_CONT, only call the completion callback ieee80211_stop_tx_ba_cb_irqsafe() if the MCU command succeeded, to avoid signaling completion when the firmware operation failed. Reported-by: Zac Bowling <zac@zacbowling.com> Signed-off-by: Zac Bowling <zac@zacbowling.com>
…a_add Check return value of mt7925_mcu_add_bss_info() in mt7925_mac_link_sta_add() and propagate errors to the caller. BSS info must be set up before adding a station record. If this MCU command fails, continuing with station add would leave the firmware in an inconsistent state with a station but no BSS configuration. Reported-by: Zac Bowling <zac@zacbowling.com> Signed-off-by: Zac Bowling <zac@zacbowling.com>
Check return value of mt7925_mcu_add_bss_info() in mt7925_set_key_link() when setting up cipher for the first time and propagate errors. The BSS info update with cipher information must succeed before key programming can proceed. If this MCU command fails, continuing with key setup would program keys into the firmware for a BSS that doesn't have the correct cipher configuration. Reported-by: Zac Bowling <zac@zacbowling.com> Signed-off-by: Zac Bowling <zac@zacbowling.com>
This was referenced Jan 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds error handling for critical MCU commands in the MT7925 driver.
Problem
Several MCU commands in the MT7925 driver ignore return values, which could leave
the driver and firmware in inconsistent states when commands fail.
Changes
Patch 1: AMPDU MCU Error Handling
mt7925_mcu_uni_rx_ba()andmt7925_mcu_uni_tx_ba()Patch 2: Station Add BSS Info Error Handling
mt7925_mcu_add_bss_info()inmt7925_mac_link_sta_add()Patch 3: Key Setup BSS Info Error Handling
mt7925_mcu_add_bss_info()during cipher setupTesting
Tested on Framework Desktop (AMD Ryzen AI Max 300 Series) with MT7925 WiFi.
These fixes complement the mutex fixes in PR #1029 and NULL checks in PR #1030.
Related