brcmfmac: Fix for unable to return to visible SSID
authorSoontak Lee <soontak.lee@cypress.com>
Thu, 18 Jun 2020 16:07:37 +0000 (11:07 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Jul 2020 09:47:58 +0000 (12:47 +0300)
Unable to change back to visiable SSID because there is
no disable hidden ssid routine.

Signed-off-by: Soontak Lee <soontak.lee@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200618160739.21457-2-chi-hsien.lin@cypress.com
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index 0c93a2f..c698a55 100644 (file)
@@ -4835,12 +4835,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
                        goto exit;
                }
 
-               if (settings->hidden_ssid) {
-                       err = brcmf_fil_iovar_int_set(ifp, "closednet", 1);
-                       if (err) {
-                               bphy_err(drvr, "closednet error (%d)\n", err);
-                               goto exit;
-                       }
+               err = brcmf_fil_iovar_int_set(ifp, "closednet",
+                                             settings->hidden_ssid);
+               if (err) {
+                       bphy_err(drvr, "%s closednet error (%d)\n",
+                                settings->hidden_ssid ?
+                                "enabled" : "disabled",
+                                err);
+                       goto exit;
                }
 
                brcmf_dbg(TRACE, "AP mode configuration complete\n");