Commit 0c430d0d authored by Marek Lindner's avatar Marek Lindner Committed by Antonio Quartulli

batman-adv: unbloat batadv_priv if debug is not enabled

Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
parent 93380261
...@@ -229,7 +229,6 @@ static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv) ...@@ -229,7 +229,6 @@ static void batadv_debug_log_cleanup(struct batadv_priv *bat_priv)
#else /* CONFIG_BATMAN_ADV_DEBUG */ #else /* CONFIG_BATMAN_ADV_DEBUG */
static int batadv_debug_log_setup(struct batadv_priv *bat_priv) static int batadv_debug_log_setup(struct batadv_priv *bat_priv)
{ {
bat_priv->debug_log = NULL;
return 0; return 0;
} }
......
...@@ -493,7 +493,9 @@ struct net_device *batadv_softif_create(const char *name) ...@@ -493,7 +493,9 @@ struct net_device *batadv_softif_create(const char *name)
atomic_set(&bat_priv->gw_bandwidth, 41); atomic_set(&bat_priv->gw_bandwidth, 41);
atomic_set(&bat_priv->orig_interval, 1000); atomic_set(&bat_priv->orig_interval, 1000);
atomic_set(&bat_priv->hop_penalty, 30); atomic_set(&bat_priv->hop_penalty, 30);
#ifdef CONFIG_BATMAN_ADV_DEBUG
atomic_set(&bat_priv->log_level, 0); atomic_set(&bat_priv->log_level, 0);
#endif
atomic_set(&bat_priv->fragmentation, 1); atomic_set(&bat_priv->fragmentation, 1);
atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN); atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN);
atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN); atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN);
......
...@@ -284,12 +284,16 @@ struct batadv_priv { ...@@ -284,12 +284,16 @@ struct batadv_priv {
atomic_t gw_bandwidth; /* gw bandwidth */ atomic_t gw_bandwidth; /* gw bandwidth */
atomic_t orig_interval; /* uint */ atomic_t orig_interval; /* uint */
atomic_t hop_penalty; /* uint */ atomic_t hop_penalty; /* uint */
#ifdef CONFIG_BATMAN_ADV_DEBUG
atomic_t log_level; /* uint */ atomic_t log_level; /* uint */
#endif
atomic_t bcast_seqno; atomic_t bcast_seqno;
atomic_t bcast_queue_left; atomic_t bcast_queue_left;
atomic_t batman_queue_left; atomic_t batman_queue_left;
char num_ifaces; char num_ifaces;
#ifdef CONFIG_BATMAN_ADV_DEBUG
struct batadv_debug_log *debug_log; struct batadv_debug_log *debug_log;
#endif
struct kobject *mesh_obj; struct kobject *mesh_obj;
struct dentry *debug_dir; struct dentry *debug_dir;
struct hlist_head forw_bat_list; struct hlist_head forw_bat_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment