net: stmmac: Use netif_tx_napi_add() for TX polling function
authorFrode Isaksen <fisaksen@baylibre.com>
Tue, 30 Jul 2019 11:38:14 +0000 (13:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Jul 2019 23:09:36 +0000 (19:09 -0400)
This variant of netif_napi_add() should be used from drivers
using NAPI to exclusively poll a TX queue.

Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 9a4a56ad35cd3a403e5283ad12f50a65c538d0bd..fd54c7c8748548e279cc5293ea3df19d656c6366 100644 (file)
@@ -4320,8 +4320,9 @@ int stmmac_dvr_probe(struct device *device,
                                       NAPI_POLL_WEIGHT);
                }
                if (queue < priv->plat->tx_queues_to_use) {
-                       netif_napi_add(ndev, &ch->tx_napi, stmmac_napi_poll_tx,
-                                      NAPI_POLL_WEIGHT);
+                       netif_tx_napi_add(ndev, &ch->tx_napi,
+                                         stmmac_napi_poll_tx,
+                                         NAPI_POLL_WEIGHT);
                }
        }