diff options
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index ed93ac41297f..105f214e21f4 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -369,9 +369,6 @@ struct rndis_wext_private { | |||
369 | }; | 369 | }; |
370 | 370 | ||
371 | 371 | ||
372 | static const int freq_chan[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, | ||
373 | 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; | ||
374 | |||
375 | static const int rates_80211g[8] = { 6, 9, 12, 18, 24, 36, 48, 54 }; | 372 | static const int rates_80211g[8] = { 6, 9, 12, 18, 24, 36, 48, 54 }; |
376 | 373 | ||
377 | static const int bcm4320_power_output[4] = { 25, 50, 75, 100 }; | 374 | static const int bcm4320_power_output[4] = { 25, 50, 75, 100 }; |
@@ -640,8 +637,8 @@ static void dsconfig_to_freq(unsigned int dsconfig, struct iw_freq *freq) | |||
640 | static int freq_to_dsconfig(struct iw_freq *freq, unsigned int *dsconfig) | 637 | static int freq_to_dsconfig(struct iw_freq *freq, unsigned int *dsconfig) |
641 | { | 638 | { |
642 | if (freq->m < 1000 && freq->e == 0) { | 639 | if (freq->m < 1000 && freq->e == 0) { |
643 | if (freq->m >= 1 && freq->m <= ARRAY_SIZE(freq_chan)) | 640 | if (freq->m >= 1 && freq->m <= 14) |
644 | *dsconfig = freq_chan[freq->m - 1] * 1000; | 641 | *dsconfig = ieee80211_dsss_chan_to_freq(freq->m) * 1000; |
645 | else | 642 | else |
646 | return -1; | 643 | return -1; |
647 | } else { | 644 | } else { |
@@ -1178,11 +1175,11 @@ static int rndis_iw_get_range(struct net_device *dev, | |||
1178 | range->throughput = 11 * 1000 * 1000 / 2; | 1175 | range->throughput = 11 * 1000 * 1000 / 2; |
1179 | } | 1176 | } |
1180 | 1177 | ||
1181 | range->num_channels = ARRAY_SIZE(freq_chan); | 1178 | range->num_channels = 14; |
1182 | 1179 | ||
1183 | for (i = 0; i < ARRAY_SIZE(freq_chan) && i < IW_MAX_FREQUENCIES; i++) { | 1180 | for (i = 0; (i < 14) && (i < IW_MAX_FREQUENCIES); i++) { |
1184 | range->freq[i].i = i + 1; | 1181 | range->freq[i].i = i + 1; |
1185 | range->freq[i].m = freq_chan[i] * 100000; | 1182 | range->freq[i].m = ieee80211_dsss_chan_to_freq(i + 1) * 100000; |
1186 | range->freq[i].e = 1; | 1183 | range->freq[i].e = 1; |
1187 | } | 1184 | } |
1188 | range->num_frequency = i; | 1185 | range->num_frequency = i; |