diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2022-11-08 07:10:02 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-11-08 11:11:24 +0100 |
commit | 90682050d1492cf3cae14ca839409db6307cb6ec (patch) | |
tree | 88a87eefa80e097b2beccb91408474c0b58bf0c6 /net | |
parent | fdcfd76ee4fec9d348f29320ad413099b5fe1b6d (diff) | |
download | barebox-90682050d1492cf3cae14ca839409db6307cb6ec.tar.gz |
net: add promiscuous mode configuration support
This configuration is mostly needed for controllers attached to switches
with different MAC address configurations or for debugging networking
issues.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20221108061009.4168735-1-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -31,6 +31,14 @@ struct eth_ethaddr { static LIST_HEAD(ethaddr_list); +int eth_set_promisc(struct eth_device *edev, bool enable) +{ + if (!edev->set_promisc) + return -EOPNOTSUPP; + + return edev->set_promisc(edev, enable); +} + int eth_set_ethaddr(struct eth_device *edev, const char *ethaddr) { int ret; |