eth: switch to netif_napi_add_weight()
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 May 2022 17:07:48 +0000 (10:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 May 2022 10:33:57 +0000 (11:33 +0100)
Switch all Ethernet drivers which use custom napi weights
to the new API.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
34 files changed:
drivers/net/ethernet/3com/typhoon.c
drivers/net/ethernet/adaptec/starfire.c
drivers/net/ethernet/amd/amd8111e.c
drivers/net/ethernet/amd/pcnet32.c
drivers/net/ethernet/arc/emac_main.c
drivers/net/ethernet/atheros/ag71xx.c
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/sb1250-mac.c
drivers/net/ethernet/dec/tulip/tulip_core.c
drivers/net/ethernet/ezchip/nps_enet.c
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
drivers/net/ethernet/hisilicon/hisi_femac.c
drivers/net/ethernet/huawei/hinic/hinic_rx.c
drivers/net/ethernet/huawei/hinic/hinic_tx.c
drivers/net/ethernet/ibm/emac/mal.c
drivers/net/ethernet/ibm/ibmveth.c
drivers/net/ethernet/intel/e100.c
drivers/net/ethernet/lantiq_etop.c
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
drivers/net/ethernet/microsoft/mana/mana_en.c
drivers/net/ethernet/moxa/moxart_ether.c
drivers/net/ethernet/mscc/ocelot_fdma.c
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
drivers/net/ethernet/neterion/vxge/vxge-main.c
drivers/net/ethernet/nxp/lpc_eth.c
drivers/net/ethernet/realtek/8139cp.c
drivers/net/ethernet/sfc/efx_channels.c
drivers/net/ethernet/sfc/falcon/efx.c
drivers/net/ethernet/smsc/smsc911x.c
drivers/net/ethernet/toshiba/tc35815.c
drivers/net/ethernet/wiznet/w5100.c
drivers/net/ethernet/wiznet/w5300.c
drivers/net/ethernet/xscale/ixp4xx_eth.c

index ad57209007e1892656e60176ae464b7bdf3b0b49..cad4f354cc76f05f01dbbd8e93f04dc4f11389d7 100644 (file)
@@ -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;
index c6982f7caf9b47c4ccb0ed1436fa110e9a40308f..8f0a6b9c518e40a9c13d58d2a8ea7f922dda7e70 100644 (file)
@@ -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;
index 9421afb950f791c921306a45f03a3ad31e4a554d..05ac8d9ccb2fa0824fddda5a63d6865be0e49d26 100644 (file)
@@ -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;
index c20c369c7eb84f0516f76487762bb12ff9c6b8f7..b5ff47283cfe0543e3501cc6db4bdd4db313f4ab 100644 (file)
@@ -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]))
index c642c3d3e600606f281ec4819533702276c335fe..288e2961823eaf3b008edf709b55bb5b6f7db34b 100644 (file)
@@ -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) {
index ec167af0e3b2d3cf6f2370da295dd0dc3296f428..cac509708e9dfd0837b5b3139f0cfe9009b37031 100644 (file)
@@ -1922,7 +1922,8 @@ static int ag71xx_probe(struct platform_device *pdev)
                return err;
        }
 
