|
|
@@ -2718,22 +2718,6 @@ void i40e_vlan_stripping_disable(struct i40e_vsi *vsi)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * i40e_vlan_rx_register - Setup or shutdown vlan offload
|
|
|
- * @netdev: network interface to be adjusted
|
|
|
- * @features: netdev features to test if VLAN offload is enabled or not
|
|
|
- **/
|
|
|
-static void i40e_vlan_rx_register(struct net_device *netdev, u32 features)
|
|
|
-{
|
|
|
- struct i40e_netdev_priv *np = netdev_priv(netdev);
|
|
|
- struct i40e_vsi *vsi = np->vsi;
|
|
|
-
|
|
|
- if (features & NETIF_F_HW_VLAN_CTAG_RX)
|
|
|
- i40e_vlan_stripping_enable(vsi);
|
|
|
- else
|
|
|
- i40e_vlan_stripping_disable(vsi);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* i40e_add_vlan_all_mac - Add a MAC/VLAN filter for each existing MAC address
|
|
|
* @vsi: the vsi being configured
|
|
|
@@ -2909,7 +2893,10 @@ static void i40e_restore_vlan(struct i40e_vsi *vsi)
|
|
|
if (!vsi->netdev)
|
|
|
return;
|
|
|
|
|
|
- i40e_vlan_rx_register(vsi->netdev, vsi->netdev->features);
|
|
|
+ if (vsi->netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
|
|
|
+ i40e_vlan_stripping_enable(vsi);
|
|
|
+ else
|
|
|
+ i40e_vlan_stripping_disable(vsi);
|
|
|
|
|
|
for_each_set_bit(vid, vsi->active_vlans, VLAN_N_VID)
|
|
|
i40e_vlan_rx_add_vid(vsi->netdev, htons(ETH_P_8021Q),
|