dev.c (9cbbd694a58bdf24def2462276514c90cab7cf80) dev.c (0b5c21bbc01e92745ca1ca4f6fd87d878fa3ea5e)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * NET3 Protocol independent device support routines.
4 *
5 * Derived from the non IP parts of dev.c 1.0.19
6 * Authors: Ross Biro
7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
8 * Mark Evans, <evansmp@uhura.aston.ac.uk>

--- 9417 unchanged lines hidden (view full) ---

9426 if (++ifindex <= 0)
9427 ifindex = 1;
9428 if (!__dev_get_by_index(net, ifindex))
9429 return net->ifindex = ifindex;
9430 }
9431}
9432
9433/* Delayed registration/unregisteration */
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * NET3 Protocol independent device support routines.
4 *
5 * Derived from the non IP parts of dev.c 1.0.19
6 * Authors: Ross Biro
7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
8 * Mark Evans, <evansmp@uhura.aston.ac.uk>

--- 9417 unchanged lines hidden (view full) ---

9426 if (++ifindex <= 0)
9427 ifindex = 1;
9428 if (!__dev_get_by_index(net, ifindex))
9429 return net->ifindex = ifindex;
9430 }
9431}
9432
9433/* Delayed registration/unregisteration */
9434static LIST_HEAD(net_todo_list);
9434LIST_HEAD(net_todo_list);
9435DECLARE_WAIT_QUEUE_HEAD(netdev_unregistering_wq);
9436
9437static void net_set_todo(struct net_device *dev)
9438{
9439 list_add_tail(&dev->todo_list, &net_todo_list);
9440 atomic_inc(&dev_net(dev)->dev_unreg_count);
9441}
9442

--- 1896 unchanged lines hidden ---
9435DECLARE_WAIT_QUEUE_HEAD(netdev_unregistering_wq);
9436
9437static void net_set_todo(struct net_device *dev)
9438{
9439 list_add_tail(&dev->todo_list, &net_todo_list);
9440 atomic_inc(&dev_net(dev)->dev_unreg_count);
9441}
9442

--- 1896 unchanged lines hidden ---