-       netif_napi_add(ndev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT);
+       netif_napi_add_weight(ndev, &ag->napi, ag71xx_poll,
+                             AG71XX_NAPI_WEIGHT);
 
        err = clk_prepare_enable(ag->clk_eth);
        if (err) {
index c1b97e8c55efc4763d383b371ed4ea5a9c958320..698438a2ee0f91be255b591ec077fe90ec136db0 100644 (file)
@@ -1859,7 +1859,7 @@ static int bcm_enet_probe(struct platform_device *pdev)
 
        /* register netdevice */
        dev->netdev_ops = &bcm_enet_ops;
-       netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
+       netif_napi_add_weight(dev, &priv->napi, bcm_enet_poll, 16);
 
        dev->ethtool_ops = &bcm_enet_ethtool_ops;
        /* MTU range: 46 - 2028 */
@@ -2714,7 +2714,7 @@ static int bcm_enetsw_probe(struct platform_device *pdev)
 
        /* register netdevice */
        dev->netdev_ops = &bcm_enetsw_ops;
-       netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
+       netif_napi_add_weight(dev, &priv->napi, bcm_enet_poll, 16);
        dev->ethtool_ops = &bcm_enetsw_ethtool_ops;
        SET_NETDEV_DEV(dev, &pdev->dev);
 
index 5d5f101801588ee4c03a12bba74e6983d1d22972..f02facb60fd1e913698d5d802509ff29d3056f54 100644 (file)
@@ -2203,7 +2203,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
        dev->min_mtu = 0;
        dev->max_mtu = ENET_PACKET_SIZE;
 
-       netif_napi_add(dev, &sc->napi, sbmac_poll, 16);
+       netif_napi_add_weight(dev, &sc->napi, sbmac_poll, 16);
 
        dev->irq                = UNIT_INT(idx);
 
index 79df5a72877b83b4a01429c0e929ff86aa706e08..434d8bf0e8f9d892967fac5af4b29e150f986db7 100644 (file)
@@ -1689,7 +1689,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        dev->netdev_ops = &tulip_netdev_ops;
        dev->watchdog_timeo = TX_TIMEOUT;
 #ifdef CONFIG_TULIP_NAPI
-       netif_napi_add(dev, &tp->napi, tulip_poll, 16);
+       netif_napi_add_weight(dev, &tp->napi, tulip_poll, 16);
 #endif
        dev->ethtool_ops = &ops;
 
index 69dbf950d4516e89bbfd9e13b8d7007c7d6b8957..f1eb660aaee2e17a3945a2b3ff1580a9b0c8a752 100644 (file)
@@ -612,8 +612,8 @@ static s32 nps_enet_probe(struct platform_device *pdev)
                goto out_netdev;
        }
 
-       netif_napi_add(ndev, &priv->napi, nps_enet_poll,
-                      NPS_ENET_NAPI_POLL_WEIGHT);
+       netif_napi_add_weight(ndev, &priv->napi, nps_enet_poll,
+                             NPS_ENET_NAPI_POLL_WEIGHT);
 
        /* Register the driver. Should be the last thing in probe */
        err = register_netdev(ndev);
index bacf25318f87aee1f91aad9b05cb688cd52f3ce0..b3dae17e067e0798198b7823a8f7b84ace64fc35 100644 (file)
@@ -1020,7 +1020,8 @@ static int fs_enet_probe(struct platform_device *ofdev)
        ndev->netdev_ops = &fs_enet_netdev_ops;
        ndev->watchdog_timeo = 2 * HZ;
        INIT_WORK(&fep->timeout_work, fs_timeout_work);
-       netif_napi_add(ndev, &fep->napi, fs_enet_napi, fpi->napi_weight);
+       netif_napi_add_weight(ndev, &fep->napi, fs_enet_napi,
+                             fpi->napi_weight);
 
        ndev->ethtool_ops = &fs_ethtool_ops;
 
index a6c18b6527f9ae23423c038951b29a96c63d9ac8..93846bace02856e5b30544d3ad0024671cff071d 100644 (file)
@@ -852,7 +852,8 @@ static int hisi_femac_drv_probe(struct platform_device *pdev)
        ndev->priv_flags |= IFF_UNICAST_FLT;
        ndev->netdev_ops = &hisi_femac_netdev_ops;
        ndev->ethtool_ops = &hisi_femac_ethtools_ops;
-       netif_napi_add(ndev, &priv->napi, hisi_femac_poll, FEMAC_POLL_WEIGHT);
+       netif_napi_add_weight(ndev, &priv->napi, hisi_femac_poll,
+                             FEMAC_POLL_WEIGHT);
 
        hisi_femac_port_init(priv);
 
