net: add netdev_set_operstate() helper
authorEric Dumazet <edumazet@google.com>
Tue, 13 Feb 2024 06:32:42 +0000 (06:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2024 11:20:13 +0000 (11:20 +0000)
commit6a2968ee1ee2cc6fce30f6f5724442b34b1483b3
tree0a41642980c841e40bbcd58ce7b4b1612362aeac
parent328771deab16fcac55763309bb59e28b1c050853
net: add netdev_set_operstate() helper

dev_base_lock is going away, add netdev_set_operstate() helper
so that hsr does not have to know core internals.

Remove dev_base_lock acquisition from rfc2863_policy()

v3: use an "unsigned int" for dev->operstate,
    so that try_cmpxchg() can work on all arches.
        ( https://lore.kernel.org/oe-kbuild-all/202402081918.OLyGaea3-lkp@intel.com/ )

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/linux/rtnetlink.h
net/core/link_watch.c
net/core/rtnetlink.c
net/hsr/hsr_device.c