ksz8775_driver.c
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:559
void ksz8775EnableRsvdMcastTable(NetInterface *interface, bool_t enable)
Enable reserved multicast table.
Definition: ksz8775_driver.c:959
#define KSZ8775_GLOBAL_CTRL3_SW5_IGMP_SNOOP_EN
Definition: ksz8775_driver.h:427
error_t ksz8775DeleteStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Remove an entry from the static MAC table.
Definition: ksz8775_driver.c:1103
void ksz8775FlushStaticFdbTable(NetInterface *interface)
Flush static MAC table.
Definition: ksz8775_driver.c:1234
void ksz8775DumpPhyReg(NetInterface *interface, uint8_t port)
Dump PHY registers for debugging purpose.
Definition: ksz8775_driver.c:1499
void ksz8775EnableMldSnooping(NetInterface *interface, bool_t enable)
Enable MLD snooping.
Definition: ksz8775_driver.c:931
__weak_func void ksz8775InitHook(NetInterface *interface)
KSZ8775 custom configuration.
Definition: ksz8775_driver.c:210
const SwitchDriver ksz8775SwitchDriver
KSZ8775 Ethernet switch driver.
Definition: ksz8775_driver.c:45
uint16_t ksz8775ReadPhyReg(NetInterface *interface, uint8_t port, uint8_t address)
Read PHY register.
Definition: ksz8775_driver.c:1473
#define KSZ8775_PORTn_CTRL2_LEARNING_DIS
Definition: ksz8775_driver.h:510
#define KSZ8775_PORTn_IF_CTRL6_IF_MODE_SEL_RGMII
Definition: ksz8775_driver.h:531
uint8_t ksz8775ReadSwitchReg(NetInterface *interface, uint16_t address)
Read switch register.
Definition: ksz8775_driver.c:1564
void ksz8775SetUnknownMcastFwdPorts(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Set forward ports for unknown multicast packets.
Definition: ksz8775_driver.c:1405
void ksz8775WritePhyReg(NetInterface *interface, uint8_t port, uint8_t address, uint16_t data)
Write PHY register.
Definition: ksz8775_driver.c:1450
#define KSZ8775_PORTn_CTRL2_TRANSMIT_EN
Definition: ksz8775_driver.h:508
void ksz8775SetPortState(NetInterface *interface, uint8_t port, SwitchPortState state)
Set port state.
Definition: ksz8775_driver.c:772
error_t ksz8775GetDynamicFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the dynamic MAC table.
Definition: ksz8775_driver.c:1274
#define KSZ8775_GLOBAL_CTRL16_UNKNOWN_MCAST_FWD
Definition: ksz8775_driver.h:655
#define KSZ8775_TAIL_TAG_NORMAL_ADDR_LOOKUP
Definition: ksz8775_driver.h:62
KSZ8775 5-port Ethernet switch driver.
#define KSZ8775_GLOBAL_CTRL4_SW5_SPEED
Definition: ksz8775_driver.h:434
void ksz8775SetAgingTime(NetInterface *interface, uint32_t agingTime)
Set aging time for dynamic filtering entries.
Definition: ksz8775_driver.c:891
const uint8_t ksz8775IngressTailTag[5]
Tail tag rules (host to KSZ8775)
Definition: ksz8775_driver.c:77
NicDuplexMode ksz8775GetDuplexMode(NetInterface *interface, uint8_t port)
Get duplex mode.
Definition: ksz8775_driver.c:693
error_t ksz8775Init(NetInterface *interface)
KSZ8775 Ethernet switch initialization.
Definition: ksz8775_driver.c:93
SwitchPortState ksz8775GetPortState(NetInterface *interface, uint8_t port)
Get port state.
Definition: ksz8775_driver.c:828
#define KSZ8775_GLOBAL_CTRL2_MAX_PKT_SIZE_CHECK_DIS
Definition: ksz8775_driver.h:423
#define KSZ8775_GLOBAL_CTRL4_SW5_HALF_DUPLEX_MODE
Definition: ksz8775_driver.h:432
void ksz8775DumpSwitchReg(NetInterface *interface)
Dump switch registers for debugging purpose.
Definition: ksz8775_driver.c:1607
error_t ethPadFrame(NetBuffer *buffer, size_t *length)
Ethernet frame padding.
Definition: ethernet_misc.c:147
void ksz8775EnableIgmpSnooping(NetInterface *interface, bool_t enable)
Enable IGMP snooping.
Definition: ksz8775_driver.c:903
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
uint32_t ksz8775GetLinkSpeed(NetInterface *interface, uint8_t port)
Get link speed.
Definition: ksz8775_driver.c:595
#define KSZ8775_PORTn_CTRL9_FORCED_DUPLEX
Definition: ksz8775_driver.h:552
error_t ksz8775UntagFrame(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Decode tail tag from incoming Ethernet frame.
Definition: ksz8775_driver.c:494
error_t ksz8775GetStaticFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the static MAC table.
Definition: ksz8775_driver.c:1172
bool_t ksz8775GetLinkState(NetInterface *interface, uint8_t port)
Get link state.
Definition: ksz8775_driver.c:546
#define KSZ8775_INDIRECT_CTRL0_TABLE_SEL_DYNAMIC_MAC
Definition: ksz8775_driver.h:592
#define KSZ8775_GLOBAL_CTRL16_UNKNOWN_MCAST_FWD_MAP_ALL
Definition: ksz8775_driver.h:663
error_t netBufferAppend(NetBuffer *dest, const void *src, size_t length)
Append data a multi-part buffer.
Definition: net_mem.c:604
#define KSZ8775_CHIP_ID0_FAMILY_ID_DEFAULT
Definition: ksz8775_driver.h:392
#define KSZ8775_INDIRECT_CTRL0_TABLE_SEL_STATIC_MAC
Definition: ksz8775_driver.h:590
#define KSZ8775_PORTn_CTRL2_RECEIVE_EN
Definition: ksz8775_driver.h:509
#define KSZ8775_PORTn_IF_CTRL6_IS_1GBPS
Definition: ksz8775_driver.h:522
#define KSZ8775_GLOBAL_CTRL16_UNKNOWN_MCAST_FWD_MAP
Definition: ksz8775_driver.h:656
#define KSZ8775_GLOBAL_CTRL0_FLUSH_STATIC_MAC_TABLE
Definition: ksz8775_driver.h:404
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
#define KSZ8775_GLOBAL_CTRL21_MLD_SNOOP_EN
Definition: ksz8775_driver.h:718
error_t ksz8775TagFrame(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Add tail tag to Ethernet frame.
Definition: ksz8775_driver.c:435
#define KSZ8775_GLOBAL_CTRL16_UNKNOWN_MCAST_FWD_MAP_PORT5
Definition: ksz8775_driver.h:662
TCP/IP stack core.
#define KSZ8775_GLOBAL_CTRL0_FLUSH_DYNAMIC_MAC_TABLE
Definition: ksz8775_driver.h:403
#define KSZ8775_PORTn_CTRL9_FORCED_SPEED
Definition: ksz8775_driver.h:551
error_t ksz8775AddStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Add a new entry to the static MAC table.
Definition: ksz8775_driver.c:1001
void ksz8775EventHandler(NetInterface *interface)
KSZ8775 event handler.
Definition: ksz8775_driver.c:310
#define KSZ8775_PORTn_IF_CTRL6_IF_MODE_SEL
Definition: ksz8775_driver.h:528
#define KSZ8775_GLOBAL_CTRL10_TAIL_TAG_EN
Definition: ksz8775_driver.h:472
Helper functions for Ethernet.
#define KSZ8775_INDIRECT_CTRL0_ADDR_9_8
Definition: ksz8775_driver.h:595
void ksz8775FlushDynamicFdbTable(NetInterface *interface, uint8_t port)
Flush dynamic MAC table.
Definition: ksz8775_driver.c:1358
Debugging facilities.
void ksz8775WriteSwitchReg(NetInterface *interface, uint16_t address, uint8_t data)
Write switch register.
Definition: ksz8775_driver.c:1523