diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_ethtool.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index d4e803e2a977..b9d5acbaf540 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c | |||
@@ -983,12 +983,19 @@ static int qlcnic_set_flags(struct net_device *netdev, u32 data) | |||
983 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | 983 | struct qlcnic_adapter *adapter = netdev_priv(netdev); |
984 | int hw_lro; | 984 | int hw_lro; |
985 | 985 | ||
986 | if (data & ~ETH_FLAG_LRO) | ||
987 | return -EOPNOTSUPP; | ||
988 | |||
986 | if (!(adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO)) | 989 | if (!(adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO)) |
987 | return -EINVAL; | 990 | return -EINVAL; |
988 | 991 | ||
989 | ethtool_op_set_flags(netdev, data); | 992 | if (data & ETH_FLAG_LRO) { |
990 | 993 | hw_lro = QLCNIC_LRO_ENABLED; | |
991 | hw_lro = (data & ETH_FLAG_LRO) ? QLCNIC_LRO_ENABLED : 0; | 994 | netdev->features |= NETIF_F_LRO; |
995 | } else { | ||
996 | hw_lro = 0; | ||
997 | netdev->features &= ~NETIF_F_LRO; | ||
998 | } | ||
992 | 999 | ||
993 | if (qlcnic_config_hw_lro(adapter, hw_lro)) | 1000 | if (qlcnic_config_hw_lro(adapter, hw_lro)) |
994 | return -EIO; | 1001 | return -EIO; |