[package] mac80211: update ath9k patches
[openwrt.git] / package / mac80211 / patches / 410-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch
1 From ea298030ddc0089f308eec39571355aa359a1563 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 v3 10/11] ath9k: fix null pointer dereference in ani monitor code
5
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
9 dereference on AR9100.
10
11 Changes-licensed-under: ISC
12
13 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
14 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
15 ---
16 drivers/net/wireless/ath9k/ani.c | 6 +++---
17 1 files changed, 3 insertions(+), 3 deletions(-)
18
19 --- a/drivers/net/wireless/ath9k/ani.c
20 +++ b/drivers/net/wireless/ath9k/ani.c
21 @@ -551,6 +551,9 @@ void ath9k_hw_ani_monitor(struct ath_hal
22 struct ar5416AniState *aniState;
23 int32_t listenTime;
24
25 + if (!DO_ANI(ah))
26 + return;
27 +
28 aniState = ahp->ah_curani;
29 ahp->ah_stats.ast_nodestats = *stats;
30
31 @@ -610,9 +613,6 @@ void ath9k_hw_ani_monitor(struct ath_hal
32 aniState->cckPhyErrCount = cckPhyErrCnt;
33 }
34
35 - if (!DO_ANI(ah))
36 - return;
37 -
38 if (aniState->listenTime > 5 * ahp->ah_aniPeriod) {
39 if (aniState->ofdmPhyErrCount <= aniState->listenTime *
40 aniState->ofdmTrigLow / 1000 &&
This page took 0.050954 seconds and 5 git commands to generate.