diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-03 16:19:21 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:19 -0400 |
commit | acd34afa89772f6379b642bb979d0a112328c769 (patch) | |
tree | dc72002fdefbd521253f651a53bbed762d3af899 /net/batman-adv/unicast.c | |
parent | d69909d2fc9e00bd8149cc8df9b18c35008e3e62 (diff) |
batman-adv: Prefix packet enum with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r-- | net/batman-adv/unicast.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 8454d916cd01..c4603552f9d8 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -42,7 +42,7 @@ batadv_frag_merge_packet(struct list_head *head, | |||
42 | int uni_diff = sizeof(*up) - hdr_len; | 42 | int uni_diff = sizeof(*up) - hdr_len; |
43 | 43 | ||
44 | /* set skb to the first part and tmp_skb to the second part */ | 44 | /* set skb to the first part and tmp_skb to the second part */ |
45 | if (up->flags & UNI_FRAG_HEAD) { | 45 | if (up->flags & BATADV_UNI_FRAG_HEAD) { |
46 | tmp_skb = tfp->skb; | 46 | tmp_skb = tfp->skb; |
47 | } else { | 47 | } else { |
48 | tmp_skb = skb; | 48 | tmp_skb = skb; |
@@ -66,7 +66,7 @@ batadv_frag_merge_packet(struct list_head *head, | |||
66 | 66 | ||
67 | memmove(skb->data + uni_diff, skb->data, hdr_len); | 67 | memmove(skb->data + uni_diff, skb->data, hdr_len); |
68 | unicast_packet = (struct unicast_packet *)skb_pull(skb, uni_diff); | 68 | unicast_packet = (struct unicast_packet *)skb_pull(skb, uni_diff); |
69 | unicast_packet->header.packet_type = BAT_UNICAST; | 69 | unicast_packet->header.packet_type = BATADV_UNICAST; |
70 | 70 | ||
71 | return skb; | 71 | return skb; |
72 | 72 | ||
@@ -121,7 +121,7 @@ batadv_frag_search_packet(struct list_head *head, | |||
121 | struct unicast_frag_packet *tmp_up = NULL; | 121 | struct unicast_frag_packet *tmp_up = NULL; |
122 | uint16_t search_seqno; | 122 | uint16_t search_seqno; |
123 | 123 | ||
124 | if (up->flags & UNI_FRAG_HEAD) | 124 | if (up->flags & BATADV_UNI_FRAG_HEAD) |
125 | search_seqno = ntohs(up->seqno)+1; | 125 | search_seqno = ntohs(up->seqno)+1; |
126 | else | 126 | else |
127 | search_seqno = ntohs(up->seqno)-1; | 127 | search_seqno = ntohs(up->seqno)-1; |
@@ -138,8 +138,8 @@ batadv_frag_search_packet(struct list_head *head, | |||
138 | 138 | ||
139 | if (tfp->seqno == search_seqno) { | 139 | if (tfp->seqno == search_seqno) { |
140 | 140 | ||
141 | if ((tmp_up->flags & UNI_FRAG_HEAD) != | 141 | if ((tmp_up->flags & BATADV_UNI_FRAG_HEAD) != |
142 | (up->flags & UNI_FRAG_HEAD)) | 142 | (up->flags & BATADV_UNI_FRAG_HEAD)) |
143 | return tfp; | 143 | return tfp; |
144 | else | 144 | else |
145 | goto mov_tail; | 145 | goto mov_tail; |
@@ -254,15 +254,15 @@ int batadv_frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv, | |||
254 | 254 | ||
255 | frag1->header.ttl--; | 255 | frag1->header.ttl--; |
256 | frag1->header.version = BATADV_COMPAT_VERSION; | 256 | frag1->header.version = BATADV_COMPAT_VERSION; |
257 | frag1->header.packet_type = BAT_UNICAST_FRAG; | 257 | frag1->header.packet_type = BATADV_UNICAST_FRAG; |
258 | 258 | ||
259 | memcpy(frag1->orig, primary_if->net_dev->dev_addr, ETH_ALEN); | 259 | memcpy(frag1->orig, primary_if->net_dev->dev_addr, ETH_ALEN); |
260 | memcpy(frag2, frag1, sizeof(*frag2)); | 260 | memcpy(frag2, frag1, sizeof(*frag2)); |
261 | 261 | ||
262 | if (data_len & 1) | 262 | if (data_len & 1) |
263 | large_tail = UNI_FRAG_LARGETAIL; | 263 | large_tail = BATADV_UNI_FRAG_LARGETAIL; |
264 | 264 | ||
265 | frag1->flags = UNI_FRAG_HEAD | large_tail; | 265 | frag1->flags = BATADV_UNI_FRAG_HEAD | large_tail; |
266 | frag2->flags = large_tail; | 266 | frag2->flags = large_tail; |
267 | 267 | ||
268 | seqno = atomic_add_return(2, &hard_iface->frag_seqno); | 268 | seqno = atomic_add_return(2, &hard_iface->frag_seqno); |
@@ -321,7 +321,7 @@ find_router: | |||
321 | 321 | ||
322 | unicast_packet->header.version = BATADV_COMPAT_VERSION; | 322 | unicast_packet->header.version = BATADV_COMPAT_VERSION; |
323 | /* batman packet type: unicast */ | 323 | /* batman packet type: unicast */ |
324 | unicast_packet->header.packet_type = BAT_UNICAST; | 324 | unicast_packet->header.packet_type = BATADV_UNICAST; |
325 | /* set unicast ttl */ | 325 | /* set unicast ttl */ |
326 | unicast_packet->header.ttl = BATADV_TTL; | 326 | unicast_packet->header.ttl = BATADV_TTL; |
327 | /* copy the destination for faster routing */ | 327 | /* copy the destination for faster routing */ |