backports: add VLAN_PRIO_MASK and VLAN_PRIO_SHIFT
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 25 Oct 2013 22:26:47 +0000 (00:26 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 26 Oct 2013 09:54:07 +0000 (11:54 +0200)
It should be safe to add them for older kernel versions, there these
values were hard coded in other places.

This was added in linux-2.6.33.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/backport-include/linux/if_vlan.h

index fea0accc834fbe1089854e583e2cceef441476b2..2d996fa16044a37aff76eddceabd14c3368e2c6d 100644 (file)
@@ -17,4 +17,12 @@ static inline bool vlan_hw_offload_capable(netdev_features_t features,
 }
 #endif 
 
+#ifndef VLAN_PRIO_MASK
+#define VLAN_PRIO_MASK         0xe000 /* Priority Code Point */
+#endif
+
+#ifndef VLAN_PRIO_SHIFT
+#define VLAN_PRIO_SHIFT                13
+#endif
+
 #endif /* __BACKPORT_LINUX_IF_VLAN_H_ */