aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/soft-interface.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:38 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:28 -0400
commit04b482a21aaf22cf5b327fb6a3fba6fdc8cb3de9 (patch)
tree4035e2c89d47a961045c01d98d7bb4588478b86a /net/batman-adv/soft-interface.c
parent9455e34cb2ded22e01abb6daa65ba1caeed8d7fe (diff)
batman-adv: Prefix soft-interface non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r--net/batman-adv/soft-interface.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index e15d474bd0b0..cbc36f0ec242 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -61,7 +61,7 @@ static const struct ethtool_ops bat_ethtool_ops = {
61 .get_sset_count = batadv_get_sset_count, 61 .get_sset_count = batadv_get_sset_count,
62}; 62};
63 63
64int my_skb_head_push(struct sk_buff *skb, unsigned int len) 64int batadv_skb_head_push(struct sk_buff *skb, unsigned int len)
65{ 65{
66 int result; 66 int result;
67 67
@@ -204,7 +204,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
204 if (!primary_if) 204 if (!primary_if)
205 goto dropped; 205 goto dropped;
206 206
207 if (my_skb_head_push(skb, sizeof(*bcast_packet)) < 0) 207 if (batadv_skb_head_push(skb, sizeof(*bcast_packet)) < 0)
208 goto dropped; 208 goto dropped;
209 209
210 bcast_packet = (struct bcast_packet *)skb->data; 210 bcast_packet = (struct bcast_packet *)skb->data;
@@ -256,9 +256,9 @@ end:
256 return NETDEV_TX_OK; 256 return NETDEV_TX_OK;
257} 257}
258 258
259void interface_rx(struct net_device *soft_iface, 259void batadv_interface_rx(struct net_device *soft_iface,
260 struct sk_buff *skb, struct hard_iface *recv_if, 260 struct sk_buff *skb, struct hard_iface *recv_if,
261 int hdr_size) 261 int hdr_size)
262{ 262{
263 struct bat_priv *bat_priv = netdev_priv(soft_iface); 263 struct bat_priv *bat_priv = netdev_priv(soft_iface);
264 struct ethhdr *ethhdr; 264 struct ethhdr *ethhdr;
@@ -357,7 +357,7 @@ static void interface_setup(struct net_device *dev)
357 memset(priv, 0, sizeof(*priv)); 357 memset(priv, 0, sizeof(*priv));
358} 358}
359 359
360struct net_device *softif_create(const char *name) 360struct net_device *batadv_softif_create(const char *name)
361{ 361{
362 struct net_device *soft_iface; 362 struct net_device *soft_iface;
363 struct bat_priv *bat_priv; 363 struct bat_priv *bat_priv;
@@ -445,7 +445,7 @@ out:
445 return NULL; 445 return NULL;
446} 446}
447 447
448void softif_destroy(struct net_device *soft_iface) 448void batadv_softif_destroy(struct net_device *soft_iface)
449{ 449{
450 batadv_debugfs_del_meshif(soft_iface); 450 batadv_debugfs_del_meshif(soft_iface);
451 batadv_sysfs_del_meshif(soft_iface); 451 batadv_sysfs_del_meshif(soft_iface);
@@ -453,7 +453,7 @@ void softif_destroy(struct net_device *soft_iface)
453 unregister_netdevice(soft_iface); 453 unregister_netdevice(soft_iface);
454} 454}
455 455
456int softif_is_valid(const struct net_device *net_dev) 456int batadv_softif_is_valid(const struct net_device *net_dev)
457{ 457{
458 if (net_dev->netdev_ops->ndo_start_xmit == interface_tx) 458 if (net_dev->netdev_ops->ndo_start_xmit == interface_tx)
459 return 1; 459 return 1;