Skip to content

Commit

Permalink
wlcore: add support for dynamic scan configuration (INTERNAL)
Browse files Browse the repository at this point in the history
Adding new scan setup parameters: min/max dwell time
and number of probe requests.
Default scan parameters will be used whenever user doesn't set
these new scan parameters during the scan.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
victorgld authored and elp committed Jan 16, 2014
1 parent c53184a commit a059eff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion drivers/net/wireless/ti/wl12xx/scan.c
Expand Up @@ -136,7 +136,6 @@ static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
}

cmd->params.tx_rate = cpu_to_le32(basic_rate);
cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;
cmd->params.tid_trigger = CONF_TX_AC_ANY_TID;
cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;

Expand All @@ -145,6 +144,11 @@ static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
else
cmd->params.band = WL1271_SCAN_BAND_5_GHZ;

if (wl->scan.req->num_probe)
cmd->params.n_probe_reqs = wl->scan.req->num_probe;
else
cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs;

if (wl->scan.ssid_len && wl->scan.ssid) {
cmd->params.ssid_len = wl->scan.ssid_len;
memcpy(cmd->params.ssid, wl->scan.ssid, wl->scan.ssid_len);
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/wireless/ti/wl18xx/scan.c
Expand Up @@ -71,7 +71,10 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
cmd->urgency = 0;
cmd->protect = 0;

cmd->n_probe_reqs = wl->conf.scan.num_probe_reqs;
if (req->num_probe)
cmd->n_probe_reqs = wl->scan.req->num_probe;
else
cmd->n_probe_reqs = wl->conf.scan.num_probe_reqs;
cmd->terminate_after = 0;

/* configure channels */
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ti/wlcore/scan.c
Expand Up @@ -148,6 +148,7 @@ wlcore_scan_get_channels(struct wl1271 *wl,
u32 dwell_time_passive, dwell_time_dfs;

/* configure dwell times according to scan type */
/* TODO: consider req->min/max dwell time */
if (scan_type == SCAN_TYPE_SEARCH) {
struct conf_scan_settings *c = &wl->conf.scan;
bool active_vif_exists = !!wlcore_count_started_vifs(wl);
Expand Down

0 comments on commit a059eff

Please sign in to comment.