batman-adv: ELP - adding basic infrastructure
[deliverable/linux.git] / net / batman-adv / bat_v.c
CommitLineData
d6f94d91
LL
1/* Copyright (C) 2013-2016 B.A.T.M.A.N. contributors:
2 *
3 * Linus Lüssing, Marek Lindner
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "bat_algo.h"
19#include "main.h"
20
21#include <linux/cache.h>
22#include <linux/init.h>
23
24#include "bat_v_elp.h"
25
26static int batadv_v_iface_enable(struct batadv_hard_iface *hard_iface)
27{
28 return batadv_v_elp_iface_enable(hard_iface);
29}
30
31static void batadv_v_iface_disable(struct batadv_hard_iface *hard_iface)
32{
33 batadv_v_elp_iface_disable(hard_iface);
34}
35
36static void batadv_v_iface_update_mac(struct batadv_hard_iface *hard_iface)
37{
38}
39
40static void batadv_v_primary_iface_set(struct batadv_hard_iface *hard_iface)
41{
42 batadv_v_elp_primary_iface_set(hard_iface);
43}
44
45static void batadv_v_ogm_schedule(struct batadv_hard_iface *hard_iface)
46{
47}
48
49static void batadv_v_ogm_emit(struct batadv_forw_packet *forw_packet)
50{
51}
52
53static struct batadv_algo_ops batadv_batman_v __read_mostly = {
54 .name = "BATMAN_V",
55 .bat_iface_enable = batadv_v_iface_enable,
56 .bat_iface_disable = batadv_v_iface_disable,
57 .bat_iface_update_mac = batadv_v_iface_update_mac,
58 .bat_primary_iface_set = batadv_v_primary_iface_set,
59 .bat_ogm_emit = batadv_v_ogm_emit,
60 .bat_ogm_schedule = batadv_v_ogm_schedule,
61};
62
63/**
64 * batadv_v_init - B.A.T.M.A.N. V initialization function
65 *
66 * Description: Takes care of initializing all the subcomponents.
67 * It is invoked upon module load only.
68 *
69 * Return: 0 on success or a negative error code otherwise
70 */
71int __init batadv_v_init(void)
72{
73 return batadv_algo_register(&batadv_batman_v);
74}
This page took 0.028882 seconds and 5 git commands to generate.