mac80211: brcmfmac: backport 4.10 fixes & typo fix
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 358-0002-brcmfmac-fix-uninitialized-field-in-scheduled-scan-s.patch
1 From 2b66325d5ea7c2a39ac69ed83b6979afe480d81a Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Fri, 9 Dec 2016 11:34:14 +0000
4 Subject: [PATCH] brcmfmac: fix uninitialized field in scheduled scan ssid
5 configuration
6
7 The scheduled scan ssid configuration in firmware has a flags field that
8 was not initialized resulting in unexpected behaviour.
9
10 Fixes: e3bdb7cc0300 ("brcmfmac: fix handling ssids in .sched_scan_start() callback")
11 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
12 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
13 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
14 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
15 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
16 ---
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 1 +
18 1 file changed, 1 insertion(+)
19
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
22 @@ -137,6 +137,7 @@ static int brcmf_pno_add_ssid(struct brc
23 pfn.wpa_auth = cpu_to_le32(BRCMF_PNO_WPA_AUTH_ANY);
24 pfn.wsec = cpu_to_le32(0);
25 pfn.infra = cpu_to_le32(1);
26 + pfn.flags = 0;
27 if (active)
28 pfn.flags = cpu_to_le32(1 << BRCMF_PNO_HIDDEN_BIT);
29 pfn.ssid.SSID_len = cpu_to_le32(ssid->ssid_len);