diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-06-29 22:46:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-30 17:09:36 -0400 |
commit | 97d1935a61b7fe7a65f98f154c7f3301cfe746f3 (patch) | |
tree | 5c4586fd94e18935a9022f5c440f503daa32c636 /drivers | |
parent | 1437ce3983bcbc0447a0dedcd644c14fe833d266 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x_main.c | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/s2io.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 0809f6cfbd1a..29e293f97dba 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -10983,7 +10983,7 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data) | |||
10983 | int rc = 0; | 10983 | int rc = 0; |
10984 | 10984 | ||
10985 | if (data & ~(ETH_FLAG_LRO | ETH_FLAG_RXHASH)) | 10985 | if (data & ~(ETH_FLAG_LRO | ETH_FLAG_RXHASH)) |
10986 | return -EOPNOTSUPP; | 10986 | return -EINVAL; |
10987 | 10987 | ||
10988 | if (bp->recovery_state != BNX2X_RECOVERY_DONE) { | 10988 | if (bp->recovery_state != BNX2X_RECOVERY_DONE) { |
10989 | printk(KERN_ERR "Handling parity error recovery. Try again later\n"); | 10989 | printk(KERN_ERR "Handling parity error recovery. Try again later\n"); |
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 6d94ee579466..b30de24f4a52 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -888,7 +888,7 @@ static int netxen_nic_set_flags(struct net_device *netdev, u32 data) | |||
888 | int hw_lro; | 888 | int hw_lro; |
889 | 889 | ||
890 | if (data & ~ETH_FLAG_LRO) | 890 | if (data & ~ETH_FLAG_LRO) |
891 | return -EOPNOTSUPP; | 891 | return -EINVAL; |
892 | 892 | ||
893 | if (!(adapter->capabilities & NX_FW_CAPABILITY_HW_LRO)) | 893 | if (!(adapter->capabilities & NX_FW_CAPABILITY_HW_LRO)) |
894 | return -EINVAL; | 894 | return -EINVAL; |
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index b9d5acbaf540..f8e39e4cfe0f 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c | |||
@@ -984,7 +984,7 @@ static int qlcnic_set_flags(struct net_device *netdev, u32 data) | |||
984 | int hw_lro; | 984 | int hw_lro; |
985 | 985 | ||
986 | if (data & ~ETH_FLAG_LRO) | 986 | if (data & ~ETH_FLAG_LRO) |
987 | return -EOPNOTSUPP; | 987 | return -EINVAL; |
988 | 988 | ||
989 | if (!(adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO)) | 989 | if (!(adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO)) |
990 | return -EINVAL; | 990 | return -EINVAL; |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index a032d726d640..22371f1dca58 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -6692,7 +6692,7 @@ static int s2io_ethtool_set_flags(struct net_device *dev, u32 data) | |||
6692 | int changed = 0; | 6692 | int changed = 0; |
6693 | 6693 | ||
6694 | if (data & ~ETH_FLAG_LRO) | 6694 | if (data & ~ETH_FLAG_LRO) |
6695 | return -EOPNOTSUPP; | 6695 | return -EINVAL; |
6696 | 6696 | ||
6697 | if (data & ETH_FLAG_LRO) { | 6697 | if (data & ETH_FLAG_LRO) { |
6698 | if (lro_enable) { | 6698 | if (lro_enable) { |