aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2013-02-04 17:12:41 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-05 05:00:09 -0500
commitaa5a1b8e68c95151fd249a3b5ec444c6b0aa2f1c (patch)
treea789a412a0633b759bf11b4c1395c99380063fe5
parent3f52b7e328c526fa7a592af9bf5772c591ed38a4 (diff)
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 <emmanuel.grumbach@intel.com> Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/mesh_plink.c3
1 files changed, 3 insertions, 0 deletions
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)
592#ifdef CONFIG_PM 592#ifdef CONFIG_PM
593void mesh_plink_quiesce(struct sta_info *sta) 593void mesh_plink_quiesce(struct sta_info *sta)
594{ 594{
595 if (!ieee80211_vif_is_mesh(&sta->sdata->vif))
596 return;
597
595 if (del_timer_sync(&sta->plink_timer)) 598 if (del_timer_sync(&sta->plink_timer))
596 sta->plink_timer_was_running = true; 599 sta->plink_timer_was_running = true;
597} 600}