ath9k: fix a crash that happens when survey stats are accessed before the interface...
authorFelix Fietkau <nbd@openwrt.org>
Wed, 20 Oct 2010 14:01:53 +0000 (14:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 20 Oct 2010 14:01:53 +0000 (14:01 +0000)
SVN-Revision: 23549

package/mac80211/patches/540-ath9k_fix_survey_crash.patch [new file with mode: 0644]

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 (file)
index 0000000..b627f8f
--- /dev/null
@@ -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);