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

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

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: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2c725fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3146,7 +3146,8 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
			    gp->phy_mii.def ? gp->phy_mii.def->name : "no");
			    gp->phy_mii.def ? gp->phy_mii.def->name : "no");


	/* GEM can do it all... */
	/* 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)
	if (pci_using_dac)
		dev->features |= NETIF_F_HIGHDMA;
		dev->features |= NETIF_F_HIGHDMA;


+4 −2
Original line number Original line Diff line number Diff line
@@ -2788,7 +2788,8 @@ static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int i
	dev->ethtool_ops = &hme_ethtool_ops;
	dev->ethtool_ops = &hme_ethtool_ops;


	/* Happy Meal can do it all... */
	/* 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];
	dev->irq = op->archdata.irqs[0];


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


	/* Happy Meal can do it all... */
	/* 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)
#if defined(CONFIG_SBUS) && defined(CONFIG_PCI)
	/* Hook up PCI register/descriptor accessors. */
	/* Hook up PCI register/descriptor accessors. */