diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-13 08:19:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-13 08:19:37 +0200 |
commit | 991919e969043a4422dfebbcadf600a5d28b94e4 (patch) | |
tree | 4776f9f162c665a9735198fafc466d3e49a14253 /net/core/dev_api.c | |
parent | 73ed6faed58e5611abfb54c2f703eec091781d63 (diff) | |
parent | 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3 (diff) |
Merge 6.15-rc6 into char-misc-next
We need the iio/hyperv fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/dev_api.c')
-rw-r--r-- | net/core/dev_api.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c index 90898cd540ce..f9a160ab596f 100644 --- a/net/core/dev_api.c +++ b/net/core/dev_api.c @@ -268,6 +268,29 @@ void dev_disable_lro(struct net_device *dev) EXPORT_SYMBOL(dev_disable_lro); /** + * dev_set_promiscuity() - update promiscuity count on a device + * @dev: device + * @inc: modifier + * + * Add or remove promiscuity from a device. While the count in the device + * remains above zero the interface remains promiscuous. Once it hits zero + * the device reverts back to normal filtering operation. A negative inc + * value is used to drop promiscuity on the device. + * Return 0 if successful or a negative errno code on error. + */ +int dev_set_promiscuity(struct net_device *dev, int inc) +{ + int ret; + + netdev_lock_ops(dev); + ret = netif_set_promiscuity(dev, inc); + netdev_unlock_ops(dev); + + return ret; +} +EXPORT_SYMBOL(dev_set_promiscuity); + +/** * dev_set_allmulti() - update allmulti count on a device * @dev: device * @inc: modifier |