aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2013-04-19 12:07:00 -0400
committerAntonio Quartulli <ordex@autistici.org>2013-05-28 20:44:55 -0400
commiteb2deb6b39b1597577c1635e9ebf319f1ae02213 (patch)
tree94cea78183fa4e5da3245d8ac07ce8020f08ccc8 /net/batman-adv/main.h
parentaa27c31265f111ff73d948a5846a3f193376491e (diff)
batman-adv: change VID semantic in the BLA code
In order to make batman-adv fully vlan aware later, the semantic used for variables storing the VLAN ID values has to be changed in order to be adapted to the new one which will be used batman-adv wide. In particular, the VID has to be an "_unsigned_ short int" and its 4 MSB will be used as a flag bitfield, while the remaining 12 bits are used to store the real VID value Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index ea1a3bafe9c3..6f25ef29f305 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -162,6 +162,17 @@ enum batadv_uev_type {
162#include <linux/seq_file.h> 162#include <linux/seq_file.h>
163#include "types.h" 163#include "types.h"
164 164
165/**
166 * batadv_vlan_flags - flags for the four MSB of any vlan ID field
167 * @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not
168 */
169enum batadv_vlan_flags {
170 BATADV_VLAN_HAS_TAG = BIT(15),
171};
172
173#define BATADV_PRINT_VID(vid) (vid & BATADV_VLAN_HAS_TAG ? \
174 (int)(vid & VLAN_VID_MASK) : -1)
175
165extern char batadv_routing_algo[]; 176extern char batadv_routing_algo[];
166extern struct list_head batadv_hardif_list; 177extern struct list_head batadv_hardif_list;
167 178