merge mac80211, iw, hostapd from trunk to backfire
[openwrt-10.03/.git] / package / mac80211 / patches / 540-ath9k_fix_survey_crash.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -183,6 +183,9 @@ static void ath_update_survey_stats(stru
4         struct ath_cycle_counters *cc = &common->cc_survey;
5         unsigned int div = common->clockrate * 1000;
6  
7 +       if (!ah->curchan)
8 +               return;
9 +
10         if (ah->power_mode == ATH9K_PM_AWAKE)
11                 ath_hw_cycle_counters_update(common);
12