index b33ed4d92b71bd82473b22df02600af1381a505d..24b7b819dbfbad1d64116ef54058ee4887d7a056 100644 (file)
@@ -481,7 +481,8 @@ static void rx_add_napi(struct hinic_rxq *rxq)
 {
        struct hinic_dev *nic_dev = netdev_priv(rxq->netdev);
 
-       netif_napi_add(rxq->netdev, &rxq->napi, rx_poll, nic_dev->rx_weight);
+       netif_napi_add_weight(rxq->netdev, &rxq->napi, rx_poll,
+                             nic_dev->rx_weight);
        napi_enable(&rxq->napi);
 }
 
index 8d59babbf476ca48ad53addae9a39879ceb7e8b5..87408e7bb8097de6fced7f0f2d170179b3fe93a9 100644 (file)
@@ -809,7 +809,8 @@ static int tx_request_irq(struct hinic_txq *txq)
 
        qp = container_of(sq, struct hinic_qp, sq);
 
-       netif_napi_add(txq->netdev, &txq->napi, free_tx_poll, nic_dev->tx_weight);
+       netif_napi_add_weight(txq->netdev, &txq->napi, free_tx_poll,
+                             nic_dev->tx_weight);
 
        hinic_hwdev_msix_set(nic_dev->hwdev, sq->msix_entry,
                             TX_IRQ_NO_PENDING, TX_IRQ_NO_COALESC,
index 075c07303f1656efa7a198f596196fc10606985d..ff5487bbebe378b771fe6958e28f2105d44d4a46 100644 (file)
@@ -605,8 +605,8 @@ static int mal_probe(struct platform_device *ofdev)
 
        init_dummy_netdev(&mal->dummy_dev);
 
-       netif_napi_add(&mal->dummy_dev, &mal->napi, mal_poll,
-                      CONFIG_IBM_EMAC_POLL_WEIGHT);
+       netif_napi_add_weight(&mal->dummy_dev, &mal->napi, mal_poll,
+                             CONFIG_IBM_EMAC_POLL_WEIGHT);
 
        /* Load power-on reset defaults */
        mal_reset(mal);
index 22fb0d109a68ca93b0a5f016bd2f9d8d1203b6bd..5c6a04d29f5bad43673687041158ab8f9578a699 100644 (file)
@@ -1674,7 +1674,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
        adapter->pool_config = 0;
        ibmveth_init_link_settings(netdev);
 
-       netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
+       netif_napi_add_weight(netdev, &adapter->napi, ibmveth_poll, 16);
 
        netdev->irq = dev->irq;
        netdev->netdev_ops = &ibmveth_netdev_ops;
index 4a8013f20152918a362fd371b6a06d9357a54fe0..36418b510ddee6e6a28bfdbe63c2ffcb134a8db4 100644 (file)
@@ -2848,7 +2848,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
 
        nic = netdev_priv(netdev);
-       netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
+       netif_napi_add_weight(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
        nic->netdev = netdev;
        nic->pdev = pdev;
        nic->msg_enable = (1 << debug) - 1;
index 9b6fa27b7daf77f2d2465fda337c3ca8df8c0033..7cedbe1fdfd7721594bcf69f13e7e381ed63eb4b 100644 (file)
@@ -701,11 +701,11 @@ ltq_etop_probe(struct platform_device *pdev)
 
        for (i = 0; i < MAX_DMA_CHAN; i++) {
                if (IS_TX(i))
-                       netif_napi_add(dev, &priv->ch[i].napi,
-                                      ltq_etop_poll_tx, 8);
+                       netif_napi_add_weight(dev, &priv->ch[i].napi,
+                                             ltq_etop_poll_tx, 8);
                else if (IS_RX(i))
-                       netif_napi_add(dev, &priv->ch[i].napi,
-                                      ltq_etop_poll_rx, 32);
+                       netif_napi_add_weight(dev, &priv->ch[i].napi,
+                                             ltq_etop_poll_rx, 32);
                priv->ch[i].netdev = dev;
        }
 
index 52bef50f5a0da2b0cbc9427e88541cd253795e55..349b8a94e9391b48afff2d0721cea5a0404fd0fa 100644 (file)
@@ -1486,7 +1486,8 @@ static int pxa168_eth_probe(struct platform_device *pdev)
 
        /* Hardware supports only 3 ports */
        BUG_ON(pep->port_num > 2);
-       netif_napi_add(dev, &pep->napi, pxa168_rx_poll, pep->rx_ring_size);
+       netif_napi_add_weight(dev, &pep->napi, pxa168_rx_poll,
+                             pep->rx_ring_size);
 
        memset(&pep->timeout, 0, sizeof(struct timer_list));
        timer_setup(&pep->timeout, rxq_refill_timer_wrapper, 0);
index 1e9ff365459e650f2d08c2792ea5c3a93c33f027..66360c8c5a38ca6aa0ecc3a322aeebfbe0058f72 100644 (file)
@@ -381,7 +381,8 @@ static int sparx5_fdma_rx_alloc(struct sparx5 *sparx5)
                }
                sparx5_fdma_rx_add_dcb(rx, dcb, rx->dma + sizeof(*dcb) * idx);
        }
