aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-11-28 08:31:55 -0500
committerMarek Lindner <lindner_marek@yahoo.de>2012-02-16 13:50:20 -0500
commit01c4224b51feba2ba64d070ab9f4aa32c9d0bb29 (patch)
tree80ca19da3b90b2b69f01492c06310be4c8678efc /net/batman-adv/main.c
parent1c280471b013e26c833fc86acc231c73442cfa21 (diff)
batman-adv: convert batman iv algorithm to use dynamic infrastructure
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r--net/batman-adv/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 7c87a341f29f..bcc2bddd893a 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -206,6 +206,18 @@ int bat_algo_register(struct bat_algo_ops *bat_algo_ops)
206 goto out; 206 goto out;
207 } 207 }
208 208
209 /* all algorithms must implement all ops (for now) */
210 if (!bat_algo_ops->bat_ogm_init ||
211 !bat_algo_ops->bat_ogm_init_primary ||
212 !bat_algo_ops->bat_ogm_update_mac ||
213 !bat_algo_ops->bat_ogm_schedule ||
214 !bat_algo_ops->bat_ogm_emit ||
215 !bat_algo_ops->bat_ogm_receive) {
216 pr_info("Routing algo '%s' does not implement required ops\n",
217 bat_algo_ops->name);
218 goto out;
219 }
220
209 INIT_HLIST_NODE(&bat_algo_ops->list); 221 INIT_HLIST_NODE(&bat_algo_ops->list);
210 hlist_add_head(&bat_algo_ops->list, &bat_algo_list); 222 hlist_add_head(&bat_algo_ops->list, &bat_algo_list);
211 ret = 0; 223 ret = 0;