diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2012-12-16 00:53:15 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-01-12 05:58:23 -0500 |
commit | 0c430d0d7b8bafa74959a84156ef0bda1417a3d4 (patch) | |
tree | 32e476273adc485ffe0e5f8751086219ef8b94af | |
parent | 9338026107166b54d54ef875978c9c3dca3aaee5 (diff) |
batman-adv: unbloat batadv_priv if debug is not enabled
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
-rw-r--r-- | net/batman-adv/debugfs.c | 1 | ||||
-rw-r--r-- | net/batman-adv/soft-interface.c | 2 | ||||
-rw-r--r-- | net/batman-adv/types.h | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c index 5136d32bc9b9..55a90078dc66 100644 --- a/net/batman-adv/debugfs.c +++ b/net/batman-adv/debugfs.c | |||
@@ -229,7 +229,6 @@ static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv) | |||
229 | #else /* CONFIG_BATMAN_ADV_DEBUG */ | 229 | #else /* CONFIG_BATMAN_ADV_DEBUG */ |
230 | static int batadv_debug_log_setup(struct batadv_priv *bat_priv) | 230 | static int batadv_debug_log_setup(struct batadv_priv *bat_priv) |
231 | { | 231 | { |
232 | bat_priv->debug_log = NULL; | ||
233 | return 0; | 232 | return 0; |
234 | } | 233 | } |
235 | 234 | ||
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 57714f83ede4..3d6816667bfc 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -493,7 +493,9 @@ struct net_device *batadv_softif_create(const char *name) | |||
493 | atomic_set(&bat_priv->gw_bandwidth, 41); | 493 | atomic_set(&bat_priv->gw_bandwidth, 41); |
494 | atomic_set(&bat_priv->orig_interval, 1000); | 494 | atomic_set(&bat_priv->orig_interval, 1000); |
495 | atomic_set(&bat_priv->hop_penalty, 30); | 495 | atomic_set(&bat_priv->hop_penalty, 30); |
496 | #ifdef CONFIG_BATMAN_ADV_DEBUG | ||
496 | atomic_set(&bat_priv->log_level, 0); | 497 | atomic_set(&bat_priv->log_level, 0); |
498 | #endif | ||
497 | atomic_set(&bat_priv->fragmentation, 1); | 499 | atomic_set(&bat_priv->fragmentation, 1); |
498 | atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN); | 500 | atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN); |
499 | atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN); | 501 | atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN); |
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 441880a0caa7..d8061ac28409 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h | |||
@@ -284,12 +284,16 @@ struct batadv_priv { | |||
284 | atomic_t gw_bandwidth; /* gw bandwidth */ | 284 | atomic_t gw_bandwidth; /* gw bandwidth */ |
285 | atomic_t orig_interval; /* uint */ | 285 | atomic_t orig_interval; /* uint */ |
286 | atomic_t hop_penalty; /* uint */ | 286 | atomic_t hop_penalty; /* uint */ |
287 | #ifdef CONFIG_BATMAN_ADV_DEBUG | ||
287 | atomic_t log_level; /* uint */ | 288 | atomic_t log_level; /* uint */ |
289 | #endif | ||
288 | atomic_t bcast_seqno; | 290 | atomic_t bcast_seqno; |
289 | atomic_t bcast_queue_left; | 291 | atomic_t bcast_queue_left; |
290 | atomic_t batman_queue_left; | 292 | atomic_t batman_queue_left; |
291 | char num_ifaces; | 293 | char num_ifaces; |
294 | #ifdef CONFIG_BATMAN_ADV_DEBUG | ||
292 | struct batadv_debug_log *debug_log; | 295 | struct batadv_debug_log *debug_log; |
296 | #endif | ||
293 | struct kobject *mesh_obj; | 297 | struct kobject *mesh_obj; |
294 | struct dentry *debug_dir; | 298 | struct dentry *debug_dir; |
295 | struct hlist_head forw_bat_list; | 299 | struct hlist_head forw_bat_list; |