Commit 631f3afb authored by Tim Harvey's avatar Tim Harvey Committed by Stefano Babic
Browse files

net: add set_promisc function to enable/disable Promiscuous mode



Enabling promiscuous mode can be useful for DSA switches where each port
has its own MAC address.
Signed-off-by: default avatarTim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried's avatarRamon Fried <rfried.dev@gmail.com>
parent 69c81d65
......@@ -158,6 +158,7 @@ enum eth_recv_flags {
* ROM on the board. This is how the driver should expose it
* to the network stack. This function should fill in the
* eth_pdata::enetaddr field - optional
* set_promisc: Enable or Disable promiscuous mode
*/
struct eth_ops {
int (*start)(struct udevice *dev);
......@@ -168,6 +169,7 @@ struct eth_ops {
int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join);
int (*write_hwaddr)(struct udevice *dev);
int (*read_rom_hwaddr)(struct udevice *dev);
int (*set_promisc)(struct udevice *dev, bool enable);
};
#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment