diff options
author | Thomas Pedersen <thomas@cozybit.com> | 2013-02-06 13:17:21 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-11 12:44:54 -0500 |
commit | 45b5028e86292284f4d5794047d5dfd742c22421 (patch) | |
tree | 126650c535a6d88fcace074d9f4987abbb1f9762 /net/mac80211/mesh_plink.c | |
parent | 077f897a8be9c617e69035af4d17a472d4af272b (diff) |
mac80211: fix mesh sta teardown
The patch "mac80211: clean up mesh sta allocation warning"
moved some mesh initialization into a path which is only
called when the kernel handles peering. This causes a hang
when mac80211 tries to clean up a userspace-allocated
station entry and delete a timer which has never been
initialized.
To avoid this, only do any mesh sta peering teardown if
the kernel is actually handling it.
The same is true when quiescing before suspend.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 67524e7d2548..56c9b318a97e 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -214,7 +214,7 @@ static u32 __mesh_plink_deactivate(struct sta_info *sta) | |||
214 | * | 214 | * |
215 | * All mesh paths with this peer as next hop will be flushed | 215 | * All mesh paths with this peer as next hop will be flushed |
216 | */ | 216 | */ |
217 | void mesh_plink_deactivate(struct sta_info *sta) | 217 | u32 mesh_plink_deactivate(struct sta_info *sta) |
218 | { | 218 | { |
219 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 219 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
220 | u32 changed; | 220 | u32 changed; |
@@ -227,7 +227,7 @@ void mesh_plink_deactivate(struct sta_info *sta) | |||
227 | sta->reason); | 227 | sta->reason); |
228 | spin_unlock_bh(&sta->lock); | 228 | spin_unlock_bh(&sta->lock); |
229 | 229 | ||
230 | ieee80211_bss_info_change_notify(sdata, changed); | 230 | return changed; |
231 | } | 231 | } |
232 | 232 | ||
233 | static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | 233 | static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, |
@@ -595,6 +595,10 @@ void mesh_plink_quiesce(struct sta_info *sta) | |||
595 | if (!ieee80211_vif_is_mesh(&sta->sdata->vif)) | 595 | if (!ieee80211_vif_is_mesh(&sta->sdata->vif)) |
596 | return; | 596 | return; |
597 | 597 | ||
598 | /* no kernel mesh sta timers have been initialized */ | ||
599 | if (sta->sdata->u.mesh.security != IEEE80211_MESH_SEC_NONE) | ||
600 | return; | ||
601 | |||
598 | if (del_timer_sync(&sta->plink_timer)) | 602 | if (del_timer_sync(&sta->plink_timer)) |
599 | sta->plink_timer_was_running = true; | 603 | sta->plink_timer_was_running = true; |
600 | } | 604 | } |