Skip to content
Snippets Groups Projects
Commit e53a3539 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

ath9k: fix a crash that happens when survey stats are accessed before the...

ath9k: fix a crash that happens when survey stats are accessed before the interface is brought up for the first time

SVN-Revision: 23549
parent b79b9292
No related branches found
No related tags found
No related merge requests found
--- 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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment