Commit f2a3c7f5 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville

rt2x00: Use ieee80211_channel_to_frequency()

No need to perform the calculation ourselves when
wireless provides a helper function for it.
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f5507ce9
...@@ -827,10 +827,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry, ...@@ -827,10 +827,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry,
const int channel, const int tx_power, const int channel, const int tx_power,
const int value) const int value)
{ {
if (channel <= 14) entry->center_freq = ieee80211_channel_to_frequency(channel);
entry->center_freq = 2407 + (5 * channel);
else
entry->center_freq = 5000 + (5 * channel);
entry->hw_value = value; entry->hw_value = value;
entry->max_power = tx_power; entry->max_power = tx_power;
entry->max_antenna_gain = 0xff; entry->max_antenna_gain = 0xff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment