aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/phy.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index fe265e3e6ac4..7df8f711f5d8 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -1558,9 +1558,9 @@ static int carl9170_set_power_cal(struct ar9170 *ar, u32 freq,
1558static int carl9170_calc_noise_dbm(u32 raw_noise) 1558static int carl9170_calc_noise_dbm(u32 raw_noise)
1559{ 1559{
1560 if (raw_noise & 0x100) 1560 if (raw_noise & 0x100)
1561 return ~((raw_noise & 0x0ff) >> 1); 1561 return ~0x1ff | raw_noise;
1562 else 1562 else
1563 return (raw_noise & 0xff) >> 1; 1563 return raw_noise;
1564} 1564}
1565 1565
1566int carl9170_get_noisefloor(struct ar9170 *ar) 1566int carl9170_get_noisefloor(struct ar9170 *ar)