diff options
author | Alexey Berezhok <a@bayrepo.ru> | 2024-02-22 15:29:23 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2024-02-27 16:56:20 +0200 |
commit | 379e5e83f9f9a0d3d3318fee2f363278e7ab08e7 (patch) | |
tree | df952248d3e2bf9dc9d296c0d92b82c6fb5d55b5 /drivers/net | |
parent | 53fe234f15b9e45a699591828950b1c3416da239 (diff) |
wifi: brcmfmac: do not pass hidden SSID attribute as value directly
In brcmf_cfg80211_start_ap() do not assume that NL80211_HIDDEN_SSID_NOT_IN_USE
is zero but prefer an explicit check instead. Use local variable 'closednet'
to pass in function call and use for error message.
Compile tested only. Addition for the commit f20073f50dfd1 ("wifi: brcmfmac: do
not cast hidden SSID attribute value to boolean").
Signed-off-by: Alexey Berezhok <a@bayrepo.ru>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240222122923.46691-1-a@bayrepo.ru
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index adf8a14feb49..54ff59a8c35c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5101,6 +5101,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, bool mbss; int is_11d; bool supports_11d; + bool closednet; brcmf_dbg(TRACE, "ctrlchn=%d, center=%d, bw=%d, beacon_interval=%d, dtim_period=%d,\n", settings->chandef.chan->hw_value, @@ -5270,12 +5271,12 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, goto exit; } - err = brcmf_fil_iovar_int_set(ifp, "closednet", - settings->hidden_ssid); + closednet = + (settings->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE); + err = brcmf_fil_iovar_int_set(ifp, "closednet", closednet); if (err) { bphy_err(drvr, "%s closednet error (%d)\n", - (settings->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE) ? - "enabled" : "disabled", + (closednet ? "enabled" : "disabled"), err); goto exit; } |