public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: brcmfmac: do not cast hidden SSID attribute value to boolean
@ 2024-02-08  8:51 Alexey Berezhok
  2024-02-08 14:06 ` Arend van Spriel
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Alexey Berezhok @ 2024-02-08  8:51 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: Kalle Valo, linux-wireless, lvc-project, Alexey Berezhok

In 'brcmf_cfg80211_start_ap()', not assume that
NL80211_HIDDEN_SSID_NOT_IN_USE is zero but prefer
an explicit check instead. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Alexey Berezhok <a@bayrepo.ru>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 736b2ada6..63f6e9436 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5272,7 +5272,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
 					      settings->hidden_ssid);
 		if (err) {
 			bphy_err(drvr, "%s closednet error (%d)\n",
-				 settings->hidden_ssid ?
+				 (settings->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE) ?
 				 "enabled" : "disabled",
 				 err);
 			goto exit;
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-19 18:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08  8:51 [PATCH] wifi: brcmfmac: do not cast hidden SSID attribute value to boolean Alexey Berezhok
2024-02-08 14:06 ` Arend van Spriel
2024-02-08 14:15   ` Johannes Berg
2024-02-08 15:56     ` Arend Van Spriel
2024-02-12 15:38 ` Kalle Valo
2024-02-12 16:00   ` Arend van Spriel
2024-02-12 16:03     ` Kalle Valo
2024-02-12 16:43       ` Arend Van Spriel
2024-02-13 13:34         ` Kalle Valo
2024-02-13 14:01           ` Arend van Spriel
2024-02-13 15:46             ` Kalle Valo
2024-02-13 17:40               ` Arend Van Spriel
2024-02-14 10:28     ` Alexey Berezhok
2024-02-14 11:44       ` Arend Van Spriel
2024-02-19 18:25 ` andy.shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox