wwan: core: multiple netdevs deletion support
authorSergey Ryazanov <ryazanov.s.a@gmail.com>
Mon, 21 Jun 2021 22:50:54 +0000 (01:50 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 17:01:16 +0000 (10:01 -0700)
Use unregister_netdevice_queue() instead of simple
unregister_netdevice() if the WWAN netdev ops does not provide a dellink
callback. This will help to accelerate deletion of multiple netdevs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/wwan_core.c

index 1bd472195813f298dc2ede057f48b9d16624aa2b..b6b9c52f617cb682f5d6fd2d7d1b4293a72fc039 100644 (file)
@@ -882,7 +882,7 @@ static void wwan_rtnl_dellink(struct net_device *dev, struct list_head *head)
        if (wwandev->ops->dellink)
                wwandev->ops->dellink(wwandev->ops_ctxt, dev, head);
        else
-               unregister_netdevice(dev);
+               unregister_netdevice_queue(dev, head);
 
 out:
        /* release the reference */