aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-30 02:44:32 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-30 14:09:35 -0700
commit1437ce3983bcbc0447a0dedcd644c14fe833d266 (patch)
tree073ba0dc60127b08b65fbcca4d0d7c15318c08f8 /include/linux
parentcxgb4vf: Use correct shift factor for extracting the SGE DMA Ingress Padding Boundary (diff)
downloadlinux-dev-1437ce3983bcbc0447a0dedcd644c14fe833d266.tar.xz
linux-dev-1437ce3983bcbc0447a0dedcd644c14fe833d266.zip
ethtool: Change ethtool_op_set_flags to validate flags
ethtool_op_set_flags() does not check for unsupported flags, and has no way of doing so. This means it is not suitable for use as a default implementation of ethtool_ops::set_flags. Add a 'supported' parameter specifying the flags that the driver and hardware support, validate the requested flags against this, and change all current callers to pass this parameter. Change some other trivial implementations of ethtool_ops::set_flags to call ethtool_op_set_flags(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ethtool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 2c8af093d8b3..084ddb3c8032 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -457,7 +457,7 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
u32 ethtool_op_get_ufo(struct net_device *dev);
int ethtool_op_set_ufo(struct net_device *dev, u32 data);
u32 ethtool_op_get_flags(struct net_device *dev);
-int ethtool_op_set_flags(struct net_device *dev, u32 data);
+int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
void ethtool_ntuple_flush(struct net_device *dev);
/**