-       netif_napi_add(rx->ndev, &rx->napi, sparx5_fdma_napi_callback, FDMA_WEIGHT);
+       netif_napi_add_weight(rx->ndev, &rx->napi, sparx5_fdma_napi_callback,
+                             FDMA_WEIGHT);
        napi_enable(&rx->napi);
        sparx5_fdma_rx_activate(sparx5, rx);
        return 0;
index 06f853c5c14119771e4547050987f8b0cac2c98d..b1d773823232ced702e2799e0df8bbf5d841f042 100644 (file)
@@ -1602,7 +1602,7 @@ static struct mana_rxq *mana_create_rxq(struct mana_port_context *apc,
 
        gc->cq_table[cq->gdma_id] = cq->gdma_cq;
 
-       netif_napi_add(ndev, &cq->napi, mana_poll, 1);
+       netif_napi_add_weight(ndev, &cq->napi, mana_poll, 1);
 
        WARN_ON(xdp_rxq_info_reg(&rxq->xdp_rxq, ndev, rxq_idx,
                                 cq->napi.napi_id));
index afb7dcadb8d2528daf7bbe21e2851e54ed2c4f4b..a3214a762e4b3e7ae4d5f5bdce16994a318d971f 100644 (file)
@@ -533,7 +533,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
        }
 
        ndev->netdev_ops = &moxart_netdev_ops;
-       netif_napi_add(ndev, &priv->napi, moxart_rx_poll, RX_DESC_NUM);
+       netif_napi_add_weight(ndev, &priv->napi, moxart_rx_poll, RX_DESC_NUM);
        ndev->priv_flags |= IFF_UNICAST_FLT;
        ndev->irq = irq;
 
index dffa597bffe6b7ecd82db62f51d5a52473951333..083fddd263ec620207d852f9acc05b9a0c71f899 100644 (file)
@@ -799,8 +799,8 @@ void ocelot_fdma_netdev_init(struct ocelot *ocelot, struct net_device *dev)
                return;
 
        fdma->ndev = dev;
-       netif_napi_add(dev, &fdma->napi, ocelot_fdma_napi_poll,
-                      OCELOT_FDMA_WEIGHT);
+       netif_napi_add_weight(dev, &fdma->napi, ocelot_fdma_napi_poll,
+                             OCELOT_FDMA_WEIGHT);
 }
 
 void ocelot_fdma_netdev_deinit(struct ocelot *ocelot, struct net_device *dev)
