mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
a59e2ecb85
commit
c8f44affb7
74 changed files with 305 additions and 202 deletions
|
@ -171,7 +171,7 @@ static void __ethtool_get_strings(struct net_device *dev,
|
|||
ops->get_strings(dev, stringset, data);
|
||||
}
|
||||
|
||||
static u32 ethtool_get_feature_mask(u32 eth_cmd)
|
||||
static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd)
|
||||
{
|
||||
/* feature masks of legacy discrete ethtool ops */
|
||||
|
||||
|
@ -205,7 +205,7 @@ static u32 ethtool_get_feature_mask(u32 eth_cmd)
|
|||
static int ethtool_get_one_feature(struct net_device *dev,
|
||||
char __user *useraddr, u32 ethcmd)
|
||||
{
|
||||
u32 mask = ethtool_get_feature_mask(ethcmd);
|
||||
netdev_features_t mask = ethtool_get_feature_mask(ethcmd);
|
||||
struct ethtool_value edata = {
|
||||
.cmd = ethcmd,
|
||||
.data = !!(dev->features & mask),
|
||||
|
@ -220,7 +220,7 @@ static int ethtool_set_one_feature(struct net_device *dev,
|
|||
void __user *useraddr, u32 ethcmd)
|
||||
{
|
||||
struct ethtool_value edata;
|
||||
u32 mask;
|
||||
netdev_features_t mask;
|
||||
|
||||
if (copy_from_user(&edata, useraddr, sizeof(edata)))
|
||||
return -EFAULT;
|
||||
|
@ -260,8 +260,7 @@ static u32 __ethtool_get_flags(struct net_device *dev)
|
|||
|
||||
static int __ethtool_set_flags(struct net_device *dev, u32 data)
|
||||
{
|
||||
u32 features = 0;
|
||||
u32 changed;
|
||||
netdev_features_t features = 0, changed;
|
||||
|
||||
if (data & ~ETH_ALL_FLAGS)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue