diff options
Diffstat (limited to 'drivers/net/wireless/rtl8180_sa2400.c')
-rw-r--r-- | drivers/net/wireless/rtl8180_sa2400.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl8180_sa2400.c b/drivers/net/wireless/rtl8180_sa2400.c index e08ace7b1cb7..0311b4ea124c 100644 --- a/drivers/net/wireless/rtl8180_sa2400.c +++ b/drivers/net/wireless/rtl8180_sa2400.c | |||
@@ -80,8 +80,9 @@ static void sa2400_rf_set_channel(struct ieee80211_hw *dev, | |||
80 | struct ieee80211_conf *conf) | 80 | struct ieee80211_conf *conf) |
81 | { | 81 | { |
82 | struct rtl8180_priv *priv = dev->priv; | 82 | struct rtl8180_priv *priv = dev->priv; |
83 | u32 txpw = priv->channels[conf->channel - 1].val & 0xFF; | 83 | int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); |
84 | u32 chan = sa2400_chan[conf->channel - 1]; | 84 | u32 txpw = priv->channels[channel - 1].hw_value & 0xFF; |
85 | u32 chan = sa2400_chan[channel - 1]; | ||
85 | 86 | ||
86 | write_sa2400(dev, 7, txpw); | 87 | write_sa2400(dev, 7, txpw); |
87 | 88 | ||