mac80211: add initial support for AR9330
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 559-ath9k-set-NF-limits-for-AR9330.patch
1 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
2 index a0ca1eb..eb18b63 100644
3 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
4 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
5 @@ -1089,7 +1089,10 @@ static void ar9003_hw_set_nf_limits(struct ath_hw *ah)
6 {
7 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ;
8 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ;
9 - ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9300_2GHZ;
10 + if (AR_SREV_9330(ah))
11 + ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9330_2GHZ;
12 + else
13 + ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9300_2GHZ;
14 ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ;
15 ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ;
16 ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9300_5GHZ;
17 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
18 index 443090d..d259278 100644
19 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
20 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
21 @@ -332,6 +332,8 @@
22 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -95
23 #define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -100
24
25 +#define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118
26 +
27 /*
28 * AGC Field Definitions
29 */
30