提交 bbf35414 编写于 作者: A Arend Van Spriel 提交者: Kalle Valo

brcmfmac: get rid of struct brcmf_cfg80211_info::active_scan field

The field struct brcmf_cfg80211_info::active_scan is set to true upon
initializing the driver instance, but it is never changed so simply
get rid of it.
Reviewed-by: NHante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: NPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: NFranky Lin <franky.lin@broadcom.com>
Signed-off-by: NArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 588378f1
...@@ -1043,7 +1043,6 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request) ...@@ -1043,7 +1043,6 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request)
{ {
struct brcmf_cfg80211_info *cfg = ifp->drvr->config; struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
s32 err; s32 err;
u32 passive_scan;
struct brcmf_scan_results *results; struct brcmf_scan_results *results;
struct escan_info *escan = &cfg->escan_info; struct escan_info *escan = &cfg->escan_info;
...@@ -1051,13 +1050,7 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request) ...@@ -1051,13 +1050,7 @@ brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request)
escan->ifp = ifp; escan->ifp = ifp;
escan->wiphy = cfg->wiphy; escan->wiphy = cfg->wiphy;
escan->escan_state = WL_ESCAN_STATE_SCANNING; escan->escan_state = WL_ESCAN_STATE_SCANNING;
passive_scan = cfg->active_scan ? 0 : 1;
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PASSIVE_SCAN,
passive_scan);
if (err) {
brcmf_err("error (%d)\n", err);
return err;
}
brcmf_scan_config_mpc(ifp, 0); brcmf_scan_config_mpc(ifp, 0);
results = (struct brcmf_scan_results *)cfg->escan_info.escan_buf; results = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
results->version = 0; results->version = 0;
...@@ -5767,7 +5760,6 @@ static s32 wl_init_priv(struct brcmf_cfg80211_info *cfg) ...@@ -5767,7 +5760,6 @@ static s32 wl_init_priv(struct brcmf_cfg80211_info *cfg)
cfg->scan_request = NULL; cfg->scan_request = NULL;
cfg->pwr_save = true; cfg->pwr_save = true;
cfg->active_scan = true; /* we do active scan per default */
cfg->dongle_up = false; /* dongle is not up yet */ cfg->dongle_up = false; /* dongle is not up yet */
err = brcmf_init_priv_mem(cfg); err = brcmf_init_priv_mem(cfg);
if (err) if (err)
......
...@@ -283,7 +283,6 @@ struct brcmf_cfg80211_wowl { ...@@ -283,7 +283,6 @@ struct brcmf_cfg80211_wowl {
* @scan_status: scan activity on the dongle. * @scan_status: scan activity on the dongle.
* @pub: common driver information. * @pub: common driver information.
* @channel: current channel. * @channel: current channel.
* @active_scan: current scan mode.
* @int_escan_map: bucket map for which internal e-scan is done. * @int_escan_map: bucket map for which internal e-scan is done.
* @ibss_starter: indicates this sta is ibss starter. * @ibss_starter: indicates this sta is ibss starter.
* @pwr_save: indicate whether dongle to support power save mode. * @pwr_save: indicate whether dongle to support power save mode.
...@@ -316,7 +315,6 @@ struct brcmf_cfg80211_info { ...@@ -316,7 +315,6 @@ struct brcmf_cfg80211_info {
unsigned long scan_status; unsigned long scan_status;
struct brcmf_pub *pub; struct brcmf_pub *pub;
u32 channel; u32 channel;
bool active_scan;
u32 int_escan_map; u32 int_escan_map;
bool ibss_starter; bool ibss_starter;
bool pwr_save; bool pwr_save;
......
...@@ -692,10 +692,7 @@ static s32 brcmf_p2p_escan(struct brcmf_p2p_info *p2p, u32 num_chans, ...@@ -692,10 +692,7 @@ static s32 brcmf_p2p_escan(struct brcmf_p2p_info *p2p, u32 num_chans,
/* determine the scan engine parameters */ /* determine the scan engine parameters */
sparams->bss_type = DOT11_BSSTYPE_ANY; sparams->bss_type = DOT11_BSSTYPE_ANY;
if (p2p->cfg->active_scan) sparams->scan_type = BRCMF_SCANTYPE_ACTIVE;
sparams->scan_type = 0;
else
sparams->scan_type = 1;
eth_broadcast_addr(sparams->bssid); eth_broadcast_addr(sparams->bssid);
sparams->home_time = cpu_to_le32(P2PAPI_SCAN_HOME_TIME_MS); sparams->home_time = cpu_to_le32(P2PAPI_SCAN_HOME_TIME_MS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册