aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_scan.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_scan.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c
index 37f9ccbe738f..5c76b79a96bf 100644
--- a/drivers/net/wireless/wl12xx/wl1271_scan.c
+++ b/drivers/net/wireless/wl12xx/wl1271_scan.c
@@ -64,6 +64,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
64 struct basic_scan_channel_params *channels, 64 struct basic_scan_channel_params *channels,
65 enum ieee80211_band band, bool passive) 65 enum ieee80211_band band, bool passive)
66{ 66{
67 struct conf_scan_settings *c = &wl->conf.scan;
67 int i, j; 68 int i, j;
68 u32 flags; 69 u32 flags;
69 70
@@ -91,10 +92,17 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
91 wl1271_debug(DEBUG_SCAN, "beacon_found %d", 92 wl1271_debug(DEBUG_SCAN, "beacon_found %d",
92 req->channels[i]->beacon_found); 93 req->channels[i]->beacon_found);
93 94
94 channels[j].min_duration = 95 if (!passive) {
95 cpu_to_le32(WL1271_SCAN_CHAN_MIN_DURATION); 96 channels[j].min_duration =
96 channels[j].max_duration = 97 cpu_to_le32(c->min_dwell_time_active);
97 cpu_to_le32(WL1271_SCAN_CHAN_MAX_DURATION); 98 channels[j].max_duration =
99 cpu_to_le32(c->max_dwell_time_active);
100 } else {
101 channels[j].min_duration =
102 cpu_to_le32(c->min_dwell_time_passive);
103 channels[j].max_duration =
104 cpu_to_le32(c->max_dwell_time_passive);
105 }
98 channels[j].early_termination = 0; 106 channels[j].early_termination = 0;
99 channels[j].tx_power_att = req->channels[i]->max_power; 107 channels[j].tx_power_att = req->channels[i]->max_power;
100 channels[j].channel = req->channels[i]->hw_value; 108 channels[j].channel = req->channels[i]->hw_value;
@@ -151,7 +159,7 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band,
151 cmd->params.rx_filter_options = 159 cmd->params.rx_filter_options =
152 cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN); 160 cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN);
153 161
154 cmd->params.n_probe_reqs = WL1271_SCAN_PROBE_REQS; 162 cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
155 cmd->params.tx_rate = cpu_to_le32(basic_rate); 163 cmd->params.tx_rate = cpu_to_le32(basic_rate);
156 cmd->params.tid_trigger = 0; 164 cmd->params.tid_trigger = 0;
157 cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; 165 cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;