Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / net / 8021q / vlan.h
index 245de9653db0b8752da5ed7c6861e74a2769e45a..ba5983f34c42f8076f4416af164f229678ffc4e1 100644 (file)
@@ -91,6 +91,7 @@ static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev)
 
 enum vlan_protos {
        VLAN_PROTO_8021Q        = 0,
+       VLAN_PROTO_8021AD,
        VLAN_PROTO_NUM,
 };
 
@@ -116,8 +117,11 @@ static inline unsigned int vlan_proto_idx(__be16 proto)
        switch (proto) {
        case __constant_htons(ETH_P_8021Q):
                return VLAN_PROTO_8021Q;
+       case __constant_htons(ETH_P_8021AD):
+               return VLAN_PROTO_8021AD;
        default:
                BUG();
+               return 0;
        }
 }