351-0026-brcmfmac-respect-hidden_ssid-for-AP-interfaces.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  2. Date: Wed, 6 Jul 2016 12:22:54 +0200
  3. Subject: [PATCH] brcmfmac: respect hidden_ssid for AP interfaces
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. This was succesfully tested with 4366B1. A small workaround is needed
  8. for the main interface otherwise it would stuck at the hidden state.
  9. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  10. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  11. ---
  12. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  13. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  14. @@ -4586,6 +4586,15 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
  15. brcmf_err("SET SSID error (%d)\n", err);
  16. goto exit;
  17. }
  18. +
  19. + if (settings->hidden_ssid) {
  20. + err = brcmf_fil_iovar_int_set(ifp, "closednet", 1);
  21. + if (err) {
  22. + brcmf_err("closednet error (%d)\n", err);
  23. + goto exit;
  24. + }
  25. + }
  26. +
  27. brcmf_dbg(TRACE, "AP mode configuration complete\n");
  28. } else if (dev_role == NL80211_IFTYPE_P2P_GO) {
  29. err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
  30. @@ -4644,6 +4653,10 @@ static int brcmf_cfg80211_stop_ap(struct
  31. return err;
  32. }
  33. + /* First BSS doesn't get a full reset */
  34. + if (ifp->bsscfgidx == 0)
  35. + brcmf_fil_iovar_int_set(ifp, "closednet", 0);
  36. +
  37. memset(&join_params, 0, sizeof(join_params));
  38. err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
  39. &join_params, sizeof(join_params));