4d4235f4b069f49bd51083dbde33caea29111913
[oweals/openwrt.git] /
1 From bbf35414cd23a9d7230bfd7046e1e2c26020e7eb Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Wed, 8 Nov 2017 14:36:36 +0100
4 Subject: [PATCH] brcmfmac: get rid of struct brcmf_cfg80211_info::active_scan
5  field
6
7 The field struct brcmf_cfg80211_info::active_scan is set to true upon
8 initializing the driver instance, but it is never changed so simply
9 get rid of it.
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 | 10 +---------
18  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h |  2 --
19  drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c      |  5 +----
20  3 files changed, 2 insertions(+), 15 deletions(-)
21
22 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
23 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
24 @@ -1043,7 +1043,6 @@ brcmf_do_escan(struct brcmf_if *ifp, str
25  {
26         struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
27         s32 err;
28 -       u32 passive_scan;
29         struct brcmf_scan_results *results;
30         struct escan_info *escan = &cfg->escan_info;
31  
32 @@ -1051,13 +1050,7 @@ brcmf_do_escan(struct brcmf_if *ifp, str
33         escan->ifp = ifp;
34         escan->wiphy = cfg->wiphy;
35         escan->escan_state = WL_ESCAN_STATE_SCANNING;
36 -       passive_scan = cfg->active_scan ? 0 : 1;
37 -       err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PASSIVE_SCAN,
38 -                                   passive_scan);
39 -       if (err) {
40 -               brcmf_err("error (%d)\n", err);
41 -               return err;
42 -       }
43 +
44         brcmf_scan_config_mpc(ifp, 0);
45         results = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
46         results->version = 0;
47 @@ -5767,7 +5760,6 @@ static s32 wl_init_priv(struct brcmf_cfg
48  
49         cfg->scan_request = NULL;
50         cfg->pwr_save = true;
51 -       cfg->active_scan = true;        /* we do active scan per default */
52         cfg->dongle_up = false;         /* dongle is not up yet */
53         err = brcmf_init_priv_mem(cfg);
54         if (err)
55 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
56 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
57 @@ -283,7 +283,6 @@ struct brcmf_cfg80211_wowl {
58   * @scan_status: scan activity on the dongle.
59   * @pub: common driver information.
60   * @channel: current channel.
61 - * @active_scan: current scan mode.
62   * @int_escan_map: bucket map for which internal e-scan is done.
63   * @ibss_starter: indicates this sta is ibss starter.
64   * @pwr_save: indicate whether dongle to support power save mode.
65 @@ -316,7 +315,6 @@ struct brcmf_cfg80211_info {
66         unsigned long scan_status;
67         struct brcmf_pub *pub;
68         u32 channel;
69 -       bool active_scan;
70         u32 int_escan_map;
71         bool ibss_starter;
72         bool pwr_save;
73 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
74 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
75 @@ -692,10 +692,7 @@ static s32 brcmf_p2p_escan(struct brcmf_
76  
77         /* determine the scan engine parameters */
78         sparams->bss_type = DOT11_BSSTYPE_ANY;
79 -       if (p2p->cfg->active_scan)
80 -               sparams->scan_type = 0;
81 -       else
82 -               sparams->scan_type = 1;
83 +       sparams->scan_type = BRCMF_SCANTYPE_ACTIVE;
84  
85         eth_broadcast_addr(sparams->bssid);
86         sparams->home_time = cpu_to_le32(P2PAPI_SCAN_HOME_TIME_MS);