diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-06-15 09:08:59 -0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-06-20 04:38:55 -0400 |
commit | b8e2dd135c3d8b06a4bc6d52b69317bdcccf4605 (patch) | |
tree | 555c4912e9947cfcb9c2d19641c4745a8da00d89 /net/batman-adv/originator.c | |
parent | ecbd532108cb21d9d3770f73e168bad65d14d9eb (diff) |
batman-adv: Move compare_orig to originator.c
compare_orig is only used in context of orig_node which is managed
inside originator.c. It is not necessary to keep that function inside
the header originator.h.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r-- | net/batman-adv/originator.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index a6c35d4e332b..991a6e72a9d7 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -37,6 +37,14 @@ static void start_purge_timer(struct bat_priv *bat_priv) | |||
37 | queue_delayed_work(bat_event_workqueue, &bat_priv->orig_work, 1 * HZ); | 37 | queue_delayed_work(bat_event_workqueue, &bat_priv->orig_work, 1 * HZ); |
38 | } | 38 | } |
39 | 39 | ||
40 | /* returns 1 if they are the same originator */ | ||
41 | static int compare_orig(const struct hlist_node *node, const void *data2) | ||
42 | { | ||
43 | const void *data1 = container_of(node, struct orig_node, hash_entry); | ||
44 | |||
45 | return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); | ||
46 | } | ||
47 | |||
40 | int originator_init(struct bat_priv *bat_priv) | 48 | int originator_init(struct bat_priv *bat_priv) |
41 | { | 49 | { |
42 | if (bat_priv->orig_hash) | 50 | if (bat_priv->orig_hash) |