11#ifndef ZEPHYR_INCLUDE_NET_DSA_H_
12#define ZEPHYR_INCLUDE_NET_DSA_H_
24#define NET_DSA_PORT_MAX_COUNT 8
25#define DSA_STATUS_PERIOD_MS K_MSEC(1000)
31#if defined(CONFIG_DSA_KSZ8794) && defined(DSA_KSZ_TAIL_TAGGING)
130 struct net_if *iface_master;
133 struct dsa_api *dapi;
170 int (*switch_set_mac_table_entry)(
const struct device *dev,
177 int (*switch_get_mac_table_entry)(
const struct device *dev,
struct net_if * dsa_net_recv(struct net_if *iface, struct net_pkt **pkt)
Set DSA interface to packet.
bool dsa_is_port_master(struct net_if *iface)
DSA helper function to check if port is master.
int dsa_switch_read(struct net_if *iface, uint16_t reg_addr, uint8_t *value)
Read from DSA switch register.
int dsa_switch_get_mac_table_entry(struct net_if *iface, uint8_t *buf, uint16_t tbl_entry_idx)
Read static MAC table entry.
int dsa_tx(const struct device *dev, struct net_pkt *pkt)
DSA generic transmit function.
#define NET_DSA_PORT_MAX_COUNT
Definition: dsa.h:24
int dsa_register_master_tx(struct net_if *iface, dsa_send_t fn)
DSA helper function to register transmit function for master.
enum net_verdict(* dsa_net_recv_cb_t)(struct net_if *iface, struct net_pkt *pkt)
DSA (MGMT) Receive packet callback.
Definition: dsa.h:68
struct net_if * dsa_get_slave_port(struct net_if *iface, int slave_num)
Get network interface of a slave port.
int dsa_switch_set_mac_table_entry(struct net_if *iface, const uint8_t *mac, uint8_t fw_port, uint16_t tbl_entry_idx, uint16_t flags)
Write static MAC table entry.
int dsa_switch_write(struct net_if *iface, uint16_t reg_addr, uint8_t value)
Write to DSA switch.
int(* dsa_send_t)(const struct device *dev, struct net_pkt *pkt)
Pointer to master interface send function.
Definition: dsa.h:94
int dsa_register_recv_callback(struct net_if *iface, dsa_net_recv_cb_t cb)
Register DSA Rx callback functions.
net_verdict
Net Verdict.
Definition: net_core.h:97
flags
Definition: http_parser.h:131
Public API for network interface.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
Structure to provide mac address for each LAN interface.
Definition: dsa.h:259
uint8_t mac_addr[6]
Definition: dsa.h:261
A structure used to submit work after a delay.
Definition: kernel.h:3651
Network Interface structure.
Definition: net_if.h:468
Network packet.
Definition: net_pkt.h:62
struct net_if * iface
Definition: net_pkt.h:85