package/mac80211/patches/530-ath9k_nf_sanitize.patch |
25 | 25 | } |
26 | 26 | --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c |
27 | 27 | +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c |
28 | | @@ -520,6 +520,30 @@ static void ar9002_hw_do_getnf(struct at |
| 28 | @@ -481,9 +481,6 @@ static void ar9002_hw_do_getnf(struct at |
| 29 | ath_print(common, ATH_DBG_CALIBRATE, |
| 30 | "NF calibrated [ctl] [chain 0] is %d\n", nf); |
| 31 | |
| 32 | - if (AR_SREV_9271(ah) && (nf >= -114)) |
| 33 | - nf = -116; |
| 34 | - |
| 35 | nfarray[0] = nf; |
| 36 | |
| 37 | if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) { |
| 38 | @@ -503,9 +500,6 @@ static void ar9002_hw_do_getnf(struct at |
| 39 | ath_print(common, ATH_DBG_CALIBRATE, |
| 40 | "NF calibrated [ext] [chain 0] is %d\n", nf); |
| 41 | |
| 42 | - if (AR_SREV_9271(ah) && (nf >= -114)) |
| 43 | - nf = -116; |
| 44 | - |
| 45 | nfarray[3] = nf; |
| 46 | |
| 47 | if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) { |
| 48 | @@ -520,6 +514,30 @@ static void ar9002_hw_do_getnf(struct at |
29 | 49 | } |
30 | 50 | } |
31 | 51 | |
... | ... | |
56 | 76 | void ar9002_hw_attach_phy_ops(struct ath_hw *ah) |
57 | 77 | { |
58 | 78 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
59 | | @@ -532,4 +556,6 @@ void ar9002_hw_attach_phy_ops(struct ath |
| 79 | @@ -532,4 +550,6 @@ void ar9002_hw_attach_phy_ops(struct ath |
60 | 80 | priv_ops->olc_init = ar9002_olc_init; |
61 | 81 | priv_ops->compute_pll_control = ar9002_hw_compute_pll_control; |
62 | 82 | priv_ops->do_getnf = ar9002_hw_do_getnf; |
... | ... | |
302 | 322 | - noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE; |
303 | 323 | - else if (AR_SREV_9287(ah)) |
304 | 324 | - noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE; |
305 | | + if (IS_CHAN_2GHZ(ah->curchan)) |
| 325 | + if (!ah->curchan || IS_CHAN_2GHZ(ah->curchan)) |
306 | 326 | + limit = &ah->nf_2g; |
307 | 327 | else |
308 | 328 | - noise_floor = AR_PHY_CCA_MAX_AR5416_GOOD_VALUE; |