diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-07-15 16:26:51 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-08-23 08:20:13 -0400 |
commit | 807736f6e00714fdeb443b31061d1c27fa903296 (patch) | |
tree | a070c2e9316365424e4d08e2fa50e5a28729670d /net/batman-adv/soft-interface.c | |
parent | 624463079e0af455a2d70d2a59b9e2f6b5827aea (diff) |
batman-adv: Split batadv_priv in sub-structures for features
The structure batadv_priv grows everytime a new feature is introduced. It gets
hard to find the parts of the struct that belongs to a specific feature. This
becomes even harder by the fact that not every feature uses a prefix in the
member name.
The variables for bridge loop avoidence, gateway handling, translation table
and visualization server are moved into separate structs that are included in
the bat_priv main struct.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 2b3842b99096..6d44625c0f5e 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -420,14 +420,15 @@ struct net_device *batadv_softif_create(const char *name) | |||
420 | 420 | ||
421 | atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); | 421 | atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); |
422 | atomic_set(&bat_priv->bcast_seqno, 1); | 422 | atomic_set(&bat_priv->bcast_seqno, 1); |
423 | atomic_set(&bat_priv->ttvn, 0); | 423 | atomic_set(&bat_priv->tt.vn, 0); |
424 | atomic_set(&bat_priv->tt_local_changes, 0); | 424 | atomic_set(&bat_priv->tt.local_changes, 0); |
425 | atomic_set(&bat_priv->tt_ogm_append_cnt, 0); | 425 | atomic_set(&bat_priv->tt.ogm_append_cnt, 0); |
426 | atomic_set(&bat_priv->bla_num_requests, 0); | 426 | #ifdef CONFIG_BATMAN_ADV_BLA |
427 | 427 | atomic_set(&bat_priv->bla.num_requests, 0); | |
428 | bat_priv->tt_buff = NULL; | 428 | #endif |
429 | bat_priv->tt_buff_len = 0; | 429 | bat_priv->tt.last_changeset = NULL; |
430 | bat_priv->tt_poss_change = false; | 430 | bat_priv->tt.last_changeset_len = 0; |
431 | bat_priv->tt.poss_change = false; | ||
431 | 432 | ||
432 | bat_priv->primary_if = NULL; | 433 | bat_priv->primary_if = NULL; |
433 | bat_priv->num_ifaces = 0; | 434 | bat_priv->num_ifaces = 0; |