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:
Sean Wang
2026-05-28 13:32:33 +02:00
committed by Felix Fietkau
parent 9342a01799
commit 3969bb1171
3 changed files with 35 additions and 3 deletions
+23
View File
@@ -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);