1 From 676b58c27475a9defccc025fea1cbd2b141ee539 Mon Sep 17 00:00:00 2001
2 From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
3 Date: Thu, 7 Jul 2011 23:33:39 +0530
4 Subject: mac80211: Restart STA timers only on associated state
6 From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
8 commit 676b58c27475a9defccc025fea1cbd2b141ee539 upstream.
10 A panic was observed when the device is failed to resume properly,
11 and there are no running interfaces. ieee80211_reconfig tries
12 to restart STA timers on unassociated state.
14 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
15 Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19 net/mac80211/mlme.c | 3 +++
20 1 file changed, 3 insertions(+)
22 --- a/net/mac80211/mlme.c
23 +++ b/net/mac80211/mlme.c
24 @@ -2200,6 +2200,9 @@ void ieee80211_sta_restart(struct ieee80
26 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
28 + if (!ifmgd->associated)
31 if (test_and_clear_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running))
32 add_timer(&ifmgd->timer);
33 if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running))