mac80211: brcmfmac: backport wowlan netdetect fixes
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 364-0002-brcmfmac-fix-handling-firmware-results-for-wowl-netd.patch
1 From d29afe91af5995306d940b3dfee2419e0bb24a51 Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Fri, 27 Jan 2017 12:27:46 +0000
4 Subject: [PATCH] brcmfmac: fix handling firmware results for wowl netdetect
5
6 For wowl netdetect the event data changed for newer chips. This
7 was recently fixed for scheduled scan, but same change is needed
8 for wowl netdetect. Removing now pointles += operation from both
9 result handlers.
10
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/cfg80211.c | 4 +---
18 1 file changed, 1 insertion(+), 3 deletions(-)
19
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
22 @@ -3328,7 +3328,6 @@ brcmf_notify_sched_scan_results(struct b
23 goto out_err;
24 }
25
26 - data += sizeof(struct brcmf_pno_scanresults_le);
27 netinfo_start = brcmf_get_netinfo_array(pfn_result);
28
29 for (i = 0; i < result_count; i++) {
30 @@ -3476,8 +3475,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
31 return -EINVAL;
32 }
33
34 - data += sizeof(struct brcmf_pno_scanresults_le);
35 - netinfo = (struct brcmf_pno_net_info_le *)data;
36 + netinfo = brcmf_get_netinfo_array(pfn_result);
37 memcpy(cfg->wowl.nd->ssid.ssid, netinfo->SSID, netinfo->SSID_len);
38 cfg->wowl.nd->ssid.ssid_len = netinfo->SSID_len;
39 cfg->wowl.nd->n_channels = 1;