--- zzzz-none-000/linux-4.1.52/net/8021q/vlan.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/net/8021q/vlan.c 2022-03-02 11:37:13.000000000 +0000 @@ -40,12 +40,20 @@ #include "vlan.h" #include "vlanproc.h" +#if defined(CONFIG_BCM_KF_BLOG) && defined(CONFIG_BLOG) +#include +#endif + #define DRV_VERSION "1.8" /* Global VLAN variables */ int vlan_net_id __read_mostly; +#if defined(CONFIG_BCM_KF_VLAN) && (defined(CONFIG_BCM_VLAN) || defined(CONFIG_BCM_VLAN_MODULE)) +int vlan_dev_set_nfmark_to_priority(char *, int); +#endif + const char vlan_fullname[] = "802.1Q VLAN Support"; const char vlan_version[] = DRV_VERSION; @@ -117,6 +125,7 @@ dev_put(real_dev); } + int vlan_check_real_dev(struct net_device *real_dev, __be16 protocol, u16 vlan_id) { @@ -251,6 +260,11 @@ if (new_dev == NULL) return -ENOBUFS; +#if defined(CONFIG_BCM_KF_VLAN) && (defined(CONFIG_BCM_VLAN) || defined(CONFIG_BCM_VLAN_MODULE)) + /* If real device is a hardware switch port, the vlan device must also be */ + new_dev->priv_flags |= real_dev->priv_flags; +#endif + dev_net_set(new_dev, net); /* need 4 bytes for extra VLAN header info, * hope the underlying device can handle it. @@ -554,6 +568,13 @@ args.vlan_qos); break; +#if defined(CONFIG_BCM_KF_VLAN) && (defined(CONFIG_BCM_VLAN) || defined(CONFIG_BCM_VLAN_MODULE)) + case SET_VLAN_NFMARK_TO_PRIORITY_CMD: + err = vlan_dev_set_nfmark_to_priority(args.device1, + args.u.nfmark_to_priority); + break; +#endif + case SET_VLAN_FLAG_CMD: err = -EPERM; if (!ns_capable(net->user_ns, CAP_NET_ADMIN))