diff options
Diffstat (limited to 'drivers/net/wireless/rtl8180_max2820.c')
-rw-r--r-- | drivers/net/wireless/rtl8180_max2820.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl8180_max2820.c b/drivers/net/wireless/rtl8180_max2820.c index 98fe9fd64968..a34dfd382b6d 100644 --- a/drivers/net/wireless/rtl8180_max2820.c +++ b/drivers/net/wireless/rtl8180_max2820.c | |||
@@ -78,8 +78,9 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, | |||
78 | struct ieee80211_conf *conf) | 78 | struct ieee80211_conf *conf) |
79 | { | 79 | { |
80 | struct rtl8180_priv *priv = dev->priv; | 80 | struct rtl8180_priv *priv = dev->priv; |
81 | unsigned int chan_idx = conf ? conf->channel - 1 : 0; | 81 | int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); |
82 | u32 txpw = priv->channels[chan_idx].val & 0xFF; | 82 | unsigned int chan_idx = channel - 1; |
83 | u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; | ||
83 | u32 chan = max2820_chan[chan_idx]; | 84 | u32 chan = max2820_chan[chan_idx]; |
84 | 85 | ||
85 | /* While philips SA2400 drive the PA bias from | 86 | /* While philips SA2400 drive the PA bias from |