mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
0988c4c7fb
commit
ec37a48d1d
@ -7528,7 +7528,7 @@ bnx2_set_flags(struct net_device *dev, u32 data)
|
||||
|
||||
if (!(bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) &&
|
||||
!(data & ETH_FLAG_RXVLAN))
|
||||
return -EOPNOTSUPP;
|
||||
return -EINVAL;
|
||||
|
||||
rc = ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH | ETH_FLAG_RXVLAN |
|
||||
ETH_FLAG_TXVLAN);
|
||||
|
@ -1123,7 +1123,7 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data)
|
||||
}
|
||||
|
||||
if (!(data & ETH_FLAG_RXVLAN))
|
||||
return -EOPNOTSUPP;
|
||||
return -EINVAL;
|
||||
|
||||
if ((data & ETH_FLAG_LRO) && bp->rx_csum && bp->disable_tpa)
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user