summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-03 17:52:45 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 23:19:38 +0300
commitf2a3c7f5c8e3c1356dbbce1e9ac2e7f4d5365ba9 (patch)
treed8f5b34bbecd4d7da1214ba26b1d1c65f532a26a /drivers/net/wireless/rt2x00
parentf5507ce90be4e00a84b5bb4c7b4324455aa6ee21 (diff)
downloadlinux-f2a3c7f5c8e3c1356dbbce1e9ac2e7f4d5365ba9.tar.xz
rt2x00: Use ieee80211_channel_to_frequency()
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 72c4f13a5336..2b99f22ef036 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -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;