aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Merello <andreamrl@tiscali.it>2007-12-02 17:17:51 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:46 -0500
commit43fd6c7ebdd50276a7d26d7dddcb109c291dde50 (patch)
tree84b8ba5eec6e4c471cb4f042c7127286b4cc1c6d
parent9ee1ba474fc37bcaf6a958bf7e995006fc69893b (diff)
rtl8187: fix tx power reading
CCK and OFDM power levels are stored in adjacent bytes, not nibbles. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Andrea Merello <andreamrl@tiscali.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rtl8187_rtl8225.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl8187_rtl8225.c b/drivers/net/wireless/rtl8187_rtl8225.c
index efc41207780e..eade81f76510 100644
--- a/drivers/net/wireless/rtl8187_rtl8225.c
+++ b/drivers/net/wireless/rtl8187_rtl8225.c
@@ -283,8 +283,8 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
283 u32 reg; 283 u32 reg;
284 int i; 284 int i;
285 285
286 cck_power = priv->channels[channel - 1].val & 0xF; 286 cck_power = priv->channels[channel - 1].val & 0xFF;
287 ofdm_power = priv->channels[channel - 1].val >> 4; 287 ofdm_power = priv->channels[channel - 1].val >> 8;
288 288
289 cck_power = min(cck_power, (u8)11); 289 cck_power = min(cck_power, (u8)11);
290 ofdm_power = min(ofdm_power, (u8)35); 290 ofdm_power = min(ofdm_power, (u8)35);
@@ -500,8 +500,8 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
500 u32 reg; 500 u32 reg;
501 int i; 501 int i;
502 502
503 cck_power = priv->channels[channel - 1].val & 0xF; 503 cck_power = priv->channels[channel - 1].val & 0xFF;
504 ofdm_power = priv->channels[channel - 1].val >> 4; 504 ofdm_power = priv->channels[channel - 1].val >> 8;
505 505
506 cck_power = min(cck_power, (u8)15); 506 cck_power = min(cck_power, (u8)15);
507 cck_power += priv->txpwr_base & 0xF; 507 cck_power += priv->txpwr_base & 0xF;