aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r--net/mac80211/mesh_plink.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 79f2a0a13db8..7fcdcf622655 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -370,13 +370,21 @@ u32 mesh_plink_deactivate(struct sta_info *sta)
370 370
371 spin_lock_bh(&sta->mesh->plink_lock); 371 spin_lock_bh(&sta->mesh->plink_lock);
372 changed = __mesh_plink_deactivate(sta); 372 changed = __mesh_plink_deactivate(sta);
373 sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED; 373
374 mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE, 374 if (!sdata->u.mesh.user_mpm) {
375 sta->sta.addr, sta->mesh->llid, sta->mesh->plid, 375 sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED;
376 sta->mesh->reason); 376 mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE,
377 sta->sta.addr, sta->mesh->llid,
378 sta->mesh->plid, sta->mesh->reason);
379 }
377 spin_unlock_bh(&sta->mesh->plink_lock); 380 spin_unlock_bh(&sta->mesh->plink_lock);
381 if (!sdata->u.mesh.user_mpm)
382 del_timer_sync(&sta->mesh->plink_timer);
378 mesh_path_flush_by_nexthop(sta); 383 mesh_path_flush_by_nexthop(sta);
379 384
385 /* make sure no readers can access nexthop sta from here on */
386 synchronize_net();
387
380 return changed; 388 return changed;
381} 389}
382 390