Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c482c10 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho
Browse files

wlcore: configure dwell times according to scan type



Allow configuring different dwell times to the different
scan types (regular and scheduled).

Add new configuration entry (dwell_time_dfs) to
conf_scan_settings, in order to allow setting
different values for normal scan and scheduled scan.

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 6507baba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -267,8 +267,8 @@ static struct wlcore_conf wl12xx_conf = {
	.scan = {
		.min_dwell_time_active        = 7500,
		.max_dwell_time_active        = 30000,
		.min_dwell_time_passive       = 100000,
		.max_dwell_time_passive       = 100000,
		.dwell_time_passive           = 100000,
		.dwell_time_dfs               = 150000,
		.num_probe_reqs               = 2,
		.split_scan_timeout           = 50000,
	},
+4 −3
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
					cpu_to_le32(c->max_dwell_time_active);
			} else {
				channels[j].min_duration =
					cpu_to_le32(c->min_dwell_time_passive);
					cpu_to_le32(c->dwell_time_passive);
				channels[j].max_duration =
					cpu_to_le32(c->max_dwell_time_passive);
					cpu_to_le32(c->dwell_time_passive);
			}
			channels[j].early_termination = 0;
			channels[j].tx_power_att = req->channels[i]->max_power;
@@ -364,7 +364,8 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
	}

	if (!wlcore_set_scan_chan_params(wl, cfg_channels, req->channels,
					 req->n_channels, req->n_ssids)) {
					 req->n_channels, req->n_ssids,
					 SCAN_TYPE_PERIODIC)) {
		wl1271_error("scan channel list is empty");
		ret = -EINVAL;
		goto out;
+2 −2
Original line number Diff line number Diff line
@@ -394,8 +394,8 @@ static struct wlcore_conf wl18xx_conf = {
	.scan = {
		.min_dwell_time_active        = 7500,
		.max_dwell_time_active        = 30000,
		.min_dwell_time_passive       = 100000,
		.max_dwell_time_passive       = 100000,
		.dwell_time_passive           = 100000,
		.dwell_time_dfs               = 150000,
		.num_probe_reqs               = 2,
		.split_scan_timeout           = 50000,
	},
+4 −2
Original line number Diff line number Diff line
@@ -84,7 +84,8 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
	}

	wlcore_set_scan_chan_params(wl, cmd_channels, req->channels,
				    req->n_channels, req->n_ssids);
				    req->n_channels, req->n_ssids,
				    SCAN_TYPE_SEARCH);
	wl18xx_adjust_channels(cmd, cmd_channels);

	/*
@@ -214,7 +215,8 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl,

	/* configure channels */
	wlcore_set_scan_chan_params(wl, cmd_channels, req->channels,
				    req->n_channels, req->n_ssids);
				    req->n_channels, req->n_ssids,
				    SCAN_TYPE_PERIODIC);
	wl18xx_adjust_channels(cmd, cmd_channels);

	cmd->short_cycles_sec = 0;
+0 −7
Original line number Diff line number Diff line
@@ -35,13 +35,6 @@ struct tracking_ch_params {
	u8 padding[2];
} __packed;

enum
{
	SCAN_TYPE_SEARCH	= 0,
	SCAN_TYPE_PERIODIC	= 1,
	SCAN_TYPE_TRACKING	= 2,
};

/* probe request rate */
enum
{
Loading