net: wan: switch to netif_napi_add_weight()
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 May 2022 17:07:51 +0000 (10:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 May 2022 10:33:57 +0000 (11:33 +0100)
A handful of WAN drivers use custom napi weights,
switch them to the new API.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/fsl_ucc_hdlc.c
drivers/net/wan/hd64572.c
drivers/net/wan/ixp4xx_hss.c
drivers/net/wan/lapbether.c

index 5ae2d27b5da97cb6f7143ea180e980f255b9e393..22edea6ca4b817b55bfcb7c0a25a8c5d23ceec5c 100644 (file)
@@ -1231,7 +1231,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
        dev->watchdog_timeo = 2 * HZ;
        hdlc->attach = ucc_hdlc_attach;
        hdlc->xmit = ucc_hdlc_tx;
-       netif_napi_add(dev, &uhdlc_priv->napi, ucc_hdlc_poll, 32);
+       netif_napi_add_weight(dev, &uhdlc_priv->napi, ucc_hdlc_poll, 32);
        if (register_hdlc_device(dev)) {
                ret = -ENOBUFS;
                pr_err("ucc_hdlc: unable to register hdlc device\n");
index b89b03a6aba739277361ac05f8fd174bdf0ee477..534369ffe5de3f7e361793363af97a909ce78ce3 100644 (file)
@@ -173,7 +173,8 @@ static void sca_init_port(port_t *port)
        sca_out(DIR_EOME, DIR_TX(port->chan), card); /* enable interrupts */
 
        sca_set_carrier(port);
-       netif_napi_add(port->netdev, &port->napi, sca_poll, NAPI_WEIGHT);
+       netif_napi_add_weight(port->netdev, &port->napi, sca_poll,
+                             NAPI_WEIGHT);
 }
 
 /* MSCI interrupt service */
index 863c3e34e1368fbb39b4b2336312fcaab20fa929..e46b7f5ee49e2f0415233cdac96803f597a3bec0 100644 (file)
@@ -1504,7 +1504,7 @@ static int ixp4xx_hss_probe(struct platform_device *pdev)
        port->clock_reg = CLK42X_SPEED_2048KHZ;
        port->id = pdev->id;
        port->dev = &pdev->dev;
-       netif_napi_add(ndev, &port->napi, hss_hdlc_poll, NAPI_WEIGHT);
+       netif_napi_add_weight(ndev, &port->napi, hss_hdlc_poll, NAPI_WEIGHT);
 
        err = register_hdlc_device(ndev);
        if (err)
index 282192b82404bb76a24b5a0a739c3479cf9c0210..960f1393595cc1926dabe1e04ea5c59e85335932 100644 (file)
@@ -408,7 +408,7 @@ static int lapbeth_new_device(struct net_device *dev)
        spin_lock_init(&lapbeth->up_lock);
 
        skb_queue_head_init(&lapbeth->rx_queue);
-       netif_napi_add(ndev, &lapbeth->napi, lapbeth_napi_poll, 16);
+       netif_napi_add_weight(ndev, &lapbeth->napi, lapbeth_napi_poll, 16);
 
        rc = -EIO;
        if (register_netdevice(ndev))