summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_sysfs.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-06-03 22:19:11 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-06-28 08:44:58 +0200
commit97ea4ba1f9a20d6e1921ef4d61e2248e82b429fb (patch)
treef03186f707c856655f735bda3894eb9130ad9604 /net/batman-adv/bat_sysfs.c
parent3964f7285eba48b971b11dc51ba0a6e41cb995b3 (diff)
batman-adv: Prefix gateway 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/bat_sysfs.c')
-rw-r--r--net/batman-adv/bat_sysfs.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c
index 725e7d74f56..a6c27f0621a 100644
--- a/net/batman-adv/bat_sysfs.c
+++ b/net/batman-adv/bat_sysfs.c
@@ -361,13 +361,16 @@ static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr,
switch (atomic_read(&bat_priv->gw_mode)) {
case GW_MODE_CLIENT:
- bytes_written = sprintf(buff, "%s\n", GW_MODE_CLIENT_NAME);
+ bytes_written = sprintf(buff, "%s\n",
+ BATADV_GW_MODE_CLIENT_NAME);
break;
case GW_MODE_SERVER:
- bytes_written = sprintf(buff, "%s\n", GW_MODE_SERVER_NAME);
+ bytes_written = sprintf(buff, "%s\n",
+ BATADV_GW_MODE_SERVER_NAME);
break;
default:
- bytes_written = sprintf(buff, "%s\n", GW_MODE_OFF_NAME);
+ bytes_written = sprintf(buff, "%s\n",
+ BATADV_GW_MODE_OFF_NAME);
break;
}
@@ -386,15 +389,16 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
if (buff[count - 1] == '\n')
buff[count - 1] = '\0';
- if (strncmp(buff, GW_MODE_OFF_NAME, strlen(GW_MODE_OFF_NAME)) == 0)
+ if (strncmp(buff, BATADV_GW_MODE_OFF_NAME,
+ strlen(BATADV_GW_MODE_OFF_NAME)) == 0)
gw_mode_tmp = GW_MODE_OFF;
- if (strncmp(buff, GW_MODE_CLIENT_NAME,
- strlen(GW_MODE_CLIENT_NAME)) == 0)
+ if (strncmp(buff, BATADV_GW_MODE_CLIENT_NAME,
+ strlen(BATADV_GW_MODE_CLIENT_NAME)) == 0)
gw_mode_tmp = GW_MODE_CLIENT;
- if (strncmp(buff, GW_MODE_SERVER_NAME,
- strlen(GW_MODE_SERVER_NAME)) == 0)
+ if (strncmp(buff, BATADV_GW_MODE_SERVER_NAME,
+ strlen(BATADV_GW_MODE_SERVER_NAME)) == 0)
gw_mode_tmp = GW_MODE_SERVER;
if (gw_mode_tmp < 0) {
@@ -409,13 +413,13 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
switch (atomic_read(&bat_priv->gw_mode)) {
case GW_MODE_CLIENT:
- curr_gw_mode_str = GW_MODE_CLIENT_NAME;
+ curr_gw_mode_str = BATADV_GW_MODE_CLIENT_NAME;
break;
case GW_MODE_SERVER:
- curr_gw_mode_str = GW_MODE_SERVER_NAME;
+ curr_gw_mode_str = BATADV_GW_MODE_SERVER_NAME;
break;
default:
- curr_gw_mode_str = GW_MODE_OFF_NAME;
+ curr_gw_mode_str = BATADV_GW_MODE_OFF_NAME;
break;
}