WSL2-Linux-Kernel/drivers/net/qlcnic
Stanislaw Gruszka 673e63c688 net: fix ethtool->set_flags not intended -EINVAL return value
After commit d5dbda2380 "ethtool: Add
support for vlan accleration.", drivers that have NETIF_F_HW_VLAN_TX,
and/or NETIF_F_HW_VLAN_RX feature, but do not allow enable/disable vlan
acceleration via ethtool set_flags, always return -EINVAL from that
function. Fix by returning -EINVAL only if requested features do not
match current settings and can not be changed by driver.

Change any driver that define ethtool->set_flags to use
ethtool_invalid_flags() to avoid similar problems in the future
(also on drivers that do not have the problem).

Tested with modified (to reproduce this bug) myri10ge driver.

Cc: stable@kernel.org # 2.6.37+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-27 23:35:24 -07:00
..
Makefile qlcnic: Qlogic ethernet driver for CNA devices 2010-01-16 01:17:15 -08:00
qlcnic.h qlcnic: Remove validation for max tx and max rx queues 2011-02-23 14:23:33 -08:00
qlcnic_ctx.c qlcnic: LICENSE file for qlcnic 2010-12-03 09:33:21 -08:00
qlcnic_ethtool.c net: fix ethtool->set_flags not intended -EINVAL return value 2011-03-27 23:35:24 -07:00
qlcnic_hdr.h qlcnic: fix ocm window register offset calculation 2010-12-17 11:39:01 -08:00
qlcnic_hw.c drivers/net/*/: Use static const 2010-12-21 02:16:10 -08:00
qlcnic_init.c qlcnic: fix flash fw version read 2011-01-10 13:34:54 -08:00
qlcnic_main.c qlcnic: Remove validation for max tx and max rx queues 2011-02-23 14:23:33 -08:00