]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2x00: Use ieee80211_channel_to_frequency()
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 3 Feb 2008 14:52:45 +0000 (15:52 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Feb 2008 20:19:38 +0000 (15:19 -0500)
No need to perform the calculation ourselves when
wireless provides a helper function for it.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 72c4f13a53361d7167ea8d00d7f67129aec42705..2b99f22ef036ad25d19ea8607dc3dbe5098e669c 100644 (file)
@@ -827,10 +827,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry,
                              const int channel, const int tx_power,
                              const int value)
 {
-       if (channel <= 14)
-               entry->center_freq = 2407 + (5 * channel);
-       else
-               entry->center_freq = 5000 + (5 * channel);
+       entry->center_freq = ieee80211_channel_to_frequency(channel);
        entry->hw_value = value;
        entry->max_power = tx_power;
        entry->max_antenna_gain = 0xff;