Skip to content

Commit

Permalink
brcmfmac: Work around potential firmware crash on BCM4329
Browse files Browse the repository at this point in the history
BCM4329 doesn't support BRCMF_C_GET_ASSOCLIST firmware call and WiFi
eventually stop to work properly on Acer A500 during the FW call. Don't
use that FW command on unsupported hardware to work around the problem.

Signed-off-by: Dmitry Osipenko <[email protected]>
  • Loading branch information
digetx committed Feb 20, 2022
1 parent df95c78 commit 5fa689d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2898,6 +2898,13 @@ brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,

brcmf_dbg(TRACE, "Enter, idx %d\n", idx);

/*
* BCM4329 firmware doesn't support GET_ASSOCLIST and may stop
* operating properly after the call.
*/
if (brcmf_feat_is_quirk_enabled(ifp, BRCMF_FEAT_QUIRK_NO_GET_ASSOCLIST))
return -EOPNOTSUPP;

if (idx == 0) {
cfg->assoclist.count = cpu_to_le32(BRCMF_MAX_ASSOCLIST);
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_ASSOCLIST,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
break;
case BRCM_CC_4329_CHIP_ID:
drvr->chip_quirks |= BIT(BRCMF_FEAT_QUIRK_NEED_MPC);
drvr->chip_quirks |= BIT(BRCMF_FEAT_QUIRK_NO_GET_ASSOCLIST);
break;
default:
/* no quirks */
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@
*
* AUTO_AUTH: workaround needed for automatic authentication type.
* NEED_MPC: driver needs to disable MPC during scanning operation.
* NO_GET_ASSOCLIST: driver needs to avoid use of GET_ASSOCLIST firmware call.
*/
#define BRCMF_QUIRK_LIST \
BRCMF_QUIRK_DEF(AUTO_AUTH) \
BRCMF_QUIRK_DEF(NEED_MPC)
BRCMF_QUIRK_DEF(NEED_MPC) \
BRCMF_QUIRK_DEF(NO_GET_ASSOCLIST)

#define BRCMF_FEAT_DEF(_f) \
BRCMF_FEAT_ ## _f,
Expand Down

0 comments on commit 5fa689d

Please sign in to comment.