diff options
author | Luciano Coelho <coelho@ti.com> | 2011-05-27 08:34:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-31 14:47:25 -0400 |
commit | 50a66d7f04adbfab9db55144c58dc693358cb635 (patch) | |
tree | 5b332a377b92a58991666a57fbaa274d15a7797b | |
parent | 2497a246e880d1fb537f754f551177c01fa39242 (diff) |
wl12xx: add separate config value for DFS dwell time on sched scan
Use a different value for DFS dwell time when performing a scheduled
scan. Previously we were using the same value as for normal passive
scans. This adds some flexibility between these two different types
of passive scan.
For now we use 150 TUs for DFS channel dwell time. This may need to
be fine-tuned in the future.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 1ab6c86aac40..c83fefb6662f 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -1157,6 +1157,9 @@ struct conf_sched_scan_settings { | |||
1157 | /* time to wait on the channel for passive scans (in TUs) */ | 1157 | /* time to wait on the channel for passive scans (in TUs) */ |
1158 | u32 dwell_time_passive; | 1158 | u32 dwell_time_passive; |
1159 | 1159 | ||
1160 | /* time to wait on the channel for DFS scans (in TUs) */ | ||
1161 | u32 dwell_time_dfs; | ||
1162 | |||
1160 | /* number of probe requests to send on each channel in active scans */ | 1163 | /* number of probe requests to send on each channel in active scans */ |
1161 | u8 num_probe_reqs; | 1164 | u8 num_probe_reqs; |
1162 | 1165 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index bc00e52f6445..e6497dc669df 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -311,6 +311,7 @@ static struct conf_drv_settings default_conf = { | |||
311 | .min_dwell_time_active = 8, | 311 | .min_dwell_time_active = 8, |
312 | .max_dwell_time_active = 30, | 312 | .max_dwell_time_active = 30, |
313 | .dwell_time_passive = 100, | 313 | .dwell_time_passive = 100, |
314 | .dwell_time_dfs = 150, | ||
314 | .num_probe_reqs = 2, | 315 | .num_probe_reqs = 2, |
315 | .rssi_threshold = -90, | 316 | .rssi_threshold = -90, |
316 | .snr_threshold = 0, | 317 | .snr_threshold = 0, |
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index 8ccbb911776a..28ec0addc657 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -352,9 +352,12 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl, | |||
352 | wl1271_debug(DEBUG_SCAN, "max_power %d", | 352 | wl1271_debug(DEBUG_SCAN, "max_power %d", |
353 | req->channels[i]->max_power); | 353 | req->channels[i]->max_power); |
354 | 354 | ||
355 | if (flags & IEEE80211_CHAN_RADAR) | 355 | if (flags & IEEE80211_CHAN_RADAR) { |
356 | channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS; | 356 | channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS; |
357 | if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { | 357 | channels[j].passive_duration = |
358 | cpu_to_le16(c->dwell_time_dfs); | ||
359 | } | ||
360 | else if (flags & IEEE80211_CHAN_PASSIVE_SCAN) { | ||
358 | channels[j].passive_duration = | 361 | channels[j].passive_duration = |
359 | cpu_to_le16(c->dwell_time_passive); | 362 | cpu_to_le16(c->dwell_time_passive); |
360 | } else { | 363 | } else { |