--- zzzz-none-000/linux-4.4.271/include/linux/if_vlan.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/linux/if_vlan.h 2023-04-19 10:22:30.000000000 +0000 @@ -69,6 +69,7 @@ #define VLAN_PRIO_SHIFT 13 #define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */ #define VLAN_TAG_PRESENT VLAN_CFI_MASK +#define VLAN_DEI_BIT BIT(12) #define VLAN_VID_MASK 0x0fff /* VLAN Identifier */ #define VLAN_N_VID 4096 @@ -110,7 +111,13 @@ extern struct net_device *__vlan_find_dev_deep_rcu(struct net_device *real_dev, __be16 vlan_proto, u16 vlan_id); +extern void __vlan_dev_update_accel_stats(struct net_device *dev, + struct rtnl_link_stats64 *stats); + +extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev, + __be16 vlan_proto, u16 vlan_id); extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); +extern struct net_device *vlan_dev_next_dev(const struct net_device *dev); extern u16 vlan_dev_vlan_id(const struct net_device *dev); extern __be16 vlan_dev_vlan_proto(const struct net_device *dev); @@ -206,6 +213,12 @@ return vlan_dev_priv(dev)->nest_level; } #else +static inline void __vlan_dev_update_accel_stats(struct net_device *dev, + struct rtnl_link_stats64 *stats) +{ + +} + static inline struct net_device * __vlan_find_dev_deep_rcu(struct net_device *real_dev, __be16 vlan_proto, u16 vlan_id) @@ -412,6 +425,9 @@ __be16 vlan_proto, u16 vlan_tci) { skb->vlan_proto = vlan_proto; +#ifdef CONFIG_AVM_WAR_SKB_HAS_VLAN_DEI + skb->vlan_dei = !!(vlan_tci & VLAN_DEI_BIT); +#endif skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci; }