diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-02 00:09:50 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-02 13:44:36 -0400 |
commit | f2552e28375cb34073a2f940ee9a8439c37d9ec2 (patch) | |
tree | 85c718798e4f64cbc2ddd1beb93541722719d69e /drivers/net/wireless/ath/ath9k/ar5008_phy.c | |
parent | ba17bc5e55ba541d2a8765fca53b6883b667ab21 (diff) | |
download | op-kernel-dev-f2552e28375cb34073a2f940ee9a8439c37d9ec2.zip op-kernel-dev-f2552e28375cb34073a2f940ee9a8439c37d9ec2.tar.gz |
ath9k_hw: sanitize noise floor values properly on all chips
This refactors the noise floor range checks to make them generic,
and adds proper ranges for each supported chip type.
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/ar5008_phy.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index ee34a49..c675182 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c @@ -1676,6 +1676,15 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) aniState->cycleCount = 0; } +static void ar5008_hw_set_nf_limits(struct ath_hw *ah) +{ + ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ; + ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ; + ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_5416_2GHZ; + ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ; + ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ; + ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_5416_5GHZ; +} void ar5008_hw_attach_phy_ops(struct ath_hw *ah) { @@ -1713,4 +1722,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah) priv_ops->compute_pll_control = ar9160_hw_compute_pll_control; else priv_ops->compute_pll_control = ar5008_hw_compute_pll_control; + + ar5008_hw_set_nf_limits(ah); } |