aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-06-03 16:19:13 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-28 02:45:00 -0400
commit7e071c79a6964130d1df4dc5ca5a6f3638680fce (patch)
tree5e6260e15caf8cfb14037b526c06a2e578e8a007 /net/batman-adv
parent64346643e86d93805fcb8f722fc4817110be99d8 (diff)
batman-adv: Prefix packet defines 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/bat_iv_ogm.c20
-rw-r--r--net/batman-adv/hard-interface.c3
-rw-r--r--net/batman-adv/icmp_socket.c4
-rw-r--r--net/batman-adv/main.c4
-rw-r--r--net/batman-adv/packet.h12
-rw-r--r--net/batman-adv/routing.c4
-rw-r--r--net/batman-adv/send.c4
-rw-r--r--net/batman-adv/soft-interface.c12
-rw-r--r--net/batman-adv/translation-table.c8
-rw-r--r--net/batman-adv/unicast.c4
-rw-r--r--net/batman-adv/vis.c2
11 files changed, 40 insertions, 37 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index ffe9d1d057c1..245bb2d7647c 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -64,7 +64,7 @@ static int batadv_iv_ogm_iface_enable(struct hard_iface *hard_iface)
64 get_random_bytes(&random_seqno, sizeof(random_seqno)); 64 get_random_bytes(&random_seqno, sizeof(random_seqno));
65 atomic_set(&hard_iface->seqno, random_seqno); 65 atomic_set(&hard_iface->seqno, random_seqno);
66 66
67 hard_iface->packet_len = BATMAN_OGM_HLEN; 67 hard_iface->packet_len = BATADV_OGM_HLEN;
68 hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC); 68 hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC);
69 69
70 if (!hard_iface->packet_buff) 70 if (!hard_iface->packet_buff)
@@ -72,7 +72,7 @@ static int batadv_iv_ogm_iface_enable(struct hard_iface *hard_iface)
72 72
73 batman_ogm_packet = (struct batman_ogm_packet *)hard_iface->packet_buff; 73 batman_ogm_packet = (struct batman_ogm_packet *)hard_iface->packet_buff;
74 batman_ogm_packet->header.packet_type = BAT_IV_OGM; 74 batman_ogm_packet->header.packet_type = BAT_IV_OGM;
75 batman_ogm_packet->header.version = COMPAT_VERSION; 75 batman_ogm_packet->header.version = BATADV_COMPAT_VERSION;
76 batman_ogm_packet->header.ttl = 2; 76 batman_ogm_packet->header.ttl = 2;
77 batman_ogm_packet->flags = NO_FLAGS; 77 batman_ogm_packet->flags = NO_FLAGS;
78 batman_ogm_packet->tq = TQ_MAX_VALUE; 78 batman_ogm_packet->tq = TQ_MAX_VALUE;
@@ -139,7 +139,7 @@ static int batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len,
139{ 139{
140 int next_buff_pos = 0; 140 int next_buff_pos = 0;
141 141
142 next_buff_pos += buff_pos + BATMAN_OGM_HLEN; 142 next_buff_pos += buff_pos + BATADV_OGM_HLEN;
143 next_buff_pos += batadv_tt_len(tt_num_changes); 143 next_buff_pos += batadv_tt_len(tt_num_changes);
144 144
145 return (next_buff_pos <= packet_len) && 145 return (next_buff_pos <= packet_len) &&
@@ -191,7 +191,7 @@ static void batadv_iv_ogm_send_to_if(struct forw_packet *forw_packet,
191 batman_ogm_packet->ttvn, hard_iface->net_dev->name, 191 batman_ogm_packet->ttvn, hard_iface->net_dev->name,
192 hard_iface->net_dev->dev_addr); 192 hard_iface->net_dev->dev_addr);
193 193
194 buff_pos += BATMAN_OGM_HLEN; 194 buff_pos += BATADV_OGM_HLEN;
195 buff_pos += batadv_tt_len(batman_ogm_packet->tt_num_changes); 195 buff_pos += batadv_tt_len(batman_ogm_packet->tt_num_changes);
196 packet_num++; 196 packet_num++;
197 batman_ogm_packet = (struct batman_ogm_packet *) 197 batman_ogm_packet = (struct batman_ogm_packet *)
@@ -561,7 +561,7 @@ static void batadv_iv_ogm_forward(struct orig_node *orig_node,
561 batman_ogm_packet->flags &= ~DIRECTLINK; 561 batman_ogm_packet->flags &= ~DIRECTLINK;
562 562
563 batadv_iv_ogm_queue_add(bat_priv, (unsigned char *)batman_ogm_packet, 563 batadv_iv_ogm_queue_add(bat_priv, (unsigned char *)batman_ogm_packet,
564 BATMAN_OGM_HLEN + batadv_tt_len(tt_num_changes), 564 BATADV_OGM_HLEN + batadv_tt_len(tt_num_changes),
565 if_incoming, 0, batadv_iv_ogm_fwd_send_time()); 565 if_incoming, 0, batadv_iv_ogm_fwd_send_time());
566} 566}
567 567
@@ -579,7 +579,7 @@ static void batadv_iv_ogm_schedule(struct hard_iface *hard_iface)
579 tt_num_changes = batadv_tt_append_diff(bat_priv, 579 tt_num_changes = batadv_tt_append_diff(bat_priv,
580 &hard_iface->packet_buff, 580 &hard_iface->packet_buff,
581 &hard_iface->packet_len, 581 &hard_iface->packet_len,
582 BATMAN_OGM_HLEN); 582 BATADV_OGM_HLEN);
583 583
584 batman_ogm_packet = (struct batman_ogm_packet *)hard_iface->packet_buff; 584 batman_ogm_packet = (struct batman_ogm_packet *)hard_iface->packet_buff;
585 585
@@ -1025,7 +1025,7 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
1025 } 1025 }
1026 rcu_read_unlock(); 1026 rcu_read_unlock();
1027 1027
1028 if (batman_ogm_packet->header.version != COMPAT_VERSION) { 1028 if (batman_ogm_packet->header.version != BATADV_COMPAT_VERSION) {
1029 batadv_dbg(DBG_BATMAN, bat_priv, 1029 batadv_dbg(DBG_BATMAN, bat_priv,
1030 "Drop packet: incompatible batman version (%i)\n", 1030 "Drop packet: incompatible batman version (%i)\n",
1031 batman_ogm_packet->header.version); 1031 batman_ogm_packet->header.version);
@@ -1227,7 +1227,7 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb,
1227 unsigned char *tt_buff, *packet_buff; 1227 unsigned char *tt_buff, *packet_buff;
1228 bool ret; 1228 bool ret;
1229 1229
1230 ret = batadv_check_management_packet(skb, if_incoming, BATMAN_OGM_HLEN); 1230 ret = batadv_check_management_packet(skb, if_incoming, BATADV_OGM_HLEN);
1231 if (!ret) 1231 if (!ret)
1232 return NET_RX_DROP; 1232 return NET_RX_DROP;
1233 1233
@@ -1248,12 +1248,12 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb,
1248 1248
1249 /* unpack the aggregated packets and process them one by one */ 1249 /* unpack the aggregated packets and process them one by one */
1250 do { 1250 do {
1251 tt_buff = packet_buff + buff_pos + BATMAN_OGM_HLEN; 1251 tt_buff = packet_buff + buff_pos + BATADV_OGM_HLEN;
1252 1252
1253 batadv_iv_ogm_process(ethhdr, batman_ogm_packet, tt_buff, 1253 batadv_iv_ogm_process(ethhdr, batman_ogm_packet, tt_buff,
1254 if_incoming); 1254 if_incoming);
1255 1255
1256 buff_pos += BATMAN_OGM_HLEN; 1256 buff_pos += BATADV_OGM_HLEN;
1257 buff_pos += batadv_tt_len(batman_ogm_packet->tt_num_changes); 1257 buff_pos += batadv_tt_len(batman_ogm_packet->tt_num_changes);
1258 1258
1259 batman_ogm_packet = (struct batman_ogm_packet *) 1259 batman_ogm_packet = (struct batman_ogm_packet *)
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index c1ba6e28a96c..340108411c4d 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -263,6 +263,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
263{ 263{
264 struct bat_priv *bat_priv; 264 struct bat_priv *bat_priv;
265 struct net_device *soft_iface; 265 struct net_device *soft_iface;
266 __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN);
266 int ret; 267 int ret;
267 268
268 if (hard_iface->if_status != IF_NOT_IN_USE) 269 if (hard_iface->if_status != IF_NOT_IN_USE)
@@ -309,7 +310,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
309 hard_iface->if_status = IF_INACTIVE; 310 hard_iface->if_status = IF_INACTIVE;
310 batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); 311 batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
311 312
312 hard_iface->batman_adv_ptype.type = __constant_htons(ETH_P_BATMAN); 313 hard_iface->batman_adv_ptype.type = ethertype;
313 hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv; 314 hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv;
314 hard_iface->batman_adv_ptype.dev = hard_iface->net_dev; 315 hard_iface->batman_adv_ptype.dev = hard_iface->net_dev;
315 dev_add_pack(&hard_iface->batman_adv_ptype); 316 dev_add_pack(&hard_iface->batman_adv_ptype);
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index 4f45ca72fefc..f2f578b1d9f0 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -203,9 +203,9 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff,
203 203
204 icmp_packet->uid = socket_client->index; 204 icmp_packet->uid = socket_client->index;
205 205
206 if (icmp_packet->header.version != COMPAT_VERSION) { 206 if (icmp_packet->header.version != BATADV_COMPAT_VERSION) {
207 icmp_packet->msg_type = PARAMETER_PROBLEM; 207 icmp_packet->msg_type = PARAMETER_PROBLEM;
208 icmp_packet->header.version = COMPAT_VERSION; 208 icmp_packet->header.version = BATADV_COMPAT_VERSION;
209 batadv_socket_add_packet(socket_client, icmp_packet, 209 batadv_socket_add_packet(socket_client, icmp_packet,
210 packet_len); 210 packet_len);
211 goto free_skb; 211 goto free_skb;
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 9cf0b38fab8b..986be72b5144 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -72,7 +72,7 @@ static int __init batadv_init(void)
72 register_netdevice_notifier(&batadv_hard_if_notifier); 72 register_netdevice_notifier(&batadv_hard_if_notifier);
73 73
74 pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n", 74 pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",
75 SOURCE_VERSION, COMPAT_VERSION); 75 SOURCE_VERSION, BATADV_COMPAT_VERSION);
76 76
77 return 0; 77 return 0;
78} 78}
@@ -238,7 +238,7 @@ int batadv_batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
238 238
239 batman_ogm_packet = (struct batman_ogm_packet *)skb->data; 239 batman_ogm_packet = (struct batman_ogm_packet *)skb->data;
240 240
241 if (batman_ogm_packet->header.version != COMPAT_VERSION) { 241 if (batman_ogm_packet->header.version != BATADV_COMPAT_VERSION) {
242 batadv_dbg(DBG_BATMAN, bat_priv, 242 batadv_dbg(DBG_BATMAN, bat_priv,
243 "Drop packet: incompatible batman version (%i)\n", 243 "Drop packet: incompatible batman version (%i)\n",
244 batman_ogm_packet->header.version); 244 batman_ogm_packet->header.version);
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index c90219cd648e..e562414c2940 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -20,7 +20,7 @@
20#ifndef _NET_BATMAN_ADV_PACKET_H_ 20#ifndef _NET_BATMAN_ADV_PACKET_H_
21#define _NET_BATMAN_ADV_PACKET_H_ 21#define _NET_BATMAN_ADV_PACKET_H_
22 22
23#define ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype */ 23#define BATADV_ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype */
24 24
25enum bat_packettype { 25enum bat_packettype {
26 BAT_IV_OGM = 0x01, 26 BAT_IV_OGM = 0x01,
@@ -34,7 +34,7 @@ enum bat_packettype {
34}; 34};
35 35
36/* this file is included by batctl which needs these defines */ 36/* this file is included by batctl which needs these defines */
37#define COMPAT_VERSION 14 37#define BATADV_COMPAT_VERSION 14
38 38
39enum batman_iv_flags { 39enum batman_iv_flags {
40 NOT_BEST_NEXT_HOP = 1 << 3, 40 NOT_BEST_NEXT_HOP = 1 << 3,
@@ -65,7 +65,7 @@ enum unicast_frag_flags {
65}; 65};
66 66
67/* TT_QUERY subtypes */ 67/* TT_QUERY subtypes */
68#define TT_QUERY_TYPE_MASK 0x3 68#define BATADV_TT_QUERY_TYPE_MASK 0x3
69 69
70enum tt_query_packettype { 70enum tt_query_packettype {
71 TT_REQUEST = 0, 71 TT_REQUEST = 0,
@@ -126,7 +126,7 @@ struct batman_ogm_packet {
126 __be16 tt_crc; 126 __be16 tt_crc;
127} __packed; 127} __packed;
128 128
129#define BATMAN_OGM_HLEN sizeof(struct batman_ogm_packet) 129#define BATADV_OGM_HLEN sizeof(struct batman_ogm_packet)
130 130
131struct icmp_packet { 131struct icmp_packet {
132 struct batman_header header; 132 struct batman_header header;
@@ -138,7 +138,7 @@ struct icmp_packet {
138 uint8_t reserved; 138 uint8_t reserved;
139} __packed; 139} __packed;
140 140
141#define BAT_RR_LEN 16 141#define BATADV_RR_LEN 16
142 142
143/* icmp_packet_rr must start with all fields from imcp_packet 143/* icmp_packet_rr must start with all fields from imcp_packet
144 * as this is assumed by code that handles ICMP packets 144 * as this is assumed by code that handles ICMP packets
@@ -151,7 +151,7 @@ struct icmp_packet_rr {
151 __be16 seqno; 151 __be16 seqno;
152 uint8_t uid; 152 uint8_t uid;
153 uint8_t rr_cur; 153 uint8_t rr_cur;
154 uint8_t rr[BAT_RR_LEN][ETH_ALEN]; 154 uint8_t rr[BATADV_RR_LEN][ETH_ALEN];
155} __packed; 155} __packed;
156 156
157struct unicast_packet { 157struct unicast_packet {
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 864692add808..c8fee749eab8 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -423,7 +423,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if)
423 423
424 /* add record route information if not full */ 424 /* add record route information if not full */
425 if ((hdr_size == sizeof(struct icmp_packet_rr)) && 425 if ((hdr_size == sizeof(struct icmp_packet_rr)) &&
426 (icmp_packet->rr_cur < BAT_RR_LEN)) { 426 (icmp_packet->rr_cur < BATADV_RR_LEN)) {
427 memcpy(&(icmp_packet->rr[icmp_packet->rr_cur]), 427 memcpy(&(icmp_packet->rr[icmp_packet->rr_cur]),
428 ethhdr->h_dest, ETH_ALEN); 428 ethhdr->h_dest, ETH_ALEN);
429 icmp_packet->rr_cur++; 429 icmp_packet->rr_cur++;
@@ -603,7 +603,7 @@ int batadv_recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if)
603 603
604 tt_query = (struct tt_query_packet *)skb->data; 604 tt_query = (struct tt_query_packet *)skb->data;
605 605
606 switch (tt_query->flags & TT_QUERY_TYPE_MASK) { 606 switch (tt_query->flags & BATADV_TT_QUERY_TYPE_MASK) {
607 case TT_REQUEST: 607 case TT_REQUEST:
608 batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_RX); 608 batadv_inc_counter(bat_priv, BAT_CNT_TT_REQUEST_RX);
609 609
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 3d725e0b1d90..72542cb01662 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -58,11 +58,11 @@ int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
58 ethhdr = (struct ethhdr *)skb_mac_header(skb); 58 ethhdr = (struct ethhdr *)skb_mac_header(skb);
59 memcpy(ethhdr->h_source, hard_iface->net_dev->dev_addr, ETH_ALEN); 59 memcpy(ethhdr->h_source, hard_iface->net_dev->dev_addr, ETH_ALEN);
60 memcpy(ethhdr->h_dest, dst_addr, ETH_ALEN); 60 memcpy(ethhdr->h_dest, dst_addr, ETH_ALEN);
61 ethhdr->h_proto = __constant_htons(ETH_P_BATMAN); 61 ethhdr->h_proto = __constant_htons(BATADV_ETH_P_BATMAN);
62 62
63 skb_set_network_header(skb, ETH_HLEN); 63 skb_set_network_header(skb, ETH_HLEN);
64 skb->priority = TC_PRIO_CONTROL; 64 skb->priority = TC_PRIO_CONTROL;
65 skb->protocol = __constant_htons(ETH_P_BATMAN); 65 skb->protocol = __constant_htons(BATADV_ETH_P_BATMAN);
66 66
67 skb->dev = hard_iface->net_dev; 67 skb->dev = hard_iface->net_dev;
68 68
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 2de1d742119f..e726419045e4 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -135,6 +135,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
135 struct hard_iface *primary_if = NULL; 135 struct hard_iface *primary_if = NULL;
136 struct bcast_packet *bcast_packet; 136 struct bcast_packet *bcast_packet;
137 struct vlan_ethhdr *vhdr; 137 struct vlan_ethhdr *vhdr;
138 __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN);
138 static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, 139 static const uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00,
139 0x00}; 140 0x00};
140 unsigned int header_len = 0; 141 unsigned int header_len = 0;
@@ -152,11 +153,11 @@ static int batadv_interface_tx(struct sk_buff *skb,
152 vhdr = (struct vlan_ethhdr *)skb->data; 153 vhdr = (struct vlan_ethhdr *)skb->data;
153 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; 154 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
154 155
155 if (ntohs(vhdr->h_vlan_encapsulated_proto) != ETH_P_BATMAN) 156 if (vhdr->h_vlan_encapsulated_proto != ethertype)
156 break; 157 break;
157 158
158 /* fall through */ 159 /* fall through */
159 case ETH_P_BATMAN: 160 case BATADV_ETH_P_BATMAN:
160 goto dropped; 161 goto dropped;
161 } 162 }
162 163
@@ -208,7 +209,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
208 goto dropped; 209 goto dropped;
209 210
210 bcast_packet = (struct bcast_packet *)skb->data; 211 bcast_packet = (struct bcast_packet *)skb->data;
211 bcast_packet->header.version = COMPAT_VERSION; 212 bcast_packet->header.version = BATADV_COMPAT_VERSION;
212 bcast_packet->header.ttl = TTL; 213 bcast_packet->header.ttl = TTL;
213 214
214 /* batman packet type: broadcast */ 215 /* batman packet type: broadcast */
@@ -266,6 +267,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
266 struct ethhdr *ethhdr; 267 struct ethhdr *ethhdr;
267 struct vlan_ethhdr *vhdr; 268 struct vlan_ethhdr *vhdr;
268 short vid __maybe_unused = -1; 269 short vid __maybe_unused = -1;
270 __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN);
269 271
270 /* check if enough space is available for pulling, and pull */ 272 /* check if enough space is available for pulling, and pull */
271 if (!pskb_may_pull(skb, hdr_size)) 273 if (!pskb_may_pull(skb, hdr_size))
@@ -281,11 +283,11 @@ void batadv_interface_rx(struct net_device *soft_iface,
281 vhdr = (struct vlan_ethhdr *)skb->data; 283 vhdr = (struct vlan_ethhdr *)skb->data;
282 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; 284 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
283 285
284 if (ntohs(vhdr->h_vlan_encapsulated_proto) != ETH_P_BATMAN) 286 if (vhdr->h_vlan_encapsulated_proto != ethertype)
285 break; 287 break;
286 288
287 /* fall through */ 289 /* fall through */
288 case ETH_P_BATMAN: 290 case BATADV_ETH_P_BATMAN:
289 goto dropped; 291 goto dropped;
290 } 292 }
291 293
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 3ca2e48d669e..79cd3f76a865 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1441,7 +1441,7 @@ static int batadv_send_tt_request(struct bat_priv *bat_priv,
1441 sizeof(struct tt_query_packet)); 1441 sizeof(struct tt_query_packet));
1442 1442
1443 tt_request->header.packet_type = BAT_TT_QUERY; 1443 tt_request->header.packet_type = BAT_TT_QUERY;
1444 tt_request->header.version = COMPAT_VERSION; 1444 tt_request->header.version = BATADV_COMPAT_VERSION;
1445 memcpy(tt_request->src, primary_if->net_dev->dev_addr, ETH_ALEN); 1445 memcpy(tt_request->src, primary_if->net_dev->dev_addr, ETH_ALEN);
1446 memcpy(tt_request->dst, dst_orig_node->orig, ETH_ALEN); 1446 memcpy(tt_request->dst, dst_orig_node->orig, ETH_ALEN);
1447 tt_request->header.ttl = TTL; 1447 tt_request->header.ttl = TTL;
@@ -1575,7 +1575,7 @@ static bool batadv_send_other_tt_response(struct bat_priv *bat_priv,
1575 } 1575 }
1576 1576
1577 tt_response->header.packet_type = BAT_TT_QUERY; 1577 tt_response->header.packet_type = BAT_TT_QUERY;
1578 tt_response->header.version = COMPAT_VERSION; 1578 tt_response->header.version = BATADV_COMPAT_VERSION;
1579 tt_response->header.ttl = TTL; 1579 tt_response->header.ttl = TTL;
1580 memcpy(tt_response->src, req_dst_orig_node->orig, ETH_ALEN); 1580 memcpy(tt_response->src, req_dst_orig_node->orig, ETH_ALEN);
1581 memcpy(tt_response->dst, tt_request->src, ETH_ALEN); 1581 memcpy(tt_response->dst, tt_request->src, ETH_ALEN);
@@ -1696,7 +1696,7 @@ static bool batadv_send_my_tt_response(struct bat_priv *bat_priv,
1696 } 1696 }
1697 1697
1698 tt_response->header.packet_type = BAT_TT_QUERY; 1698 tt_response->header.packet_type = BAT_TT_QUERY;
1699 tt_response->header.version = COMPAT_VERSION; 1699 tt_response->header.version = BATADV_COMPAT_VERSION;
1700 tt_response->header.ttl = TTL; 1700 tt_response->header.ttl = TTL;
1701 memcpy(tt_response->src, primary_if->net_dev->dev_addr, ETH_ALEN); 1701 memcpy(tt_response->src, primary_if->net_dev->dev_addr, ETH_ALEN);
1702 memcpy(tt_response->dst, tt_request->src, ETH_ALEN); 1702 memcpy(tt_response->dst, tt_request->src, ETH_ALEN);
@@ -2008,7 +2008,7 @@ static void batadv_send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
2008 sizeof(struct roam_adv_packet)); 2008 sizeof(struct roam_adv_packet));
2009 2009
2010 roam_adv_packet->header.packet_type = BAT_ROAM_ADV; 2010 roam_adv_packet->header.packet_type = BAT_ROAM_ADV;
2011 roam_adv_packet->header.version = COMPAT_VERSION; 2011 roam_adv_packet->header.version = BATADV_COMPAT_VERSION;
2012 roam_adv_packet->header.ttl = TTL; 2012 roam_adv_packet->header.ttl = TTL;
2013 primary_if = batadv_primary_if_get_selected(bat_priv); 2013 primary_if = batadv_primary_if_get_selected(bat_priv);
2014 if (!primary_if) 2014 if (!primary_if)
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index 472436a06d89..c8da6b0acc38 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -253,7 +253,7 @@ int batadv_frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
253 memcpy(frag1, &tmp_uc, sizeof(tmp_uc)); 253 memcpy(frag1, &tmp_uc, sizeof(tmp_uc));
254 254
255 frag1->header.ttl--; 255 frag1->header.ttl--;
256 frag1->header.version = COMPAT_VERSION; 256 frag1->header.version = BATADV_COMPAT_VERSION;
257 frag1->header.packet_type = BAT_UNICAST_FRAG; 257 frag1->header.packet_type = BAT_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);
@@ -319,7 +319,7 @@ find_router:
319 319
320 unicast_packet = (struct unicast_packet *)skb->data; 320 unicast_packet = (struct unicast_packet *)skb->data;
321 321
322 unicast_packet->header.version = 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 = BAT_UNICAST;
325 /* set unicast ttl */ 325 /* set unicast ttl */
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index 7dc750670c34..596eacc3dd1c 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -873,7 +873,7 @@ int batadv_vis_init(struct bat_priv *bat_priv)
873 INIT_LIST_HEAD(&bat_priv->my_vis_info->send_list); 873 INIT_LIST_HEAD(&bat_priv->my_vis_info->send_list);
874 kref_init(&bat_priv->my_vis_info->refcount); 874 kref_init(&bat_priv->my_vis_info->refcount);
875 bat_priv->my_vis_info->bat_priv = bat_priv; 875 bat_priv->my_vis_info->bat_priv = bat_priv;
876 packet->header.version = COMPAT_VERSION; 876 packet->header.version = BATADV_COMPAT_VERSION;
877 packet->header.packet_type = BAT_VIS; 877 packet->header.packet_type = BAT_VIS;
878 packet->header.ttl = TTL; 878 packet->header.ttl = TTL;
879 packet->seqno = 0; 879 packet->seqno = 0;