diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2012-02-07 17:20:47 +0800 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-18 09:53:59 +0200 |
commit | 00a50076a3afa4014cdd57e87e31a00ce4c4b67e (patch) | |
tree | 29a2f36db820eb25b3d4abd56c71d8c2e6cde889 /net/batman-adv/bat_iv_ogm.c | |
parent | d7d32ec0f199cc00a43434cdd920338763fab2e0 (diff) | |
download | op-kernel-dev-00a50076a3afa4014cdd57e87e31a00ce4c4b67e.zip op-kernel-dev-00a50076a3afa4014cdd57e87e31a00ce4c4b67e.tar.gz |
batman-adv: add iface_disable() callback to routing API
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 95bfc59..4cc66db 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -52,6 +52,12 @@ static void bat_iv_ogm_iface_enable(struct hard_iface *hard_iface) batman_ogm_packet->ttvn = 0; } +static void bat_iv_ogm_iface_disable(struct hard_iface *hard_iface) +{ + kfree(hard_iface->packet_buff); + hard_iface->packet_buff = NULL; +} + static void bat_iv_ogm_init_primary(struct hard_iface *hard_iface) { struct batman_ogm_packet *batman_ogm_packet; @@ -1175,6 +1181,7 @@ static void bat_iv_ogm_receive(struct hard_iface *if_incoming, static struct bat_algo_ops batman_iv __read_mostly = { .name = "BATMAN IV", .bat_iface_enable = bat_iv_ogm_iface_enable, + .bat_iface_disable = bat_iv_ogm_iface_disable, .bat_ogm_init_primary = bat_iv_ogm_init_primary, .bat_ogm_update_mac = bat_iv_ogm_update_mac, .bat_ogm_schedule = bat_iv_ogm_schedule, |