From: Thomas Pedersen Date: Mon, 4 Feb 2013 22:12:41 +0000 (-0800) Subject: mac80211: stop plink timer only on mesh interfaces X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=aa5a1b8e68c95151fd249a3b5ec444c6b0aa2f1c;p=deliverable%2Flinux.git mac80211: stop plink timer only on mesh interfaces Since mesh_plink_quiesce() would unconditionally delete the plink timer, and the timer initialization was recently moved into the mesh code path, suspending with a non-mesh interface now causes a crash. Fix this by only deleting the plink timer for mesh interfaces. Reported-by: Emmanuel Grumbach Tested-by: Emmanuel Grumbach Signed-off-by: Thomas Pedersen Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index fe7c3334d6fe..67524e7d2548 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -592,6 +592,9 @@ static void mesh_plink_timer(unsigned long data) #ifdef CONFIG_PM void mesh_plink_quiesce(struct sta_info *sta) { + if (!ieee80211_vif_is_mesh(&sta->sdata->vif)) + return; + if (del_timer_sync(&sta->plink_timer)) sta->plink_timer_was_running = true; }