ath9k: Fix regulatory compliance
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Fri, 6 Dec 2013 10:58:50 +0000 (16:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Dec 2013 20:38:00 +0000 (15:38 -0500)
Adjusting the CCA registers for maximum permissible
noise floor in ETSI/Japan domains has to be done for
all AR9003 family chips.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_phy.h
drivers/net/wireless/ath/ath9k/hw.c

index 2af667beb2738ea498c87ed171d8e4aed5e31bd5..bbbfc4dc59eb1e14f69fbd1e4c78eee38c3ad215 100644 (file)
 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ     -95
 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ     -100
 
+#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_2GHZ -95
+#define AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_5GHZ -100
+
 #define AR_PHY_CCA_NOM_VAL_9462_2GHZ          -127
 #define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ     -127
 #define AR_PHY_CCA_MAX_GOOD_VAL_9462_2GHZ     -60
-#define AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_2GHZ -95
 #define AR_PHY_CCA_NOM_VAL_9462_5GHZ          -127
 #define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ     -127
 #define AR_PHY_CCA_MAX_GOOD_VAL_9462_5GHZ     -60
-#define AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_5GHZ -100
 
 #define AR_PHY_CCA_NOM_VAL_9330_2GHZ          -118
 
index 779d38a98a0e82c4a2e64cf676afef01fcbd1d59..4ee24b1eec38fa12ba86c838573a31b8d808f28f 100644 (file)
@@ -548,11 +548,11 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
         * EEPROM needs to be initialized before we do this.
         * This is required for regulatory compliance.
         */
-       if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
+       if (AR_SREV_9300_20_OR_LATER(ah)) {
                u16 regdmn = ah->eep_ops->get_eeprom(ah, EEP_REG_0);
                if ((regdmn & 0xF0) == CTL_FCC) {
-                       ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_2GHZ;
-                       ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9462_FCC_5GHZ;
+                       ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_2GHZ;
+                       ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_FCC_5GHZ;
                }
        }