Return-Path: From: Antonio Quartulli Date: Thu, 9 May 2013 18:48:17 +0200 Message-Id: <1368118097-1875-2-git-send-email-ordex@autistici.org> In-Reply-To: <1368118097-1875-1-git-send-email-ordex@autistici.org> References: <1368118097-1875-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCHv2 next 2/2] batman-adv: use VLAN_VID_MASK instead of BATADV_VID_MASK Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: Antonio Quartulli VLAN_VID_MASK is already diefined in linux/if_vlan.h and therefore does not need to be privately re-defined Introduced in 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b ("batman-adv: change VID semantic in the BLA code") Signed-off-by: Antonio Quartulli --- bridge_loop_avoidance.c | 2 +- main.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c index e95cf4b..e9d8e0b 100644 --- a/bridge_loop_avoidance.c +++ b/bridge_loop_avoidance.c @@ -344,7 +344,7 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac, if (vid & BATADV_VLAN_HAS_TAG) skb = vlan_insert_tag(skb, htons(ETH_P_8021Q), - vid & BATADV_VID_MASK); + vid & VLAN_VID_MASK); skb_reset_mac_header(skb); skb->protocol = eth_type_trans(skb, soft_iface); diff --git a/main.h b/main.h index 8bcffa5..834b1a0 100644 --- a/main.h +++ b/main.h @@ -172,8 +172,6 @@ enum batadv_vlan_flags { BATADV_VLAN_HAS_TAG = BIT(15), }; -/* mask needed to extract the vlan ID (12bits) from a 16bits variable */ -#define BATADV_VID_MASK 0x0FFF #define BATADV_PRINT_VID(vid) (vid & BATADV_VLAN_HAS_TAG ? \ (int)(vid & VLAN_VID_MASK) : -1) -- 1.8.1.5