diff options
| author | Stanislav Fomichev <[email protected]> | 2025-03-12 19:05:12 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-03-19 17:52:00 +0000 |
| commit | 8033d2aef51722fe74068b52553625ed91ea256c (patch) | |
| tree | 6910b7f09c5c94632c251b1564cb17f9330682a9 /net/core/dev_api.c | |
| parent | tc-tests: Update tc police action tests for tc buffer size rounding fixes. (diff) | |
| download | kernel-8033d2aef51722fe74068b52553625ed91ea256c.tar.gz kernel-8033d2aef51722fe74068b52553625ed91ea256c.zip | |
Revert "net: replace dev_addr_sem with netdev instance lock"
This reverts commit df43d8bf10316a7c3b1e47e3cc0057a54df4a5b8.
Cc: Kohei Enju <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Fixes: df43d8bf1031 ("net: replace dev_addr_sem with netdev instance lock")
Signed-off-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Tested-by: Lei Yang <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
| -rw-r--r-- | net/core/dev_api.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c index 1f0e24849bc6..2e17548af685 100644 --- a/net/core/dev_api.c +++ b/net/core/dev_api.c @@ -84,6 +84,19 @@ void dev_set_group(struct net_device *dev, int new_group) netdev_unlock_ops(dev); } +int dev_set_mac_address_user(struct net_device *dev, struct sockaddr *sa, + struct netlink_ext_ack *extack) +{ + int ret; + + netdev_lock_ops(dev); + ret = netif_set_mac_address_user(dev, sa, extack); + netdev_unlock_ops(dev); + + return ret; +} +EXPORT_SYMBOL(dev_set_mac_address_user); + /** * dev_change_net_namespace() - move device to different nethost namespace * @dev: device @@ -299,9 +312,9 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa, { int ret; - netdev_lock(dev); + netdev_lock_ops(dev); ret = netif_set_mac_address(dev, sa, extack); - netdev_unlock(dev); + netdev_unlock_ops(dev); return ret; } |
