diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-05 16:31:28 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:20 -0400 |
commit | 5bf74e9ca1e618afe5a513f64ee4923115e67004 (patch) | |
tree | 6534af43c249344deaf881006b27240fb77ee4c2 /net/batman-adv | |
parent | 7f223c0c323a9ac2e88714669994007776e966a8 (diff) |
batman-adv: Prefix hash struct and typedef with batadv_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 20 | ||||
-rw-r--r-- | net/batman-adv/hash.c | 10 | ||||
-rw-r--r-- | net/batman-adv/hash.h | 33 | ||||
-rw-r--r-- | net/batman-adv/originator.c | 10 | ||||
-rw-r--r-- | net/batman-adv/originator.h | 2 | ||||
-rw-r--r-- | net/batman-adv/routing.c | 2 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 30 | ||||
-rw-r--r-- | net/batman-adv/types.h | 12 | ||||
-rw-r--r-- | net/batman-adv/vis.c | 12 |
9 files changed, 67 insertions, 64 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index b463402281b1..8bd70501b1e0 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -133,7 +133,7 @@ static void batadv_claim_free_ref(struct claim *claim) | |||
133 | static struct claim *batadv_claim_hash_find(struct bat_priv *bat_priv, | 133 | static struct claim *batadv_claim_hash_find(struct bat_priv *bat_priv, |
134 | struct claim *data) | 134 | struct claim *data) |
135 | { | 135 | { |
136 | struct hashtable_t *hash = bat_priv->claim_hash; | 136 | struct batadv_hashtable *hash = bat_priv->claim_hash; |
137 | struct hlist_head *head; | 137 | struct hlist_head *head; |
138 | struct hlist_node *node; | 138 | struct hlist_node *node; |
139 | struct claim *claim; | 139 | struct claim *claim; |
@@ -172,7 +172,7 @@ static struct claim *batadv_claim_hash_find(struct bat_priv *bat_priv, | |||
172 | static struct backbone_gw *batadv_backbone_hash_find(struct bat_priv *bat_priv, | 172 | static struct backbone_gw *batadv_backbone_hash_find(struct bat_priv *bat_priv, |
173 | uint8_t *addr, short vid) | 173 | uint8_t *addr, short vid) |
174 | { | 174 | { |
175 | struct hashtable_t *hash = bat_priv->backbone_hash; | 175 | struct batadv_hashtable *hash = bat_priv->backbone_hash; |
176 | struct hlist_head *head; | 176 | struct hlist_head *head; |
177 | struct hlist_node *node; | 177 | struct hlist_node *node; |
178 | struct backbone_gw search_entry, *backbone_gw; | 178 | struct backbone_gw search_entry, *backbone_gw; |
@@ -208,7 +208,7 @@ static struct backbone_gw *batadv_backbone_hash_find(struct bat_priv *bat_priv, | |||
208 | /* delete all claims for a backbone */ | 208 | /* delete all claims for a backbone */ |
209 | static void batadv_bla_del_backbone_claims(struct backbone_gw *backbone_gw) | 209 | static void batadv_bla_del_backbone_claims(struct backbone_gw *backbone_gw) |
210 | { | 210 | { |
211 | struct hashtable_t *hash; | 211 | struct batadv_hashtable *hash; |
212 | struct hlist_node *node, *node_tmp; | 212 | struct hlist_node *node, *node_tmp; |
213 | struct hlist_head *head; | 213 | struct hlist_head *head; |
214 | struct claim *claim; | 214 | struct claim *claim; |
@@ -434,7 +434,7 @@ static void batadv_bla_answer_request(struct bat_priv *bat_priv, | |||
434 | { | 434 | { |
435 | struct hlist_node *node; | 435 | struct hlist_node *node; |
436 | struct hlist_head *head; | 436 | struct hlist_head *head; |
437 | struct hashtable_t *hash; | 437 | struct batadv_hashtable *hash; |
438 | struct claim *claim; | 438 | struct claim *claim; |
439 | struct backbone_gw *backbone_gw; | 439 | struct backbone_gw *backbone_gw; |
440 | int i; | 440 | int i; |
@@ -931,7 +931,7 @@ static void batadv_bla_purge_backbone_gw(struct bat_priv *bat_priv, int now) | |||
931 | struct backbone_gw *backbone_gw; | 931 | struct backbone_gw *backbone_gw; |
932 | struct hlist_node *node, *node_tmp; | 932 | struct hlist_node *node, *node_tmp; |
933 | struct hlist_head *head; | 933 | struct hlist_head *head; |
934 | struct hashtable_t *hash; | 934 | struct batadv_hashtable *hash; |
935 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 935 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
936 | int i; | 936 | int i; |
937 | 937 | ||
@@ -983,7 +983,7 @@ static void batadv_bla_purge_claims(struct bat_priv *bat_priv, | |||
983 | struct claim *claim; | 983 | struct claim *claim; |
984 | struct hlist_node *node; | 984 | struct hlist_node *node; |
985 | struct hlist_head *head; | 985 | struct hlist_head *head; |
986 | struct hashtable_t *hash; | 986 | struct batadv_hashtable *hash; |
987 | int i; | 987 | int i; |
988 | 988 | ||
989 | hash = bat_priv->claim_hash; | 989 | hash = bat_priv->claim_hash; |
@@ -1030,7 +1030,7 @@ void batadv_bla_update_orig_address(struct bat_priv *bat_priv, | |||
1030 | struct backbone_gw *backbone_gw; | 1030 | struct backbone_gw *backbone_gw; |
1031 | struct hlist_node *node; | 1031 | struct hlist_node *node; |
1032 | struct hlist_head *head; | 1032 | struct hlist_head *head; |
1033 | struct hashtable_t *hash; | 1033 | struct batadv_hashtable *hash; |
1034 | int i; | 1034 | int i; |
1035 | 1035 | ||
1036 | /* reset bridge loop avoidance group id */ | 1036 | /* reset bridge loop avoidance group id */ |
@@ -1091,7 +1091,7 @@ static void batadv_bla_periodic_work(struct work_struct *work) | |||
1091 | struct hlist_node *node; | 1091 | struct hlist_node *node; |
1092 | struct hlist_head *head; | 1092 | struct hlist_head *head; |
1093 | struct backbone_gw *backbone_gw; | 1093 | struct backbone_gw *backbone_gw; |
1094 | struct hashtable_t *hash; | 1094 | struct batadv_hashtable *hash; |
1095 | struct hard_iface *primary_if; | 1095 | struct hard_iface *primary_if; |
1096 | int i; | 1096 | int i; |
1097 | 1097 | ||
@@ -1262,7 +1262,7 @@ int batadv_bla_check_bcast_duplist(struct bat_priv *bat_priv, | |||
1262 | */ | 1262 | */ |
1263 | int batadv_bla_is_backbone_gw_orig(struct bat_priv *bat_priv, uint8_t *orig) | 1263 | int batadv_bla_is_backbone_gw_orig(struct bat_priv *bat_priv, uint8_t *orig) |
1264 | { | 1264 | { |
1265 | struct hashtable_t *hash = bat_priv->backbone_hash; | 1265 | struct batadv_hashtable *hash = bat_priv->backbone_hash; |
1266 | struct hlist_head *head; | 1266 | struct hlist_head *head; |
1267 | struct hlist_node *node; | 1267 | struct hlist_node *node; |
1268 | struct backbone_gw *backbone_gw; | 1268 | struct backbone_gw *backbone_gw; |
@@ -1534,7 +1534,7 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset) | |||
1534 | { | 1534 | { |
1535 | struct net_device *net_dev = (struct net_device *)seq->private; | 1535 | struct net_device *net_dev = (struct net_device *)seq->private; |
1536 | struct bat_priv *bat_priv = netdev_priv(net_dev); | 1536 | struct bat_priv *bat_priv = netdev_priv(net_dev); |
1537 | struct hashtable_t *hash = bat_priv->claim_hash; | 1537 | struct batadv_hashtable *hash = bat_priv->claim_hash; |
1538 | struct claim *claim; | 1538 | struct claim *claim; |
1539 | struct hard_iface *primary_if; | 1539 | struct hard_iface *primary_if; |
1540 | struct hlist_node *node; | 1540 | struct hlist_node *node; |
diff --git a/net/batman-adv/hash.c b/net/batman-adv/hash.c index 1fb961c8d9a0..0759c707e974 100644 --- a/net/batman-adv/hash.c +++ b/net/batman-adv/hash.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "hash.h" | 21 | #include "hash.h" |
22 | 22 | ||
23 | /* clears the hash */ | 23 | /* clears the hash */ |
24 | static void batadv_hash_init(struct hashtable_t *hash) | 24 | static void batadv_hash_init(struct batadv_hashtable *hash) |
25 | { | 25 | { |
26 | uint32_t i; | 26 | uint32_t i; |
27 | 27 | ||
@@ -32,7 +32,7 @@ static void batadv_hash_init(struct hashtable_t *hash) | |||
32 | } | 32 | } |
33 | 33 | ||
34 | /* free only the hashtable and the hash itself. */ | 34 | /* free only the hashtable and the hash itself. */ |
35 | void batadv_hash_destroy(struct hashtable_t *hash) | 35 | void batadv_hash_destroy(struct batadv_hashtable *hash) |
36 | { | 36 | { |
37 | kfree(hash->list_locks); | 37 | kfree(hash->list_locks); |
38 | kfree(hash->table); | 38 | kfree(hash->table); |
@@ -40,9 +40,9 @@ void batadv_hash_destroy(struct hashtable_t *hash) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | /* allocates and clears the hash */ | 42 | /* allocates and clears the hash */ |
43 | struct hashtable_t *batadv_hash_new(uint32_t size) | 43 | struct batadv_hashtable *batadv_hash_new(uint32_t size) |
44 | { | 44 | { |
45 | struct hashtable_t *hash; | 45 | struct batadv_hashtable *hash; |
46 | 46 | ||
47 | hash = kmalloc(sizeof(*hash), GFP_ATOMIC); | 47 | hash = kmalloc(sizeof(*hash), GFP_ATOMIC); |
48 | if (!hash) | 48 | if (!hash) |
@@ -68,7 +68,7 @@ free_hash: | |||
68 | return NULL; | 68 | return NULL; |
69 | } | 69 | } |
70 | 70 | ||
71 | void batadv_hash_set_lock_class(struct hashtable_t *hash, | 71 | void batadv_hash_set_lock_class(struct batadv_hashtable *hash, |
72 | struct lock_class_key *key) | 72 | struct lock_class_key *key) |
73 | { | 73 | { |
74 | uint32_t i; | 74 | uint32_t i; |
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index 7ec4e5b0bd41..83990e318e43 100644 --- a/net/batman-adv/hash.h +++ b/net/batman-adv/hash.h | |||
@@ -25,37 +25,39 @@ | |||
25 | /* callback to a compare function. should compare 2 element datas for their | 25 | /* callback to a compare function. should compare 2 element datas for their |
26 | * keys, return 0 if same and not 0 if not same | 26 | * keys, return 0 if same and not 0 if not same |
27 | */ | 27 | */ |
28 | typedef int (*hashdata_compare_cb)(const struct hlist_node *, const void *); | 28 | typedef int (*batadv_hashdata_compare_cb)(const struct hlist_node *, |
29 | const void *); | ||
29 | 30 | ||
30 | /* the hashfunction, should return an index | 31 | /* the hashfunction, should return an index |
31 | * based on the key in the data of the first | 32 | * based on the key in the data of the first |
32 | * argument and the size the second | 33 | * argument and the size the second |
33 | */ | 34 | */ |
34 | typedef uint32_t (*hashdata_choose_cb)(const void *, uint32_t); | 35 | typedef uint32_t (*batadv_hashdata_choose_cb)(const void *, uint32_t); |
35 | typedef void (*hashdata_free_cb)(struct hlist_node *, void *); | 36 | typedef void (*batadv_hashdata_free_cb)(struct hlist_node *, void *); |
36 | 37 | ||
37 | struct hashtable_t { | 38 | struct batadv_hashtable { |
38 | struct hlist_head *table; /* the hashtable itself with the buckets */ | 39 | struct hlist_head *table; /* the hashtable itself with the buckets */ |
39 | spinlock_t *list_locks; /* spinlock for each hash list entry */ | 40 | spinlock_t *list_locks; /* spinlock for each hash list entry */ |
40 | uint32_t size; /* size of hashtable */ | 41 | uint32_t size; /* size of hashtable */ |
41 | }; | 42 | }; |
42 | 43 | ||
43 | /* allocates and clears the hash */ | 44 | /* allocates and clears the hash */ |
44 | struct hashtable_t *batadv_hash_new(uint32_t size); | 45 | struct batadv_hashtable *batadv_hash_new(uint32_t size); |
45 | 46 | ||
46 | /* set class key for all locks */ | 47 | /* set class key for all locks */ |
47 | void batadv_hash_set_lock_class(struct hashtable_t *hash, | 48 | void batadv_hash_set_lock_class(struct batadv_hashtable *hash, |
48 | struct lock_class_key *key); | 49 | struct lock_class_key *key); |
49 | 50 | ||
50 | /* free only the hashtable and the hash itself. */ | 51 | /* free only the hashtable and the hash itself. */ |
51 | void batadv_hash_destroy(struct hashtable_t *hash); | 52 | void batadv_hash_destroy(struct batadv_hashtable *hash); |
52 | 53 | ||
53 | /* remove the hash structure. if hashdata_free_cb != NULL, this function will be | 54 | /* remove the hash structure. if hashdata_free_cb != NULL, this function will be |
54 | * called to remove the elements inside of the hash. if you don't remove the | 55 | * called to remove the elements inside of the hash. if you don't remove the |
55 | * elements, memory might be leaked. | 56 | * elements, memory might be leaked. |
56 | */ | 57 | */ |
57 | static inline void batadv_hash_delete(struct hashtable_t *hash, | 58 | static inline void batadv_hash_delete(struct batadv_hashtable *hash, |
58 | hashdata_free_cb free_cb, void *arg) | 59 | batadv_hashdata_free_cb free_cb, |
60 | void *arg) | ||
59 | { | 61 | { |
60 | struct hlist_head *head; | 62 | struct hlist_head *head; |
61 | struct hlist_node *node, *node_tmp; | 63 | struct hlist_node *node, *node_tmp; |
@@ -89,9 +91,9 @@ static inline void batadv_hash_delete(struct hashtable_t *hash, | |||
89 | * Returns 0 on success, 1 if the element already is in the hash | 91 | * Returns 0 on success, 1 if the element already is in the hash |
90 | * and -1 on error. | 92 | * and -1 on error. |
91 | */ | 93 | */ |
92 | static inline int batadv_hash_add(struct hashtable_t *hash, | 94 | static inline int batadv_hash_add(struct batadv_hashtable *hash, |
93 | hashdata_compare_cb compare, | 95 | batadv_hashdata_compare_cb compare, |
94 | hashdata_choose_cb choose, | 96 | batadv_hashdata_choose_cb choose, |
95 | const void *data, | 97 | const void *data, |
96 | struct hlist_node *data_node) | 98 | struct hlist_node *data_node) |
97 | { | 99 | { |
@@ -134,9 +136,10 @@ out: | |||
134 | * structure you use with just the key filled, we just need the key for | 136 | * structure you use with just the key filled, we just need the key for |
135 | * comparing. | 137 | * comparing. |
136 | */ | 138 | */ |
137 | static inline void *batadv_hash_remove(struct hashtable_t *hash, | 139 | static inline void *batadv_hash_remove(struct batadv_hashtable *hash, |
138 | hashdata_compare_cb compare, | 140 | batadv_hashdata_compare_cb compare, |
139 | hashdata_choose_cb choose, void *data) | 141 | batadv_hashdata_choose_cb choose, |
142 | void *data) | ||
140 | { | 143 | { |
141 | uint32_t index; | 144 | uint32_t index; |
142 | struct hlist_node *node; | 145 | struct hlist_node *node; |
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 4ddea31bfd60..dc9c4bf63118 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -154,7 +154,7 @@ void batadv_orig_node_free_ref(struct orig_node *orig_node) | |||
154 | 154 | ||
155 | void batadv_originator_free(struct bat_priv *bat_priv) | 155 | void batadv_originator_free(struct bat_priv *bat_priv) |
156 | { | 156 | { |
157 | struct hashtable_t *hash = bat_priv->orig_hash; | 157 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
158 | struct hlist_node *node, *node_tmp; | 158 | struct hlist_node *node, *node_tmp; |
159 | struct hlist_head *head; | 159 | struct hlist_head *head; |
160 | spinlock_t *list_lock; /* spinlock to protect write access */ | 160 | spinlock_t *list_lock; /* spinlock to protect write access */ |
@@ -343,7 +343,7 @@ static bool batadv_purge_orig_node(struct bat_priv *bat_priv, | |||
343 | 343 | ||
344 | static void _batadv_purge_orig(struct bat_priv *bat_priv) | 344 | static void _batadv_purge_orig(struct bat_priv *bat_priv) |
345 | { | 345 | { |
346 | struct hashtable_t *hash = bat_priv->orig_hash; | 346 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
347 | struct hlist_node *node, *node_tmp; | 347 | struct hlist_node *node, *node_tmp; |
348 | struct hlist_head *head; | 348 | struct hlist_head *head; |
349 | spinlock_t *list_lock; /* spinlock to protect write access */ | 349 | spinlock_t *list_lock; /* spinlock to protect write access */ |
@@ -401,7 +401,7 @@ int batadv_orig_seq_print_text(struct seq_file *seq, void *offset) | |||
401 | { | 401 | { |
402 | struct net_device *net_dev = (struct net_device *)seq->private; | 402 | struct net_device *net_dev = (struct net_device *)seq->private; |
403 | struct bat_priv *bat_priv = netdev_priv(net_dev); | 403 | struct bat_priv *bat_priv = netdev_priv(net_dev); |
404 | struct hashtable_t *hash = bat_priv->orig_hash; | 404 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
405 | struct hlist_node *node, *node_tmp; | 405 | struct hlist_node *node, *node_tmp; |
406 | struct hlist_head *head; | 406 | struct hlist_head *head; |
407 | struct hard_iface *primary_if; | 407 | struct hard_iface *primary_if; |
@@ -514,7 +514,7 @@ static int batadv_orig_node_add_if(struct orig_node *orig_node, int max_if_num) | |||
514 | int batadv_orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num) | 514 | int batadv_orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num) |
515 | { | 515 | { |
516 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 516 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
517 | struct hashtable_t *hash = bat_priv->orig_hash; | 517 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
518 | struct hlist_node *node; | 518 | struct hlist_node *node; |
519 | struct hlist_head *head; | 519 | struct hlist_head *head; |
520 | struct orig_node *orig_node; | 520 | struct orig_node *orig_node; |
@@ -597,7 +597,7 @@ free_own_sum: | |||
597 | int batadv_orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num) | 597 | int batadv_orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num) |
598 | { | 598 | { |
599 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 599 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
600 | struct hashtable_t *hash = bat_priv->orig_hash; | 600 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
601 | struct hlist_node *node; | 601 | struct hlist_node *node; |
602 | struct hlist_head *head; | 602 | struct hlist_head *head; |
603 | struct hard_iface *hard_iface_tmp; | 603 | struct hard_iface *hard_iface_tmp; |
diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h index 35f67eb4073f..32e7e289a76e 100644 --- a/net/batman-adv/originator.h +++ b/net/batman-adv/originator.h | |||
@@ -63,7 +63,7 @@ static inline uint32_t batadv_choose_orig(const void *data, uint32_t size) | |||
63 | static inline struct orig_node *batadv_orig_hash_find(struct bat_priv *bat_priv, | 63 | static inline struct orig_node *batadv_orig_hash_find(struct bat_priv *bat_priv, |
64 | const void *data) | 64 | const void *data) |
65 | { | 65 | { |
66 | struct hashtable_t *hash = bat_priv->orig_hash; | 66 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
67 | struct hlist_head *head; | 67 | struct hlist_head *head; |
68 | struct hlist_node *node; | 68 | struct hlist_node *node; |
69 | struct orig_node *orig_node, *orig_node_tmp = NULL; | 69 | struct orig_node *orig_node, *orig_node_tmp = NULL; |
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index b8c47dcb5853..86d444a87bde 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -35,7 +35,7 @@ static int batadv_route_unicast_packet(struct sk_buff *skb, | |||
35 | void batadv_slide_own_bcast_window(struct hard_iface *hard_iface) | 35 | void batadv_slide_own_bcast_window(struct hard_iface *hard_iface) |
36 | { | 36 | { |
37 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 37 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
38 | struct hashtable_t *hash = bat_priv->orig_hash; | 38 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
39 | struct hlist_node *node; | 39 | struct hlist_node *node; |
40 | struct hlist_head *head; | 40 | struct hlist_head *head; |
41 | struct orig_node *orig_node; | 41 | struct orig_node *orig_node; |
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 6d03cb11071a..9b35d1f59a11 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -51,8 +51,8 @@ static void batadv_tt_start_timer(struct bat_priv *bat_priv) | |||
51 | msecs_to_jiffies(5000)); | 51 | msecs_to_jiffies(5000)); |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct tt_common_entry *batadv_tt_hash_find(struct hashtable_t *hash, | 54 | static struct tt_common_entry * |
55 | const void *data) | 55 | batadv_tt_hash_find(struct batadv_hashtable *hash, const void *data) |
56 | { | 56 | { |
57 | struct hlist_head *head; | 57 | struct hlist_head *head; |
58 | struct hlist_node *node; | 58 | struct hlist_node *node; |
@@ -417,7 +417,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset) | |||
417 | { | 417 | { |
418 | struct net_device *net_dev = (struct net_device *)seq->private; | 418 | struct net_device *net_dev = (struct net_device *)seq->private; |
419 | struct bat_priv *bat_priv = netdev_priv(net_dev); | 419 | struct bat_priv *bat_priv = netdev_priv(net_dev); |
420 | struct hashtable_t *hash = bat_priv->tt_local_hash; | 420 | struct batadv_hashtable *hash = bat_priv->tt_local_hash; |
421 | struct tt_common_entry *tt_common_entry; | 421 | struct tt_common_entry *tt_common_entry; |
422 | struct hard_iface *primary_if; | 422 | struct hard_iface *primary_if; |
423 | struct hlist_node *node; | 423 | struct hlist_node *node; |
@@ -538,7 +538,7 @@ static void batadv_tt_local_purge_list(struct bat_priv *bat_priv, | |||
538 | 538 | ||
539 | static void batadv_tt_local_purge(struct bat_priv *bat_priv) | 539 | static void batadv_tt_local_purge(struct bat_priv *bat_priv) |
540 | { | 540 | { |
541 | struct hashtable_t *hash = bat_priv->tt_local_hash; | 541 | struct batadv_hashtable *hash = bat_priv->tt_local_hash; |
542 | struct hlist_head *head; | 542 | struct hlist_head *head; |
543 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 543 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
544 | uint32_t i; | 544 | uint32_t i; |
@@ -556,7 +556,7 @@ static void batadv_tt_local_purge(struct bat_priv *bat_priv) | |||
556 | 556 | ||
557 | static void batadv_tt_local_table_free(struct bat_priv *bat_priv) | 557 | static void batadv_tt_local_table_free(struct bat_priv *bat_priv) |
558 | { | 558 | { |
559 | struct hashtable_t *hash; | 559 | struct batadv_hashtable *hash; |
560 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 560 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
561 | struct tt_common_entry *tt_common_entry; | 561 | struct tt_common_entry *tt_common_entry; |
562 | struct tt_local_entry *tt_local_entry; | 562 | struct tt_local_entry *tt_local_entry; |
@@ -775,7 +775,7 @@ int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset) | |||
775 | { | 775 | { |
776 | struct net_device *net_dev = (struct net_device *)seq->private; | 776 | struct net_device *net_dev = (struct net_device *)seq->private; |
777 | struct bat_priv *bat_priv = netdev_priv(net_dev); | 777 | struct bat_priv *bat_priv = netdev_priv(net_dev); |
778 | struct hashtable_t *hash = bat_priv->tt_global_hash; | 778 | struct batadv_hashtable *hash = bat_priv->tt_global_hash; |
779 | struct tt_common_entry *tt_common_entry; | 779 | struct tt_common_entry *tt_common_entry; |
780 | struct tt_global_entry *tt_global_entry; | 780 | struct tt_global_entry *tt_global_entry; |
781 | struct hard_iface *primary_if; | 781 | struct hard_iface *primary_if; |
@@ -984,7 +984,7 @@ void batadv_tt_global_del_orig(struct bat_priv *bat_priv, | |||
984 | struct tt_global_entry *global_entry; | 984 | struct tt_global_entry *global_entry; |
985 | struct tt_common_entry *tt_common_entry; | 985 | struct tt_common_entry *tt_common_entry; |
986 | uint32_t i; | 986 | uint32_t i; |
987 | struct hashtable_t *hash = bat_priv->tt_global_hash; | 987 | struct batadv_hashtable *hash = bat_priv->tt_global_hash; |
988 | struct hlist_node *node, *safe; | 988 | struct hlist_node *node, *safe; |
989 | struct hlist_head *head; | 989 | struct hlist_head *head; |
990 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 990 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
@@ -1047,7 +1047,7 @@ static void batadv_tt_global_roam_purge_list(struct bat_priv *bat_priv, | |||
1047 | 1047 | ||
1048 | static void batadv_tt_global_roam_purge(struct bat_priv *bat_priv) | 1048 | static void batadv_tt_global_roam_purge(struct bat_priv *bat_priv) |
1049 | { | 1049 | { |
1050 | struct hashtable_t *hash = bat_priv->tt_global_hash; | 1050 | struct batadv_hashtable *hash = bat_priv->tt_global_hash; |
1051 | struct hlist_head *head; | 1051 | struct hlist_head *head; |
1052 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 1052 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
1053 | uint32_t i; | 1053 | uint32_t i; |
@@ -1065,7 +1065,7 @@ static void batadv_tt_global_roam_purge(struct bat_priv *bat_priv) | |||
1065 | 1065 | ||
1066 | static void batadv_tt_global_table_free(struct bat_priv *bat_priv) | 1066 | static void batadv_tt_global_table_free(struct bat_priv *bat_priv) |
1067 | { | 1067 | { |
1068 | struct hashtable_t *hash; | 1068 | struct batadv_hashtable *hash; |
1069 | spinlock_t *list_lock; /* protects write access to the hash lists */ | 1069 | spinlock_t *list_lock; /* protects write access to the hash lists */ |
1070 | struct tt_common_entry *tt_common_entry; | 1070 | struct tt_common_entry *tt_common_entry; |
1071 | struct tt_global_entry *tt_global_entry; | 1071 | struct tt_global_entry *tt_global_entry; |
@@ -1174,7 +1174,7 @@ static uint16_t batadv_tt_global_crc(struct bat_priv *bat_priv, | |||
1174 | struct orig_node *orig_node) | 1174 | struct orig_node *orig_node) |
1175 | { | 1175 | { |
1176 | uint16_t total = 0, total_one; | 1176 | uint16_t total = 0, total_one; |
1177 | struct hashtable_t *hash = bat_priv->tt_global_hash; | 1177 | struct batadv_hashtable *hash = bat_priv->tt_global_hash; |
1178 | struct tt_common_entry *tt_common; | 1178 | struct tt_common_entry *tt_common; |
1179 | struct tt_global_entry *tt_global_entry; | 1179 | struct tt_global_entry *tt_global_entry; |
1180 | struct hlist_node *node; | 1180 | struct hlist_node *node; |
@@ -1221,7 +1221,7 @@ static uint16_t batadv_tt_global_crc(struct bat_priv *bat_priv, | |||
1221 | static uint16_t batadv_tt_local_crc(struct bat_priv *bat_priv) | 1221 | static uint16_t batadv_tt_local_crc(struct bat_priv *bat_priv) |
1222 | { | 1222 | { |
1223 | uint16_t total = 0, total_one; | 1223 | uint16_t total = 0, total_one; |
1224 | struct hashtable_t *hash = bat_priv->tt_local_hash; | 1224 | struct batadv_hashtable *hash = bat_priv->tt_local_hash; |
1225 | struct tt_common_entry *tt_common; | 1225 | struct tt_common_entry *tt_common; |
1226 | struct hlist_node *node; | 1226 | struct hlist_node *node; |
1227 | struct hlist_head *head; | 1227 | struct hlist_head *head; |
@@ -1360,7 +1360,7 @@ static int batadv_tt_global_valid(const void *entry_ptr, | |||
1360 | 1360 | ||
1361 | static struct sk_buff * | 1361 | static struct sk_buff * |
1362 | batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | 1362 | batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, |
1363 | struct hashtable_t *hash, | 1363 | struct batadv_hashtable *hash, |
1364 | struct hard_iface *primary_if, | 1364 | struct hard_iface *primary_if, |
1365 | int (*valid_cb)(const void *, const void *), | 1365 | int (*valid_cb)(const void *, const void *), |
1366 | void *cb_data) | 1366 | void *cb_data) |
@@ -2088,8 +2088,8 @@ void batadv_tt_free(struct bat_priv *bat_priv) | |||
2088 | /* This function will enable or disable the specified flags for all the entries | 2088 | /* This function will enable or disable the specified flags for all the entries |
2089 | * in the given hash table and returns the number of modified entries | 2089 | * in the given hash table and returns the number of modified entries |
2090 | */ | 2090 | */ |
2091 | static uint16_t batadv_tt_set_flags(struct hashtable_t *hash, uint16_t flags, | 2091 | static uint16_t batadv_tt_set_flags(struct batadv_hashtable *hash, |
2092 | bool enable) | 2092 | uint16_t flags, bool enable) |
2093 | { | 2093 | { |
2094 | uint32_t i; | 2094 | uint32_t i; |
2095 | uint16_t changed_num = 0; | 2095 | uint16_t changed_num = 0; |
@@ -2126,7 +2126,7 @@ out: | |||
2126 | /* Purge out all the tt local entries marked with BATADV_TT_CLIENT_PENDING */ | 2126 | /* Purge out all the tt local entries marked with BATADV_TT_CLIENT_PENDING */ |
2127 | static void batadv_tt_local_purge_pending_clients(struct bat_priv *bat_priv) | 2127 | static void batadv_tt_local_purge_pending_clients(struct bat_priv *bat_priv) |
2128 | { | 2128 | { |
2129 | struct hashtable_t *hash = bat_priv->tt_local_hash; | 2129 | struct batadv_hashtable *hash = bat_priv->tt_local_hash; |
2130 | struct tt_common_entry *tt_common; | 2130 | struct tt_common_entry *tt_common; |
2131 | struct tt_local_entry *tt_local_entry; | 2131 | struct tt_local_entry *tt_local_entry; |
2132 | struct hlist_node *node, *node_tmp; | 2132 | struct hlist_node *node, *node_tmp; |
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index fcbac82e9c47..9dddaf1c1ca0 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h | |||
@@ -198,16 +198,16 @@ struct bat_priv { | |||
198 | struct hlist_head gw_list; | 198 | struct hlist_head gw_list; |
199 | struct list_head tt_changes_list; /* tracks changes in a OGM int */ | 199 | struct list_head tt_changes_list; /* tracks changes in a OGM int */ |
200 | struct list_head vis_send_list; | 200 | struct list_head vis_send_list; |
201 | struct hashtable_t *orig_hash; | 201 | struct batadv_hashtable *orig_hash; |
202 | struct hashtable_t *tt_local_hash; | 202 | struct batadv_hashtable *tt_local_hash; |
203 | struct hashtable_t *tt_global_hash; | 203 | struct batadv_hashtable *tt_global_hash; |
204 | #ifdef CONFIG_BATMAN_ADV_BLA | 204 | #ifdef CONFIG_BATMAN_ADV_BLA |
205 | struct hashtable_t *claim_hash; | 205 | struct batadv_hashtable *claim_hash; |
206 | struct hashtable_t *backbone_hash; | 206 | struct batadv_hashtable *backbone_hash; |
207 | #endif | 207 | #endif |
208 | struct list_head tt_req_list; /* list of pending tt_requests */ | 208 | struct list_head tt_req_list; /* list of pending tt_requests */ |
209 | struct list_head tt_roam_list; | 209 | struct list_head tt_roam_list; |
210 | struct hashtable_t *vis_hash; | 210 | struct batadv_hashtable *vis_hash; |
211 | #ifdef CONFIG_BATMAN_ADV_BLA | 211 | #ifdef CONFIG_BATMAN_ADV_BLA |
212 | struct bcast_duplist_entry bcast_duplist[BATADV_DUPLIST_SIZE]; | 212 | struct bcast_duplist_entry bcast_duplist[BATADV_DUPLIST_SIZE]; |
213 | int bcast_duplist_curr; | 213 | int bcast_duplist_curr; |
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index f5692eef613a..c1fafa3b172f 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -91,7 +91,7 @@ static uint32_t batadv_vis_info_choose(const void *data, uint32_t size) | |||
91 | static struct vis_info *batadv_vis_hash_find(struct bat_priv *bat_priv, | 91 | static struct vis_info *batadv_vis_hash_find(struct bat_priv *bat_priv, |
92 | const void *data) | 92 | const void *data) |
93 | { | 93 | { |
94 | struct hashtable_t *hash = bat_priv->vis_hash; | 94 | struct batadv_hashtable *hash = bat_priv->vis_hash; |
95 | struct hlist_head *head; | 95 | struct hlist_head *head; |
96 | struct hlist_node *node; | 96 | struct hlist_node *node; |
97 | struct vis_info *vis_info, *vis_info_tmp = NULL; | 97 | struct vis_info *vis_info, *vis_info_tmp = NULL; |
@@ -247,7 +247,7 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
247 | struct hlist_head *head; | 247 | struct hlist_head *head; |
248 | struct net_device *net_dev = (struct net_device *)seq->private; | 248 | struct net_device *net_dev = (struct net_device *)seq->private; |
249 | struct bat_priv *bat_priv = netdev_priv(net_dev); | 249 | struct bat_priv *bat_priv = netdev_priv(net_dev); |
250 | struct hashtable_t *hash = bat_priv->vis_hash; | 250 | struct batadv_hashtable *hash = bat_priv->vis_hash; |
251 | uint32_t i; | 251 | uint32_t i; |
252 | int ret = 0; | 252 | int ret = 0; |
253 | int vis_server = atomic_read(&bat_priv->vis_mode); | 253 | int vis_server = atomic_read(&bat_priv->vis_mode); |
@@ -506,7 +506,7 @@ end: | |||
506 | static int batadv_find_best_vis_server(struct bat_priv *bat_priv, | 506 | static int batadv_find_best_vis_server(struct bat_priv *bat_priv, |
507 | struct vis_info *info) | 507 | struct vis_info *info) |
508 | { | 508 | { |
509 | struct hashtable_t *hash = bat_priv->orig_hash; | 509 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
510 | struct neigh_node *router; | 510 | struct neigh_node *router; |
511 | struct hlist_node *node; | 511 | struct hlist_node *node; |
512 | struct hlist_head *head; | 512 | struct hlist_head *head; |
@@ -559,7 +559,7 @@ static bool batadv_vis_packet_full(const struct vis_info *info) | |||
559 | */ | 559 | */ |
560 | static int batadv_generate_vis_packet(struct bat_priv *bat_priv) | 560 | static int batadv_generate_vis_packet(struct bat_priv *bat_priv) |
561 | { | 561 | { |
562 | struct hashtable_t *hash = bat_priv->orig_hash; | 562 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
563 | struct hlist_node *node; | 563 | struct hlist_node *node; |
564 | struct hlist_head *head; | 564 | struct hlist_head *head; |
565 | struct orig_node *orig_node; | 565 | struct orig_node *orig_node; |
@@ -659,7 +659,7 @@ unlock: | |||
659 | static void batadv_purge_vis_packets(struct bat_priv *bat_priv) | 659 | static void batadv_purge_vis_packets(struct bat_priv *bat_priv) |
660 | { | 660 | { |
661 | uint32_t i; | 661 | uint32_t i; |
662 | struct hashtable_t *hash = bat_priv->vis_hash; | 662 | struct batadv_hashtable *hash = bat_priv->vis_hash; |
663 | struct hlist_node *node, *node_tmp; | 663 | struct hlist_node *node, *node_tmp; |
664 | struct hlist_head *head; | 664 | struct hlist_head *head; |
665 | struct vis_info *info; | 665 | struct vis_info *info; |
@@ -687,7 +687,7 @@ static void batadv_broadcast_vis_packet(struct bat_priv *bat_priv, | |||
687 | struct vis_info *info) | 687 | struct vis_info *info) |
688 | { | 688 | { |
689 | struct neigh_node *router; | 689 | struct neigh_node *router; |
690 | struct hashtable_t *hash = bat_priv->orig_hash; | 690 | struct batadv_hashtable *hash = bat_priv->orig_hash; |
691 | struct hlist_node *node; | 691 | struct hlist_node *node; |
692 | struct hlist_head *head; | 692 | struct hlist_head *head; |
693 | struct orig_node *orig_node; | 693 | struct orig_node *orig_node; |