diff options
author | Arend Van Spriel <arend.vanspriel@broadcom.com> | 2016-11-23 11:25:23 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-29 16:29:26 +0100 |
commit | 3e2e86ab19c2a43953de30089c5411c580ddb5f7 (patch) | |
tree | f1095a15b338deeb2f3f560997924c49aa382559 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | |
parent | brcmfmac: move pno helper functions in separate source file (diff) | |
download | linux-3e2e86ab19c2a43953de30089c5411c580ddb5f7.tar.xz linux-3e2e86ab19c2a43953de30089c5411c580ddb5f7.zip |
brcmfmac: fix handling ssids in .sched_scan_start() callback
The ssids list in the scheduled scan request were not properly taken
into account when configuring in firmware. The hidden bit was set for
any ssid resulting in active scanning for all. Only set it for ssids
that are in the ssids list.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c index 2f6a4e0f0b8d..c7967d9e92d7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c @@ -28,6 +28,8 @@ #define BRCMF_PNO_FREQ_EXPO_MAX 3 #define BRCMF_PNO_ENABLE_ADAPTSCAN_BIT 6 #define BRCMF_PNO_SCAN_INCOMPLETE 0 +#define BRCMF_PNO_WPA_AUTH_ANY 0xFFFFFFFF +#define BRCMF_PNO_HIDDEN_BIT 2 int brcmf_pno_clean(struct brcmf_if *ifp) { @@ -98,3 +100,19 @@ int brcmf_pno_config(struct brcmf_if *ifp, return err; } +int brcmf_pno_add_ssid(struct brcmf_if *ifp, struct cfg80211_ssid *ssid, + bool active) +{ + struct brcmf_pno_net_param_le pfn; + + pfn.auth = cpu_to_le32(WLAN_AUTH_OPEN); + pfn.wpa_auth = cpu_to_le32(BRCMF_PNO_WPA_AUTH_ANY); + pfn.wsec = cpu_to_le32(0); + pfn.infra = cpu_to_le32(1); + if (active) + pfn.flags = cpu_to_le32(1 << BRCMF_PNO_HIDDEN_BIT); + pfn.ssid.SSID_len = cpu_to_le32(ssid->ssid_len); + memcpy(pfn.ssid.SSID, ssid->ssid, ssid->ssid_len); + return brcmf_fil_iovar_data_set(ifp, "pfn_add", &pfn, sizeof(pfn)); +} + |