aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-01-24 18:32:47 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-24 18:32:47 -0500
commit04ed3e741d0f133e02bed7fa5c98edba128f90e7 (patch)
tree3dde4ca8306e98536faa69bccf0e47a2549c088f /drivers
parent57422dc530115e427dff464cc0a32bcd0efb5008 (diff)
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: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bonding/bond_main.c4
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/sfc/ethtool.c4
-rw-r--r--drivers/net/sfc/net_driver.h2
-rw-r--r--drivers/net/tun.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index df99edf3464a..cab96fa4cd3a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -8312,7 +8312,7 @@ static const struct net_device_ops bnx2_netdev_ops = {
8312#endif 8312#endif
8313}; 8313};
8314 8314
8315static void inline vlan_features_add(struct net_device *dev, unsigned long flags) 8315static void inline vlan_features_add(struct net_device *dev, u32 flags)
8316{ 8316{
8317 dev->vlan_features |= flags; 8317 dev->vlan_features |= flags;
8318} 8318}
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 163e0b06eaa5..7047b406b8ba 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1372,8 +1372,8 @@ static int bond_compute_features(struct bonding *bond)
1372{ 1372{
1373 struct slave *slave; 1373 struct slave *slave;
1374 struct net_device *bond_dev = bond->dev; 1374 struct net_device *bond_dev = bond->dev;
1375 unsigned long features = bond_dev->features; 1375 u32 features = bond_dev->features;
1376 unsigned long vlan_features = 0; 1376 u32 vlan_features = 0;
1377 unsigned short max_hard_header_len = max((u16)ETH_HLEN, 1377 unsigned short max_hard_header_len = max((u16)ETH_HLEN,
1378 bond_dev->hard_header_len); 1378 bond_dev->hard_header_len);
1379 int i; 1379 int i;
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index ea5cfe2c3a04..a7f2eed9a08a 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -253,7 +253,7 @@ struct myri10ge_priv {
253 unsigned long serial_number; 253 unsigned long serial_number;
254 int vendor_specific_offset; 254 int vendor_specific_offset;
255 int fw_multicast_support; 255 int fw_multicast_support;
256 unsigned long features; 256 u32 features;
257 u32 max_tso6; 257 u32 max_tso6;
258 u32 read_dma; 258 u32 read_dma;
259 u32 write_dma; 259 u32 write_dma;
@@ -1776,7 +1776,7 @@ static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled)
1776static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled) 1776static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled)
1777{ 1777{
1778 struct myri10ge_priv *mgp = netdev_priv(netdev); 1778 struct myri10ge_priv *mgp = netdev_priv(netdev);
1779 unsigned long flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO); 1779 u32 flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO);
1780 1780
1781 if (tso_enabled) 1781 if (tso_enabled)
1782 netdev->features |= flags; 1782 netdev->features |= flags;
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 0e8bb19ed60d..713969accdbd 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -502,7 +502,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
502static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) 502static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
503{ 503{
504 struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev); 504 struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev);
505 unsigned long features; 505 u32 features;
506 506
507 features = NETIF_F_TSO; 507 features = NETIF_F_TSO;
508 if (efx->type->offload_features & NETIF_F_V6_CSUM) 508 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)
519static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) 519static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
520{ 520{
521 struct efx_nic *efx = netdev_priv(net_dev); 521 struct efx_nic *efx = netdev_priv(net_dev);
522 unsigned long features = efx->type->offload_features & NETIF_F_ALL_CSUM; 522 u32 features = efx->type->offload_features & NETIF_F_ALL_CSUM;
523 523
524 if (enable) 524 if (enable)
525 net_dev->features |= features; 525 net_dev->features |= features;
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 28df8665256a..c65270241d2d 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -906,7 +906,7 @@ struct efx_nic_type {
906 unsigned int phys_addr_channels; 906 unsigned int phys_addr_channels;
907 unsigned int tx_dc_base; 907 unsigned int tx_dc_base;
908 unsigned int rx_dc_base; 908 unsigned int rx_dc_base;
909 unsigned long offload_features; 909 u32 offload_features;
910 u32 reset_world_flags; 910 u32 reset_world_flags;
911}; 911};
912 912
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index b100bd50a0d7..55786a0efc41 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1142,7 +1142,7 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun,
1142 * privs required. */ 1142 * privs required. */
1143static int set_offload(struct net_device *dev, unsigned long arg) 1143static int set_offload(struct net_device *dev, unsigned long arg)
1144{ 1144{
1145 unsigned int old_features, features; 1145 u32 old_features, features;
1146 1146
1147 old_features = dev->features; 1147 old_features = dev->features;
1148 /* Unset features, set them as we chew on the arg. */ 1148 /* Unset features, set them as we chew on the arg. */