aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_pathtbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r--net/mac80211/mesh_pathtbl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 04b9e4d61b8e..431865a58622 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -38,6 +38,8 @@ struct mpath_node {
38static struct mesh_table *mesh_paths; 38static struct mesh_table *mesh_paths;
39static struct mesh_table *mpp_paths; /* Store paths for MPP&MAP */ 39static struct mesh_table *mpp_paths; /* Store paths for MPP&MAP */
40 40
41int mesh_paths_generation;
42
41/* This lock will have the grow table function as writer and add / delete nodes 43/* This lock will have the grow table function as writer and add / delete nodes
42 * as readers. When reading the table (i.e. doing lookups) we are well protected 44 * as readers. When reading the table (i.e. doing lookups) we are well protected
43 * by RCU 45 * by RCU
@@ -243,6 +245,8 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
243 mesh_paths->mean_chain_len * (mesh_paths->hash_mask + 1)) 245 mesh_paths->mean_chain_len * (mesh_paths->hash_mask + 1))
244 grow = 1; 246 grow = 1;
245 247
248 mesh_paths_generation++;
249
246 spin_unlock(&mesh_paths->hashwlock[hash_idx]); 250 spin_unlock(&mesh_paths->hashwlock[hash_idx]);
247 read_unlock(&pathtbl_resize_lock); 251 read_unlock(&pathtbl_resize_lock);
248 if (grow) { 252 if (grow) {
@@ -484,6 +488,7 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
484 488
485 err = -ENXIO; 489 err = -ENXIO;
486enddel: 490enddel:
491 mesh_paths_generation++;
487 spin_unlock(&mesh_paths->hashwlock[hash_idx]); 492 spin_unlock(&mesh_paths->hashwlock[hash_idx]);
488 read_unlock(&pathtbl_resize_lock); 493 read_unlock(&pathtbl_resize_lock);
489 return err; 494 return err;