--- zzzz-none-000/linux-4.9.279/include/linux/if_vlan.h 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/include/linux/if_vlan.h 2023-02-08 11:43:43.000000000 +0000 @@ -171,15 +171,23 @@ } static inline u16 -vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio) +vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) { +#if defined(CONFIG_INTEL_KERNEL_PP_DRIVER_LOCAL) + if ((skb->ti_ds_traffic_prio < 2) && (dev->priv_flags & IFF_BONDING)) + { + /* Increase VLAN priority for traffic directed to the LAG */ + return (VLAN_PRIO_MASK & ((2) << VLAN_PRIO_SHIFT)); + } + return (VLAN_PRIO_MASK & (((u16)(skb->ti_ds_traffic_prio)) << VLAN_PRIO_SHIFT)); +#else struct vlan_priority_tci_mapping *mp; smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */ - mp = vlan_dev_priv(dev)->egress_priority_map[(skprio & 0xF)]; + mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)]; while (mp) { - if (mp->priority == skprio) { + if (mp->priority == skb->priority) { return mp->vlan_qos; /* This should already be shifted * to mask correctly with the * VLAN's TCI */ @@ -187,6 +195,7 @@ mp = mp->next; } return 0; +#endif /* CONFIG_INTEL_KERNEL_PP_DRIVER_LOCAL */ } extern bool vlan_do_receive(struct sk_buff **skb); @@ -592,6 +601,10 @@ skb->protocol = htons(ETH_P_802_2); } +// AVM/TKL: AVMNET VLAN extension +#define AVM_REGISTER_VLAN_DEVICE +int avm_register_vlan_device(struct net_device *real_dev, uint16_t vlan_id, const char *name, struct net_device **vlan_dev); + /** * skb_vlan_tagged - check if skb is vlan tagged. * @skb: skbuff to query