aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-07-08 10:32:09 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-08-23 08:20:19 -0400
commit8de47de5757bd5f64a823185e544210d95fd2088 (patch)
tree0cd51b5150434b80e12c65f2d04139a102b4106c /net/batman-adv/main.h
parent74ee3634dcd1f11624192f72f458bcb5a04e4822 (diff)
batman-adv: Use BIT(x) macro to calculate bit positions
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 4dfeae5e344a..574fca1bd434 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -123,15 +123,6 @@ enum batadv_uev_type {
123/* Append 'batman-adv: ' before kernel messages */ 123/* Append 'batman-adv: ' before kernel messages */
124#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 124#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
125 125
126/* all messages related to routing / flooding / broadcasting / etc */
127enum batadv_dbg_level {
128 BATADV_DBG_BATMAN = 1 << 0,
129 BATADV_DBG_ROUTES = 1 << 1, /* route added / changed / deleted */
130 BATADV_DBG_TT = 1 << 2, /* translation table operations */
131 BATADV_DBG_BLA = 1 << 3, /* bridge loop avoidance */
132 BATADV_DBG_ALL = 15,
133};
134
135/* Kernel headers */ 126/* Kernel headers */
136 127
137#include <linux/mutex.h> /* mutex */ 128#include <linux/mutex.h> /* mutex */
@@ -173,6 +164,15 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops);
173int batadv_algo_select(struct batadv_priv *bat_priv, char *name); 164int batadv_algo_select(struct batadv_priv *bat_priv, char *name);
174int batadv_algo_seq_print_text(struct seq_file *seq, void *offset); 165int batadv_algo_seq_print_text(struct seq_file *seq, void *offset);
175 166
167/* all messages related to routing / flooding / broadcasting / etc */
168enum batadv_dbg_level {
169 BATADV_DBG_BATMAN = BIT(0),
170 BATADV_DBG_ROUTES = BIT(1), /* route added / changed / deleted */
171 BATADV_DBG_TT = BIT(2), /* translation table operations */
172 BATADV_DBG_BLA = BIT(3), /* bridge loop avoidance */
173 BATADV_DBG_ALL = 15,
174};
175
176#ifdef CONFIG_BATMAN_ADV_DEBUG 176#ifdef CONFIG_BATMAN_ADV_DEBUG
177int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) 177int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...)
178__printf(2, 3); 178__printf(2, 3);