[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH 2/6] header: add skb_vlan_tag_{present,get,get_id}
From: Hauke Mehrtens <hauke () hauke-m ! de>
Date: 2015-02-22 1:42:04
Message-ID: 1424569328-12514-3-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]
These macros are used by some Ethernet drivers now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/if_vlan.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/backport/backport-include/linux/if_vlan.h \
b/backport/backport-include/linux/if_vlan.h index 7d39d52..be2e259 100644
--- a/backport/backport-include/linux/if_vlan.h
+++ b/backport/backport-include/linux/if_vlan.h
@@ -24,4 +24,16 @@
#define __vlan_find_dev_deep_rcu(real_dev, vlan_proto, vlan_id) \
__vlan_find_dev_deep(real_dev, vlan_proto, vlan_id) #endif
+#ifndef skb_vlan_tag_present
+#define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
+#endif
+
+#ifndef skb_vlan_tag_get
+#define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
+#endif
+
+#ifndef skb_vlan_tag_get_id
+#define skb_vlan_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK)
+#endif
+
#endif /* __BACKPORT_LINUX_IF_VLAN_H_ */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic