Skip to content

Commit e9403c8

Browse files
osctobedavem330
authored andcommitted
net: convert sunhme/sungem network drivers to hw_features
Side effects: - TX offloads (HW csum, scatter-gather) can be toggled now - RX checksum is reported correctly now (it's always active) Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a2c725f commit e9403c8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/net/sungem.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3146,7 +3146,8 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
31463146
gp->phy_mii.def ? gp->phy_mii.def->name : "no");
31473147

31483148
/* GEM can do it all... */
3149-
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_LLTX;
3149+
dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
3150+
dev->features |= dev->hw_features | NETIF_F_RXCSUM | NETIF_F_LLTX;
31503151
if (pci_using_dac)
31513152
dev->features |= NETIF_F_HIGHDMA;
31523153

drivers/net/sunhme.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,7 +2788,8 @@ static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int i
27882788
dev->ethtool_ops = &hme_ethtool_ops;
27892789

27902790
/* Happy Meal can do it all... */
2791-
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
2791+
dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
2792+
dev->features |= dev->hw_features | NETIF_F_RXCSUM;
27922793

27932794
dev->irq = op->archdata.irqs[0];
27942795

@@ -3113,7 +3114,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
31133114
dev->dma = 0;
31143115

31153116
/* Happy Meal can do it all... */
3116-
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
3117+
dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
3118+
dev->features |= dev->hw_features | NETIF_F_RXCSUM;
31173119

31183120
#if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
31193121
/* Hook up PCI register/descriptor accessors. */

0 commit comments

Comments
 (0)