diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-07-08 10:32:09 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-08-23 08:20:19 -0400 |
commit | 8de47de5757bd5f64a823185e544210d95fd2088 (patch) | |
tree | 0cd51b5150434b80e12c65f2d04139a102b4106c /net/batman-adv/main.h | |
parent | 74ee3634dcd1f11624192f72f458bcb5a04e4822 (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.h | 18 |
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 */ | ||
127 | enum 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); | |||
173 | int batadv_algo_select(struct batadv_priv *bat_priv, char *name); | 164 | int batadv_algo_select(struct batadv_priv *bat_priv, char *name); |
174 | int batadv_algo_seq_print_text(struct seq_file *seq, void *offset); | 165 | int batadv_algo_seq_print_text(struct seq_file *seq, void *offset); |
175 | 166 | ||
167 | /* all messages related to routing / flooding / broadcasting / etc */ | ||
168 | enum 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 |
177 | int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) | 177 | int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) |
178 | __printf(2, 3); | 178 | __printf(2, 3); |