netdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flags
The documented error code for attempts to set unsupported flags (or to clear flags that cannot be disabled) is EINVAL, not EOPNOTSUPP. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1437ce3983
commit
97d1935a61
@@ -888,7 +888,7 @@ static int netxen_nic_set_flags(struct net_device *netdev, u32 data)
|
||||
int hw_lro;
|
||||
|
||||
if (data & ~ETH_FLAG_LRO)
|
||||
return -EOPNOTSUPP;
|
||||
return -EINVAL;
|
||||
|
||||
if (!(adapter->capabilities & NX_FW_CAPABILITY_HW_LRO))
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user