]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ice: Implement toggling ethtool rx-vlan-filter
authorTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 16 Apr 2019 17:30:39 +0000 (10:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 29 May 2019 09:35:06 +0000 (02:35 -0700)
Implement the toggling of rx-vlan-filter; enable|disable VLAN
pruning based on on|off, respectively.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c

index 0a4abc21890ccf5fb928a76d763d58447f29bb90..eaa1b25dd1b06d149782c6b6c67da5005b539732 100644 (file)
@@ -2876,6 +2876,13 @@ ice_set_features(struct net_device *netdev, netdev_features_t features)
                 (netdev->features & NETIF_F_HW_VLAN_CTAG_TX))
                ret = ice_vsi_manage_vlan_insertion(vsi);
 
+       if ((features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
+           !(netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER))
+               ret = ice_cfg_vlan_pruning(vsi, true, false);
+       else if (!(features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
+                (netdev->features & NETIF_F_HW_VLAN_CTAG_FILTER))
+               ret = ice_cfg_vlan_pruning(vsi, false, false);
+
        return ret;
 }