1 From 7b647404fb694f250b62a2a363b1298243ea403b Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Mon, 5 Jan 2009 11:14:14 +0100
4 Subject: [PATCH 11/11] ath9k: fix null pointer dereference in ani monitor code
6 In 'ath9k_ani_reset' the 'ahp->ah_curani' will be initialized only
7 if 'DO_ANI(ah)' true. In 'ath9k_hw_ani_monitor' we are using
8 'ahp->ah_curani' unconditionally, and it will cause a NULL pointer
11 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
12 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
14 drivers/net/wireless/ath9k/ani.c | 6 +++---
15 1 files changed, 3 insertions(+), 3 deletions(-)
17 --- a/drivers/net/wireless/ath9k/ani.c
18 +++ b/drivers/net/wireless/ath9k/ani.c
19 @@ -551,6 +551,9 @@ void ath9k_hw_ani_monitor(struct ath_hal
20 struct ar5416AniState *aniState;
26 aniState = ahp->ah_curani;
27 ahp->ah_stats.ast_nodestats = *stats;
29 @@ -610,9 +613,6 @@ void ath9k_hw_ani_monitor(struct ath_hal
30 aniState->cckPhyErrCount = cckPhyErrCnt;
36 if (aniState->listenTime > 5 * ahp->ah_aniPeriod) {
37 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
38 aniState->ofdmTrigLow / 1000 &&