summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/sysfs.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2013-02-11 17:10:24 +0800
committerAntonio Quartulli <ordex@autistici.org>2013-03-27 10:27:32 +0100
commita15fd3612dd95341ad190def7faceebb41d6e346 (patch)
tree1d0566e7cca7845737df1c429683bf3215d8f23f /net/batman-adv/sysfs.c
parentb3246020e27ecc7c50cc77535936987d6eb6c869 (diff)
downloadblackbird-op-linux-a15fd3612dd95341ad190def7faceebb41d6e346.tar.gz
blackbird-op-linux-a15fd3612dd95341ad190def7faceebb41d6e346.zip
batman-adv: Don't always delete softif when last slave was removed
batman-adv has an unusual way to manage softinterfaces. These will be created automatically when a user writes to the batman-adv/mesh_iface file in sysfs and removed when no slave device exists anymore. This behaviour cannot be changed without breaking compatibility with existing code. Instead other interfaces should be able to slightly reduce this behaviour and provide a more common reaction to a removal of a slave interface. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/sysfs.c')
-rw-r--r--net/batman-adv/sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
index ce39f62f751e..15a22efa9a67 100644
--- a/net/batman-adv/sysfs.c
+++ b/net/batman-adv/sysfs.c
@@ -588,13 +588,15 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj,
}
if (status_tmp == BATADV_IF_NOT_IN_USE) {
- batadv_hardif_disable_interface(hard_iface);
+ batadv_hardif_disable_interface(hard_iface,
+ BATADV_IF_CLEANUP_AUTO);
goto unlock;
}
/* if the interface already is in use */
if (hard_iface->if_status != BATADV_IF_NOT_IN_USE)
- batadv_hardif_disable_interface(hard_iface);
+ batadv_hardif_disable_interface(hard_iface,
+ BATADV_IF_CLEANUP_AUTO);
ret = batadv_hardif_enable_interface(hard_iface, buff);
OpenPOWER on IntegriCloud