1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-01 20:06:14 +02:00
openwrt-xburst/package/mac80211/patches/540-ath9k_fix_survey_crash.patch
nbd bcb63b9e02 ath9k: fix a crash that happens when survey stats are accessed before the interface is brought up for the first time
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23549 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-10-20 14:01:53 +00:00

13 lines
368 B
Diff

--- 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);