diff options
author | Eyal Shapira <eyal@wizery.com> | 2012-02-02 06:54:28 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-02-15 01:38:35 -0500 |
commit | d647f2dd1a445f5a683372f1b47919fe92c19896 (patch) | |
tree | 0aab06854d18e0f9b538cd2b60cf22bbb09c91f2 /drivers/net/wireless/wl12xx | |
parent | c08e371a683021cfb99632db799bea9b69d176e5 (diff) |
wl12xx: use split scan for normal scan
Split scan allows the FW to schedule other activities
during a scan which may be a long operation. This is
achieved by setting a trigger TID to ANY_TID and a scan
trigger timeout other than 0. The default one is set to 50ms.
Signed-off-by: Eyal Shapira <eyal@wizey.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/conf.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/scan.h | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h index 823535cdf150..cc50faaf03d1 100644 --- a/drivers/net/wireless/wl12xx/conf.h +++ b/drivers/net/wireless/wl12xx/conf.h | |||
@@ -1082,6 +1082,14 @@ struct conf_scan_settings { | |||
1082 | */ | 1082 | */ |
1083 | u16 num_probe_reqs; | 1083 | u16 num_probe_reqs; |
1084 | 1084 | ||
1085 | /* | ||
1086 | * Scan trigger (split scan) timeout. The FW will split the scan | ||
1087 | * operation into slices of the given time and allow the FW to schedule | ||
1088 | * other tasks in between. | ||
1089 | * | ||
1090 | * Range: u32 Microsecs | ||
1091 | */ | ||
1092 | u32 split_scan_timeout; | ||
1085 | }; | 1093 | }; |
1086 | 1094 | ||
1087 | struct conf_sched_scan_settings { | 1095 | struct conf_sched_scan_settings { |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 253847ff344b..723df48ed447 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -272,6 +272,7 @@ static struct conf_drv_settings default_conf = { | |||
272 | .min_dwell_time_passive = 100000, | 272 | .min_dwell_time_passive = 100000, |
273 | .max_dwell_time_passive = 100000, | 273 | .max_dwell_time_passive = 100000, |
274 | .num_probe_reqs = 2, | 274 | .num_probe_reqs = 2, |
275 | .split_scan_timeout = 50000, | ||
275 | }, | 276 | }, |
276 | .sched_scan = { | 277 | .sched_scan = { |
277 | /* sched_scan requires dwell times in TU instead of TU/1000 */ | 278 | /* sched_scan requires dwell times in TU instead of TU/1000 */ |
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c index e3566ca90f0d..e43a6b2c1d91 100644 --- a/drivers/net/wireless/wl12xx/scan.c +++ b/drivers/net/wireless/wl12xx/scan.c | |||
@@ -172,6 +172,9 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
172 | goto out; | 172 | goto out; |
173 | } | 173 | } |
174 | 174 | ||
175 | if (wl->conf.scan.split_scan_timeout) | ||
176 | scan_options |= WL1271_SCAN_OPT_SPLIT_SCAN; | ||
177 | |||
175 | if (passive) | 178 | if (passive) |
176 | scan_options |= WL1271_SCAN_OPT_PASSIVE; | 179 | scan_options |= WL1271_SCAN_OPT_PASSIVE; |
177 | 180 | ||
@@ -198,7 +201,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
198 | 201 | ||
199 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | 202 | cmd->params.tx_rate = cpu_to_le32(basic_rate); |
200 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; | 203 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; |
201 | cmd->params.tid_trigger = 0; | 204 | cmd->params.tid_trigger = CONF_TX_AC_ANY_TID; |
202 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 205 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
203 | 206 | ||
204 | if (band == IEEE80211_BAND_2GHZ) | 207 | if (band == IEEE80211_BAND_2GHZ) |
@@ -223,8 +226,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
223 | goto out; | 226 | goto out; |
224 | } | 227 | } |
225 | 228 | ||
226 | /* disable the timeout */ | 229 | trigger->timeout = cpu_to_le32(wl->conf.scan.split_scan_timeout); |
227 | trigger->timeout = 0; | ||
228 | ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger, | 230 | ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger, |
229 | sizeof(*trigger), 0); | 231 | sizeof(*trigger), 0); |
230 | if (ret < 0) { | 232 | if (ret < 0) { |
diff --git a/drivers/net/wireless/wl12xx/scan.h b/drivers/net/wireless/wl12xx/scan.h index a7ed43dc08c9..96ff457a3a0b 100644 --- a/drivers/net/wireless/wl12xx/scan.h +++ b/drivers/net/wireless/wl12xx/scan.h | |||
@@ -48,7 +48,7 @@ void wl1271_scan_sched_scan_results(struct wl1271 *wl); | |||
48 | #define WL1271_SCAN_CURRENT_TX_PWR 0 | 48 | #define WL1271_SCAN_CURRENT_TX_PWR 0 |
49 | #define WL1271_SCAN_OPT_ACTIVE 0 | 49 | #define WL1271_SCAN_OPT_ACTIVE 0 |
50 | #define WL1271_SCAN_OPT_PASSIVE 1 | 50 | #define WL1271_SCAN_OPT_PASSIVE 1 |
51 | #define WL1271_SCAN_OPT_TRIGGERED_SCAN 2 | 51 | #define WL1271_SCAN_OPT_SPLIT_SCAN 2 |
52 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 | 52 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 |
53 | /* scan even if we fail to enter psm */ | 53 | /* scan even if we fail to enter psm */ |
54 | #define WL1271_SCAN_OPT_FORCE 8 | 54 | #define WL1271_SCAN_OPT_FORCE 8 |