aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/gateway_common.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-12 12:33:56 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-25 02:21:39 -0400
commit8e714a5ded231abb853941b67845d25a022daa89 (patch)
tree6f7a8f4cdbea87bc73fbe4998311ecbbe3a6c46f /net/batman-adv/gateway_common.c
parent1409a8349f978abec556748bcac00541a46a56b5 (diff)
batman-adv: Prefix gateway_common local static functions with batadv_
All non-static symbols of batman-adv were prefixed with batadv_ to avoid collisions with other symbols of the kernel. Other symbols of batman-adv should use the same prefix to keep the naming scheme consistent. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/gateway_common.c')
-rw-r--r--net/batman-adv/gateway_common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index 3700562cf276..6edf37f9a15c 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -22,7 +22,7 @@
22#include "gateway_client.h" 22#include "gateway_client.h"
23 23
24/* calculates the gateway class from kbit */ 24/* calculates the gateway class from kbit */
25static void kbit_to_gw_bandwidth(int down, int up, long *gw_srv_class) 25static void batadv_kbit_to_gw_bandwidth(int down, int up, long *gw_srv_class)
26{ 26{
27 int mdown = 0, tdown, tup, difference; 27 int mdown = 0, tdown, tup, difference;
28 uint8_t sbit, part; 28 uint8_t sbit, part;
@@ -73,8 +73,8 @@ void batadv_gw_bandwidth_to_kbit(uint8_t gw_srv_class, int *down, int *up)
73 *up = ((upart + 1) * (*down)) / 8; 73 *up = ((upart + 1) * (*down)) / 8;
74} 74}
75 75
76static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, 76static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff,
77 int *up, int *down) 77 int *up, int *down)
78{ 78{
79 int ret, multi = 1; 79 int ret, multi = 1;
80 char *slash_ptr, *tmp_ptr; 80 char *slash_ptr, *tmp_ptr;
@@ -142,7 +142,7 @@ ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
142 int up = 0, down = 0; 142 int up = 0, down = 0;
143 bool ret; 143 bool ret;
144 144
145 ret = parse_gw_bandwidth(net_dev, buff, &up, &down); 145 ret = batadv_parse_gw_bandwidth(net_dev, buff, &up, &down);
146 if (!ret) 146 if (!ret)
147 goto end; 147 goto end;
148 148
@@ -152,7 +152,7 @@ ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff,
152 if (!up) 152 if (!up)
153 up = down / 5; 153 up = down / 5;
154 154
155 kbit_to_gw_bandwidth(down, up, &gw_bandwidth_tmp); 155 batadv_kbit_to_gw_bandwidth(down, up, &gw_bandwidth_tmp);
156 156
157 /* the gw bandwidth we guessed above might not match the given 157 /* the gw bandwidth we guessed above might not match the given
158 * speeds, hence we need to calculate it back to show the number 158 * speeds, hence we need to calculate it back to show the number