aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-06-03 16:19:14 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-28 02:45:01 -0400
commitc11fdfaefa46a83a668a73dc3ae90859e99ed251 (patch)
treeac6d6d4e67b687e04a5ae46b83754109acd9edeb /net/batman-adv
parent7e071c79a6964130d1df4dc5ca5a6f3638680fce (diff)
batman-adv: Prefix types 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/hard-interface.c11
-rw-r--r--net/batman-adv/soft-interface.c2
-rw-r--r--net/batman-adv/types.h9
3 files changed, 11 insertions, 11 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 340108411c4d..9b1cb23ec1f4 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -196,7 +196,8 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)
196 if (hard_iface->soft_iface != soft_iface) 196 if (hard_iface->soft_iface != soft_iface)
197 continue; 197 continue;
198 198
199 min_mtu = min_t(int, hard_iface->net_dev->mtu - BAT_HEADER_LEN, 199 min_mtu = min_t(int,
200 hard_iface->net_dev->mtu - BATADV_HEADER_LEN,
200 min_mtu); 201 min_mtu);
201 } 202 }
202 rcu_read_unlock(); 203 rcu_read_unlock();
@@ -320,18 +321,18 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
320 hard_iface->net_dev->name); 321 hard_iface->net_dev->name);
321 322
322 if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < 323 if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
323 ETH_DATA_LEN + BAT_HEADER_LEN) 324 ETH_DATA_LEN + BATADV_HEADER_LEN)
324 batadv_info(hard_iface->soft_iface, 325 batadv_info(hard_iface->soft_iface,
325 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to %zi would solve the problem.\n", 326 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to %zi would solve the problem.\n",
326 hard_iface->net_dev->name, hard_iface->net_dev->mtu, 327 hard_iface->net_dev->name, hard_iface->net_dev->mtu,
327 ETH_DATA_LEN + BAT_HEADER_LEN); 328 ETH_DATA_LEN + BATADV_HEADER_LEN);
328 329
329 if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < 330 if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
330 ETH_DATA_LEN + BAT_HEADER_LEN) 331 ETH_DATA_LEN + BATADV_HEADER_LEN)
331 batadv_info(hard_iface->soft_iface, 332 batadv_info(hard_iface->soft_iface,
332 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. If you experience problems getting traffic through try increasing the MTU to %zi.\n", 333 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. If you experience problems getting traffic through try increasing the MTU to %zi.\n",
333 hard_iface->net_dev->name, hard_iface->net_dev->mtu, 334 hard_iface->net_dev->name, hard_iface->net_dev->mtu,
334 ETH_DATA_LEN + BAT_HEADER_LEN); 335 ETH_DATA_LEN + BATADV_HEADER_LEN);
335 336
336 if (batadv_hardif_is_iface_up(hard_iface)) 337 if (batadv_hardif_is_iface_up(hard_iface))
337 batadv_hardif_activate_interface(hard_iface); 338 batadv_hardif_activate_interface(hard_iface);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index e726419045e4..bbbc9a93d430 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -351,7 +351,7 @@ static void batadv_interface_setup(struct net_device *dev)
351 */ 351 */
352 dev->mtu = ETH_DATA_LEN; 352 dev->mtu = ETH_DATA_LEN;
353 /* reserve more space in the skbuff for our header */ 353 /* reserve more space in the skbuff for our header */
354 dev->hard_header_len = BAT_HEADER_LEN; 354 dev->hard_header_len = BATADV_HEADER_LEN;
355 355
356 /* generate random address */ 356 /* generate random address */
357 eth_hw_addr_random(dev); 357 eth_hw_addr_random(dev);
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 053c5d4776ce..1d5d21ed8e8a 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -22,12 +22,11 @@
22 22
23#include "packet.h" 23#include "packet.h"
24#include "bitarray.h" 24#include "bitarray.h"
25#include <linux/kernel.h>
25 26
26#define BAT_HEADER_LEN (ETH_HLEN + \ 27#define BATADV_HEADER_LEN \
27 ((sizeof(struct unicast_packet) > sizeof(struct bcast_packet) ? \ 28 (ETH_HLEN + max(sizeof(struct unicast_packet), \
28 sizeof(struct unicast_packet) : \ 29 sizeof(struct bcast_packet)))
29 sizeof(struct bcast_packet))))
30
31 30
32struct hard_iface { 31struct hard_iface {
33 struct list_head list; 32 struct list_head list;