Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04ed3e74 authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller
Browse files

net: change netdev->features to u32



Quoting Ben Hutchings: we presumably won't be defining features that
can only be enabled on 64-bit architectures.

Occurences found by `grep -r` on net/, drivers/net, include/

[ Move features and vlan_features next to each other in
  struct netdev, as per Eric Dumazet's suggestion -DaveM ]

Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57422dc5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8312,7 +8312,7 @@ static const struct net_device_ops bnx2_netdev_ops = {
#endif
};

static void inline vlan_features_add(struct net_device *dev, unsigned long flags)
static void inline vlan_features_add(struct net_device *dev, u32 flags)
{
	dev->vlan_features |= flags;
}
+2 −2
Original line number Diff line number Diff line
@@ -1372,8 +1372,8 @@ static int bond_compute_features(struct bonding *bond)
{
	struct slave *slave;
	struct net_device *bond_dev = bond->dev;
	unsigned long features = bond_dev->features;
	unsigned long vlan_features = 0;
	u32 features = bond_dev->features;
	u32 vlan_features = 0;
	unsigned short max_hard_header_len = max((u16)ETH_HLEN,
						bond_dev->hard_header_len);
	int i;
+2 −2
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ struct myri10ge_priv {
	unsigned long serial_number;
	int vendor_specific_offset;
	int fw_multicast_support;
	unsigned long features;
	u32 features;
	u32 max_tso6;
	u32 read_dma;
	u32 write_dma;
@@ -1776,7 +1776,7 @@ static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled)
static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled)
{
	struct myri10ge_priv *mgp = netdev_priv(netdev);
	unsigned long flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO);
	u32 flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO);

	if (tso_enabled)
		netdev->features |= flags;
+2 −2
Original line number Diff line number Diff line
@@ -502,7 +502,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
{
	struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev);
	unsigned long features;
	u32 features;

	features = NETIF_F_TSO;
	if (efx->type->offload_features & NETIF_F_V6_CSUM)
@@ -519,7 +519,7 @@ static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
{
	struct efx_nic *efx = netdev_priv(net_dev);
	unsigned long features = efx->type->offload_features & NETIF_F_ALL_CSUM;
	u32 features = efx->type->offload_features & NETIF_F_ALL_CSUM;

	if (enable)
		net_dev->features |= features;
+1 −1
Original line number Diff line number Diff line
@@ -906,7 +906,7 @@ struct efx_nic_type {
	unsigned int phys_addr_channels;
	unsigned int tx_dc_base;
	unsigned int rx_dc_base;
	unsigned long offload_features;
	u32 offload_features;
	u32 reset_world_flags;
};

Loading