aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-11-15 10:29:55 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-16 17:43:10 -0500
commitc8f44affb7244f2ac3e703cab13d55ede27621bb (patch)
tree62e7aea2916a8d7cab825fe500670c5113854c0f /net/core/ethtool.c
parenta59e2ecb859f2ab03bb2e230709f8039472ad2c3 (diff)
net: introduce and use netdev_features_t for device features sets
v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index a354919a32ac..f135f1c92c9d 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -171,7 +171,7 @@ static void __ethtool_get_strings(struct net_device *dev,
171 ops->get_strings(dev, stringset, data); 171 ops->get_strings(dev, stringset, data);
172} 172}
173 173
174static u32 ethtool_get_feature_mask(u32 eth_cmd) 174static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd)
175{ 175{
176 /* feature masks of legacy discrete ethtool ops */ 176 /* feature masks of legacy discrete ethtool ops */
177 177
@@ -205,7 +205,7 @@ static u32 ethtool_get_feature_mask(u32 eth_cmd)
205static int ethtool_get_one_feature(struct net_device *dev, 205static int ethtool_get_one_feature(struct net_device *dev,
206 char __user *useraddr, u32 ethcmd) 206 char __user *useraddr, u32 ethcmd)
207{ 207{
208 u32 mask = ethtool_get_feature_mask(ethcmd); 208 netdev_features_t mask = ethtool_get_feature_mask(ethcmd);
209 struct ethtool_value edata = { 209 struct ethtool_value edata = {
210 .cmd = ethcmd, 210 .cmd = ethcmd,
211 .data = !!(dev->features & mask), 211 .data = !!(dev->features & mask),
@@ -220,7 +220,7 @@ static int ethtool_set_one_feature(struct net_device *dev,
220 void __user *useraddr, u32 ethcmd) 220 void __user *useraddr, u32 ethcmd)
221{ 221{
222 struct ethtool_value edata; 222 struct ethtool_value edata;
223 u32 mask; 223 netdev_features_t mask;
224 224
225 if (copy_from_user(&edata, useraddr, sizeof(edata))) 225 if (copy_from_user(&edata, useraddr, sizeof(edata)))
226 return -EFAULT; 226 return -EFAULT;
@@ -260,8 +260,7 @@ static u32 __ethtool_get_flags(struct net_device *dev)
260 260
261static int __ethtool_set_flags(struct net_device *dev, u32 data) 261static int __ethtool_set_flags(struct net_device *dev, u32 data)
262{ 262{
263 u32 features = 0; 263 netdev_features_t features = 0, changed;
264 u32 changed;
265 264
266 if (data & ~ETH_ALL_FLAGS) 265 if (data & ~ETH_ALL_FLAGS)
267 return -EINVAL; 266 return -EINVAL;