aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-20 14:01:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-10-20 14:01:53 +0000
commite53a3539e2582f2755b07494e82abfa7358262f6 (patch)
tree08406a8118e7bfe006c67b3c54143e2ad7bf720d /package/mac80211/patches
parentb79b9292104dc38a3b5a017208f09e2bb595fbfc (diff)
downloadupstream-e53a3539e2582f2755b07494e82abfa7358262f6.tar.gz
upstream-e53a3539e2582f2755b07494e82abfa7358262f6.tar.bz2
upstream-e53a3539e2582f2755b07494e82abfa7358262f6.zip
ath9k: fix a crash that happens when survey stats are accessed before the interface is brought up for the first time
SVN-Revision: 23549
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r--package/mac80211/patches/540-ath9k_fix_survey_crash.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/package/mac80211/patches/540-ath9k_fix_survey_crash.patch b/package/mac80211/patches/540-ath9k_fix_survey_crash.patch
new file mode 100644
index 0000000000..b627f8f4a8
--- /dev/null
+++ b/package/mac80211/patches/540-ath9k_fix_survey_crash.patch
@@ -0,0 +1,12 @@
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -183,6 +183,9 @@ static void ath_update_survey_stats(stru
+ struct ath_cycle_counters *cc = &common->cc_survey;
+ unsigned int div = common->clockrate * 1000;
+
++ if (!ah->curchan)
++ return;
++
+ if (ah->power_mode == ATH9K_PM_AWAKE)
+ ath_hw_cycle_counters_update(common);
+