aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r--net/mac80211/mesh.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index f3cc3917e048..cc6854db156e 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -51,10 +51,6 @@ enum mesh_path_flags {
51 * 51 *
52 * 52 *
53 * @MESH_WORK_HOUSEKEEPING: run the periodic mesh housekeeping tasks 53 * @MESH_WORK_HOUSEKEEPING: run the periodic mesh housekeeping tasks
54 * @MESH_WORK_GROW_MPATH_TABLE: the mesh path table is full and needs
55 * to grow.
56 * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to
57 * grow
58 * @MESH_WORK_ROOT: the mesh root station needs to send a frame 54 * @MESH_WORK_ROOT: the mesh root station needs to send a frame
59 * @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other 55 * @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other
60 * mesh nodes 56 * mesh nodes
@@ -62,8 +58,6 @@ enum mesh_path_flags {
62 */ 58 */
63enum mesh_deferred_task_flags { 59enum mesh_deferred_task_flags {
64 MESH_WORK_HOUSEKEEPING, 60 MESH_WORK_HOUSEKEEPING,
65 MESH_WORK_GROW_MPATH_TABLE,
66 MESH_WORK_GROW_MPP_TABLE,
67 MESH_WORK_ROOT, 61 MESH_WORK_ROOT,
68 MESH_WORK_DRIFT_ADJUST, 62 MESH_WORK_DRIFT_ADJUST,
69 MESH_WORK_MBSS_CHANGED, 63 MESH_WORK_MBSS_CHANGED,
@@ -105,6 +99,7 @@ enum mesh_deferred_task_flags {
105struct mesh_path { 99struct mesh_path {
106 u8 dst[ETH_ALEN]; 100 u8 dst[ETH_ALEN];
107 u8 mpp[ETH_ALEN]; /* used for MPP or MAP */ 101 u8 mpp[ETH_ALEN]; /* used for MPP or MAP */
102 struct rhash_head rhash;
108 struct hlist_node gate_list; 103 struct hlist_node gate_list;
109 struct ieee80211_sub_if_data *sdata; 104 struct ieee80211_sub_if_data *sdata;
110 struct sta_info __rcu *next_hop; 105 struct sta_info __rcu *next_hop;
@@ -129,34 +124,17 @@ struct mesh_path {
129/** 124/**
130 * struct mesh_table 125 * struct mesh_table
131 * 126 *
132 * @hash_buckets: array of hash buckets of the table
133 * @hashwlock: array of locks to protect write operations, one per bucket
134 * @hash_mask: 2^size_order - 1, used to compute hash idx
135 * @hash_rnd: random value used for hash computations
136 * @entries: number of entries in the table 127 * @entries: number of entries in the table
137 * @free_node: function to free nodes of the table
138 * @copy_node: function to copy nodes of the table
139 * @size_order: determines size of the table, there will be 2^size_order hash
140 * buckets
141 * @known_gates: list of known mesh gates and their mpaths by the station. The 128 * @known_gates: list of known mesh gates and their mpaths by the station. The
142 * gate's mpath may or may not be resolved and active. 129 * gate's mpath may or may not be resolved and active.
143 * 130 * @rhash: the rhashtable containing struct mesh_paths, keyed by dest addr
144 * rcu_head: RCU head to free the table
145 */ 131 */
146struct mesh_table { 132struct mesh_table {
147 /* Number of buckets will be 2^N */
148 struct hlist_head *hash_buckets;
149 spinlock_t *hashwlock; /* One per bucket, for add/del */
150 unsigned int hash_mask; /* (2^size_order) - 1 */
151 __u32 hash_rnd; /* Used for hash generation */
152 atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */ 133 atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */
153 void (*free_node) (struct hlist_node *p, bool free_leafs);
154 int (*copy_node) (struct hlist_node *p, struct mesh_table *newtbl);
155 int size_order;
156 struct hlist_head *known_gates; 134 struct hlist_head *known_gates;
157 spinlock_t gates_lock; 135 spinlock_t gates_lock;
158 136
159 struct rcu_head rcu_head; 137 struct rhashtable rhead;
160}; 138};
161 139
162/* Recent multicast cache */ 140/* Recent multicast cache */
@@ -300,9 +278,6 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
300void mesh_sta_cleanup(struct sta_info *sta); 278void mesh_sta_cleanup(struct sta_info *sta);
301 279
302/* Private interfaces */ 280/* Private interfaces */
303/* Mesh tables */
304void mesh_mpath_table_grow(struct ieee80211_sub_if_data *sdata);
305void mesh_mpp_table_grow(struct ieee80211_sub_if_data *sdata);
306/* Mesh paths */ 281/* Mesh paths */
307int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, 282int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata,
308 u8 ttl, const u8 *target, u32 target_sn, 283 u8 ttl, const u8 *target, u32 target_sn,