Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314538
b: refs/heads/master
c: 5853e22
h: refs/heads/master
v: v3
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 20, 2012
1 parent 64140f5 commit 49f3779
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40a072d777a4f417c0296e06f91297b0f3f2fa36
refs/heads/master: 5853e22c58b318232fd6e15033ccb0852f865c0b
12 changes: 6 additions & 6 deletions trunk/net/batman-adv/bat_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static struct bat_attribute *mesh_attrs[] = {
NULL,
};

int sysfs_add_meshif(struct net_device *dev)
int batadv_sysfs_add_meshif(struct net_device *dev)
{
struct kobject *batif_kobject = &dev->dev.kobj;
struct bat_priv *bat_priv = netdev_priv(dev);
Expand Down Expand Up @@ -507,7 +507,7 @@ int sysfs_add_meshif(struct net_device *dev)
return -ENOMEM;
}

void sysfs_del_meshif(struct net_device *dev)
void batadv_sysfs_del_meshif(struct net_device *dev)
{
struct bat_priv *bat_priv = netdev_priv(dev);
struct bat_attribute **bat_attr;
Expand Down Expand Up @@ -637,7 +637,7 @@ static struct bat_attribute *batman_attrs[] = {
NULL,
};

int sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev)
int batadv_sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev)
{
struct kobject *hardif_kobject = &dev->dev.kobj;
struct bat_attribute **bat_attr;
Expand Down Expand Up @@ -671,14 +671,14 @@ int sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev)
return -ENOMEM;
}

void sysfs_del_hardif(struct kobject **hardif_obj)
void batadv_sysfs_del_hardif(struct kobject **hardif_obj)
{
kobject_put(*hardif_obj);
*hardif_obj = NULL;
}

int throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
enum uev_action action, const char *data)
int batadv_throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
enum uev_action action, const char *data)
{
int ret = -ENOMEM;
struct hard_iface *primary_if = NULL;
Expand Down
13 changes: 7 additions & 6 deletions trunk/net/batman-adv/bat_sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ struct bat_attribute {
char *buf, size_t count);
};

int sysfs_add_meshif(struct net_device *dev);
void sysfs_del_meshif(struct net_device *dev);
int sysfs_add_hardif(struct kobject **hardif_obj, struct net_device *dev);
void sysfs_del_hardif(struct kobject **hardif_obj);
int throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
enum uev_action action, const char *data);
int batadv_sysfs_add_meshif(struct net_device *dev);
void batadv_sysfs_del_meshif(struct net_device *dev);
int batadv_sysfs_add_hardif(struct kobject **hardif_obj,
struct net_device *dev);
void batadv_sysfs_del_hardif(struct kobject **hardif_obj);
int batadv_throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
enum uev_action action, const char *data);

#endif /* _NET_BATMAN_ADV_SYSFS_H_ */
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,19 @@ void gw_election(struct bat_priv *bat_priv)
if ((curr_gw) && (!next_gw)) {
bat_dbg(DBG_BATMAN, bat_priv,
"Removing selected gateway - no gateway in range\n");
throw_uevent(bat_priv, UEV_GW, UEV_DEL, NULL);
batadv_throw_uevent(bat_priv, UEV_GW, UEV_DEL, NULL);
} else if ((!curr_gw) && (next_gw)) {
bat_dbg(DBG_BATMAN, bat_priv,
"Adding route to gateway %pM (gw_flags: %i, tq: %i)\n",
next_gw->orig_node->orig, next_gw->orig_node->gw_flags,
router->tq_avg);
throw_uevent(bat_priv, UEV_GW, UEV_ADD, gw_addr);
batadv_throw_uevent(bat_priv, UEV_GW, UEV_ADD, gw_addr);
} else {
bat_dbg(DBG_BATMAN, bat_priv,
"Changing route to gateway %pM (gw_flags: %i, tq: %i)\n",
next_gw->orig_node->orig, next_gw->orig_node->gw_flags,
router->tq_avg);
throw_uevent(bat_priv, UEV_GW, UEV_CHANGE, gw_addr);
batadv_throw_uevent(bat_priv, UEV_GW, UEV_CHANGE, gw_addr);
}

gw_select(bat_priv, next_gw);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
if (!hard_iface)
goto release_dev;

ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
ret = batadv_sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
goto free_if;

Expand Down Expand Up @@ -467,7 +467,7 @@ static void hardif_remove_interface(struct hard_iface *hard_iface)
return;

hard_iface->if_status = IF_TO_BE_REMOVED;
sysfs_del_hardif(&hard_iface->hardif_obj);
batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
hardif_free_ref(hard_iface);
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ struct net_device *softif_create(const char *name)
if (ret < 0)
goto free_bat_counters;

ret = sysfs_add_meshif(soft_iface);
ret = batadv_sysfs_add_meshif(soft_iface);
if (ret < 0)
goto free_bat_counters;

Expand All @@ -432,7 +432,7 @@ struct net_device *softif_create(const char *name)
unreg_debugfs:
batadv_debugfs_del_meshif(soft_iface);
unreg_sysfs:
sysfs_del_meshif(soft_iface);
batadv_sysfs_del_meshif(soft_iface);
free_bat_counters:
free_percpu(bat_priv->bat_counters);
unreg_soft_iface:
Expand All @@ -448,7 +448,7 @@ struct net_device *softif_create(const char *name)
void softif_destroy(struct net_device *soft_iface)
{
batadv_debugfs_del_meshif(soft_iface);
sysfs_del_meshif(soft_iface);
batadv_sysfs_del_meshif(soft_iface);
mesh_free(soft_iface);
unregister_netdevice(soft_iface);
}
Expand Down

0 comments on commit 49f3779

Please sign in to comment.