ksz8863_driver.c
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:559
error_t ksz8863DeleteStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Remove an entry from the static MAC table.
Definition: ksz8863_driver.c:941
#define KSZ8863_INDIRECT_CTRL0_TABLE_SEL_DYNAMIC_MAC
Definition: ksz8863_driver.h:532
void ksz8863DumpPhyReg(NetInterface *interface, uint8_t port)
Dump PHY registers for debugging purpose.
Definition: ksz8863_driver.c:1302
error_t ksz8863GetDynamicFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the dynamic MAC table.
Definition: ksz8863_driver.c:1107
error_t ksz8863AddStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Add a new entry to the static MAC table.
Definition: ksz8863_driver.c:842
void ksz8863DumpSwitchReg(NetInterface *interface)
Dump switch registers for debugging purpose.
Definition: ksz8863_driver.c:1437
void ksz8863FlushDynamicFdbTable(NetInterface *interface, uint8_t port)
Flush dynamic MAC table.
Definition: ksz8863_driver.c:1191
#define KSZ8863_GLOBAL_CTRL1_TAIL_TAG_EN
Definition: ksz8863_driver.h:340
error_t ksz8863Init(NetInterface *interface)
KSZ8863 Ethernet switch initialization.
Definition: ksz8863_driver.c:91
void ksz8863EnableRsvdMcastTable(NetInterface *interface, bool_t enable)
Enable reserved multicast table.
Definition: ksz8863_driver.c:829
void ksz8863WritePhyReg(NetInterface *interface, uint8_t port, uint8_t address, uint16_t data)
Write PHY register.
Definition: ksz8863_driver.c:1253
#define KSZ8863_TAIL_TAG_NORMAL_ADDR_LOOKUP
Definition: ksz8863_driver.h:60
void ksz8863EnableMldSnooping(NetInterface *interface, bool_t enable)
Enable MLD snooping.
Definition: ksz8863_driver.c:817
#define KSZ8863_PORTn_CTRL2_RECEIVE_EN
Definition: ksz8863_driver.h:437
void ksz8863WriteSwitchReg(NetInterface *interface, uint8_t address, uint8_t data)
Write switch register.
Definition: ksz8863_driver.c:1326
#define KSZ8863_GLOBAL_CTRL4_SW_MII_HALF_DUPLEX_MODE
Definition: ksz8863_driver.h:364
bool_t ksz8863GetLinkState(NetInterface *interface, uint8_t port)
Get link state.
Definition: ksz8863_driver.c:506
KSZ8863 3-port Ethernet switch driver.
void ksz8863SetUnknownMcastFwdPorts(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Set forward ports for unknown multicast packets.
Definition: ksz8863_driver.c:1238
error_t ethPadFrame(NetBuffer *buffer, size_t *length)
Ethernet frame padding.
Definition: ethernet_misc.c:147
#define KSZ8863_GLOBAL_CTRL3_IGMP_SNOOP_EN
Definition: ksz8863_driver.h:359
SwitchPortState ksz8863GetPortState(NetInterface *interface, uint8_t port)
Get port state.
Definition: ksz8863_driver.c:714
error_t ksz8863TagFrame(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Add tail tag to Ethernet frame.
Definition: ksz8863_driver.c:408
#define KSZ8863_PORTn_CTRL2_LEARNING_DIS
Definition: ksz8863_driver.h:438
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
#define KSZ8863_CHIP_ID0_FAMILY_ID_DEFAULT
Definition: ksz8863_driver.h:324
void ksz8863FlushStaticFdbTable(NetInterface *interface)
Flush static MAC table.
Definition: ksz8863_driver.c:1067
error_t ksz8863GetStaticFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the static MAC table.
Definition: ksz8863_driver.c:1005
error_t ksz8863UntagFrame(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Decode tail tag from incoming Ethernet frame.
Definition: ksz8863_driver.c:463
error_t netBufferAppend(NetBuffer *dest, const void *src, size_t length)
Append data a multi-part buffer.
Definition: net_mem.c:604
#define KSZ8863_GLOBAL_CTRL4_SW_MII_10BT
Definition: ksz8863_driver.h:366
#define KSZ8863_INDIRECT_CTRL0_TABLE_SEL_STATIC_MAC
Definition: ksz8863_driver.h:530
#define KSZ8863_GLOBAL_CTRL0_FLUSH_DYNAMIC_MAC_TABLE
Definition: ksz8863_driver.h:334
#define KSZ8863_GLOBAL_CTRL0_FLUSH_STATIC_MAC_TABLE
Definition: ksz8863_driver.h:335
uint8_t ksz8863ReadSwitchReg(NetInterface *interface, uint8_t address)
Read switch register.
Definition: ksz8863_driver.c:1381
void ksz8863SetAgingTime(NetInterface *interface, uint32_t agingTime)
Set aging time for dynamic filtering entries.
Definition: ksz8863_driver.c:777
void ksz8863EventHandler(NetInterface *interface)
KSZ8863 event handler.
Definition: ksz8863_driver.c:283
__weak_func void ksz8863InitHook(NetInterface *interface)
KSZ8863 custom configuration.
Definition: ksz8863_driver.c:183
NicDuplexMode ksz8863GetDuplexMode(NetInterface *interface, uint8_t port)
Get duplex mode.
Definition: ksz8863_driver.c:604
const SwitchDriver ksz8863SwitchDriver
KSZ8863 Ethernet switch driver.
Definition: ksz8863_driver.c:45
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
void ksz8863SetPortState(NetInterface *interface, uint8_t port, SwitchPortState state)
Set port state.
Definition: ksz8863_driver.c:658
uint32_t ksz8863GetLinkSpeed(NetInterface *interface, uint8_t port)
Get link speed.
Definition: ksz8863_driver.c:550
TCP/IP stack core.
Helper functions for Ethernet.
Debugging facilities.
uint16_t ksz8863ReadPhyReg(NetInterface *interface, uint8_t port, uint8_t address)
Read PHY register.
Definition: ksz8863_driver.c:1276
#define KSZ8863_PORTn_CTRL2_TRANSMIT_EN
Definition: ksz8863_driver.h:436
const uint8_t ksz8863IngressTailTag[3]
Tail tag rules (host to KSZ8863)
Definition: ksz8863_driver.c:77
void ksz8863EnableIgmpSnooping(NetInterface *interface, bool_t enable)
Enable IGMP snooping.
Definition: ksz8863_driver.c:789