diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-09-21 02:14:31 -0400 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 05:30:06 -0400 |
commit | bea39d6a60b62f16e904be5a520bf55714d73021 (patch) | |
tree | aef66ffd0c553eea8de20ec46e819b661d38ab2b /drivers | |
parent | 78abd3207438b20e099b41cbed58d640cbd237a6 (diff) |
wl1271: Optimize scan duration
Currently then dwell times for each channel in scans is set to an overly
long value, and excessive number of probe-requests are transmitted on each
channel (for active scans.)
Based on testing, comparable results can be received with smaller dwell-time,
and, with fever probe-requests - in fact, reducing the number of probe-requests
to 2 seems to increase the number of found results.
Configure more optimal values for per channel dwell times. Comparison for the
different scan configurations (in my current office environment):
dwell-time 60000 3x probe-req == ~60 results
40000 3x probe-req == ~50 results
30000 3x probe-req == ~40 results
dwell-time 60000 2x probe-req == ~70 results
40000 2x probe-req == ~60 results
30000 2x probe-req == ~58 results
The above are results for a cumulative 3 scan run. For individual scans, the
number of results drop slightly more.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_conf.h | 39 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_scan.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_scan.h | 3 |
4 files changed, 60 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h index feb493ebe5bd..ab716f517553 100644 --- a/drivers/net/wireless/wl12xx/wl1271_conf.h +++ b/drivers/net/wireless/wl12xx/wl1271_conf.h | |||
@@ -1016,6 +1016,44 @@ struct conf_roam_trigger_settings { | |||
1016 | u8 avg_weight_snr_data; | 1016 | u8 avg_weight_snr_data; |
1017 | }; | 1017 | }; |
1018 | 1018 | ||
1019 | struct conf_scan_settings { | ||
1020 | /* | ||
1021 | * The minimum time to wait on each channel for active scans | ||
1022 | * | ||
1023 | * Range: 0 - 65536 tu | ||
1024 | */ | ||
1025 | u16 min_dwell_time_active; | ||
1026 | |||
1027 | /* | ||
1028 | * The maximum time to wait on each channel for active scans | ||
1029 | * | ||
1030 | * Range: 0 - 65536 tu | ||
1031 | */ | ||
1032 | u16 max_dwell_time_active; | ||
1033 | |||
1034 | /* | ||
1035 | * The maximum time to wait on each channel for passive scans | ||
1036 | * | ||
1037 | * Range: 0 - 65536 tu | ||
1038 | */ | ||
1039 | u16 min_dwell_time_passive; | ||
1040 | |||
1041 | /* | ||
1042 | * The maximum time to wait on each channel for passive scans | ||
1043 | * | ||
1044 | * Range: 0 - 65536 tu | ||
1045 | */ | ||
1046 | u16 max_dwell_time_passive; | ||
1047 | |||
1048 | /* | ||
1049 | * Number of probe requests to transmit on each active scan channel | ||
1050 | * | ||
1051 | * Range: u8 | ||
1052 | */ | ||
1053 | u16 num_probe_reqs; | ||
1054 | |||
1055 | }; | ||
1056 | |||
1019 | struct conf_drv_settings { | 1057 | struct conf_drv_settings { |
1020 | struct conf_sg_settings sg; | 1058 | struct conf_sg_settings sg; |
1021 | struct conf_rx_settings rx; | 1059 | struct conf_rx_settings rx; |
@@ -1024,6 +1062,7 @@ struct conf_drv_settings { | |||
1024 | struct conf_itrim_settings itrim; | 1062 | struct conf_itrim_settings itrim; |
1025 | struct conf_pm_config_settings pm_config; | 1063 | struct conf_pm_config_settings pm_config; |
1026 | struct conf_roam_trigger_settings roam_trigger; | 1064 | struct conf_roam_trigger_settings roam_trigger; |
1065 | struct conf_scan_settings scan; | ||
1027 | }; | 1066 | }; |
1028 | 1067 | ||
1029 | #endif | 1068 | #endif |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index c13175892960..b2f2d457f28c 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -232,7 +232,14 @@ static struct conf_drv_settings default_conf = { | |||
232 | .avg_weight_rssi_data = 10, | 232 | .avg_weight_rssi_data = 10, |
233 | .avg_weight_snr_beacon = 20, | 233 | .avg_weight_snr_beacon = 20, |
234 | .avg_weight_snr_data = 10 | 234 | .avg_weight_snr_data = 10 |
235 | } | 235 | }, |
236 | .scan = { | ||
237 | .min_dwell_time_active = 7500, | ||
238 | .max_dwell_time_active = 30000, | ||
239 | .min_dwell_time_passive = 30000, | ||
240 | .max_dwell_time_passive = 60000, | ||
241 | .num_probe_reqs = 2, | ||
242 | }, | ||
236 | }; | 243 | }; |
237 | 244 | ||
238 | static void __wl1271_op_remove_interface(struct wl1271 *wl); | 245 | static void __wl1271_op_remove_interface(struct wl1271 *wl); |
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c index 37f9ccbe738f..5c76b79a96bf 100644 --- a/drivers/net/wireless/wl12xx/wl1271_scan.c +++ b/drivers/net/wireless/wl12xx/wl1271_scan.c | |||
@@ -64,6 +64,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl, | |||
64 | struct basic_scan_channel_params *channels, | 64 | struct basic_scan_channel_params *channels, |
65 | enum ieee80211_band band, bool passive) | 65 | enum ieee80211_band band, bool passive) |
66 | { | 66 | { |
67 | struct conf_scan_settings *c = &wl->conf.scan; | ||
67 | int i, j; | 68 | int i, j; |
68 | u32 flags; | 69 | u32 flags; |
69 | 70 | ||
@@ -91,10 +92,17 @@ static int wl1271_get_scan_channels(struct wl1271 *wl, | |||
91 | wl1271_debug(DEBUG_SCAN, "beacon_found %d", | 92 | wl1271_debug(DEBUG_SCAN, "beacon_found %d", |
92 | req->channels[i]->beacon_found); | 93 | req->channels[i]->beacon_found); |
93 | 94 | ||
94 | channels[j].min_duration = | 95 | if (!passive) { |
95 | cpu_to_le32(WL1271_SCAN_CHAN_MIN_DURATION); | 96 | channels[j].min_duration = |
96 | channels[j].max_duration = | 97 | cpu_to_le32(c->min_dwell_time_active); |
97 | cpu_to_le32(WL1271_SCAN_CHAN_MAX_DURATION); | 98 | channels[j].max_duration = |
99 | cpu_to_le32(c->max_dwell_time_active); | ||
100 | } else { | ||
101 | channels[j].min_duration = | ||
102 | cpu_to_le32(c->min_dwell_time_passive); | ||
103 | channels[j].max_duration = | ||
104 | cpu_to_le32(c->max_dwell_time_passive); | ||
105 | } | ||
98 | channels[j].early_termination = 0; | 106 | channels[j].early_termination = 0; |
99 | channels[j].tx_power_att = req->channels[i]->max_power; | 107 | channels[j].tx_power_att = req->channels[i]->max_power; |
100 | channels[j].channel = req->channels[i]->hw_value; | 108 | channels[j].channel = req->channels[i]->hw_value; |
@@ -151,7 +159,7 @@ static int wl1271_scan_send(struct wl1271 *wl, enum ieee80211_band band, | |||
151 | cmd->params.rx_filter_options = | 159 | cmd->params.rx_filter_options = |
152 | cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN); | 160 | cpu_to_le32(CFG_RX_PRSP_EN | CFG_RX_MGMT_EN | CFG_RX_BCN_EN); |
153 | 161 | ||
154 | cmd->params.n_probe_reqs = WL1271_SCAN_PROBE_REQS; | 162 | cmd->params.n_probe_reqs = wl->conf.scan.num_probe_reqs; |
155 | cmd->params.tx_rate = cpu_to_le32(basic_rate); | 163 | cmd->params.tx_rate = cpu_to_le32(basic_rate); |
156 | cmd->params.tid_trigger = 0; | 164 | cmd->params.tid_trigger = 0; |
157 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 165 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.h b/drivers/net/wireless/wl12xx/wl1271_scan.h index bb7af2a102fa..6d57127b5e6b 100644 --- a/drivers/net/wireless/wl12xx/wl1271_scan.h +++ b/drivers/net/wireless/wl12xx/wl1271_scan.h | |||
@@ -40,11 +40,8 @@ void wl1271_scan_complete_work(struct work_struct *work); | |||
40 | #define WL1271_SCAN_OPT_ACTIVE 0 | 40 | #define WL1271_SCAN_OPT_ACTIVE 0 |
41 | #define WL1271_SCAN_OPT_PASSIVE 1 | 41 | #define WL1271_SCAN_OPT_PASSIVE 1 |
42 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 | 42 | #define WL1271_SCAN_OPT_PRIORITY_HIGH 4 |
43 | #define WL1271_SCAN_CHAN_MIN_DURATION 30000 /* TU */ | ||
44 | #define WL1271_SCAN_CHAN_MAX_DURATION 60000 /* TU */ | ||
45 | #define WL1271_SCAN_BAND_2_4_GHZ 0 | 43 | #define WL1271_SCAN_BAND_2_4_GHZ 0 |
46 | #define WL1271_SCAN_BAND_5_GHZ 1 | 44 | #define WL1271_SCAN_BAND_5_GHZ 1 |
47 | #define WL1271_SCAN_PROBE_REQS 3 | ||
48 | 45 | ||
49 | #define WL1271_SCAN_TIMEOUT 10000 /* msec */ | 46 | #define WL1271_SCAN_TIMEOUT 10000 /* msec */ |
50 | 47 | ||