aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c9
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c13
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c13
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c13
-rw-r--r--drivers/net/ethernet/atheros/atlx/atlx.c13
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c6
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c5
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h5
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c11
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/cxgb2.c7
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/sge.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/sge.h2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c9
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c12
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c8
-rw-r--r--drivers/net/ethernet/davicom/dm9000.c5
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c2
-rw-r--r--drivers/net/ethernet/freescale/gianfar.h4
-rw-r--r--drivers/net/ethernet/freescale/gianfar_ethtool.c4
-rw-r--r--drivers/net/ethernet/ibm/ibmveth.c6
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c14
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c5
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c12
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c3
-rw-r--r--drivers/net/ethernet/intel/ixgb/ixgb_main.c8
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c6
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c3
-rw-r--r--drivers/net/ethernet/jme.c8
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c4
-rw-r--r--drivers/net/ethernet/marvell/sky2.c13
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c3
-rw-r--r--drivers/net/ethernet/myricom/myri10ge/myri10ge.c5
-rw-r--r--drivers/net/ethernet/neterion/s2io.c4
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-main.c9
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c11
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c5
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c6
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic.h5
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c9
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c10
-rw-r--r--drivers/net/ethernet/realtek/8139cp.c2
-rw-r--r--drivers/net/ethernet/realtek/r8169.c6
-rw-r--r--drivers/net/ethernet/sfc/efx.c2
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h2
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c3
-rw-r--r--drivers/net/tun.c7
-rw-r--r--drivers/net/usb/smsc75xx.c3
-rw-r--r--drivers/net/usb/smsc95xx.c3
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethtool.c4
-rw-r--r--drivers/net/vmxnet3/vmxnet3_int.h2
-rw-r--r--drivers/net/xen-netback/interface.c3
-rw-r--r--drivers/net/xen-netfront.c8
53 files changed, 198 insertions, 141 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b0c577256487..ac5337a04639 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1325,11 +1325,12 @@ static int bond_sethwaddr(struct net_device *bond_dev,
1325 return 0; 1325 return 0;
1326} 1326}
1327 1327
1328static u32 bond_fix_features(struct net_device *dev, u32 features) 1328static netdev_features_t bond_fix_features(struct net_device *dev,
1329 netdev_features_t features)
1329{ 1330{
1330 struct slave *slave; 1331 struct slave *slave;
1331 struct bonding *bond = netdev_priv(dev); 1332 struct bonding *bond = netdev_priv(dev);
1332 u32 mask; 1333 netdev_features_t mask;
1333 int i; 1334 int i;
1334 1335
1335 read_lock(&bond->lock); 1336 read_lock(&bond->lock);
@@ -1363,7 +1364,7 @@ static void bond_compute_features(struct bonding *bond)
1363{ 1364{
1364 struct slave *slave; 1365 struct slave *slave;
1365 struct net_device *bond_dev = bond->dev; 1366 struct net_device *bond_dev = bond->dev;
1366 u32 vlan_features = BOND_VLAN_FEATURES; 1367 netdev_features_t vlan_features = BOND_VLAN_FEATURES;
1367 unsigned short max_hard_header_len = ETH_HLEN; 1368 unsigned short max_hard_header_len = ETH_HLEN;
1368 int i; 1369 int i;
1369 1370
@@ -1897,7 +1898,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1897 struct bonding *bond = netdev_priv(bond_dev); 1898 struct bonding *bond = netdev_priv(bond_dev);
1898 struct slave *slave, *oldcurrent; 1899 struct slave *slave, *oldcurrent;
1899 struct sockaddr addr; 1900 struct sockaddr addr;
1900 u32 old_features = bond_dev->features; 1901 netdev_features_t old_features = bond_dev->features;
1901 1902
1902 /* slave is not a slave or master is not master of this slave */ 1903 /* slave is not a slave or master is not master of this slave */
1903 if (!(slave_dev->flags & IFF_SLAVE) || 1904 if (!(slave_dev->flags & IFF_SLAVE) ||
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 02c7ed8d9eca..b8591246eb4c 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -411,7 +411,7 @@ static void atl1c_set_multi(struct net_device *netdev)
411 } 411 }
412} 412}
413 413
414static void __atl1c_vlan_mode(u32 features, u32 *mac_ctrl_data) 414static void __atl1c_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data)
415{ 415{
416 if (features & NETIF_F_HW_VLAN_RX) { 416 if (features & NETIF_F_HW_VLAN_RX) {
417 /* enable VLAN tag insert/strip */ 417 /* enable VLAN tag insert/strip */
@@ -422,7 +422,8 @@ static void __atl1c_vlan_mode(u32 features, u32 *mac_ctrl_data)
422 } 422 }
423} 423}
424 424
425static void atl1c_vlan_mode(struct net_device *netdev, u32 features) 425static void atl1c_vlan_mode(struct net_device *netdev,
426 netdev_features_t features)
426{ 427{
427 struct atl1c_adapter *adapter = netdev_priv(netdev); 428 struct atl1c_adapter *adapter = netdev_priv(netdev);
428 struct pci_dev *pdev = adapter->pdev; 429 struct pci_dev *pdev = adapter->pdev;
@@ -482,7 +483,8 @@ static void atl1c_set_rxbufsize(struct atl1c_adapter *adapter,
482 roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE; 483 roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE;
483} 484}
484 485
485static u32 atl1c_fix_features(struct net_device *netdev, u32 features) 486static netdev_features_t atl1c_fix_features(struct net_device *netdev,
487 netdev_features_t features)
486{ 488{
487 /* 489 /*
488 * Since there is no support for separate rx/tx vlan accel 490 * Since there is no support for separate rx/tx vlan accel
@@ -499,9 +501,10 @@ static u32 atl1c_fix_features(struct net_device *netdev, u32 features)
499 return features; 501 return features;
500} 502}
501 503
502static int atl1c_set_features(struct net_device *netdev, u32 features) 504static int atl1c_set_features(struct net_device *netdev,
505 netdev_features_t features)
503{ 506{
504 u32 changed = netdev->features ^ features; 507 netdev_features_t changed = netdev->features ^ features;
505 508
506 if (changed & NETIF_F_HW_VLAN_RX) 509 if (changed & NETIF_F_HW_VLAN_RX)
507 atl1c_vlan_mode(netdev, features); 510 atl1c_vlan_mode(netdev, features);
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index 95483bcac1d0..c915c0873810 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -313,7 +313,7 @@ static void atl1e_set_multi(struct net_device *netdev)
313 } 313 }
314} 314}
315 315
316static void __atl1e_vlan_mode(u32 features, u32 *mac_ctrl_data) 316static void __atl1e_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data)
317{ 317{
318 if (features & NETIF_F_HW_VLAN_RX) { 318 if (features & NETIF_F_HW_VLAN_RX) {
319 /* enable VLAN tag insert/strip */ 319 /* enable VLAN tag insert/strip */
@@ -324,7 +324,8 @@ static void __atl1e_vlan_mode(u32 features, u32 *mac_ctrl_data)
324 } 324 }
325} 325}
326 326
327static void atl1e_vlan_mode(struct net_device *netdev, u32 features) 327static void atl1e_vlan_mode(struct net_device *netdev,
328 netdev_features_t features)
328{ 329{
329 struct atl1e_adapter *adapter = netdev_priv(netdev); 330 struct atl1e_adapter *adapter = netdev_priv(netdev);
330 u32 mac_ctrl_data = 0; 331 u32 mac_ctrl_data = 0;
@@ -370,7 +371,8 @@ static int atl1e_set_mac_addr(struct net_device *netdev, void *p)
370 return 0; 371 return 0;
371} 372}
372 373
373static u32 atl1e_fix_features(struct net_device *netdev, u32 features) 374static netdev_features_t atl1e_fix_features(struct net_device *netdev,
375 netdev_features_t features)
374{ 376{
375 /* 377 /*
376 * Since there is no support for separate rx/tx vlan accel 378 * Since there is no support for separate rx/tx vlan accel
@@ -384,9 +386,10 @@ static u32 atl1e_fix_features(struct net_device *netdev, u32 features)
384 return features; 386 return features;
385} 387}
386 388
387static int atl1e_set_features(struct net_device *netdev, u32 features) 389static int atl1e_set_features(struct net_device *netdev,
390 netdev_features_t features)
388{ 391{
389 u32 changed = netdev->features ^ features; 392 netdev_features_t changed = netdev->features ^ features;
390 393
391 if (changed & NETIF_F_HW_VLAN_RX) 394 if (changed & NETIF_F_HW_VLAN_RX)
392 atl1e_vlan_mode(netdev, features); 395 atl1e_vlan_mode(netdev, features);
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index db3f43046d32..071f4c858969 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -361,7 +361,7 @@ static inline void atl2_irq_disable(struct atl2_adapter *adapter)
361 synchronize_irq(adapter->pdev->irq); 361 synchronize_irq(adapter->pdev->irq);
362} 362}
363 363
364static void __atl2_vlan_mode(u32 features, u32 *ctrl) 364static void __atl2_vlan_mode(netdev_features_t features, u32 *ctrl)
365{ 365{
366 if (features & NETIF_F_HW_VLAN_RX) { 366 if (features & NETIF_F_HW_VLAN_RX) {
367 /* enable VLAN tag insert/strip */ 367 /* enable VLAN tag insert/strip */
@@ -372,7 +372,8 @@ static void __atl2_vlan_mode(u32 features, u32 *ctrl)
372 } 372 }
373} 373}
374 374
375static void atl2_vlan_mode(struct net_device *netdev, u32 features) 375static void atl2_vlan_mode(struct net_device *netdev,
376 netdev_features_t features)
376{ 377{
377 struct atl2_adapter *adapter = netdev_priv(netdev); 378 struct atl2_adapter *adapter = netdev_priv(netdev);
378 u32 ctrl; 379 u32 ctrl;
@@ -391,7 +392,8 @@ static void atl2_restore_vlan(struct atl2_adapter *adapter)
391 atl2_vlan_mode(adapter->netdev, adapter->netdev->features); 392 atl2_vlan_mode(adapter->netdev, adapter->netdev->features);
392} 393}
393 394
394static u32 atl2_fix_features(struct net_device *netdev, u32 features) 395static netdev_features_t atl2_fix_features(struct net_device *netdev,
396 netdev_features_t features)
395{ 397{
396 /* 398 /*
397 * Since there is no support for separate rx/tx vlan accel 399 * Since there is no support for separate rx/tx vlan accel
@@ -405,9 +407,10 @@ static u32 atl2_fix_features(struct net_device *netdev, u32 features)
405 return features; 407 return features;
406} 408}
407 409
408static int atl2_set_features(struct net_device *netdev, u32 features) 410static int atl2_set_features(struct net_device *netdev,
411 netdev_features_t features)
409{ 412{
410 u32 changed = netdev->features ^ features; 413 netdev_features_t changed = netdev->features ^ features;
411 414
412 if (changed & NETIF_F_HW_VLAN_RX) 415 if (changed & NETIF_F_HW_VLAN_RX)
413 atl2_vlan_mode(netdev, features); 416 atl2_vlan_mode(netdev, features);
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c
index aabcf4b5745a..8ff7411094d5 100644
--- a/drivers/net/ethernet/atheros/atlx/atlx.c
+++ b/drivers/net/ethernet/atheros/atlx/atlx.c
@@ -211,7 +211,7 @@ static void atlx_link_chg_task(struct work_struct *work)
211 spin_unlock_irqrestore(&adapter->lock, flags); 211 spin_unlock_irqrestore(&adapter->lock, flags);
212} 212}
213 213
214static void __atlx_vlan_mode(u32 features, u32 *ctrl) 214static void __atlx_vlan_mode(netdev_features_t features, u32 *ctrl)
215{ 215{
216 if (features & NETIF_F_HW_VLAN_RX) { 216 if (features & NETIF_F_HW_VLAN_RX) {
217 /* enable VLAN tag insert/strip */ 217 /* enable VLAN tag insert/strip */
@@ -222,7 +222,8 @@ static void __atlx_vlan_mode(u32 features, u32 *ctrl)
222 } 222 }
223} 223}
224 224
225static void atlx_vlan_mode(struct net_device *netdev, u32 features) 225static void atlx_vlan_mode(struct net_device *netdev,
226 netdev_features_t features)
226{ 227{
227 struct atlx_adapter *adapter = netdev_priv(netdev); 228 struct atlx_adapter *adapter = netdev_priv(netdev);
228 unsigned long flags; 229 unsigned long flags;
@@ -242,7 +243,8 @@ static void atlx_restore_vlan(struct atlx_adapter *adapter)
242 atlx_vlan_mode(adapter->netdev, adapter->netdev->features); 243 atlx_vlan_mode(adapter->netdev, adapter->netdev->features);
243} 244}
244 245
245static u32 atlx_fix_features(struct net_device *netdev, u32 features) 246static netdev_features_t atlx_fix_features(struct net_device *netdev,
247 netdev_features_t features)
246{ 248{
247 /* 249 /*
248 * Since there is no support for separate rx/tx vlan accel 250 * Since there is no support for separate rx/tx vlan accel
@@ -256,9 +258,10 @@ static u32 atlx_fix_features(struct net_device *netdev, u32 features)
256 return features; 258 return features;
257} 259}
258 260
259static int atlx_set_features(struct net_device *netdev, u32 features) 261static int atlx_set_features(struct net_device *netdev,
262 netdev_features_t features)
260{ 263{
261 u32 changed = netdev->features ^ features; 264 netdev_features_t changed = netdev->features ^ features;
262 265
263 if (changed & NETIF_F_HW_VLAN_RX) 266 if (changed & NETIF_F_HW_VLAN_RX)
264 atlx_vlan_mode(netdev, features); 267 atlx_vlan_mode(netdev, features);
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 32d1f92a2479..7203f37d2ef3 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -7571,8 +7571,8 @@ bnx2_set_phys_id(struct net_device *dev, enum ethtool_phys_id_state state)
7571 return 0; 7571 return 0;
7572} 7572}
7573 7573
7574static u32 7574static netdev_features_t
7575bnx2_fix_features(struct net_device *dev, u32 features) 7575bnx2_fix_features(struct net_device *dev, netdev_features_t features)
7576{ 7576{
7577 struct bnx2 *bp = netdev_priv(dev); 7577 struct bnx2 *bp = netdev_priv(dev);
7578 7578
@@ -7583,7 +7583,7 @@ bnx2_fix_features(struct net_device *dev, u32 features)
7583} 7583}
7584 7584
7585static int 7585static int
7586bnx2_set_features(struct net_device *dev, u32 features) 7586bnx2_set_features(struct net_device *dev, netdev_features_t features)
7587{ 7587{
7588 struct bnx2 *bp = netdev_priv(dev); 7588 struct bnx2 *bp = netdev_priv(dev);
7589 7589
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 0d60b9e633ad..8336c784db49 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -3398,7 +3398,8 @@ int bnx2x_change_mtu(struct net_device *dev, int new_mtu)
3398 return bnx2x_reload_if_running(dev); 3398 return bnx2x_reload_if_running(dev);
3399} 3399}
3400 3400
3401u32 bnx2x_fix_features(struct net_device *dev, u32 features) 3401netdev_features_t bnx2x_fix_features(struct net_device *dev,
3402 netdev_features_t features)
3402{ 3403{
3403 struct bnx2x *bp = netdev_priv(dev); 3404 struct bnx2x *bp = netdev_priv(dev);
3404 3405
@@ -3409,7 +3410,7 @@ u32 bnx2x_fix_features(struct net_device *dev, u32 features)
3409 return features; 3410 return features;
3410} 3411}
3411 3412
3412int bnx2x_set_features(struct net_device *dev, u32 features) 3413int bnx2x_set_features(struct net_device *dev, netdev_features_t features)
3413{ 3414{
3414 struct bnx2x *bp = netdev_priv(dev); 3415 struct bnx2x *bp = netdev_priv(dev);
3415 u32 flags = bp->flags; 3416 u32 flags = bp->flags;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 41eb17e7720f..80c5ed08e419 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -533,8 +533,9 @@ int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
533 */ 533 */
534int bnx2x_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type); 534int bnx2x_fcoe_get_wwn(struct net_device *dev, u64 *wwn, int type);
535#endif 535#endif
536u32 bnx2x_fix_features(struct net_device *dev, u32 features); 536netdev_features_t bnx2x_fix_features(struct net_device *dev,
537int bnx2x_set_features(struct net_device *dev, u32 features); 537 netdev_features_t features);
538int bnx2x_set_features(struct net_device *dev, netdev_features_t features);
538 539
539/** 540/**
540 * bnx2x_tx_timeout - tx timeout netdev callback 541 * bnx2x_tx_timeout - tx timeout netdev callback
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index cd3623416a4e..365cd47e2298 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6968,7 +6968,7 @@ static int tg3_phy_lpbk_set(struct tg3 *tp, u32 speed, bool extlpbk)
6968 return 0; 6968 return 0;
6969} 6969}
6970 6970
6971static void tg3_set_loopback(struct net_device *dev, u32 features) 6971static void tg3_set_loopback(struct net_device *dev, netdev_features_t features)
6972{ 6972{
6973 struct tg3 *tp = netdev_priv(dev); 6973 struct tg3 *tp = netdev_priv(dev);
6974 6974
@@ -6994,7 +6994,8 @@ static void tg3_set_loopback(struct net_device *dev, u32 features)
6994 } 6994 }
6995} 6995}
6996 6996
6997static u32 tg3_fix_features(struct net_device *dev, u32 features) 6997static netdev_features_t tg3_fix_features(struct net_device *dev,
6998 netdev_features_t features)
6998{ 6999{
6999 struct tg3 *tp = netdev_priv(dev); 7000 struct tg3 *tp = netdev_priv(dev);
7000 7001
@@ -7004,9 +7005,9 @@ static u32 tg3_fix_features(struct net_device *dev, u32 features)
7004 return features; 7005 return features;
7005} 7006}
7006 7007
7007static int tg3_set_features(struct net_device *dev, u32 features) 7008static int tg3_set_features(struct net_device *dev, netdev_features_t features)
7008{ 7009{
7009 u32 changed = dev->features ^ features; 7010 netdev_features_t changed = dev->features ^ features;
7010 7011
7011 if ((changed & NETIF_F_LOOPBACK) && netif_running(dev)) 7012 if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
7012 tg3_set_loopback(dev, features); 7013 tg3_set_loopback(dev, features);
@@ -15313,7 +15314,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
15313 u32 sndmbx, rcvmbx, intmbx; 15314 u32 sndmbx, rcvmbx, intmbx;
15314 char str[40]; 15315 char str[40];
15315 u64 dma_mask, persist_dma_mask; 15316 u64 dma_mask, persist_dma_mask;
15316 u32 features = 0; 15317 netdev_features_t features = 0;
15317 15318
15318 printk_once(KERN_INFO "%s\n", version); 15319 printk_once(KERN_INFO "%s\n", version);
15319 15320
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
index 26d0fd2d9c9d..a971796b2262 100644
--- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
@@ -850,7 +850,8 @@ static int t1_set_mac_addr(struct net_device *dev, void *p)
850 return 0; 850 return 0;
851} 851}
852 852
853static u32 t1_fix_features(struct net_device *dev, u32 features) 853static netdev_features_t t1_fix_features(struct net_device *dev,
854 netdev_features_t features)
854{ 855{
855 /* 856 /*
856 * Since there is no support for separate rx/tx vlan accel 857 * Since there is no support for separate rx/tx vlan accel
@@ -864,9 +865,9 @@ static u32 t1_fix_features(struct net_device *dev, u32 features)
864 return features; 865 return features;
865} 866}
866 867
867static int t1_set_features(struct net_device *dev, u32 features) 868static int t1_set_features(struct net_device *dev, netdev_features_t features)
868{ 869{
869 u32 changed = dev->features ^ features; 870 netdev_features_t changed = dev->features ^ features;
870 struct adapter *adapter = dev->ml_priv; 871 struct adapter *adapter = dev->ml_priv;
871 872
872 if (changed & NETIF_F_HW_VLAN_RX) 873 if (changed & NETIF_F_HW_VLAN_RX)
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index f9b602300040..47a84359d4e4 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -742,7 +742,7 @@ static inline void setup_ring_params(struct adapter *adapter, u64 addr,
742/* 742/*
743 * Enable/disable VLAN acceleration. 743 * Enable/disable VLAN acceleration.
744 */ 744 */
745void t1_vlan_mode(struct adapter *adapter, u32 features) 745void t1_vlan_mode(struct adapter *adapter, netdev_features_t features)
746{ 746{
747 struct sge *sge = adapter->sge; 747 struct sge *sge = adapter->sge;
748 748
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.h b/drivers/net/ethernet/chelsio/cxgb/sge.h
index e03980bcdd65..b9bf16b385f7 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.h
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.h
@@ -79,7 +79,7 @@ irqreturn_t t1_interrupt(int irq, void *cookie);
79int t1_poll(struct napi_struct *, int); 79int t1_poll(struct napi_struct *, int);
80 80
81netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev); 81netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev);
82void t1_vlan_mode(struct adapter *adapter, u32 features); 82void t1_vlan_mode(struct adapter *adapter, netdev_features_t features);
83void t1_sge_start(struct sge *); 83void t1_sge_start(struct sge *);
84void t1_sge_stop(struct sge *); 84void t1_sge_stop(struct sge *);
85int t1_sge_intr_error_handler(struct sge *); 85int t1_sge_intr_error_handler(struct sge *);
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 053560da6347..63ffaa7e255f 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -2532,7 +2532,7 @@ static void t3_synchronize_rx(struct adapter *adap, const struct port_info *p)
2532 } 2532 }
2533} 2533}
2534 2534
2535static void cxgb_vlan_mode(struct net_device *dev, u32 features) 2535static void cxgb_vlan_mode(struct net_device *dev, netdev_features_t features)
2536{ 2536{
2537 struct port_info *pi = netdev_priv(dev); 2537 struct port_info *pi = netdev_priv(dev);
2538 struct adapter *adapter = pi->adapter; 2538 struct adapter *adapter = pi->adapter;
@@ -2553,7 +2553,8 @@ static void cxgb_vlan_mode(struct net_device *dev, u32 features)
2553 t3_synchronize_rx(adapter, pi); 2553 t3_synchronize_rx(adapter, pi);
2554} 2554}
2555 2555
2556static u32 cxgb_fix_features(struct net_device *dev, u32 features) 2556static netdev_features_t cxgb_fix_features(struct net_device *dev,
2557 netdev_features_t features)
2557{ 2558{
2558 /* 2559 /*
2559 * Since there is no support for separate rx/tx vlan accel 2560 * Since there is no support for separate rx/tx vlan accel
@@ -2567,9 +2568,9 @@ static u32 cxgb_fix_features(struct net_device *dev, u32 features)
2567 return features; 2568 return features;
2568} 2569}
2569 2570
2570static int cxgb_set_features(struct net_device *dev, u32 features) 2571static int cxgb_set_features(struct net_device *dev, netdev_features_t features)
2571{ 2572{
2572 u32 changed = dev->features ^ features; 2573 netdev_features_t changed = dev->features ^ features;
2573 2574
2574 if (changed & NETIF_F_HW_VLAN_RX) 2575 if (changed & NETIF_F_HW_VLAN_RX)
2575 cxgb_vlan_mode(dev, features); 2576 cxgb_vlan_mode(dev, features);
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 48ffe11d9aa9..fd6d460ea475 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -1856,10 +1856,10 @@ static int set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
1856 return err; 1856 return err;
1857} 1857}
1858 1858
1859static int cxgb_set_features(struct net_device *dev, u32 features) 1859static int cxgb_set_features(struct net_device *dev, netdev_features_t features)
1860{ 1860{
1861 const struct port_info *pi = netdev_priv(dev); 1861 const struct port_info *pi = netdev_priv(dev);
1862 u32 changed = dev->features ^ features; 1862 netdev_features_t changed = dev->features ^ features;
1863 int err; 1863 int err;
1864 1864
1865 if (!(changed & NETIF_F_HW_VLAN_RX)) 1865 if (!(changed & NETIF_F_HW_VLAN_RX))
@@ -3538,7 +3538,7 @@ static int __devinit init_one(struct pci_dev *pdev,
3538{ 3538{
3539 int func, i, err; 3539 int func, i, err;
3540 struct port_info *pi; 3540 struct port_info *pi;
3541 unsigned int highdma = 0; 3541 bool highdma = false;
3542 struct adapter *adapter = NULL; 3542 struct adapter *adapter = NULL;
3543 3543
3544 printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION); 3544 printk_once(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
@@ -3564,7 +3564,7 @@ static int __devinit init_one(struct pci_dev *pdev,
3564 } 3564 }
3565 3565
3566 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 3566 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3567 highdma = NETIF_F_HIGHDMA; 3567 highdma = true;
3568 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 3568 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3569 if (err) { 3569 if (err) {
3570 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for " 3570 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for "
@@ -3638,7 +3638,9 @@ static int __devinit init_one(struct pci_dev *pdev,
3638 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | 3638 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
3639 NETIF_F_RXCSUM | NETIF_F_RXHASH | 3639 NETIF_F_RXCSUM | NETIF_F_RXHASH |
3640 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 3640 NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
3641 netdev->features |= netdev->hw_features | highdma; 3641 if (highdma)
3642 netdev->hw_features |= NETIF_F_HIGHDMA;
3643 netdev->features |= netdev->hw_features;
3642 netdev->vlan_features = netdev->features & VLAN_FEAT; 3644 netdev->vlan_features = netdev->features & VLAN_FEAT;
3643 3645
3644 netdev->priv_flags |= IFF_UNICAST_FLT; 3646 netdev->priv_flags |= IFF_UNICAST_FLT;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index ee81d8e798ea..8155cfecae19 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -1092,7 +1092,8 @@ static int cxgb4vf_change_mtu(struct net_device *dev, int new_mtu)
1092 return ret; 1092 return ret;
1093} 1093}
1094 1094
1095static u32 cxgb4vf_fix_features(struct net_device *dev, u32 features) 1095static netdev_features_t cxgb4vf_fix_features(struct net_device *dev,
1096 netdev_features_t features)
1096{ 1097{
1097 /* 1098 /*
1098 * Since there is no support for separate rx/tx vlan accel 1099 * Since there is no support for separate rx/tx vlan accel
@@ -1106,10 +1107,11 @@ static u32 cxgb4vf_fix_features(struct net_device *dev, u32 features)
1106 return features; 1107 return features;
1107} 1108}
1108 1109
1109static int cxgb4vf_set_features(struct net_device *dev, u32 features) 1110static int cxgb4vf_set_features(struct net_device *dev,
1111 netdev_features_t features)
1110{ 1112{
1111 struct port_info *pi = netdev_priv(dev); 1113 struct port_info *pi = netdev_priv(dev);
1112 u32 changed = dev->features ^ features; 1114 netdev_features_t changed = dev->features ^ features;
1113 1115
1114 if (changed & NETIF_F_HW_VLAN_RX) 1116 if (changed & NETIF_F_HW_VLAN_RX)
1115 t4vf_set_rxmode(pi->adapter, pi->viid, -1, -1, -1, -1, 1117 t4vf_set_rxmode(pi->adapter, pi->viid, -1, -1, -1, -1,
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 438f4580bf66..26be1dfc1577 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -474,10 +474,11 @@ static int dm9000_nway_reset(struct net_device *dev)
474 return mii_nway_restart(&dm->mii); 474 return mii_nway_restart(&dm->mii);
475} 475}
476 476
477static int dm9000_set_features(struct net_device *dev, u32 features) 477static int dm9000_set_features(struct net_device *dev,
478 netdev_features_t features)
478{ 479{
479 board_info_t *dm = to_dm9000_board(dev); 480 board_info_t *dm = to_dm9000_board(dev);
480 u32 changed = dev->features ^ features; 481 netdev_features_t changed = dev->features ^ features;
481 unsigned long flags; 482 unsigned long flags;
482 483
483 if (!(changed & NETIF_F_RXCSUM)) 484 if (!(changed & NETIF_F_RXCSUM))
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 83199fd0d62b..ff3e8b0f0da3 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2306,7 +2306,7 @@ void gfar_check_rx_parser_mode(struct gfar_private *priv)
2306} 2306}
2307 2307
2308/* Enables and disables VLAN insertion/extraction */ 2308/* Enables and disables VLAN insertion/extraction */
2309void gfar_vlan_mode(struct net_device *dev, u32 features) 2309void gfar_vlan_mode(struct net_device *dev, netdev_features_t features)
2310{ 2310{
2311 struct gfar_private *priv = netdev_priv(dev); 2311 struct gfar_private *priv = netdev_priv(dev);
2312 struct gfar __iomem *regs = NULL; 2312 struct gfar __iomem *regs = NULL;
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index 9aa43773e8e3..cda6cb2eb1d2 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -1179,9 +1179,9 @@ extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev,
1179extern void gfar_configure_coalescing(struct gfar_private *priv, 1179extern void gfar_configure_coalescing(struct gfar_private *priv,
1180 unsigned long tx_mask, unsigned long rx_mask); 1180 unsigned long tx_mask, unsigned long rx_mask);
1181void gfar_init_sysfs(struct net_device *dev); 1181void gfar_init_sysfs(struct net_device *dev);
1182int gfar_set_features(struct net_device *dev, u32 features); 1182int gfar_set_features(struct net_device *dev, netdev_features_t features);
1183extern void gfar_check_rx_parser_mode(struct gfar_private *priv); 1183extern void gfar_check_rx_parser_mode(struct gfar_private *priv);
1184extern void gfar_vlan_mode(struct net_device *dev, u32 features); 1184extern void gfar_vlan_mode(struct net_device *dev, netdev_features_t features);
1185 1185
1186extern const struct ethtool_ops gfar_ethtool_ops; 1186extern const struct ethtool_ops gfar_ethtool_ops;
1187 1187
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 212736bab6bb..1ea0eb9ee643 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -519,12 +519,12 @@ static int gfar_sringparam(struct net_device *dev, struct ethtool_ringparam *rva
519 return err; 519 return err;
520} 520}
521 521
522int gfar_set_features(struct net_device *dev, u32 features) 522int gfar_set_features(struct net_device *dev, netdev_features_t features)
523{ 523{
524 struct gfar_private *priv = netdev_priv(dev); 524 struct gfar_private *priv = netdev_priv(dev);
525 unsigned long flags; 525 unsigned long flags;
526 int err = 0, i = 0; 526 int err = 0, i = 0;
527 u32 changed = dev->features ^ features; 527 netdev_features_t changed = dev->features ^ features;
528 528
529 if (changed & (NETIF_F_HW_VLAN_TX|NETIF_F_HW_VLAN_RX)) 529 if (changed & (NETIF_F_HW_VLAN_TX|NETIF_F_HW_VLAN_RX))
530 gfar_vlan_mode(dev, features); 530 gfar_vlan_mode(dev, features);
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index b1cd41b9c61c..e877371680a9 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -735,7 +735,8 @@ static void netdev_get_drvinfo(struct net_device *dev,
735 sizeof(info->version) - 1); 735 sizeof(info->version) - 1);
736} 736}
737 737
738static u32 ibmveth_fix_features(struct net_device *dev, u32 features) 738static netdev_features_t ibmveth_fix_features(struct net_device *dev,
739 netdev_features_t features)
739{ 740{
740 /* 741 /*
741 * Since the ibmveth firmware interface does not have the 742 * Since the ibmveth firmware interface does not have the
@@ -838,7 +839,8 @@ static int ibmveth_set_csum_offload(struct net_device *dev, u32 data)
838 return rc1 ? rc1 : rc2; 839 return rc1 ? rc1 : rc2;
839} 840}
840 841
841static int ibmveth_set_features(struct net_device *dev, u32 features) 842static int ibmveth_set_features(struct net_device *dev,
843 netdev_features_t features)
842{ 844{
843 struct ibmveth_adapter *adapter = netdev_priv(dev); 845 struct ibmveth_adapter *adapter = netdev_priv(dev);
844 int rx_csum = !!(features & NETIF_F_RXCSUM); 846 int rx_csum = !!(features & NETIF_F_RXCSUM);
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index cf480b554622..82f4ef142259 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -167,7 +167,8 @@ static int e1000_82547_fifo_workaround(struct e1000_adapter *adapter,
167 struct sk_buff *skb); 167 struct sk_buff *skb);
168 168
169static bool e1000_vlan_used(struct e1000_adapter *adapter); 169static bool e1000_vlan_used(struct e1000_adapter *adapter);
170static void e1000_vlan_mode(struct net_device *netdev, u32 features); 170static void e1000_vlan_mode(struct net_device *netdev,
171 netdev_features_t features);
171static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid); 172static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid);
172static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); 173static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid);
173static void e1000_restore_vlan(struct e1000_adapter *adapter); 174static void e1000_restore_vlan(struct e1000_adapter *adapter);
@@ -806,7 +807,8 @@ static int e1000_is_need_ioport(struct pci_dev *pdev)
806 } 807 }
807} 808}
808 809
809static u32 e1000_fix_features(struct net_device *netdev, u32 features) 810static netdev_features_t e1000_fix_features(struct net_device *netdev,
811 netdev_features_t features)
810{ 812{
811 /* 813 /*
812 * Since there is no support for separate rx/tx vlan accel 814 * Since there is no support for separate rx/tx vlan accel
@@ -820,10 +822,11 @@ static u32 e1000_fix_features(struct net_device *netdev, u32 features)
820 return features; 822 return features;
821} 823}
822 824
823static int e1000_set_features(struct net_device *netdev, u32 features) 825static int e1000_set_features(struct net_device *netdev,
826 netdev_features_t features)
824{ 827{
825 struct e1000_adapter *adapter = netdev_priv(netdev); 828 struct e1000_adapter *adapter = netdev_priv(netdev);
826 u32 changed = features ^ netdev->features; 829 netdev_features_t changed = features ^ netdev->features;
827 830
828 if (changed & NETIF_F_HW_VLAN_RX) 831 if (changed & NETIF_F_HW_VLAN_RX)
829 e1000_vlan_mode(netdev, features); 832 e1000_vlan_mode(netdev, features);
@@ -4577,7 +4580,8 @@ static void e1000_vlan_filter_on_off(struct e1000_adapter *adapter,
4577 e1000_irq_enable(adapter); 4580 e1000_irq_enable(adapter);
4578} 4581}
4579 4582
4580static void e1000_vlan_mode(struct net_device *netdev, u32 features) 4583static void e1000_vlan_mode(struct net_device *netdev,
4584 netdev_features_t features)
4581{ 4585{
4582 struct e1000_adapter *adapter = netdev_priv(netdev); 4586 struct e1000_adapter *adapter = netdev_priv(netdev);
4583 struct e1000_hw *hw = &adapter->hw; 4587 struct e1000_hw *hw = &adapter->hw;
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a855db1ad249..d85fac626a80 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5859,10 +5859,11 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter)
5859 } 5859 }
5860} 5860}
5861 5861
5862static int e1000_set_features(struct net_device *netdev, u32 features) 5862static int e1000_set_features(struct net_device *netdev,
5863 netdev_features_t features)
5863{ 5864{
5864 struct e1000_adapter *adapter = netdev_priv(netdev); 5865 struct e1000_adapter *adapter = netdev_priv(netdev);
5865 u32 changed = features ^ netdev->features; 5866 netdev_features_t changed = features ^ netdev->features;
5866 5867
5867 if (changed & (NETIF_F_TSO | NETIF_F_TSO6)) 5868 if (changed & (NETIF_F_TSO | NETIF_F_TSO6))
5868 adapter->flags |= FLAG_TSO_FORCE; 5869 adapter->flags |= FLAG_TSO_FORCE;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index ced544499f1b..1fcba22c6403 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -145,7 +145,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *, int);
145static int igb_ioctl(struct net_device *, struct ifreq *, int cmd); 145static int igb_ioctl(struct net_device *, struct ifreq *, int cmd);
146static void igb_tx_timeout(struct net_device *); 146static void igb_tx_timeout(struct net_device *);
147static void igb_reset_task(struct work_struct *); 147static void igb_reset_task(struct work_struct *);
148static void igb_vlan_mode(struct net_device *netdev, u32 features); 148static void igb_vlan_mode(struct net_device *netdev, netdev_features_t features);
149static void igb_vlan_rx_add_vid(struct net_device *, u16); 149static void igb_vlan_rx_add_vid(struct net_device *, u16);
150static void igb_vlan_rx_kill_vid(struct net_device *, u16); 150static void igb_vlan_rx_kill_vid(struct net_device *, u16);
151static void igb_restore_vlan(struct igb_adapter *); 151static void igb_restore_vlan(struct igb_adapter *);
@@ -1742,7 +1742,8 @@ void igb_reset(struct igb_adapter *adapter)
1742 igb_get_phy_info(hw); 1742 igb_get_phy_info(hw);
1743} 1743}
1744 1744
1745static u32 igb_fix_features(struct net_device *netdev, u32 features) 1745static netdev_features_t igb_fix_features(struct net_device *netdev,
1746 netdev_features_t features)
1746{ 1747{
1747 /* 1748 /*
1748 * Since there is no support for separate rx/tx vlan accel 1749 * Since there is no support for separate rx/tx vlan accel
@@ -1756,9 +1757,10 @@ static u32 igb_fix_features(struct net_device *netdev, u32 features)
1756 return features; 1757 return features;
1757} 1758}
1758 1759
1759static int igb_set_features(struct net_device *netdev, u32 features) 1760static int igb_set_features(struct net_device *netdev,
1761 netdev_features_t features)
1760{ 1762{
1761 u32 changed = netdev->features ^ features; 1763 netdev_features_t changed = netdev->features ^ features;
1762 1764
1763 if (changed & NETIF_F_HW_VLAN_RX) 1765 if (changed & NETIF_F_HW_VLAN_RX)
1764 igb_vlan_mode(netdev, features); 1766 igb_vlan_mode(netdev, features);
@@ -6467,7 +6469,7 @@ s32 igb_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
6467 return 0; 6469 return 0;
6468} 6470}
6469 6471
6470static void igb_vlan_mode(struct net_device *netdev, u32 features) 6472static void igb_vlan_mode(struct net_device *netdev, netdev_features_t features)
6471{ 6473{
6472 struct igb_adapter *adapter = netdev_priv(netdev); 6474 struct igb_adapter *adapter = netdev_priv(netdev);
6473 struct e1000_hw *hw = &adapter->hw; 6475 struct e1000_hw *hw = &adapter->hw;
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index cca78124be31..2a05658938bd 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2532,7 +2532,8 @@ static void igbvf_print_device_info(struct igbvf_adapter *adapter)
2532 dev_info(&pdev->dev, "Address: %pM\n", netdev->dev_addr); 2532 dev_info(&pdev->dev, "Address: %pM\n", netdev->dev_addr);
2533} 2533}
2534 2534
2535static int igbvf_set_features(struct net_device *netdev, u32 features) 2535static int igbvf_set_features(struct net_device *netdev,
2536 netdev_features_t features)
2536{ 2537{
2537 struct igbvf_adapter *adapter = netdev_priv(netdev); 2538 struct igbvf_adapter *adapter = netdev_priv(netdev);
2538 2539
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index e21148f8b160..247cf9219e03 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -325,8 +325,8 @@ ixgb_reset(struct ixgb_adapter *adapter)
325 } 325 }
326} 326}
327 327
328static u32 328static netdev_features_t
329ixgb_fix_features(struct net_device *netdev, u32 features) 329ixgb_fix_features(struct net_device *netdev, netdev_features_t features)
330{ 330{
331 /* 331 /*
332 * Tx VLAN insertion does not work per HW design when Rx stripping is 332 * Tx VLAN insertion does not work per HW design when Rx stripping is
@@ -339,10 +339,10 @@ ixgb_fix_features(struct net_device *netdev, u32 features)
339} 339}
340 340
341static int 341static int
342ixgb_set_features(struct net_device *netdev, u32 features) 342ixgb_set_features(struct net_device *netdev, netdev_features_t features)
343{ 343{
344 struct ixgb_adapter *adapter = netdev_priv(netdev); 344 struct ixgb_adapter *adapter = netdev_priv(netdev);
345 u32 changed = features ^ netdev->features; 345 netdev_features_t changed = features ^ netdev->features;
346 346
347 if (!(changed & (NETIF_F_RXCSUM|NETIF_F_HW_VLAN_RX))) 347 if (!(changed & (NETIF_F_RXCSUM|NETIF_F_HW_VLAN_RX)))
348 return 0; 348 return 0;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 8ef92d1a6aa1..820fc040c241 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7174,7 +7174,8 @@ void ixgbe_do_reset(struct net_device *netdev)
7174 ixgbe_reset(adapter); 7174 ixgbe_reset(adapter);
7175} 7175}
7176 7176
7177static u32 ixgbe_fix_features(struct net_device *netdev, u32 data) 7177static netdev_features_t ixgbe_fix_features(struct net_device *netdev,
7178 netdev_features_t data)
7178{ 7179{
7179 struct ixgbe_adapter *adapter = netdev_priv(netdev); 7180 struct ixgbe_adapter *adapter = netdev_priv(netdev);
7180 7181
@@ -7204,7 +7205,8 @@ static u32 ixgbe_fix_features(struct net_device *netdev, u32 data)
7204 return data; 7205 return data;
7205} 7206}
7206 7207
7207static int ixgbe_set_features(struct net_device *netdev, u32 data) 7208static int ixgbe_set_features(struct net_device *netdev,
7209 netdev_features_t data)
7208{ 7210{
7209 struct ixgbe_adapter *adapter = netdev_priv(netdev); 7211 struct ixgbe_adapter *adapter = netdev_priv(netdev);
7210 bool need_reset = false; 7212 bool need_reset = false;
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 4c8e19951d57..3e6ec088c50d 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3249,7 +3249,8 @@ static struct rtnl_link_stats64 *ixgbevf_get_stats(struct net_device *netdev,
3249 return stats; 3249 return stats;
3250} 3250}
3251 3251
3252static int ixgbevf_set_features(struct net_device *netdev, u32 features) 3252static int ixgbevf_set_features(struct net_device *netdev,
3253 netdev_features_t features)
3253{ 3254{
3254 struct ixgbevf_adapter *adapter = netdev_priv(netdev); 3255 struct ixgbevf_adapter *adapter = netdev_priv(netdev);
3255 3256
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 7d88c7c28a7c..df3ab831b1ad 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -1917,7 +1917,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx)
1917 struct jme_ring *txring = &(jme->txring[0]); 1917 struct jme_ring *txring = &(jme->txring[0]);
1918 struct txdesc *txdesc = txring->desc, *ctxdesc; 1918 struct txdesc *txdesc = txring->desc, *ctxdesc;
1919 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; 1919 struct jme_buffer_info *txbi = txring->bufinf, *ctxbi;
1920 u8 hidma = jme->dev->features & NETIF_F_HIGHDMA; 1920 u8 hidma = !!(jme->dev->features & NETIF_F_HIGHDMA);
1921 int i, nr_frags = skb_shinfo(skb)->nr_frags; 1921 int i, nr_frags = skb_shinfo(skb)->nr_frags;
1922 int mask = jme->tx_ring_mask; 1922 int mask = jme->tx_ring_mask;
1923 const struct skb_frag_struct *frag; 1923 const struct skb_frag_struct *frag;
@@ -2620,8 +2620,8 @@ jme_set_msglevel(struct net_device *netdev, u32 value)
2620 jme->msg_enable = value; 2620 jme->msg_enable = value;
2621} 2621}
2622 2622
2623static u32 2623static netdev_features_t
2624jme_fix_features(struct net_device *netdev, u32 features) 2624jme_fix_features(struct net_device *netdev, netdev_features_t features)
2625{ 2625{
2626 if (netdev->mtu > 1900) 2626 if (netdev->mtu > 1900)
2627 features &= ~(NETIF_F_ALL_TSO | NETIF_F_ALL_CSUM); 2627 features &= ~(NETIF_F_ALL_TSO | NETIF_F_ALL_CSUM);
@@ -2629,7 +2629,7 @@ jme_fix_features(struct net_device *netdev, u32 features)
2629} 2629}
2630 2630
2631static int 2631static int
2632jme_set_features(struct net_device *netdev, u32 features) 2632jme_set_features(struct net_device *netdev, netdev_features_t features)
2633{ 2633{
2634 struct jme_adapter *jme = netdev_priv(netdev); 2634 struct jme_adapter *jme = netdev_priv(netdev);
2635 2635
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index f6b4304ca459..157c5c17fdcc 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -1579,10 +1579,10 @@ mv643xx_eth_set_ringparam(struct net_device *dev, struct ethtool_ringparam *er)
1579 1579
1580 1580
1581static int 1581static int
1582mv643xx_eth_set_features(struct net_device *dev, u32 features) 1582mv643xx_eth_set_features(struct net_device *dev, netdev_features_t features)
1583{ 1583{
1584 struct mv643xx_eth_private *mp = netdev_priv(dev); 1584 struct mv643xx_eth_private *mp = netdev_priv(dev);
1585 u32 rx_csum = features & NETIF_F_RXCSUM; 1585 int rx_csum = !!(features & NETIF_F_RXCSUM);
1586 1586
1587 wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000); 1587 wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000);
1588 1588
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 553d1a315b3a..c79dc5447658 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1275,7 +1275,7 @@ static void rx_set_checksum(struct sky2_port *sky2)
1275} 1275}
1276 1276
1277/* Enable/disable receive hash calculation (RSS) */ 1277/* Enable/disable receive hash calculation (RSS) */
1278static void rx_set_rss(struct net_device *dev, u32 features) 1278static void rx_set_rss(struct net_device *dev, netdev_features_t features)
1279{ 1279{
1280 struct sky2_port *sky2 = netdev_priv(dev); 1280 struct sky2_port *sky2 = netdev_priv(dev);
1281 struct sky2_hw *hw = sky2->hw; 1281 struct sky2_hw *hw = sky2->hw;
@@ -1396,7 +1396,7 @@ static int sky2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1396 1396
1397#define SKY2_VLAN_OFFLOADS (NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO) 1397#define SKY2_VLAN_OFFLOADS (NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO)
1398 1398
1399static void sky2_vlan_mode(struct net_device *dev, u32 features) 1399static void sky2_vlan_mode(struct net_device *dev, netdev_features_t features)
1400{ 1400{
1401 struct sky2_port *sky2 = netdev_priv(dev); 1401 struct sky2_port *sky2 = netdev_priv(dev);
1402 struct sky2_hw *hw = sky2->hw; 1402 struct sky2_hw *hw = sky2->hw;
@@ -4282,7 +4282,8 @@ static int sky2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom
4282 return sky2_vpd_write(sky2->hw, cap, data, eeprom->offset, eeprom->len); 4282 return sky2_vpd_write(sky2->hw, cap, data, eeprom->offset, eeprom->len);
4283} 4283}
4284 4284
4285static u32 sky2_fix_features(struct net_device *dev, u32 features) 4285static netdev_features_t sky2_fix_features(struct net_device *dev,
4286 netdev_features_t features)
4286{ 4287{
4287 const struct sky2_port *sky2 = netdev_priv(dev); 4288 const struct sky2_port *sky2 = netdev_priv(dev);
4288 const struct sky2_hw *hw = sky2->hw; 4289 const struct sky2_hw *hw = sky2->hw;
@@ -4306,13 +4307,13 @@ static u32 sky2_fix_features(struct net_device *dev, u32 features)
4306 return features; 4307 return features;
4307} 4308}
4308 4309
4309static int sky2_set_features(struct net_device *dev, u32 features) 4310static int sky2_set_features(struct net_device *dev, netdev_features_t features)
4310{ 4311{
4311 struct sky2_port *sky2 = netdev_priv(dev); 4312 struct sky2_port *sky2 = netdev_priv(dev);
4312 u32 changed = dev->features ^ features; 4313 netdev_features_t changed = dev->features ^ features;
4313 4314
4314 if (changed & NETIF_F_RXCSUM) { 4315 if (changed & NETIF_F_RXCSUM) {
4315 u32 on = features & NETIF_F_RXCSUM; 4316 int on = !!(features & NETIF_F_RXCSUM);
4316 sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR), 4317 sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR),
4317 on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); 4318 on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM);
4318 } 4319 }
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 3b67fe65404a..8d846bd09711 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6588,7 +6588,8 @@ static void netdev_get_ethtool_stats(struct net_device *dev,
6588 * 6588 *
6589 * Return 0 if successful; otherwise an error code. 6589 * Return 0 if successful; otherwise an error code.
6590 */ 6590 */
6591static int netdev_set_features(struct net_device *dev, u32 features) 6591static int netdev_set_features(struct net_device *dev,
6592 netdev_features_t features)
6592{ 6593{
6593 struct dev_priv *priv = netdev_priv(dev); 6594 struct dev_priv *priv = netdev_priv(dev);
6594 struct dev_info *hw_priv = priv->adapter; 6595 struct dev_info *hw_priv = priv->adapter;
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 0778edcf7b9a..20b72ecb020a 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -1491,7 +1491,7 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget)
1491 * access to avoid theoretical race condition with functions that 1491 * access to avoid theoretical race condition with functions that
1492 * change NETIF_F_LRO flag at runtime. 1492 * change NETIF_F_LRO flag at runtime.
1493 */ 1493 */
1494 bool lro_enabled = ACCESS_ONCE(mgp->dev->features) & NETIF_F_LRO; 1494 bool lro_enabled = !!(ACCESS_ONCE(mgp->dev->features) & NETIF_F_LRO);
1495 1495
1496 while (rx_done->entry[idx].length != 0 && work_done < budget) { 1496 while (rx_done->entry[idx].length != 0 && work_done < budget) {
1497 length = ntohs(rx_done->entry[idx].length); 1497 length = ntohs(rx_done->entry[idx].length);
@@ -3149,7 +3149,8 @@ static int myri10ge_set_mac_address(struct net_device *dev, void *addr)
3149 return 0; 3149 return 0;
3150} 3150}
3151 3151
3152static u32 myri10ge_fix_features(struct net_device *dev, u32 features) 3152static netdev_features_t myri10ge_fix_features(struct net_device *dev,
3153 netdev_features_t features)
3153{ 3154{
3154 if (!(features & NETIF_F_RXCSUM)) 3155 if (!(features & NETIF_F_RXCSUM))
3155 features &= ~NETIF_F_LRO; 3156 features &= ~NETIF_F_LRO;
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index e6c90a5ac5d4..76ae47627200 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -6616,10 +6616,10 @@ static void s2io_ethtool_get_strings(struct net_device *dev,
6616 } 6616 }
6617} 6617}
6618 6618
6619static int s2io_set_features(struct net_device *dev, u32 features) 6619static int s2io_set_features(struct net_device *dev, netdev_features_t features)
6620{ 6620{
6621 struct s2io_nic *sp = netdev_priv(dev); 6621 struct s2io_nic *sp = netdev_priv(dev);
6622 u32 changed = (features ^ dev->features) & NETIF_F_LRO; 6622 netdev_features_t changed = (features ^ dev->features) & NETIF_F_LRO;
6623 6623
6624 if (changed && netif_running(dev)) { 6624 if (changed && netif_running(dev)) {
6625 int rc; 6625 int rc;
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index a83197d757c1..16d4d8e913c3 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -2662,9 +2662,10 @@ static void vxge_poll_vp_lockup(unsigned long data)
2662 mod_timer(&vdev->vp_lockup_timer, jiffies + HZ / 1000); 2662 mod_timer(&vdev->vp_lockup_timer, jiffies + HZ / 1000);
2663} 2663}
2664 2664
2665static u32 vxge_fix_features(struct net_device *dev, u32 features) 2665static netdev_features_t vxge_fix_features(struct net_device *dev,
2666 netdev_features_t features)
2666{ 2667{
2667 u32 changed = dev->features ^ features; 2668 netdev_features_t changed = dev->features ^ features;
2668 2669
2669 /* Enabling RTH requires some of the logic in vxge_device_register and a 2670 /* Enabling RTH requires some of the logic in vxge_device_register and a
2670 * vpath reset. Due to these restrictions, only allow modification 2671 * vpath reset. Due to these restrictions, only allow modification
@@ -2676,10 +2677,10 @@ static u32 vxge_fix_features(struct net_device *dev, u32 features)
2676 return features; 2677 return features;
2677} 2678}
2678 2679
2679static int vxge_set_features(struct net_device *dev, u32 features) 2680static int vxge_set_features(struct net_device *dev, netdev_features_t features)
2680{ 2681{
2681 struct vxgedev *vdev = netdev_priv(dev); 2682 struct vxgedev *vdev = netdev_priv(dev);
2682 u32 changed = dev->features ^ features; 2683 netdev_features_t changed = dev->features ^ features;
2683 2684
2684 if (!(changed & NETIF_F_RXHASH)) 2685 if (!(changed & NETIF_F_RXHASH))
2685 return 0; 2686 return 0;
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index e8a5ae356407..01bb7bfe14e6 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -4536,7 +4536,7 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam*
4536 return 0; 4536 return 0;
4537} 4537}
4538 4538
4539static int nv_set_loopback(struct net_device *dev, u32 features) 4539static int nv_set_loopback(struct net_device *dev, netdev_features_t features)
4540{ 4540{
4541 struct fe_priv *np = netdev_priv(dev); 4541 struct fe_priv *np = netdev_priv(dev);
4542 unsigned long flags; 4542 unsigned long flags;
@@ -4591,7 +4591,8 @@ static int nv_set_loopback(struct net_device *dev, u32 features)
4591 return retval; 4591 return retval;
4592} 4592}
4593 4593
4594static u32 nv_fix_features(struct net_device *dev, u32 features) 4594static netdev_features_t nv_fix_features(struct net_device *dev,
4595 netdev_features_t features)
4595{ 4596{
4596 /* vlan is dependent on rx checksum offload */ 4597 /* vlan is dependent on rx checksum offload */
4597 if (features & (NETIF_F_HW_VLAN_TX|NETIF_F_HW_VLAN_RX)) 4598 if (features & (NETIF_F_HW_VLAN_TX|NETIF_F_HW_VLAN_RX))
@@ -4600,7 +4601,7 @@ static u32 nv_fix_features(struct net_device *dev, u32 features)
4600 return features; 4601 return features;
4601} 4602}
4602 4603
4603static void nv_vlan_mode(struct net_device *dev, u32 features) 4604static void nv_vlan_mode(struct net_device *dev, netdev_features_t features)
4604{ 4605{
4605 struct fe_priv *np = get_nvpriv(dev); 4606 struct fe_priv *np = get_nvpriv(dev);
4606 4607
@@ -4621,11 +4622,11 @@ static void nv_vlan_mode(struct net_device *dev, u32 features)
4621 spin_unlock_irq(&np->lock); 4622 spin_unlock_irq(&np->lock);
4622} 4623}
4623 4624
4624static int nv_set_features(struct net_device *dev, u32 features) 4625static int nv_set_features(struct net_device *dev, netdev_features_t features)
4625{ 4626{
4626 struct fe_priv *np = netdev_priv(dev); 4627 struct fe_priv *np = netdev_priv(dev);
4627 u8 __iomem *base = get_hwbase(dev); 4628 u8 __iomem *base = get_hwbase(dev);
4628 u32 changed = dev->features ^ features; 4629 netdev_features_t changed = dev->features ^ features;
4629 int retval; 4630 int retval;
4630 4631
4631 if ((changed & NETIF_F_LOOPBACK) && netif_running(dev)) { 4632 if ((changed & NETIF_F_LOOPBACK) && netif_running(dev)) {
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 48406ca382f1..964e9c0948bc 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2109,10 +2109,11 @@ static int pch_gbe_change_mtu(struct net_device *netdev, int new_mtu)
2109 * Returns 2109 * Returns
2110 * 0: HW state updated successfully 2110 * 0: HW state updated successfully
2111 */ 2111 */
2112static int pch_gbe_set_features(struct net_device *netdev, u32 features) 2112static int pch_gbe_set_features(struct net_device *netdev,
2113 netdev_features_t features)
2113{ 2114{
2114 struct pch_gbe_adapter *adapter = netdev_priv(netdev); 2115 struct pch_gbe_adapter *adapter = netdev_priv(netdev);
2115 u32 changed = features ^ netdev->features; 2116 netdev_features_t changed = features ^ netdev->features;
2116 2117
2117 if (!(changed & NETIF_F_RXCSUM)) 2118 if (!(changed & NETIF_F_RXCSUM))
2118 return 0; 2119 return 0;
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 8cf3173ba488..7dd9a4b107e6 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -544,7 +544,8 @@ static void netxen_set_multicast_list(struct net_device *dev)
544 adapter->set_multi(dev); 544 adapter->set_multi(dev);
545} 545}
546 546
547static u32 netxen_fix_features(struct net_device *dev, u32 features) 547static netdev_features_t netxen_fix_features(struct net_device *dev,
548 netdev_features_t features)
548{ 549{
549 if (!(features & NETIF_F_RXCSUM)) { 550 if (!(features & NETIF_F_RXCSUM)) {
550 netdev_info(dev, "disabling LRO as RXCSUM is off\n"); 551 netdev_info(dev, "disabling LRO as RXCSUM is off\n");
@@ -555,7 +556,8 @@ static u32 netxen_fix_features(struct net_device *dev, u32 features)
555 return features; 556 return features;
556} 557}
557 558
558static int netxen_set_features(struct net_device *dev, u32 features) 559static int netxen_set_features(struct net_device *dev,
560 netdev_features_t features)
559{ 561{
560 struct netxen_adapter *adapter = netdev_priv(dev); 562 struct netxen_adapter *adapter = netdev_priv(dev);
561 int hw_lro; 563 int hw_lro;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 7ed53dbb8646..60976fc4ccc6 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -1466,8 +1466,9 @@ void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup);
1466 1466
1467int qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu); 1467int qlcnic_fw_cmd_set_mtu(struct qlcnic_adapter *adapter, int mtu);
1468int qlcnic_change_mtu(struct net_device *netdev, int new_mtu); 1468int qlcnic_change_mtu(struct net_device *netdev, int new_mtu);
1469u32 qlcnic_fix_features(struct net_device *netdev, u32 features); 1469netdev_features_t qlcnic_fix_features(struct net_device *netdev,
1470int qlcnic_set_features(struct net_device *netdev, u32 features); 1470 netdev_features_t features);
1471int qlcnic_set_features(struct net_device *netdev, netdev_features_t features);
1471int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable); 1472int qlcnic_config_hw_lro(struct qlcnic_adapter *adapter, int enable);
1472int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable); 1473int qlcnic_config_bridged_mode(struct qlcnic_adapter *adapter, u32 enable);
1473int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter); 1474int qlcnic_send_lro_cleanup(struct qlcnic_adapter *adapter);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index bcb81e47543a..b528e52a8ee1 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -817,12 +817,13 @@ int qlcnic_change_mtu(struct net_device *netdev, int mtu)
817} 817}
818 818
819 819
820u32 qlcnic_fix_features(struct net_device *netdev, u32 features) 820netdev_features_t qlcnic_fix_features(struct net_device *netdev,
821 netdev_features_t features)
821{ 822{
822 struct qlcnic_adapter *adapter = netdev_priv(netdev); 823 struct qlcnic_adapter *adapter = netdev_priv(netdev);
823 824
824 if ((adapter->flags & QLCNIC_ESWITCH_ENABLED)) { 825 if ((adapter->flags & QLCNIC_ESWITCH_ENABLED)) {
825 u32 changed = features ^ netdev->features; 826 netdev_features_t changed = features ^ netdev->features;
826 features ^= changed & (NETIF_F_ALL_CSUM | NETIF_F_RXCSUM); 827 features ^= changed & (NETIF_F_ALL_CSUM | NETIF_F_RXCSUM);
827 } 828 }
828 829
@@ -833,10 +834,10 @@ u32 qlcnic_fix_features(struct net_device *netdev, u32 features)
833} 834}
834 835
835 836
836int qlcnic_set_features(struct net_device *netdev, u32 features) 837int qlcnic_set_features(struct net_device *netdev, netdev_features_t features)
837{ 838{
838 struct qlcnic_adapter *adapter = netdev_priv(netdev); 839 struct qlcnic_adapter *adapter = netdev_priv(netdev);
839 u32 changed = netdev->features ^ features; 840 netdev_features_t changed = netdev->features ^ features;
840 int hw_lro = (features & NETIF_F_LRO) ? QLCNIC_LRO_ENABLED : 0; 841 int hw_lro = (features & NETIF_F_LRO) ? QLCNIC_LRO_ENABLED : 0;
841 842
842 if (!(changed & NETIF_F_LRO)) 843 if (!(changed & NETIF_F_LRO))
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 0bd163828e33..823f845ddc04 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -792,7 +792,7 @@ qlcnic_set_netdev_features(struct qlcnic_adapter *adapter,
792 struct qlcnic_esw_func_cfg *esw_cfg) 792 struct qlcnic_esw_func_cfg *esw_cfg)
793{ 793{
794 struct net_device *netdev = adapter->netdev; 794 struct net_device *netdev = adapter->netdev;
795 unsigned long features, vlan_features; 795 netdev_features_t features, vlan_features;
796 796
797 features = (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | 797 features = (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM |
798 NETIF_F_IPV6_CSUM | NETIF_F_GRO); 798 NETIF_F_IPV6_CSUM | NETIF_F_GRO);
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index c92afcd912e2..1ce4e08037b8 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2307,7 +2307,7 @@ static int ql_napi_poll_msix(struct napi_struct *napi, int budget)
2307 return work_done; 2307 return work_done;
2308} 2308}
2309 2309
2310static void qlge_vlan_mode(struct net_device *ndev, u32 features) 2310static void qlge_vlan_mode(struct net_device *ndev, netdev_features_t features)
2311{ 2311{
2312 struct ql_adapter *qdev = netdev_priv(ndev); 2312 struct ql_adapter *qdev = netdev_priv(ndev);
2313 2313
@@ -2323,7 +2323,8 @@ static void qlge_vlan_mode(struct net_device *ndev, u32 features)
2323 } 2323 }
2324} 2324}
2325 2325
2326static u32 qlge_fix_features(struct net_device *ndev, u32 features) 2326static netdev_features_t qlge_fix_features(struct net_device *ndev,
2327 netdev_features_t features)
2327{ 2328{
2328 /* 2329 /*
2329 * Since there is no support for separate rx/tx vlan accel 2330 * Since there is no support for separate rx/tx vlan accel
@@ -2337,9 +2338,10 @@ static u32 qlge_fix_features(struct net_device *ndev, u32 features)
2337 return features; 2338 return features;
2338} 2339}
2339 2340
2340static int qlge_set_features(struct net_device *ndev, u32 features) 2341static int qlge_set_features(struct net_device *ndev,
2342 netdev_features_t features)
2341{ 2343{
2342 u32 changed = ndev->features ^ features; 2344 netdev_features_t changed = ndev->features ^ features;
2343 2345
2344 if (changed & NETIF_F_HW_VLAN_RX) 2346 if (changed & NETIF_F_HW_VLAN_RX)
2345 qlge_vlan_mode(ndev, features); 2347 qlge_vlan_mode(ndev, features);
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index 6cfc5dc0f76e..87cff10f7be7 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1392,7 +1392,7 @@ static void cp_set_msglevel(struct net_device *dev, u32 value)
1392 cp->msg_enable = value; 1392 cp->msg_enable = value;
1393} 1393}
1394 1394
1395static int cp_set_features(struct net_device *dev, u32 features) 1395static int cp_set_features(struct net_device *dev, netdev_features_t features)
1396{ 1396{
1397 struct cp_private *cp = netdev_priv(dev); 1397 struct cp_private *cp = netdev_priv(dev);
1398 unsigned long flags; 1398 unsigned long flags;
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index cdf66d68d849..2dfb0c0ea01b 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1553,7 +1553,8 @@ static int rtl8169_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1553 return ret; 1553 return ret;
1554} 1554}
1555 1555
1556static u32 rtl8169_fix_features(struct net_device *dev, u32 features) 1556static netdev_features_t rtl8169_fix_features(struct net_device *dev,
1557 netdev_features_t features)
1557{ 1558{
1558 struct rtl8169_private *tp = netdev_priv(dev); 1559 struct rtl8169_private *tp = netdev_priv(dev);
1559 1560
@@ -1567,7 +1568,8 @@ static u32 rtl8169_fix_features(struct net_device *dev, u32 features)
1567 return features; 1568 return features;
1568} 1569}
1569 1570
1570static int rtl8169_set_features(struct net_device *dev, u32 features) 1571static int rtl8169_set_features(struct net_device *dev,
1572 netdev_features_t features)
1571{ 1573{
1572 struct rtl8169_private *tp = netdev_priv(dev); 1574 struct rtl8169_private *tp = netdev_priv(dev);
1573 void __iomem *ioaddr = tp->mmio_addr; 1575 void __iomem *ioaddr = tp->mmio_addr;
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index d5731f1fe6d6..14e134d3b4d7 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1900,7 +1900,7 @@ static void efx_set_multicast_list(struct net_device *net_dev)
1900 /* Otherwise efx_start_port() will do this */ 1900 /* Otherwise efx_start_port() will do this */
1901} 1901}
1902 1902
1903static int efx_set_features(struct net_device *net_dev, u32 data) 1903static int efx_set_features(struct net_device *net_dev, netdev_features_t data)
1904{ 1904{
1905 struct efx_nic *efx = netdev_priv(net_dev); 1905 struct efx_nic *efx = netdev_priv(net_dev);
1906 1906
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index b8e251a1ee48..c49502bab6a3 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -908,7 +908,7 @@ struct efx_nic_type {
908 unsigned int phys_addr_channels; 908 unsigned int phys_addr_channels;
909 unsigned int tx_dc_base; 909 unsigned int tx_dc_base;
910 unsigned int rx_dc_base; 910 unsigned int rx_dc_base;
911 u32 offload_features; 911 netdev_features_t offload_features;
912}; 912};
913 913
914/************************************************************************** 914/**************************************************************************
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 20546bbbb8db..643ca97a2d9a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1419,7 +1419,8 @@ static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
1419 return 0; 1419 return 0;
1420} 1420}
1421 1421
1422static u32 stmmac_fix_features(struct net_device *dev, u32 features) 1422static netdev_features_t stmmac_fix_features(struct net_device *dev,
1423 netdev_features_t features)
1423{ 1424{
1424 struct stmmac_priv *priv = netdev_priv(dev); 1425 struct stmmac_priv *priv = netdev_priv(dev);
1425 1426
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 8592523b0bb5..3dd13d606d00 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -123,7 +123,7 @@ struct tun_struct {
123 gid_t group; 123 gid_t group;
124 124
125 struct net_device *dev; 125 struct net_device *dev;
126 u32 set_features; 126 netdev_features_t set_features;
127#define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \ 127#define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \
128 NETIF_F_TSO6|NETIF_F_UFO) 128 NETIF_F_TSO6|NETIF_F_UFO)
129 struct fasync_struct *fasync; 129 struct fasync_struct *fasync;
@@ -454,7 +454,8 @@ tun_net_change_mtu(struct net_device *dev, int new_mtu)
454 return 0; 454 return 0;
455} 455}
456 456
457static u32 tun_net_fix_features(struct net_device *dev, u32 features) 457static netdev_features_t tun_net_fix_features(struct net_device *dev,
458 netdev_features_t features)
458{ 459{
459 struct tun_struct *tun = netdev_priv(dev); 460 struct tun_struct *tun = netdev_priv(dev);
460 461
@@ -1196,7 +1197,7 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun,
1196 * privs required. */ 1197 * privs required. */
1197static int set_offload(struct tun_struct *tun, unsigned long arg) 1198static int set_offload(struct tun_struct *tun, unsigned long arg)
1198{ 1199{
1199 u32 features = 0; 1200 netdev_features_t features = 0;
1200 1201
1201 if (arg & TUN_F_CSUM) { 1202 if (arg & TUN_F_CSUM) {
1202 features |= NETIF_F_HW_CSUM; 1203 features |= NETIF_F_HW_CSUM;
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index a5b9b12ef268..7d62c39f65cf 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -728,7 +728,8 @@ static int smsc75xx_change_mtu(struct net_device *netdev, int new_mtu)
728} 728}
729 729
730/* Enable or disable Rx checksum offload engine */ 730/* Enable or disable Rx checksum offload engine */
731static int smsc75xx_set_features(struct net_device *netdev, u32 features) 731static int smsc75xx_set_features(struct net_device *netdev,
732 netdev_features_t features)
732{ 733{
733 struct usbnet *dev = netdev_priv(netdev); 734 struct usbnet *dev = netdev_priv(netdev);
734 struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0]); 735 struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0]);
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index eff67678c5a6..56f3894d701a 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -516,7 +516,8 @@ static void smsc95xx_status(struct usbnet *dev, struct urb *urb)
516} 516}
517 517
518/* Enable or disable Tx & Rx checksum offload engines */ 518/* Enable or disable Tx & Rx checksum offload engines */
519static int smsc95xx_set_features(struct net_device *netdev, u32 features) 519static int smsc95xx_set_features(struct net_device *netdev,
520 netdev_features_t features)
520{ 521{
521 struct usbnet *dev = netdev_priv(netdev); 522 struct usbnet *dev = netdev_priv(netdev);
522 u32 read_buf; 523 u32 read_buf;
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index e662cbc8bfbd..77f723415c9c 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -262,11 +262,11 @@ vmxnet3_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
262 } 262 }
263} 263}
264 264
265int vmxnet3_set_features(struct net_device *netdev, u32 features) 265int vmxnet3_set_features(struct net_device *netdev, netdev_features_t features)
266{ 266{
267 struct vmxnet3_adapter *adapter = netdev_priv(netdev); 267 struct vmxnet3_adapter *adapter = netdev_priv(netdev);
268 unsigned long flags; 268 unsigned long flags;
269 u32 changed = features ^ netdev->features; 269 netdev_features_t changed = features ^ netdev->features;
270 270
271 if (changed & (NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_HW_VLAN_RX)) { 271 if (changed & (NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_HW_VLAN_RX)) {
272 if (features & NETIF_F_RXCSUM) 272 if (features & NETIF_F_RXCSUM)
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index b18eac1dccaa..ed54797db191 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -401,7 +401,7 @@ void
401vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter); 401vmxnet3_rq_destroy_all(struct vmxnet3_adapter *adapter);
402 402
403int 403int
404vmxnet3_set_features(struct net_device *netdev, u32 features); 404vmxnet3_set_features(struct net_device *netdev, netdev_features_t features);
405 405
406int 406int
407vmxnet3_create_queues(struct vmxnet3_adapter *adapter, 407vmxnet3_create_queues(struct vmxnet3_adapter *adapter,
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 182562952c79..0b5c18feb303 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -165,7 +165,8 @@ static int xenvif_change_mtu(struct net_device *dev, int mtu)
165 return 0; 165 return 0;
166} 166}
167 167
168static u32 xenvif_fix_features(struct net_device *dev, u32 features) 168static netdev_features_t xenvif_fix_features(struct net_device *dev,
169 netdev_features_t features)
169{ 170{
170 struct xenvif *vif = netdev_priv(dev); 171 struct xenvif *vif = netdev_priv(dev);
171 172
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 226faab23603..a6e379fbf377 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -203,7 +203,7 @@ static void xennet_sysfs_delif(struct net_device *netdev);
203 203
204static int xennet_can_sg(struct net_device *dev) 204static int xennet_can_sg(struct net_device *dev)
205{ 205{
206 return dev->features & NETIF_F_SG; 206 return !!(dev->features & NETIF_F_SG);
207} 207}
208 208
209 209
@@ -1190,7 +1190,8 @@ static void xennet_uninit(struct net_device *dev)
1190 gnttab_free_grant_references(np->gref_rx_head); 1190 gnttab_free_grant_references(np->gref_rx_head);
1191} 1191}
1192 1192
1193static u32 xennet_fix_features(struct net_device *dev, u32 features) 1193static netdev_features_t xennet_fix_features(struct net_device *dev,
1194 netdev_features_t features)
1194{ 1195{
1195 struct netfront_info *np = netdev_priv(dev); 1196 struct netfront_info *np = netdev_priv(dev);
1196 int val; 1197 int val;
@@ -1216,7 +1217,8 @@ static u32 xennet_fix_features(struct net_device *dev, u32 features)
1216 return features; 1217 return features;
1217} 1218}
1218 1219
1219static int xennet_set_features(struct net_device *dev, u32 features) 1220static int xennet_set_features(struct net_device *dev,
1221 netdev_features_t features)
1220{ 1222{
1221 if (!(features & NETIF_F_SG) && dev->mtu > ETH_DATA_LEN) { 1223 if (!(features & NETIF_F_SG) && dev->mtu > ETH_DATA_LEN) {
1222 netdev_info(dev, "Reducing MTU because no SG offload"); 1224 netdev_info(dev, "Reducing MTU because no SG offload");