mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: connac: tolerate inactive BSS deactivation
Firmware may return wlan_failure when deactivating a BSS that is already inactive. This is a valid teardown case and should not fail the remove path. Keep activation failures unchanged since they still indicate that firmware failed to create or activate the BSS state. Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -1907,6 +1907,29 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid,
|
||||
}
|
||||
}
|
||||
|
||||
#define MT76_CONNAC_MCU_STATUS_WLAN_FAILURE 0xc0000001
|
||||
|
||||
static inline int
|
||||
mt76_connac_mcu_bss_deact_err(struct mt76_dev *mdev, int err, bool enable)
|
||||
{
|
||||
if (err != (int)MT76_CONNAC_MCU_STATUS_WLAN_FAILURE)
|
||||
return err;
|
||||
|
||||
/* Ignore wlan_failure state false alarm when deactivating an
|
||||
* inactive network. It does not harm the firmware state.
|
||||
*/
|
||||
if (!enable) {
|
||||
dev_dbg(mdev->dev,
|
||||
"ignore wlan_failure when bss is deactivated\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
dev_warn(mdev->dev,
|
||||
"wlan_failure when bss is activated\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
struct sk_buff *
|
||||
__mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif_link *mvif,
|
||||
struct mt76_wcid *wcid, int len);
|
||||
|
||||
Reference in New Issue
Block a user