Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352211
b: refs/heads/master
c: 5d3a160
h: refs/heads/master
i:
  352209: 16215f8
  352207: f7bfd2b
v: v3
  • Loading branch information
Eyal Shapira authored and Luciano Coelho committed Dec 11, 2012
1 parent a70aa9c commit 094acfd
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4d02007cdd56c59bdb9362c699875cb2d02c0fe
refs/heads/master: 5d3a160365306c4161b7064d482c26a85829f170
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ti/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ static struct wlcore_conf wl12xx_conf = {
.scan = {
.min_dwell_time_active = 7500,
.max_dwell_time_active = 30000,
.min_dwell_time_active_long = 25000,
.max_dwell_time_active_long = 50000,
.dwell_time_passive = 100000,
.dwell_time_dfs = 150000,
.num_probe_reqs = 2,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ti/wl18xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ static struct wlcore_conf wl18xx_conf = {
.scan = {
.min_dwell_time_active = 7500,
.max_dwell_time_active = 30000,
.min_dwell_time_active_long = 25000,
.max_dwell_time_active_long = 50000,
.dwell_time_passive = 100000,
.dwell_time_dfs = 150000,
.num_probe_reqs = 2,
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1088,18 +1088,40 @@ struct conf_roam_trigger_settings {
struct conf_scan_settings {
/*
* The minimum time to wait on each channel for active scans
* This value will be used whenever there's a connected interface.
*
* Range: u32 tu/1000
*/
u32 min_dwell_time_active;

/*
* The maximum time to wait on each channel for active scans
* This value will be currently used whenever there's a
* connected interface. It shouldn't exceed 30000 (~30ms) to avoid
* possible interference of voip traffic going on while scanning.
*
* Range: u32 tu/1000
*/
u32 max_dwell_time_active;

/* The minimum time to wait on each channel for active scans
* when it's possible to have longer scan dwell times.
* Currently this is used whenever we're idle on all interfaces.
* Longer dwell times improve detection of networks within a
* single scan.
*
* Range: u32 tu/1000
*/
u32 min_dwell_time_active_long;

/* The maximum time to wait on each channel for active scans
* when it's possible to have longer scan dwell times.
* See min_dwell_time_active_long
*
* Range: u32 tu/1000
*/
u32 max_dwell_time_active_long;

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

Expand Down
30 changes: 27 additions & 3 deletions trunk/drivers/net/wireless/ti/wlcore/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@ void wl1271_scan_complete_work(struct work_struct *work)

}

static void wlcore_started_vifs_iter(void *data, u8 *mac,
struct ieee80211_vif *vif)
{
int *count = (int *)data;

if (!vif->bss_conf.idle)
(*count)++;
}

static int wlcore_count_started_vifs(struct wl1271 *wl)
{
int count = 0;

ieee80211_iterate_active_interfaces_atomic(wl->hw,
IEEE80211_IFACE_ITER_RESUME_ALL,
wlcore_started_vifs_iter, &count);
return count;
}

static int
wlcore_scan_get_channels(struct wl1271 *wl,
struct ieee80211_channel *req_channels[],
Expand All @@ -109,9 +128,14 @@ wlcore_scan_get_channels(struct wl1271 *wl,
/* configure dwell times according to scan type */
if (scan_type == SCAN_TYPE_SEARCH) {
struct conf_scan_settings *c = &wl->conf.scan;

min_dwell_time_active = c->min_dwell_time_active;
max_dwell_time_active = c->max_dwell_time_active;
bool active_vif_exists = !!wlcore_count_started_vifs(wl);

min_dwell_time_active = active_vif_exists ?
c->min_dwell_time_active :
c->min_dwell_time_active_long;
max_dwell_time_active = active_vif_exists ?
c->max_dwell_time_active :
c->max_dwell_time_active_long;
dwell_time_passive = c->dwell_time_passive;
dwell_time_dfs = c->dwell_time_dfs;
} else {
Expand Down

0 comments on commit 094acfd

Please sign in to comment.