diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-07-02 05:04:34 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-19 11:28:08 -0400 |
commit | 5d2c05b213377694a2aa8ce1ed9b23f7c39b0569 (patch) | |
tree | fbec175cf4dd4cb9b2c699b1b8d93883933fa324 /net/batman-adv/main.c | |
parent | be1db4f6615b5e6156c807ea8985171c215c2d57 (diff) |
batman-adv: add per VLAN interface attribute framework
Since batman-adv is now fully VLAN-aware, a proper framework
able to handle per-vlan-interface attributes is needed.
Those attributes will affect the associated VLAN interface
only, rather than the real soft_iface (which would result
in every vlan interface having the same attribute
configuration).
To make the code simpler and easier to extend, attributes
associated to the standalone soft_iface are now treated
like belonging to yet another vlan having a special vid.
This vid is different from the others because it is made up
by all zeros and the VLAN_HAS_TAG bit is not set.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 80f60d1144f0..22075511c448 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -113,6 +113,7 @@ int batadv_mesh_init(struct net_device *soft_iface) | |||
113 | spin_lock_init(&bat_priv->gw.list_lock); | 113 | spin_lock_init(&bat_priv->gw.list_lock); |
114 | spin_lock_init(&bat_priv->tvlv.container_list_lock); | 114 | spin_lock_init(&bat_priv->tvlv.container_list_lock); |
115 | spin_lock_init(&bat_priv->tvlv.handler_list_lock); | 115 | spin_lock_init(&bat_priv->tvlv.handler_list_lock); |
116 | spin_lock_init(&bat_priv->softif_vlan_list_lock); | ||
116 | 117 | ||
117 | INIT_HLIST_HEAD(&bat_priv->forw_bat_list); | 118 | INIT_HLIST_HEAD(&bat_priv->forw_bat_list); |
118 | INIT_HLIST_HEAD(&bat_priv->forw_bcast_list); | 119 | INIT_HLIST_HEAD(&bat_priv->forw_bcast_list); |
@@ -122,6 +123,7 @@ int batadv_mesh_init(struct net_device *soft_iface) | |||
122 | INIT_LIST_HEAD(&bat_priv->tt.roam_list); | 123 | INIT_LIST_HEAD(&bat_priv->tt.roam_list); |
123 | INIT_HLIST_HEAD(&bat_priv->tvlv.container_list); | 124 | INIT_HLIST_HEAD(&bat_priv->tvlv.container_list); |
124 | INIT_HLIST_HEAD(&bat_priv->tvlv.handler_list); | 125 | INIT_HLIST_HEAD(&bat_priv->tvlv.handler_list); |
126 | INIT_HLIST_HEAD(&bat_priv->softif_vlan_list); | ||
125 | 127 | ||
126 | ret = batadv_originator_init(bat_priv); | 128 | ret = batadv_originator_init(bat_priv); |
127 | if (ret < 0) | 129 | if (ret < 0) |
@@ -131,9 +133,6 @@ int batadv_mesh_init(struct net_device *soft_iface) | |||
131 | if (ret < 0) | 133 | if (ret < 0) |
132 | goto err; | 134 | goto err; |
133 | 135 | ||
134 | batadv_tt_local_add(soft_iface, soft_iface->dev_addr, | ||
135 | BATADV_NO_FLAGS, BATADV_NULL_IFINDEX); | ||
136 | |||
137 | ret = batadv_bla_init(bat_priv); | 136 | ret = batadv_bla_init(bat_priv); |
138 | if (ret < 0) | 137 | if (ret < 0) |
139 | goto err; | 138 | goto err; |