Skip to content

Commit

Permalink
wlcore: increase scan dwell times if no activity
Browse files Browse the repository at this point in the history
There's a limit on scan dwell times of max 30ms in order
to avoid degrading voip traffic which could be going on
while scanning. However these dwell times increase the
chance of missing out on nearby APs leading to partial
scan results. Allow configuration of longer dwell times
in case there no active interface (i.e. no STA associated
or AP up).

Signed-off-by: Eyal Shapira <eyal@wizery.com>
  • Loading branch information
Eyal Shapira authored and elp committed Nov 12, 2012
1 parent 17c861e commit d57a65e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/ti/wl12xx/main.c
Expand Up @@ -266,8 +266,10 @@ static struct wlcore_conf wl12xx_conf = {
.avg_weight_snr_data = 10,
},
.scan = {
.min_dwell_time_active = 7500,
.max_dwell_time_active = 30000,
.min_dwell_time_active_conc = 7500,
.max_dwell_time_active_conc = 30000,
.min_dwell_time_active = 25000,
.max_dwell_time_active = 50000,
.dwell_time_passive = 100000,
.dwell_time_dfs = 150000,
.num_probe_reqs = 2,
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/ti/wl18xx/main.c
Expand Up @@ -392,8 +392,10 @@ static struct wlcore_conf wl18xx_conf = {
.avg_weight_snr_data = 10,
},
.scan = {
.min_dwell_time_active = 7500,
.max_dwell_time_active = 30000,
.min_dwell_time_active_conc = 7500,
.max_dwell_time_active_conc = 30000,
.min_dwell_time_active = 25000,
.max_dwell_time_active = 50000,
.dwell_time_passive = 100000,
.dwell_time_dfs = 150000,
.num_probe_reqs = 2,
Expand Down
20 changes: 19 additions & 1 deletion drivers/net/wireless/ti/wlcore/conf.h
Expand Up @@ -1100,6 +1100,24 @@ struct conf_scan_settings {
*/
u32 max_dwell_time_active;

/*
* The minimum time to wait on each channel for active scans
* when there's a concurrent active interface. This should
* lower than min_dwell_time_active usually in order to avoid
* interfering with possible voip traffic on another interface.
*
* Range: u32 tu/1000
*/
u32 min_dwell_time_active_conc;

/*
* The maximum time to wait on each channel for active scans
* See explanation about min_dwell_time_active_conc
*
* Range: u32 tu/1000
*/
u32 max_dwell_time_active_conc;

/* time to wait on the channel for passive scans (in TU/1000) */
u32 dwell_time_passive;

Expand Down Expand Up @@ -1325,7 +1343,7 @@ struct conf_recovery_settings {
* version, the two LSB are the lower driver's private conf
* version.
*/
#define WLCORE_CONF_VERSION (0x0005 << 16)
#define WLCORE_CONF_VERSION (0x0006 << 16)
#define WLCORE_CONF_MASK 0xffff0000
#define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
sizeof(struct wlcore_conf))
Expand Down
10 changes: 8 additions & 2 deletions drivers/net/wireless/ti/wlcore/scan.c
Expand Up @@ -107,9 +107,15 @@ wlcore_scan_get_channels(struct wl1271 *wl,

if (scan_type == SCAN_TYPE_SEARCH) {
struct conf_scan_settings *c = &wl->conf.scan;
bool active_vif_exists = !!ieee80211_started_vifs_count(wl->hw);

min_dwell_time_active = active_vif_exists ?
c->min_dwell_time_active_conc :
c->min_dwell_time_active;
max_dwell_time_active = active_vif_exists ?
c->max_dwell_time_active_conc :
c->max_dwell_time_active;

min_dwell_time_active = c->min_dwell_time_active;
max_dwell_time_active = c->max_dwell_time_active;
/* TODO: convert conf from min/max to a single value */
dwell_time_passive = c->dwell_time_passive;
dwell_time_dfs = c->dwell_time_dfs;
Expand Down

0 comments on commit d57a65e

Please sign in to comment.