aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-02-16 01:22:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-27 14:05:44 -0500
commitae245cde14b2386fe77023af3934db96409d1807 (patch)
tree5c977d364e78639e0336d180454ceb9eb595ceb9 /drivers/net/wireless/ath
parent4bc7cda884731e90961a1269b51690152428b77b (diff)
ath9k: Initialize NF values properly
Using AR_SREV_* macros for setting up the chip-specific NF values will make adding support for new chips hard. Use separate macros for each chip. Currently, AR9462 has the same value for all NF limits. 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/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c15
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.h13
2 files changed, 20 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 2b0bfb8cca02..70e27d2a5e43 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1099,13 +1099,20 @@ static void ar9003_hw_set_nf_limits(struct ath_hw *ah)
1099{ 1099{
1100 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ; 1100 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ;
1101 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ; 1101 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ;
1102 if (AR_SREV_9330(ah)) 1102 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9300_2GHZ;
1103 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9330_2GHZ;
1104 else
1105 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9300_2GHZ;
1106 ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ; 1103 ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ;
1107 ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ; 1104 ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ;
1108 ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9300_5GHZ; 1105 ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9300_5GHZ;
1106
1107 if (AR_SREV_9330(ah))
1108 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9330_2GHZ;
1109
1110 if (AR_SREV_9462(ah)) {
1111 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ;
1112 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9462_2GHZ;
1113 ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ;
1114 ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9462_5GHZ;
1115 }
1109} 1116}
1110 1117
1111/* 1118/*
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
index ed64114571fc..aca24bfdc6c3 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -325,13 +325,18 @@
325 325
326#define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200) 326#define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200)
327 327
328#define AR_PHY_CCA_NOM_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -110) 328#define AR_PHY_CCA_NOM_VAL_9300_2GHZ -110
329#define AR_PHY_CCA_NOM_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -115) 329#define AR_PHY_CCA_NOM_VAL_9300_5GHZ -115
330#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -125) 330#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ -125
331#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -125) 331#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ -125
332#define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -95 332#define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -95
333#define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -100 333#define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -100
334 334
335#define AR_PHY_CCA_NOM_VAL_9462_2GHZ -127
336#define AR_PHY_CCA_MIN_GOOD_VAL_9462_2GHZ -127
337#define AR_PHY_CCA_NOM_VAL_9462_5GHZ -127
338#define AR_PHY_CCA_MIN_GOOD_VAL_9462_5GHZ -127
339
335#define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 340#define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118
336 341
337/* 342/*