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>
此提交包含在:
Eliad Peller
2015-07-30 22:38:20 +03:00
提交者 Kalle Valo
父節點 6d5c898798
當前提交 8698a3a4ff
共有 5 個檔案被更改,包括 34 行新增6 行删除

查看文件

@@ -422,6 +422,8 @@ static struct wlcore_conf wl18xx_conf = {
.num_probe_reqs = 2,
.rssi_threshold = -90,
.snr_threshold = 0,
.num_short_intervals = SCAN_MAX_SHORT_INTERVALS,
.long_interval = 30000,
},
.ht = {
.rx_ba_win_size = 32,

查看文件

@@ -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;

查看文件

@@ -74,8 +74,8 @@ struct wl18xx_cmd_scan_params {
u8 dfs; /* number of dfs channels in 5ghz */
u8 passive_active; /* number of passive before active channels 2.4ghz */
__le16 short_cycles_sec;
__le16 long_cycles_sec;
__le16 short_cycles_msec;
__le16 long_cycles_msec;
u8 short_cycles_count;
u8 total_cycles; /* 0 - infinite */
u8 padding[2];