diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-08-10 02:22:02 -0400 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@nokia.com> | 2010-09-28 05:15:07 -0400 |
commit | fa21c7a9e4be439e217fe72edbd39b643b643791 (patch) | |
tree | a11d598b953d7dee82b517838b0f3e159b7dc01a /drivers/net/wireless/wl12xx | |
parent | 4f35c0253ab7f32cf30eab5459e8256af1619ff1 (diff) |
wl1271: Change supported channel order for a more optimal scan
The mac80211 inserts channels into a scan request in the same order the driver
registers them. Use this fact to optimize scan by ordering the channels so
that adjacent channels don't get scanned consecutively.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 86 |
1 files changed, 46 insertions, 40 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index b42ee484a86f..8ce891aa2273 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -2057,21 +2057,24 @@ static struct ieee80211_rate wl1271_rates[] = { | |||
2057 | .hw_value_short = CONF_HW_BIT_RATE_54MBPS, }, | 2057 | .hw_value_short = CONF_HW_BIT_RATE_54MBPS, }, |
2058 | }; | 2058 | }; |
2059 | 2059 | ||
2060 | /* can't be const, mac80211 writes to this */ | 2060 | /* |
2061 | * Can't be const, mac80211 writes to this. The order of the channels here | ||
2062 | * is designed to improve scanning. | ||
2063 | */ | ||
2061 | static struct ieee80211_channel wl1271_channels[] = { | 2064 | static struct ieee80211_channel wl1271_channels[] = { |
2062 | { .hw_value = 1, .center_freq = 2412, .max_power = 25 }, | 2065 | { .hw_value = 1, .center_freq = 2412, .max_power = 25 }, |
2063 | { .hw_value = 2, .center_freq = 2417, .max_power = 25 }, | ||
2064 | { .hw_value = 3, .center_freq = 2422, .max_power = 25 }, | ||
2065 | { .hw_value = 4, .center_freq = 2427, .max_power = 25 }, | ||
2066 | { .hw_value = 5, .center_freq = 2432, .max_power = 25 }, | 2066 | { .hw_value = 5, .center_freq = 2432, .max_power = 25 }, |
2067 | { .hw_value = 6, .center_freq = 2437, .max_power = 25 }, | ||
2068 | { .hw_value = 7, .center_freq = 2442, .max_power = 25 }, | ||
2069 | { .hw_value = 8, .center_freq = 2447, .max_power = 25 }, | ||
2070 | { .hw_value = 9, .center_freq = 2452, .max_power = 25 }, | 2067 | { .hw_value = 9, .center_freq = 2452, .max_power = 25 }, |
2071 | { .hw_value = 10, .center_freq = 2457, .max_power = 25 }, | ||
2072 | { .hw_value = 11, .center_freq = 2462, .max_power = 25 }, | ||
2073 | { .hw_value = 12, .center_freq = 2467, .max_power = 25 }, | ||
2074 | { .hw_value = 13, .center_freq = 2472, .max_power = 25 }, | 2068 | { .hw_value = 13, .center_freq = 2472, .max_power = 25 }, |
2069 | { .hw_value = 4, .center_freq = 2427, .max_power = 25 }, | ||
2070 | { .hw_value = 8, .center_freq = 2447, .max_power = 25 }, | ||
2071 | { .hw_value = 12, .center_freq = 2467, .max_power = 25 }, | ||
2072 | { .hw_value = 3, .center_freq = 2422, .max_power = 25 }, | ||
2073 | { .hw_value = 7, .center_freq = 2442, .max_power = 25 }, | ||
2074 | { .hw_value = 11, .center_freq = 2462, .max_power = 25 }, | ||
2075 | { .hw_value = 2, .center_freq = 2417, .max_power = 25 }, | ||
2076 | { .hw_value = 6, .center_freq = 2437, .max_power = 25 }, | ||
2077 | { .hw_value = 10, .center_freq = 2457, .max_power = 25 }, | ||
2075 | }; | 2078 | }; |
2076 | 2079 | ||
2077 | /* mapping to indexes for wl1271_rates */ | 2080 | /* mapping to indexes for wl1271_rates */ |
@@ -2140,49 +2143,52 @@ static struct ieee80211_rate wl1271_rates_5ghz[] = { | |||
2140 | .hw_value_short = CONF_HW_BIT_RATE_54MBPS, }, | 2143 | .hw_value_short = CONF_HW_BIT_RATE_54MBPS, }, |
2141 | }; | 2144 | }; |
2142 | 2145 | ||
2143 | /* 5 GHz band channels for WL1273 */ | 2146 | /* |
2147 | * 5 GHz band channels for WL1273 - can't be const, mac80211 writes to this. | ||
2148 | * The order of the channels here is designed to improve scanning. | ||
2149 | */ | ||
2144 | static struct ieee80211_channel wl1271_channels_5ghz[] = { | 2150 | static struct ieee80211_channel wl1271_channels_5ghz[] = { |
2145 | { .hw_value = 183, .center_freq = 4915}, | 2151 | { .hw_value = 183, .center_freq = 4915}, |
2146 | { .hw_value = 184, .center_freq = 4920}, | ||
2147 | { .hw_value = 185, .center_freq = 4925}, | ||
2148 | { .hw_value = 187, .center_freq = 4935}, | ||
2149 | { .hw_value = 188, .center_freq = 4940}, | 2152 | { .hw_value = 188, .center_freq = 4940}, |
2150 | { .hw_value = 189, .center_freq = 4945}, | ||
2151 | { .hw_value = 192, .center_freq = 4960}, | ||
2152 | { .hw_value = 196, .center_freq = 4980}, | ||
2153 | { .hw_value = 7, .center_freq = 5035}, | ||
2154 | { .hw_value = 8, .center_freq = 5040}, | 2153 | { .hw_value = 8, .center_freq = 5040}, |
2155 | { .hw_value = 9, .center_freq = 5045}, | ||
2156 | { .hw_value = 11, .center_freq = 5055}, | ||
2157 | { .hw_value = 12, .center_freq = 5060}, | ||
2158 | { .hw_value = 16, .center_freq = 5080}, | ||
2159 | { .hw_value = 34, .center_freq = 5170}, | 2154 | { .hw_value = 34, .center_freq = 5170}, |
2160 | { .hw_value = 36, .center_freq = 5180}, | ||
2161 | { .hw_value = 38, .center_freq = 5190}, | ||
2162 | { .hw_value = 40, .center_freq = 5200}, | ||
2163 | { .hw_value = 42, .center_freq = 5210}, | ||
2164 | { .hw_value = 44, .center_freq = 5220}, | 2155 | { .hw_value = 44, .center_freq = 5220}, |
2165 | { .hw_value = 46, .center_freq = 5230}, | ||
2166 | { .hw_value = 48, .center_freq = 5240}, | ||
2167 | { .hw_value = 52, .center_freq = 5260}, | ||
2168 | { .hw_value = 56, .center_freq = 5280}, | ||
2169 | { .hw_value = 60, .center_freq = 5300}, | 2156 | { .hw_value = 60, .center_freq = 5300}, |
2170 | { .hw_value = 64, .center_freq = 5320}, | ||
2171 | { .hw_value = 100, .center_freq = 5500}, | ||
2172 | { .hw_value = 104, .center_freq = 5520}, | ||
2173 | { .hw_value = 108, .center_freq = 5540}, | ||
2174 | { .hw_value = 112, .center_freq = 5560}, | 2157 | { .hw_value = 112, .center_freq = 5560}, |
2175 | { .hw_value = 116, .center_freq = 5580}, | ||
2176 | { .hw_value = 120, .center_freq = 5600}, | ||
2177 | { .hw_value = 124, .center_freq = 5620}, | ||
2178 | { .hw_value = 128, .center_freq = 5640}, | ||
2179 | { .hw_value = 132, .center_freq = 5660}, | 2158 | { .hw_value = 132, .center_freq = 5660}, |
2159 | { .hw_value = 157, .center_freq = 5785}, | ||
2160 | { .hw_value = 184, .center_freq = 4920}, | ||
2161 | { .hw_value = 189, .center_freq = 4945}, | ||
2162 | { .hw_value = 9, .center_freq = 5045}, | ||
2163 | { .hw_value = 36, .center_freq = 5180}, | ||
2164 | { .hw_value = 46, .center_freq = 5230}, | ||
2165 | { .hw_value = 64, .center_freq = 5320}, | ||
2166 | { .hw_value = 116, .center_freq = 5580}, | ||
2180 | { .hw_value = 136, .center_freq = 5680}, | 2167 | { .hw_value = 136, .center_freq = 5680}, |
2168 | { .hw_value = 192, .center_freq = 4960}, | ||
2169 | { .hw_value = 11, .center_freq = 5055}, | ||
2170 | { .hw_value = 38, .center_freq = 5190}, | ||
2171 | { .hw_value = 48, .center_freq = 5240}, | ||
2172 | { .hw_value = 100, .center_freq = 5500}, | ||
2173 | { .hw_value = 120, .center_freq = 5600}, | ||
2181 | { .hw_value = 140, .center_freq = 5700}, | 2174 | { .hw_value = 140, .center_freq = 5700}, |
2175 | { .hw_value = 185, .center_freq = 4925}, | ||
2176 | { .hw_value = 196, .center_freq = 4980}, | ||
2177 | { .hw_value = 12, .center_freq = 5060}, | ||
2178 | { .hw_value = 40, .center_freq = 5200}, | ||
2179 | { .hw_value = 52, .center_freq = 5260}, | ||
2180 | { .hw_value = 104, .center_freq = 5520}, | ||
2181 | { .hw_value = 124, .center_freq = 5620}, | ||
2182 | { .hw_value = 149, .center_freq = 5745}, | 2182 | { .hw_value = 149, .center_freq = 5745}, |
2183 | { .hw_value = 153, .center_freq = 5765}, | ||
2184 | { .hw_value = 157, .center_freq = 5785}, | ||
2185 | { .hw_value = 161, .center_freq = 5805}, | 2183 | { .hw_value = 161, .center_freq = 5805}, |
2184 | { .hw_value = 187, .center_freq = 4935}, | ||
2185 | { .hw_value = 7, .center_freq = 5035}, | ||
2186 | { .hw_value = 16, .center_freq = 5080}, | ||
2187 | { .hw_value = 42, .center_freq = 5210}, | ||
2188 | { .hw_value = 56, .center_freq = 5280}, | ||
2189 | { .hw_value = 108, .center_freq = 5540}, | ||
2190 | { .hw_value = 128, .center_freq = 5640}, | ||
2191 | { .hw_value = 153, .center_freq = 5765}, | ||
2186 | { .hw_value = 165, .center_freq = 5825}, | 2192 | { .hw_value = 165, .center_freq = 5825}, |
2187 | }; | 2193 | }; |
2188 | 2194 | ||