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:
Ben Hutchings
2010-06-30 02:46:56 +00:00
committed by David S. Miller
parent 1437ce3983
commit 97d1935a61
4 changed files with 4 additions and 4 deletions

View File

@ -6692,7 +6692,7 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data)
int changed = 0;
if (data & ~ETH_FLAG_LRO)
return -EOPNOTSUPP;
return -EINVAL;
if (data & ETH_FLAG_LRO) {
if (lro_enable) {