static int ehea_set_flags(struct net_device *dev, u32 data) { /* Avoid changing the VLAN flags */ if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) != (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN))){ return -EINVAL; } return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO | ETH_FLAG_TXVLAN | ETH_FLAG_RXVLAN); }
static int qlcnic_set_flags(struct net_device *netdev, u32 data) { struct qlcnic_adapter *adapter = netdev_priv(netdev); int hw_lro; if (!(adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO)) return -EINVAL; ethtool_op_set_flags(netdev, data); hw_lro = (data & ETH_FLAG_LRO) ? QLCNIC_LRO_ENABLED : 0; if (qlcnic_config_hw_lro(adapter, hw_lro)) return -EIO; if ((hw_lro == 0) && qlcnic_send_lro_cleanup(adapter)) return -EIO; return 0; }
static int ehea_set_flags(struct net_device *dev, u32 data) { return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO | ETH_FLAG_TXVLAN | ETH_FLAG_RXVLAN); }