Stanislaw Gruszka 673e63c688 net: fix ethtool->set_flags not intended -EINVAL return value
After commit d5dbda23804156ae6f35025ade5307a49d1db6d7 "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
..
2011-03-05 10:55:57 +01:00
2011-02-28 11:57:33 -08:00
2011-02-28 11:57:33 -08:00
2011-03-16 11:29:47 -07:00
2011-02-02 15:41:25 -08:00
2011-03-23 12:45:10 -07:00
2011-03-27 23:35:01 -07:00
2011-02-13 10:42:07 -08:00
2011-03-02 03:20:56 -08:00
2011-01-11 14:03:09 -08:00
2011-03-11 01:16:23 -08:00
2011-03-27 23:35:06 -07:00
2011-02-28 12:06:20 -08:00
2011-03-23 15:22:05 -04:00
2011-03-15 19:38:03 -07:00
2011-03-14 15:00:12 -07:00
2011-03-14 15:00:12 -07:00
2011-01-14 12:39:59 -08:00
2011-02-01 13:19:07 -08:00
2011-01-27 14:18:34 -08:00
2011-01-09 15:42:56 -08:00
2011-03-18 21:53:03 -07:00
2011-01-14 12:45:54 -08:00
2011-02-28 11:57:33 -08:00
2011-02-13 21:44:44 -08:00
2011-02-17 14:16:35 -08:00
2011-03-15 19:38:03 -07:00
2011-03-03 13:02:32 -08:00
2011-03-19 13:39:33 -07:00
2011-02-28 12:29:34 -08:00
2011-02-24 22:17:02 -08:00
2011-01-09 15:54:15 -08:00
2011-01-25 22:41:55 -08:00
2011-03-27 23:35:06 -07:00
2011-01-26 13:13:10 -08:00
2011-03-21 18:24:53 -07:00
2011-03-15 19:38:03 -07:00