Commit b707b89f authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

eth: switch to netif_napi_add_weight()



Switch all Ethernet drivers which use custom napi weights
to the new API.

Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be8af67f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2464,7 +2464,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

	/* The chip-specific entries in the device structure. */
	dev->netdev_ops		= &typhoon_netdev_ops;
	netif_napi_add(dev, &tp->napi, typhoon_poll, 16);
	netif_napi_add_weight(dev, &tp->napi, typhoon_poll, 16);
	dev->watchdog_timeo	= TX_TIMEOUT;

	dev->ethtool_ops = &typhoon_ethtool_ops;
+1 −1
Original line number Diff line number Diff line
@@ -772,7 +772,7 @@ static int starfire_init_one(struct pci_dev *pdev,
	dev->watchdog_timeo = TX_TIMEOUT;
	dev->ethtool_ops = &ethtool_ops;

	netif_napi_add(dev, &np->napi, netdev_poll, max_interrupt_work);
	netif_napi_add_weight(dev, &np->napi, netdev_poll, max_interrupt_work);

	if (mtu)
		dev->mtu = mtu;
+1 −1
Original line number Diff line number Diff line
@@ -1828,7 +1828,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
	dev->watchdog_timeo = AMD8111E_TX_TIMEOUT;
	dev->min_mtu = AMD8111E_MIN_MTU;
	dev->max_mtu = AMD8111E_MAX_MTU;
	netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32);
	netif_napi_add_weight(dev, &lp->napi, amd8111e_rx_poll, 32);

#if AMD8111E_VLAN_TAG_USED
	dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
+2 −1
Original line number Diff line number Diff line
@@ -1881,7 +1881,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
	/* napi.weight is used in both the napi and non-napi cases */
	lp->napi.weight = lp->rx_ring_size / 2;

	netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
	netif_napi_add_weight(dev, &lp->napi, pcnet32_poll,
			      lp->rx_ring_size / 2);

	if (fdx && !(lp->options & PCNET32_PORT_ASEL) &&
	    ((cards_found >= MAX_UNITS) || full_duplex[cards_found]))
+2 −1
Original line number Diff line number Diff line
@@ -981,7 +981,8 @@ int arc_emac_probe(struct net_device *ndev, int interface)
	dev_info(dev, "connected to %s phy with id 0x%x\n",
		 phydev->drv->name, phydev->phy_id);

	netif_napi_add(ndev, &priv->napi, arc_emac_poll, ARC_EMAC_NAPI_WEIGHT);
	netif_napi_add_weight(ndev, &priv->napi, arc_emac_poll,
			      ARC_EMAC_NAPI_WEIGHT);

	err = register_netdev(ndev);
	if (err) {
Loading