index fe5e77330f5f20aa7c4680229265f930ecda3c11..61497c3e4cfbdaf5809edac65311a28699e774f9 100644 (file)
@@ -3586,8 +3586,8 @@ static int myri10ge_alloc_slices(struct myri10ge_priv *mgp)
                        goto abort;
                ss->mgp = mgp;
                ss->dev = mgp->dev;
-               netif_napi_add(ss->dev, &ss->napi, myri10ge_poll,
-                              myri10ge_napi_weight);
+               netif_napi_add_weight(ss->dev, &ss->napi, myri10ge_poll,
+                                     myri10ge_napi_weight);
        }
        return 0;
 abort:
index db4dfae8c01dc2d28f031c05cc2b692c6685a1e0..d2de8ac44f72d27a75a32e2cf7cce6e34ed15890 100644 (file)
@@ -2720,8 +2720,8 @@ static int vxge_open(struct net_device *dev)
        }
 
        if (vdev->config.intr_type != MSI_X) {
-               netif_napi_add(dev, &vdev->napi, vxge_poll_inta,
-                       vdev->config.napi_weight);
+               netif_napi_add_weight(dev, &vdev->napi, vxge_poll_inta,
+                                     vdev->config.napi_weight);
                napi_enable(&vdev->napi);
                for (i = 0; i < vdev->no_of_vpath; i++) {
                        vpath = &vdev->vpaths[i];
@@ -2730,8 +2730,9 @@ static int vxge_open(struct net_device *dev)
        } else {
                for (i = 0; i < vdev->no_of_vpath; i++) {
                        vpath = &vdev->vpaths[i];
-                       netif_napi_add(dev, &vpath->ring.napi,
-                           vxge_poll_msix, vdev->config.napi_weight);
+                       netif_napi_add_weight(dev, &vpath->ring.napi,
+                                             vxge_poll_msix,
+                                             vdev->config.napi_weight);
                        napi_enable(&vpath->ring.napi);
                        vpath->ring.napi_p = &vpath->ring.napi;
                }
index 756f97dce85b2b4a5ed95667adeffe177b7b0984..f606d75b33b4f59dab952b7b3d0fe2a394b2aba6 100644 (file)
@@ -1373,7 +1373,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
        pldat->duplex = DUPLEX_FULL;
        __lpc_params_setup(pldat);
 
-       netif_napi_add(ndev, &pldat->napi, lpc_eth_poll, NAPI_WEIGHT);
+       netif_napi_add_weight(ndev, &pldat->napi, lpc_eth_poll, NAPI_WEIGHT);
 
        ret = register_netdev(ndev);
        if (ret) {
index ad7b9e9d7f95b419ea872f373de802236a043056..e0feeec13da686be419edc3fa3e7309c7d44fcf1 100644 (file)
@@ -1986,7 +1986,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
        eth_hw_addr_set(dev, (u8 *)addr);
 
        dev->netdev_ops = &cp_netdev_ops;
-       netif_napi_add(dev, &cp->napi, cp_rx_poll, 16);
+       netif_napi_add_weight(dev, &cp->napi, cp_rx_poll, 16);
        dev->ethtool_ops = &cp_ethtool_ops;
        dev->watchdog_timeo = TX_TIMEOUT;
 
index eec80b024195122a6d4b8bd976f1f49637e0c6fe..3f28f9861dfa6e3238476ed796ca5185b160f7bb 100644 (file)
@@ -1316,8 +1316,8 @@ void efx_init_napi_channel(struct efx_channel *channel)
        struct efx_nic *efx = channel->efx;
 
        channel->napi_dev = efx->net_dev;
-       netif_napi_add(channel->napi_dev, &channel->napi_str,
-                      efx_poll, napi_weight);
+       netif_napi_add_weight(channel->napi_dev, &channel->napi_str, efx_poll,
+                             napi_weight);
 }
 
 void efx_init_napi(struct efx_nic *efx)
index b7282331faecf50d5aa039eb8c64b32d878875b7..f619ffb2678741305c2841342e75538fdf8307ab 100644 (file)
@@ -2017,8 +2017,8 @@ static void ef4_init_napi_channel(struct ef4_channel *channel)
        struct ef4_nic *efx = channel->efx;
 
        channel->napi_dev = efx->net_dev;
-       netif_napi_add(channel->napi_dev, &channel->napi_str,
-                      ef4_poll, napi_weight);
+       netif_napi_add_weight(channel->napi_dev, &channel->napi_str, ef4_poll,
+                             napi_weight);
 }
 
 static void ef4_init_napi(struct ef4_nic *efx)
index c854efdf1f25fe372850e20eeb588428f74d5df3..3bf20211cceb4529ee0063e310457343dbe7ae07 100644 (file)
@@ -2304,7 +2304,8 @@ static int smsc911x_init(struct net_device *dev)
                return -ENODEV;
 
        dev->flags |= IFF_MULTICAST;
-       netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
+       netif_napi_add_weight(dev, &pdata->napi, smsc911x_poll,
+                             SMSC_NAPI_WEIGHT);
        dev->netdev_ops = &smsc911x_netdev_ops;
        dev->ethtool_ops = &smsc911x_ethtool_ops;
 
index ce38f751522545d0cb4b28512c8fb62f0abae59f..47aab9c132c81e9342629d96adabdd9a71394618 100644 (file)
@@ -804,7 +804,7 @@ static int tc35815_init_one(struct pci_dev *pdev,
        dev->netdev_ops = &tc35815_netdev_ops;
        dev->ethtool_ops = &tc35815_ethtool_ops;
        dev->watchdog_timeo = TC35815_TX_TIMEOUT;
-       netif_napi_add(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT);
+       netif_napi_add_weight(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT);
 
        dev->irq = pdev->irq;
        dev->base_addr = (unsigned long)ioaddr;
index 4fd7c39e112337e01ffb688e6b970527596dde04..acd78120e53c9b5ef1e4fea5adee23eae15c6dbe 100644 (file)
@@ -1133,7 +1133,7 @@ int w5100_probe(struct device *dev, const struct w5100_ops *ops,
 
        ndev->netdev_ops = &w5100_netdev_ops;
        ndev->ethtool_ops = &w5100_ethtool_ops;
-       netif_napi_add(ndev, &priv->napi, w5100_napi_poll, 16);
+       netif_napi_add_weight(ndev, &priv->napi, w5100_napi_poll, 16);
 
        /* This chip doesn't support VLAN packets with normal MTU,
         * so disable VLAN for this device.
index 402d5036f266838d14230cdd66f561bac10c8f47..773f8c77909a5c190c0994829799dacaecfc2361 100644 (file)
@@ -603,7 +603,7 @@ static int w5300_probe(struct platform_device *pdev)
        ndev->netdev_ops = &w5300_netdev_ops;
        ndev->ethtool_ops = &w5300_ethtool_ops;
        ndev->watchdog_timeo = HZ;
-       netif_napi_add(ndev, &priv->napi, w5300_napi_poll, 16);
+       netif_napi_add_weight(ndev, &priv->napi, w5300_napi_poll, 16);
 
        /* This chip doesn't support VLAN packets with normal MTU,
         * so disable VLAN for this device.
index d947955621eee56efe67c9b906ee0e0b1e808e89..89770c2e0ffb1bb8fc7392d664ba77ff64e19c7c 100644 (file)
@@ -1480,7 +1480,7 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
        ndev->dev.dma_mask = dev->dma_mask;
        ndev->dev.coherent_dma_mask = dev->coherent_dma_mask;
 
-       netif_napi_add(ndev, &port->napi, eth_poll, NAPI_WEIGHT);
+       netif_napi_add_weight(ndev, &port->napi, eth_poll, NAPI_WEIGHT);
 
        if (!(port->npe = npe_request(NPE_ID(port->id))))
                return -EIO;