]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: convert sunhme/sungem network drivers to hw_features
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sat, 2 Apr 2011 03:58:37 +0000 (20:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Apr 2011 03:58:37 +0000 (20:58 -0700)
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>
drivers/net/sungem.c
drivers/net/sunhme.c

index c1a344829b54827b6a39391e558c9ed63f334e3d..a935426cbe634a95ed4a14097a7fd6a75d5e0881 100644 (file)
@@ -3146,7 +3146,8 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
                            gp->phy_mii.def ? gp->phy_mii.def->name : "no");
 
        /* GEM can do it all... */
-       dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_LLTX;
+       dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->features |= dev->hw_features | NETIF_F_RXCSUM | NETIF_F_LLTX;
        if (pci_using_dac)
                dev->features |= NETIF_F_HIGHDMA;
 
index eb4f59fb01e90cacc722a732e23ef46181747c61..80e907df36b449c2346b5e3813a4985c31b2a279 100644 (file)
@@ -2788,7 +2788,8 @@ static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int i
        dev->ethtool_ops = &hme_ethtool_ops;
 
        /* Happy Meal can do it all... */
-       dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->features |= dev->hw_features | NETIF_F_RXCSUM;
 
        dev->irq = op->archdata.irqs[0];
 
@@ -3113,7 +3114,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
        dev->dma = 0;
 
        /* Happy Meal can do it all... */
-       dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM;
+       dev->features |= dev->hw_features | NETIF_F_RXCSUM;
 
 #if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
        /* Hook up PCI register/descriptor accessors. */