diff options
author | Eliad Peller <eliad@wizery.com> | 2015-07-30 22:38:20 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-08-10 22:16:21 +0300 |
commit | 8698a3a4fff2b63831fdc0283da87f9f46c2aeb8 (patch) | |
tree | cb65321c3042f01e0c571a34e7ddc33696a673a8 /drivers/net/wireless/ti/wl18xx/scan.c | |
parent | 6d5c898798aca634f493cabd2e7a47407ee5e95d (diff) | |
download | linux-8698a3a4fff2b63831fdc0283da87f9f46c2aeb8.tar.gz linux-8698a3a4fff2b63831fdc0283da87f9f46c2aeb8.tar.bz2 linux-8698a3a4fff2b63831fdc0283da87f9f46c2aeb8.zip |
wl18xx: use long intervals in sched scan
Add support for long intervals on sched scan.
If configured, the original request interval will
be used num_short_interval times, and then the
long interval will be used.
While on it, fix the scan command field names
to reflect the expected value is in ms (rather
than secs).
These values will be taken from the conf file,
so bump its version accordingly.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/scan.c')
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/scan.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/scan.c b/drivers/net/wireless/ti/wl18xx/scan.c index 98666f235a12..ec2eb147add3 100644 --- a/drivers/net/wireless/ti/wl18xx/scan.c +++ b/drivers/net/wireless/ti/wl18xx/scan.c @@ -223,9 +223,20 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, SCAN_TYPE_PERIODIC); wl18xx_adjust_channels(cmd, cmd_channels); - cmd->short_cycles_sec = 0; - cmd->long_cycles_sec = cpu_to_le16(req->interval); - cmd->short_cycles_count = 0; + if (c->num_short_intervals && c->long_interval && + c->long_interval > req->interval) { + cmd->short_cycles_msec = cpu_to_le16(req->interval); + cmd->long_cycles_msec = cpu_to_le16(c->long_interval); + cmd->short_cycles_count = c->num_short_intervals; + } else { + cmd->short_cycles_msec = 0; + cmd->long_cycles_msec = cpu_to_le16(req->interval); + cmd->short_cycles_count = 0; + } + wl1271_debug(DEBUG_SCAN, "short_interval: %d, long_interval: %d, num_short: %d", + le16_to_cpu(cmd->short_cycles_msec), + le16_to_cpu(cmd->long_cycles_msec), + cmd->short_cycles_count); cmd->total_cycles = 0; |