ath9k: fix crash in ath_update_survey_stats
authorFelix Fietkau <nbd@openwrt.org>
Wed, 20 Oct 2010 13:59:28 +0000 (15:59 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Oct 2010 18:43:14 +0000 (14:43 -0400)
commit0845735e2d1e4c177076d4bc2d841d9f77e95131
treed45bf79b448f0eef91d1803f113df9343afef820
parent2d3fca180710c6832de22c44155ce6a3a4953c6b
ath9k: fix crash in ath_update_survey_stats

If ah->curchan is uninitialized, the channel index is bogus, which leads
to invalid memory access when the cycle counters are updated.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c