wwan: core: multiple netdevs deletion support

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>
This commit is contained in:
Sergey Ryazanov 2021-06-22 01:50:54 +03:00 committed by David S. Miller
parent 58c3b421c6
commit f492fccf3d
1 changed files with 1 additions and 1 deletions

View 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 */