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>
Esse commit está contido em:

commit de
David S. Miller

pai
a59e2ecb85
commit
c8f44affb7
@@ -7571,8 +7571,8 @@ bnx2_set_phys_id(struct net_device *dev, enum ethtool_phys_id_state state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32
|
||||
bnx2_fix_features(struct net_device *dev, u32 features)
|
||||
static netdev_features_t
|
||||
bnx2_fix_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct bnx2 *bp = netdev_priv(dev);
|
||||
|
||||
@@ -7583,7 +7583,7 @@ bnx2_fix_features(struct net_device *dev, u32 features)
|
||||
}
|
||||
|
||||
static int
|
||||
bnx2_set_features(struct net_device *dev, u32 features)
|
||||
bnx2_set_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct bnx2 *bp = netdev_priv(dev);
|
||||
|
||||
|
@@ -3398,7 +3398,8 @@ int bnx2x_change_mtu(struct net_device *dev, int new_mtu)
|
||||
return bnx2x_reload_if_running(dev);
|
||||
}
|
||||
|
||||
u32 bnx2x_fix_features(struct net_device *dev, u32 features)
|
||||
netdev_features_t bnx2x_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
|
||||
@@ -3409,7 +3410,7 @@ u32 bnx2x_fix_features(struct net_device *dev, u32 features)
|
||||
return features;
|
||||
}
|
||||
|
||||
int bnx2x_set_features(struct net_device *dev, u32 features)
|
||||
int bnx2x_set_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
u32 flags = bp->flags;
|
||||
|
@@ -533,8 +533,9 @@ int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
|
||||
*/
|
||||
int bnx2x_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type);
|
||||
#endif
|
||||
u32 bnx2x_fix_features(struct net_device *dev, u32 features);
|
||||
int bnx2x_set_features(struct net_device *dev, u32 features);
|
||||
netdev_features_t bnx2x_fix_features(struct net_device *dev,
|
||||
netdev_features_t features);
|
||||
int bnx2x_set_features(struct net_device *dev, netdev_features_t features);
|
||||
|
||||
/**
|
||||
* bnx2x_tx_timeout - tx timeout netdev callback
|
||||
|
@@ -6968,7 +6968,7 @@ static int tg3_phy_lpbk_set(struct tg3 *tp, u32 speed, bool extlpbk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tg3_set_loopback(struct net_device *dev, u32 features)
|
||||
static void tg3_set_loopback(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
struct tg3 *tp = netdev_priv(dev);
|
||||
|
||||
@@ -6994,7 +6994,8 @@ static void tg3_set_loopback(struct net_device *dev, u32 features)
|
||||
}
|
||||
}
|
||||
|
||||
static u32 tg3_fix_features(struct net_device *dev, u32 features)
|
||||
static netdev_features_t tg3_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
struct tg3 *tp = netdev_priv(dev);
|
||||
|
||||
@@ -7004,9 +7005,9 @@ static u32 tg3_fix_features(struct net_device *dev, u32 features)
|
||||
return features;
|
||||
}
|
||||
|
||||
static int tg3_set_features(struct net_device *dev, u32 features)
|
||||
static int tg3_set_features(struct net_device *dev, netdev_features_t features)
|
||||
{
|
||||
u32 changed = dev->features ^ features;
|
||||
netdev_features_t changed = dev->features ^ features;
|
||||
|
||||
if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
|
||||
tg3_set_loopback(dev, features);
|
||||
@@ -15313,7 +15314,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
|
||||
u32 sndmbx, rcvmbx, intmbx;
|
||||
char str[40];
|
||||
u64 dma_mask, persist_dma_mask;
|
||||
u32 features = 0;
|
||||
netdev_features_t features = 0;
|
||||
|
||||
printk_once(KERN_INFO "%s\n", version);
|
||||
|
||||
|
Referência em uma nova issue
Block a user