aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2010-09-17 16:42:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-21 11:05:21 -0400
commit9adc9e0ff397fb2d4f383cc2d399b18adc32e6eb (patch)
tree64b9b6ef3ce64dbc179df66414ed0bb6d047e7ce /drivers
parente278c5a90368408bd191743e7c6f978f068f4b8d (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')
-rw-r--r--drivers/net/wireless/ath/carl9170/carl9170.h2
-rw-r--r--drivers/net/wireless/ath/carl9170/debug.c8
-rw-r--r--drivers/net/wireless/ath/carl9170/phy.c11
3 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 9f1d60359061..d43675aca0bb 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -321,7 +321,7 @@ struct ar9170 {
321 321
322 /* PHY */ 322 /* PHY */
323 struct ieee80211_channel *channel; 323 struct ieee80211_channel *channel;
324 int noise[6]; 324 int noise[4];
325 unsigned int chan_fail; 325 unsigned int chan_fail;
326 unsigned int total_chan_fail; 326 unsigned int total_chan_fail;
327 u8 heavy_clip; 327 u8 heavy_clip;
diff --git a/drivers/net/wireless/ath/carl9170/debug.c b/drivers/net/wireless/ath/carl9170/debug.c
index 3e9b0e8b2b8c..19b48369ffed 100644
--- a/drivers/net/wireless/ath/carl9170/debug.c
+++ b/drivers/net/wireless/ath/carl9170/debug.c
@@ -436,12 +436,10 @@ static char *carl9170_debugfs_phy_noise_read(struct ar9170 *ar, char *buf,
436 return buf; 436 return buf;
437 } 437 }
438 438
439 ADD(buf, *len, bufsize, "Chain 1: %10d dBm, ext. chan.:%10d dBm\n", 439 ADD(buf, *len, bufsize, "Chain 0: %10d dBm, ext. chan.:%10d dBm\n",
440 ar->noise[1], ar->noise[4]); 440 ar->noise[0], ar->noise[2]);
441 ADD(buf, *len, bufsize, "Chain 2: %10d dBm, ext. chan.:%10d dBm\n", 441 ADD(buf, *len, bufsize, "Chain 2: %10d dBm, ext. chan.:%10d dBm\n",
442 ar->noise[2], ar->noise[5]); 442 ar->noise[1], ar->noise[3]);
443 ADD(buf, *len, bufsize, "Combined %10d dBm, ext. chan.:%10d dBm\n",
444 ar->noise[0], ar->noise[3]);
445 443
446 return buf; 444 return buf;
447} 445}
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index 7df8f711f5d8..fa349b86ea62 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)
1566int carl9170_get_noisefloor(struct ar9170 *ar) 1566int carl9170_get_noisefloor(struct ar9170 *ar)
1567{ 1567{
1568 static const u32 phy_regs[] = { 1568 static const u32 phy_regs[] = {
1569 AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH1_CCA, 1569 AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH2_CCA,
1570 AR9170_PHY_REG_CH2_CCA, AR9170_PHY_REG_EXT_CCA, 1570 AR9170_PHY_REG_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA };
1571 AR9170_PHY_REG_CH1_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA };
1572 u32 phy_res[ARRAY_SIZE(phy_regs)]; 1571 u32 phy_res[ARRAY_SIZE(phy_regs)];
1573 int err, i; 1572 int err, i;
1574 1573
@@ -1578,12 +1577,12 @@ int carl9170_get_noisefloor(struct ar9170 *ar)
1578 if (err) 1577 if (err)
1579 return err; 1578 return err;
1580 1579
1581 for (i = 0; i < 3; i++) { 1580 for (i = 0; i < 2; i++) {
1582 ar->noise[i] = carl9170_calc_noise_dbm( 1581 ar->noise[i] = carl9170_calc_noise_dbm(
1583 (phy_res[i] >> 19) & 0x1ff); 1582 (phy_res[i] >> 19) & 0x1ff);
1584 1583
1585 ar->noise[i + 3] = carl9170_calc_noise_dbm( 1584 ar->noise[i + 2] = carl9170_calc_noise_dbm(
1586 (phy_res[i + 3] >> 23) & 0x1ff); 1585 (phy_res[i + 2] >> 23) & 0x1ff);
1587 } 1586 }
1588 1587
1589 return 0; 1588 return 0;