diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 07:48:58 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-25 02:21:30 -0400 |
commit | 1eda58bfc56c43e73a0cf2bfb6e4d620ab866109 (patch) | |
tree | d71ba63d988193126831e49bdce03a1131d28ea4 /net/batman-adv/originator.c | |
parent | f0530ee5fb9e73465ac844ada2c96a2bea85a18f (diff) |
batman-adv: Prefix main static inline functions with batadv_
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r-- | net/batman-adv/originator.c | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 36f5ee5cd195..1cd640e8dab9 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -102,9 +102,9 @@ struct neigh_node *batadv_neigh_node_new(struct hard_iface *hard_iface, | |||
102 | /* extra reference for return */ | 102 | /* extra reference for return */ |
103 | atomic_set(&neigh_node->refcount, 2); | 103 | atomic_set(&neigh_node->refcount, 2); |
104 | 104 | ||
105 | bat_dbg(DBG_BATMAN, bat_priv, | 105 | batadv_dbg(DBG_BATMAN, bat_priv, |
106 | "Creating new neighbor %pM, initial seqno %d\n", | 106 | "Creating new neighbor %pM, initial seqno %d\n", |
107 | neigh_addr, seqno); | 107 | neigh_addr, seqno); |
108 | 108 | ||
109 | out: | 109 | out: |
110 | return neigh_node; | 110 | return neigh_node; |
@@ -199,8 +199,8 @@ struct orig_node *batadv_get_orig_node(struct bat_priv *bat_priv, | |||
199 | if (orig_node) | 199 | if (orig_node) |
200 | return orig_node; | 200 | return orig_node; |
201 | 201 | ||
202 | bat_dbg(DBG_BATMAN, bat_priv, | 202 | batadv_dbg(DBG_BATMAN, bat_priv, "Creating new originator: %pM\n", |
203 | "Creating new originator: %pM\n", addr); | 203 | addr); |
204 | 204 | ||
205 | orig_node = kzalloc(sizeof(*orig_node), GFP_ATOMIC); | 205 | orig_node = kzalloc(sizeof(*orig_node), GFP_ATOMIC); |
206 | if (!orig_node) | 206 | if (!orig_node) |
@@ -272,6 +272,7 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, | |||
272 | struct neigh_node *neigh_node; | 272 | struct neigh_node *neigh_node; |
273 | bool neigh_purged = false; | 273 | bool neigh_purged = false; |
274 | unsigned long last_seen; | 274 | unsigned long last_seen; |
275 | struct hard_iface *if_incoming; | ||
275 | 276 | ||
276 | *best_neigh_node = NULL; | 277 | *best_neigh_node = NULL; |
277 | 278 | ||
@@ -281,28 +282,26 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, | |||
281 | hlist_for_each_entry_safe(neigh_node, node, node_tmp, | 282 | hlist_for_each_entry_safe(neigh_node, node, node_tmp, |
282 | &orig_node->neigh_list, list) { | 283 | &orig_node->neigh_list, list) { |
283 | 284 | ||
284 | if ((has_timed_out(neigh_node->last_seen, PURGE_TIMEOUT)) || | 285 | last_seen = neigh_node->last_seen; |
285 | (neigh_node->if_incoming->if_status == IF_INACTIVE) || | 286 | if_incoming = neigh_node->if_incoming; |
286 | (neigh_node->if_incoming->if_status == IF_NOT_IN_USE) || | 287 | |
287 | (neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) { | 288 | if ((batadv_has_timed_out(last_seen, PURGE_TIMEOUT)) || |
288 | 289 | (if_incoming->if_status == IF_INACTIVE) || | |
289 | last_seen = neigh_node->last_seen; | 290 | (if_incoming->if_status == IF_NOT_IN_USE) || |
290 | 291 | (if_incoming->if_status == IF_TO_BE_REMOVED)) { | |
291 | if ((neigh_node->if_incoming->if_status == | 292 | |
292 | IF_INACTIVE) || | 293 | if ((if_incoming->if_status == IF_INACTIVE) || |
293 | (neigh_node->if_incoming->if_status == | 294 | (if_incoming->if_status == IF_NOT_IN_USE) || |
294 | IF_NOT_IN_USE) || | 295 | (if_incoming->if_status == IF_TO_BE_REMOVED)) |
295 | (neigh_node->if_incoming->if_status == | 296 | batadv_dbg(DBG_BATMAN, bat_priv, |
296 | IF_TO_BE_REMOVED)) | 297 | "neighbor purge: originator %pM, neighbor: %pM, iface: %s\n", |
297 | bat_dbg(DBG_BATMAN, bat_priv, | 298 | orig_node->orig, neigh_node->addr, |
298 | "neighbor purge: originator %pM, neighbor: %pM, iface: %s\n", | 299 | if_incoming->net_dev->name); |
299 | orig_node->orig, neigh_node->addr, | ||
300 | neigh_node->if_incoming->net_dev->name); | ||
301 | else | 300 | else |
302 | bat_dbg(DBG_BATMAN, bat_priv, | 301 | batadv_dbg(DBG_BATMAN, bat_priv, |
303 | "neighbor timeout: originator %pM, neighbor: %pM, last_seen: %u\n", | 302 | "neighbor timeout: originator %pM, neighbor: %pM, last_seen: %u\n", |
304 | orig_node->orig, neigh_node->addr, | 303 | orig_node->orig, neigh_node->addr, |
305 | jiffies_to_msecs(last_seen)); | 304 | jiffies_to_msecs(last_seen)); |
306 | 305 | ||
307 | neigh_purged = true; | 306 | neigh_purged = true; |
308 | 307 | ||
@@ -325,11 +324,11 @@ static bool purge_orig_node(struct bat_priv *bat_priv, | |||
325 | { | 324 | { |
326 | struct neigh_node *best_neigh_node; | 325 | struct neigh_node *best_neigh_node; |
327 | 326 | ||
328 | if (has_timed_out(orig_node->last_seen, 2 * PURGE_TIMEOUT)) { | 327 | if (batadv_has_timed_out(orig_node->last_seen, 2 * PURGE_TIMEOUT)) { |
329 | bat_dbg(DBG_BATMAN, bat_priv, | 328 | batadv_dbg(DBG_BATMAN, bat_priv, |
330 | "Originator timeout: originator %pM, last_seen %u\n", | 329 | "Originator timeout: originator %pM, last_seen %u\n", |
331 | orig_node->orig, | 330 | orig_node->orig, |
332 | jiffies_to_msecs(orig_node->last_seen)); | 331 | jiffies_to_msecs(orig_node->last_seen)); |
333 | return true; | 332 | return true; |
334 | } else { | 333 | } else { |
335 | if (purge_orig_neighbors(bat_priv, orig_node, | 334 | if (purge_orig_neighbors(bat_priv, orig_node, |
@@ -370,8 +369,8 @@ static void _purge_orig(struct bat_priv *bat_priv) | |||
370 | continue; | 369 | continue; |
371 | } | 370 | } |
372 | 371 | ||
373 | if (has_timed_out(orig_node->last_frag_packet, | 372 | if (batadv_has_timed_out(orig_node->last_frag_packet, |
374 | FRAG_TIMEOUT)) | 373 | FRAG_TIMEOUT)) |
375 | batadv_frag_list_free(&orig_node->frag_list); | 374 | batadv_frag_list_free(&orig_node->frag_list); |
376 | } | 375 | } |
377 | spin_unlock_bh(list_lock); | 376 | spin_unlock_bh(list_lock); |