aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-01 20:51:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-07-01 20:51:30 +0000
commit2221783755e65b1355e96dd4710efa9f05bb5aa2 (patch)
tree2b31885a7c6e7353d77a29c5c18b5aef05d9db3d /package
parent0d23b8d01a01b5cf21a2a4851feebfd802500941 (diff)
downloadupstream-2221783755e65b1355e96dd4710efa9f05bb5aa2.tar.gz
upstream-2221783755e65b1355e96dd4710efa9f05bb5aa2.tar.bz2
upstream-2221783755e65b1355e96dd4710efa9f05bb5aa2.zip
ath9k: add a missing null pointer check and some further cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22036 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/530-ath9k_nf_sanitize.patch26
1 files changed, 23 insertions, 3 deletions
diff --git a/package/mac80211/patches/530-ath9k_nf_sanitize.patch b/package/mac80211/patches/530-ath9k_nf_sanitize.patch
index db873921cb..191daeab20 100644
--- a/package/mac80211/patches/530-ath9k_nf_sanitize.patch
+++ b/package/mac80211/patches/530-ath9k_nf_sanitize.patch
@@ -25,7 +25,27 @@
}
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
-@@ -520,6 +520,30 @@ static void ar9002_hw_do_getnf(struct at
+@@ -481,9 +481,6 @@ static void ar9002_hw_do_getnf(struct at
+ ath_print(common, ATH_DBG_CALIBRATE,
+ "NF calibrated [ctl] [chain 0] is %d\n", nf);
+
+- if (AR_SREV_9271(ah) && (nf >= -114))
+- nf = -116;
+-
+ nfarray[0] = nf;
+
+ if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
+@@ -503,9 +500,6 @@ static void ar9002_hw_do_getnf(struct at
+ ath_print(common, ATH_DBG_CALIBRATE,
+ "NF calibrated [ext] [chain 0] is %d\n", nf);
+
+- if (AR_SREV_9271(ah) && (nf >= -114))
+- nf = -116;
+-
+ nfarray[3] = nf;
+
+ if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
+@@ -520,6 +514,30 @@ static void ar9002_hw_do_getnf(struct at
}
}
@@ -56,7 +76,7 @@
void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
{
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
-@@ -532,4 +556,6 @@ void ar9002_hw_attach_phy_ops(struct ath
+@@ -532,4 +550,6 @@ void ar9002_hw_attach_phy_ops(struct ath
priv_ops->olc_init = ar9002_olc_init;
priv_ops->compute_pll_control = ar9002_hw_compute_pll_control;
priv_ops->do_getnf = ar9002_hw_do_getnf;
@@ -302,7 +322,7 @@
- noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE;
- else if (AR_SREV_9287(ah))
- noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE;
-+ if (IS_CHAN_2GHZ(ah->curchan))
++ if (!ah->curchan || IS_CHAN_2GHZ(ah->curchan))
+ limit = &ah->nf_2g;
else
- noise_floor = AR_PHY_CCA_MAX_AR5416_GOOD_VALUE;