diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-22 22:07:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-26 15:32:42 -0400 |
commit | 866b7780fce95989dfc85f3e372635f5147e0d90 (patch) | |
tree | 795a2705b44be3f60f3d4a0ff46fddbee0337197 /drivers/net/wireless/ath/ath9k/ar9003_phy.c | |
parent | 4cee78614cfa046a26c4fbf313d5bbacb3ad8efc (diff) |
ath9k_hw: fix invalid extension channel noisefloor readings in HT20
When the hardware is configured in HT20 mode, noise floor readings for
the extension channel often return invalid values, which keep the
values in the NF history buffer at the hardware-specific maximum limit.
Fix this by discarding the extension channel values when in HT20 mode.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 7c93338540a..a753a431bb1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -1029,6 +1029,9 @@ static void ar9003_hw_do_getnf(struct ath_hw *ah, | |||
1029 | nf = MS(REG_READ(ah, AR_PHY_CCA_2), AR_PHY_CH2_MINCCA_PWR); | 1029 | nf = MS(REG_READ(ah, AR_PHY_CCA_2), AR_PHY_CH2_MINCCA_PWR); |
1030 | nfarray[2] = sign_extend(nf, 9); | 1030 | nfarray[2] = sign_extend(nf, 9); |
1031 | 1031 | ||
1032 | if (!IS_CHAN_HT40(ah->curchan)) | ||
1033 | return; | ||
1034 | |||
1032 | nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR); | 1035 | nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR); |
1033 | nfarray[3] = sign_extend(nf, 9); | 1036 | nfarray[3] = sign_extend(nf, 9); |
1034 | 1037 | ||