diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-01 18:09:50 -0400 |
---|---|---|
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) |
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 ee34a495b0b..c6751826ce7 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) | |||
1676 | aniState->cycleCount = 0; | 1676 | aniState->cycleCount = 0; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | static void ar5008_hw_set_nf_limits(struct ath_hw *ah) | ||
1680 | { | ||
1681 | ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ; | ||
1682 | ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ; | ||
1683 | ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_5416_2GHZ; | ||
1684 | ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ; | ||
1685 | ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ; | ||
1686 | ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_5416_5GHZ; | ||
1687 | } | ||
1679 | 1688 | ||
1680 | void ar5008_hw_attach_phy_ops(struct ath_hw *ah) | 1689 | void ar5008_hw_attach_phy_ops(struct ath_hw *ah) |
1681 | { | 1690 | { |
@@ -1713,4 +1722,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah) | |||
1713 | priv_ops->compute_pll_control = ar9160_hw_compute_pll_control; | 1722 | priv_ops->compute_pll_control = ar9160_hw_compute_pll_control; |
1714 | else | 1723 | else |
1715 | priv_ops->compute_pll_control = ar5008_hw_compute_pll_control; | 1724 | priv_ops->compute_pll_control = ar5008_hw_compute_pll_control; |
1725 | |||
1726 | ar5008_hw_set_nf_limits(ah); | ||
1716 | } | 1727 | } |