nl80211: add generation number to all dumps
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / mac80211 / mesh_pathtbl.c
index 04b9e4d61b8ecbd7aa957364c2d4ec48b3af6aba..431865a58622ffd6519b36638aa0931d485e99b8 100644 (file)
@@ -38,6 +38,8 @@ struct mpath_node {
 static struct mesh_table *mesh_paths;
 static struct mesh_table *mpp_paths; /* Store paths for MPP&MAP */
 
+int mesh_paths_generation;
+
 /* This lock will have the grow table function as writer and add / delete nodes
  * as readers. When reading the table (i.e. doing lookups) we are well protected
  * by RCU
@@ -243,6 +245,8 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
                mesh_paths->mean_chain_len * (mesh_paths->hash_mask + 1))
                grow = 1;
 
+       mesh_paths_generation++;
+
        spin_unlock(&mesh_paths->hashwlock[hash_idx]);
        read_unlock(&pathtbl_resize_lock);
        if (grow) {
@@ -484,6 +488,7 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
 
        err = -ENXIO;
 enddel:
+       mesh_paths_generation++;
        spin_unlock(&mesh_paths->hashwlock[hash_idx]);
        read_unlock(&pathtbl_resize_lock);
        return err;