diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-08-17 06:44:44 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-08-28 05:31:51 -0400 |
commit | 791c2a2d3f1848b56b14706059d9972dade5ec1e (patch) | |
tree | 360903b4aa72bd9621391344f6e117ec0d7287eb | |
parent | c54f38c9aa22ff65ca9f4c1bdbf2a11d017205f3 (diff) |
batman-adv: move enum definition at the top of the file
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 9886a2f804fc..0a8a80cd4bf1 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -28,6 +28,22 @@ | |||
28 | #include "bat_algo.h" | 28 | #include "bat_algo.h" |
29 | #include "network-coding.h" | 29 | #include "network-coding.h" |
30 | 30 | ||
31 | |||
32 | /** | ||
33 | * batadv_dup_status - duplicate status | ||
34 | * @BATADV_NO_DUP: the packet is a duplicate | ||
35 | * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the | ||
36 | * neighbor) | ||
37 | * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor | ||
38 | * @BATADV_PROTECTED: originator is currently protected (after reboot) | ||
39 | */ | ||
40 | enum batadv_dup_status { | ||
41 | BATADV_NO_DUP = 0, | ||
42 | BATADV_ORIG_DUP, | ||
43 | BATADV_NEIGH_DUP, | ||
44 | BATADV_PROTECTED, | ||
45 | }; | ||
46 | |||
31 | /** | 47 | /** |
32 | * batadv_ring_buffer_set - update the ring buffer with the given value | 48 | * batadv_ring_buffer_set - update the ring buffer with the given value |
33 | * @lq_recv: pointer to the ring buffer | 49 | * @lq_recv: pointer to the ring buffer |
@@ -71,21 +87,6 @@ static uint8_t batadv_ring_buffer_avg(const uint8_t lq_recv[]) | |||
71 | return (uint8_t)(sum / count); | 87 | return (uint8_t)(sum / count); |
72 | } | 88 | } |
73 | 89 | ||
74 | /* | ||
75 | * batadv_dup_status - duplicate status | ||
76 | * @BATADV_NO_DUP: the packet is a duplicate | ||
77 | * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the | ||
78 | * neighbor) | ||
79 | * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor | ||
80 | * @BATADV_PROTECTED: originator is currently protected (after reboot) | ||
81 | */ | ||
82 | enum batadv_dup_status { | ||
83 | BATADV_NO_DUP = 0, | ||
84 | BATADV_ORIG_DUP, | ||
85 | BATADV_NEIGH_DUP, | ||
86 | BATADV_PROTECTED, | ||
87 | }; | ||
88 | |||
89 | static struct batadv_neigh_node * | 90 | static struct batadv_neigh_node * |
90 | batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, | 91 | batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, |
91 | const uint8_t *neigh_addr, | 92 | const uint8_t *neigh_addr, |