diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2010-09-05 01:58:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-05 00:29:49 -0700 |
commit | 6a0e9fa88df9e3a517a2fd317706aefa10a43191 (patch) | |
tree | 2dcf657e159d168a65af81cb65d21108cae48ead /drivers/staging/batman-adv/vis.c | |
parent | bf3264f6d1039e68ec9881447808327c0260ae61 (diff) |
Staging: batman-adv: attach each hard-interface to a soft-interface
This patch replaces the static bat0 interface with a dynamic/abstracted
approach. It is now possible to create multiple batX interfaces by
assigning hard interfaces to them. Each batX interface acts as an
independent mesh network. A soft interface is removed once no hard
interface references it any longer.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/vis.c')
-rw-r--r-- | drivers/staging/batman-adv/vis.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index e89a7104e61e..ad899feacccb 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -745,17 +745,16 @@ static void send_vis_packets(struct work_struct *work) { struct vis_info *info, *temp; unsigned long flags; - /* FIXME: each batman_if will be attached to a softif */ - struct bat_priv *bat_priv = netdev_priv(soft_device); + /* struct bat_priv *bat_priv = netdev_priv(soft_device); */ spin_lock_irqsave(&vis_hash_lock, flags); purge_vis_packets(); - if (generate_vis_packet(bat_priv) == 0) { + /* if (generate_vis_packet(bat_priv) == 0) {*/ /* schedule if generation was successful */ - send_list_add(my_vis_info); - } + /*send_list_add(my_vis_info); + } */ list_for_each_entry_safe(info, temp, &send_list, send_list) { @@ -842,7 +841,7 @@ err: } /* Decrease the reference count on a hash item info */ -static void free_info_ref(void *data) +static void free_info_ref(void *data, void *arg) { struct vis_info *info = data; @@ -861,7 +860,7 @@ void vis_quit(void) spin_lock_irqsave(&vis_hash_lock, flags); /* properly remove, kill timers ... */ - hash_delete(vis_hash, free_info_ref); + hash_delete(vis_hash, free_info_ref, NULL); vis_hash = NULL; my_vis_info = NULL; spin_unlock_irqrestore(&vis_hash_lock, flags); |