aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8180_grf5101.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl8180_grf5101.c')
-rw-r--r--drivers/net/wireless/rtl8180_grf5101.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl8180_grf5101.c b/drivers/net/wireless/rtl8180_grf5101.c
index 8293e19c4c59..5d47935dbac3 100644
--- a/drivers/net/wireless/rtl8180_grf5101.c
+++ b/drivers/net/wireless/rtl8180_grf5101.c
@@ -73,8 +73,9 @@ static void grf5101_rf_set_channel(struct ieee80211_hw *dev,
73 struct ieee80211_conf *conf) 73 struct ieee80211_conf *conf)
74{ 74{
75 struct rtl8180_priv *priv = dev->priv; 75 struct rtl8180_priv *priv = dev->priv;
76 u32 txpw = priv->channels[conf->channel - 1].val & 0xFF; 76 int channel = ieee80211_frequency_to_channel(conf->channel->center_freq);
77 u32 chan = conf->channel - 1; 77 u32 txpw = priv->channels[channel - 1].hw_value & 0xFF;
78 u32 chan = channel - 1;
78 79
79 /* set TX power */ 80 /* set TX power */
80 write_grf5101(dev, 0x15, 0x0); 81 write_grf5101(dev, 0x15, 0x0);