net: Update API for VF vlan protocol 802.1ad support
[cascardo/linux.git] / drivers / net / ethernet / intel / fm10k / fm10k_iov.c
index d9dec81..5f4dac0 100644 (file)
@@ -445,7 +445,7 @@ int fm10k_ndo_set_vf_mac(struct net_device *netdev, int vf_idx, u8 *mac)
 }
 
 int fm10k_ndo_set_vf_vlan(struct net_device *netdev, int vf_idx, u16 vid,
-                         u8 qos)
+                         u8 qos, __be16 vlan_proto)
 {
        struct fm10k_intfc *interface = netdev_priv(netdev);
        struct fm10k_iov_data *iov_data = interface->iov_data;
@@ -460,6 +460,10 @@ int fm10k_ndo_set_vf_vlan(struct net_device *netdev, int vf_idx, u16 vid,
        if (qos || (vid > (VLAN_VID_MASK - 1)))
                return -EINVAL;
 
+       /* VF VLAN Protocol part to default is unsupported */
+       if (vlan_proto != htons(ETH_P_8021Q))
+               return -EPROTONOSUPPORT;
+
        vf_info = &iov_data->vf_info[vf_idx];
 
        /* exit if there is nothing to do */