mac80211: brcmfmac: firmware halt and scan cleanup
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 303-v4.15-0007-brcmfmac-move-configuration-of-probe-request-IEs.patch
1 From bd99a3013bdc00f8fc7534c657b39616792b4467 Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Wed, 8 Nov 2017 14:36:37 +0100
4 Subject: [PATCH] brcmfmac: move configuration of probe request IEs
5
6 The configuration of the IEs for probe requests was done in a P2P
7 related function, which is not very obvious. Moving it to
8 .scan callback function, ie. brcmf_cfg80211_scan().
9
10 Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
12 Reviewed-by: Franky Lin <franky.lin@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +++++
17 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 6 ++----
18 2 files changed, 7 insertions(+), 4 deletions(-)
19
20 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
21 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
22 @@ -1108,6 +1108,11 @@ brcmf_cfg80211_scan(struct wiphy *wiphy,
23 if (err)
24 goto scan_out;
25
26 + err = brcmf_vif_set_mgmt_ie(vif, BRCMF_VNDR_IE_PRBREQ_FLAG,
27 + request->ie, request->ie_len);
28 + if (err)
29 + goto scan_out;
30 +
31 err = brcmf_do_escan(vif->ifp, request);
32 if (err)
33 goto scan_out;
34 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
35 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
36 @@ -881,7 +881,7 @@ int brcmf_p2p_scan_prep(struct wiphy *wi
37 {
38 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
39 struct brcmf_p2p_info *p2p = &cfg->p2p;
40 - int err = 0;
41 + int err;
42
43 if (brcmf_p2p_scan_is_p2p_request(request)) {
44 /* find my listen channel */
45 @@ -904,9 +904,7 @@ int brcmf_p2p_scan_prep(struct wiphy *wi
46 /* override .run_escan() callback. */
47 cfg->escan_info.run = brcmf_p2p_run_escan;
48 }
49 - err = brcmf_vif_set_mgmt_ie(vif, BRCMF_VNDR_IE_PRBREQ_FLAG,
50 - request->ie, request->ie_len);
51 - return err;
52 + return 0;
53 }
54
55