summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-04-13 10:21:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-04-14 09:42:09 +0200
commitdec9b064d84ee7a3c7167cb42d1d3e8e09df07f9 (patch)
tree5408c644dc0ff92928cce84bcfdc04e9a0431b53 /include
parentec3dd1aea7c178e9d18e385b85392d63c49b4f23 (diff)
downloadbarebox-dec9b064d84ee7a3c7167cb42d1d3e8e09df07f9.tar.gz
barebox-dec9b064d84ee7a3c7167cb42d1d3e8e09df07f9.tar.xz
net: add RX preprocessor support
Add callback for optional rx_preprocessor. This is needed to add DSA switch support and demultiplex traffic received from different switch ports. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220413082205.429509-2-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index aad28e4f4c..ca9b6cd61e 100644
--- a/include/net.h
+++ b/include/net.h
@@ -44,9 +44,12 @@ struct eth_device {
void (*halt) (struct eth_device*);
int (*get_ethaddr) (struct eth_device*, u8 adr[6]);
int (*set_ethaddr) (struct eth_device*, const unsigned char *adr);
+ int (*rx_preprocessor) (struct eth_device*, unsigned char **packet,
+ int *length);
struct eth_device *next;
void *priv;
+ void *rx_preprocessor_priv;
/* phy device may attach itself for hardware timestamping */
struct phy_device *phydev;