diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:38 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:28 -0400 |
commit | 04b482a21aaf22cf5b327fb6a3fba6fdc8cb3de9 (patch) | |
tree | 4035e2c89d47a961045c01d98d7bb4588478b86a /net/batman-adv/hard-interface.c | |
parent | 9455e34cb2ded22e01abb6daa65ba1caeed8d7fe (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/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index 7392ae28114d..93acf2be7759 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -71,7 +71,7 @@ static int is_valid_iface(const struct net_device *net_dev) | |||
71 | return 0; | 71 | return 0; |
72 | 72 | ||
73 | /* no batman over batman */ | 73 | /* no batman over batman */ |
74 | if (softif_is_valid(net_dev)) | 74 | if (batadv_softif_is_valid(net_dev)) |
75 | return 0; | 75 | return 0; |
76 | 76 | ||
77 | /* Device is being bridged */ | 77 | /* Device is being bridged */ |
@@ -284,7 +284,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, | |||
284 | soft_iface = dev_get_by_name(&init_net, iface_name); | 284 | soft_iface = dev_get_by_name(&init_net, iface_name); |
285 | 285 | ||
286 | if (!soft_iface) { | 286 | if (!soft_iface) { |
287 | soft_iface = softif_create(iface_name); | 287 | soft_iface = batadv_softif_create(iface_name); |
288 | 288 | ||
289 | if (!soft_iface) { | 289 | if (!soft_iface) { |
290 | ret = -ENOMEM; | 290 | ret = -ENOMEM; |
@@ -295,7 +295,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, | |||
295 | dev_hold(soft_iface); | 295 | dev_hold(soft_iface); |
296 | } | 296 | } |
297 | 297 | ||
298 | if (!softif_is_valid(soft_iface)) { | 298 | if (!batadv_softif_is_valid(soft_iface)) { |
299 | pr_err("Can't create batman mesh interface %s: already exists as regular interface\n", | 299 | pr_err("Can't create batman mesh interface %s: already exists as regular interface\n", |
300 | soft_iface->name); | 300 | soft_iface->name); |
301 | ret = -EINVAL; | 301 | ret = -EINVAL; |
@@ -396,7 +396,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface) | |||
396 | 396 | ||
397 | /* nobody uses this interface anymore */ | 397 | /* nobody uses this interface anymore */ |
398 | if (!bat_priv->num_ifaces) | 398 | if (!bat_priv->num_ifaces) |
399 | softif_destroy(hard_iface->soft_iface); | 399 | batadv_softif_destroy(hard_iface->soft_iface); |
400 | 400 | ||
401 | hard_iface->soft_iface = NULL; | 401 | hard_iface->soft_iface = NULL; |
402 | hardif_free_ref(hard_iface); | 402 | hardif_free_ref(hard_iface); |