summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-30 02:46:56 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-30 14:09:36 -0700
commit97d1935a61b7fe7a65f98f154c7f3301cfe746f3 (patch)
tree5c4586fd94e18935a9022f5c440f503daa32c636 /drivers/net/bnx2x_main.c
parent1437ce3983bcbc0447a0dedcd644c14fe833d266 (diff)
downloadop-kernel-dev-97d1935a61b7fe7a65f98f154c7f3301cfe746f3.zip
op-kernel-dev-97d1935a61b7fe7a65f98f154c7f3301cfe746f3.tar.gz
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/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 0809f6c..29e293f 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)
int rc = 0;
if (data & ~(ETH_FLAG_LRO | ETH_FLAG_RXHASH))
- return -EOPNOTSUPP;
+ return -EINVAL;
if (bp->recovery_state != BNX2X_RECOVERY_DONE) {
printk(KERN_ERR "Handling parity error recovery. Try again later\n");
OpenPOWER on IntegriCloud