diff options
author | Jesse Gross <jesse@nicira.com> | 2010-10-21 07:30:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 22:59:32 -0400 |
commit | ec37a48d1d16c30b655ac5280209edf52a6775d4 (patch) | |
tree | de483247d7febde004678ef5f7ee2806b2ba90df /drivers/net | |
parent | 0988c4c7fb5881377ec20a6452f739a722e97c6b (diff) |
bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
Some cards don't support changing vlan offloading settings. Make
Ethtool set_flags return -EINVAL in those cases.
Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 2 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_ethtool.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index bf3c830e7dda..062600be073b 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -7528,7 +7528,7 @@ bnx2_set_flags(struct net_device *dev, u32 data) | |||
7528 | 7528 | ||
7529 | if (!(bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) && | 7529 | if (!(bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) && |
7530 | !(data & ETH_FLAG_RXVLAN)) | 7530 | !(data & ETH_FLAG_RXVLAN)) |
7531 | return -EOPNOTSUPP; | 7531 | return -EINVAL; |
7532 | 7532 | ||
7533 | rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN | | 7533 | rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN | |
7534 | ETH_FLAG_TXVLAN); | 7534 | ETH_FLAG_TXVLAN); |
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index daefef618ef7..d02ffbdc9f0e 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c | |||
@@ -1123,7 +1123,7 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data) | |||
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | if (!(data & ETH_FLAG_RXVLAN)) | 1125 | if (!(data & ETH_FLAG_RXVLAN)) |
1126 | return -EOPNOTSUPP; | 1126 | return -EINVAL; |
1127 | 1127 | ||
1128 | if ((data & ETH_FLAG_LRO) && bp->rx_csum && bp->disable_tpa) | 1128 | if ((data & ETH_FLAG_LRO) && bp->rx_csum && bp->disable_tpa) |
1129 | return -EINVAL; | 1129 | return -EINVAL; |