Skip to content

Commit

Permalink
mac80211: stop plink timer only on mesh interfaces
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Pedersen authored and Johannes Berg committed Feb 5, 2013
1 parent 3f52b7e commit aa5a1b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aa5a1b8

Please sign in to comment.