diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-09-03 00:58:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-09-26 15:13:30 -0400 |
commit | d3b371cb03330fc2474d418b0a86a5fea7267370 (patch) | |
tree | 26166aedbcc43a8ef7a9dbe3d8d3886ccb5c390d /drivers/net/wireless | |
parent | 3fcdd0a12ee0adb139d64b58658366191cb168a7 (diff) |
ath9k: Fix regulatory compliance for AR9462/AR9565
Adjust the CCA values based on the regulatory domain
present in the EEPROM.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index 6fd752321e36..fca624322dc8 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h | |||
@@ -343,8 +343,12 @@ | |||
343 | 343 | ||
344 | #define AR_PHY_CCA_NOM_VAL_9462_2GHZ -127 | 344 | #define AR_PHY_CCA_NOM_VAL_9462_2GHZ -127 |
345 | #define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ -127 | 345 | #define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ -127 |
346 | #define AR_PHY_CCA_MAX_GOOD_VAL_9462_2GHZ -60 | ||
347 | #define AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_2GHZ -95 | ||
346 | #define AR_PHY_CCA_NOM_VAL_9462_5GHZ -127 | 348 | #define AR_PHY_CCA_NOM_VAL_9462_5GHZ -127 |
347 | #define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ -127 | 349 | #define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ -127 |
350 | #define AR_PHY_CCA_MAX_GOOD_VAL_9462_5GHZ -60 | ||
351 | #define AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_5GHZ -100 | ||
348 | 352 | ||
349 | #define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 | 353 | #define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 |
350 | 354 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ecc6ec4a1edb..260e0c65f574 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -549,6 +549,18 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
549 | 549 | ||
550 | ath9k_hw_ani_init(ah); | 550 | ath9k_hw_ani_init(ah); |
551 | 551 | ||
552 | /* | ||
553 | * EEPROM needs to be initialized before we do this. | ||
554 | * This is required for regulatory compliance. | ||
555 | */ | ||
556 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { | ||
557 | u16 regdmn = ah->eep_ops->get_eeprom(ah, EEP_REG_0); | ||
558 | if ((regdmn & 0xF0) == CTL_FCC) { | ||
559 | ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_2GHZ; | ||
560 | ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_5GHZ; | ||
561 | } | ||
562 | } | ||
563 | |||
552 | return 0; | 564 | return 0; |
553 | } | 565 | } |
554 | 566 | ||