diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2010-09-17 22:42:37 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-21 11:05:21 -0400 |
commit | 9adc9e0ff397fb2d4f383cc2d399b18adc32e6eb (patch) | |
tree | 64b9b6ef3ce64dbc179df66414ed0bb6d047e7ce /drivers/net/wireless/ath/carl9170/phy.c | |
parent | e278c5a90368408bd191743e7c6f978f068f4b8d (diff) |
carl9170: don't load bogus nf of chain 1
According to Atheros, chain 1 is not connected.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/phy.c')
-rw-r--r-- | drivers/net/wireless/ath/carl9170/phy.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c index 7df8f711f5d..fa349b86ea6 100644 --- a/drivers/net/wireless/ath/carl9170/phy.c +++ b/drivers/net/wireless/ath/carl9170/phy.c @@ -1566,9 +1566,8 @@ static int carl9170_calc_noise_dbm(u32 raw_noise) int carl9170_get_noisefloor(struct ar9170 *ar) { static const u32 phy_regs[] = { - AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH1_CCA, - AR9170_PHY_REG_CH2_CCA, AR9170_PHY_REG_EXT_CCA, - AR9170_PHY_REG_CH1_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA }; + AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH2_CCA, + AR9170_PHY_REG_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA }; u32 phy_res[ARRAY_SIZE(phy_regs)]; int err, i; @@ -1578,12 +1577,12 @@ int carl9170_get_noisefloor(struct ar9170 *ar) if (err) return err; - for (i = 0; i < 3; i++) { + for (i = 0; i < 2; i++) { ar->noise[i] = carl9170_calc_noise_dbm( (phy_res[i] >> 19) & 0x1ff); - ar->noise[i + 3] = carl9170_calc_noise_dbm( - (phy_res[i + 3] >> 23) & 0x1ff); + ar->noise[i + 2] = carl9170_calc_noise_dbm( + (phy_res[i + 2] >> 23) & 0x1ff); } return 0; |