wcn36xx: don't delete invalid bss indices
authorDaniel Mack <daniel@zonque.org>
Tue, 3 Apr 2018 16:51:54 +0000 (18:51 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 10 Apr 2018 14:34:20 +0000 (17:34 +0300)
commit2edfcf2b303cdd63fe0176c6771b47af2d655f8e
treea592011c182d2ed4ba26f2a3c6b971b9450a6581
parent271f1e65ff38f18aa440fec17c759e70a6adfa4e
wcn36xx: don't delete invalid bss indices

The firmware code cannot cope with requests to remove BSS indices that have
not previously been added. This primarily happens when the device is
suspended and then resumed. ieee80211_reconfig() then calls into
wcn36xx_bss_info_changed() with an empty bssid and BSS_CHANGED_BSSID set,
which subsequently leads to a firmware crash:

[   43.647928] qcom-wcnss-pil a204000.wcnss: fatal error received: halMsg.c:4964:halMsg_DelBss: Invalid BSSIndex 0
[   43.647959] remoteproc remoteproc0: crash detected in a204000.wcnss: type fatal error

To fix this, set bss_index to WCN36XX_HAL_BSS_INVALID_IDX for all bss
that have not been configured in the firmware, and don't call into the
firmware with invalid indices.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/ath/wcn36xx/smd.c