Merge pull request #3671 from cesanta/netc-mdns
Some checks failed
Build and test - essentials / linux eth_test CC=clang++ SSL= (push) Failing after 4s
Build and test - essentials / linux mip_test CC=clang++ SSL= (push) Failing after 3s
Build and test - essentials / linux ppp_test CC=clang++ SSL= (push) Failing after 3s
Build and test - essentials / linux test CC=clang++ SSL= (push) Failing after 2s
Build and test - essentials / linux mip_test CC=clang++ SSL=BUILTIN (push) Failing after 2s
Build and test - essentials / linux test CC=clang++ SSL=BUILTIN (push) Failing after 2s
Build and test - essentials / linux eth_test CC=gcc SSL= (push) Failing after 3s
Build and test - essentials / linux mip_test CC=gcc SSL= (push) Failing after 2s
Build and test - essentials / linux ppp_test CC=gcc SSL= (push) Failing after 2s
Build and test - essentials / linux test CC=gcc SSL= (push) Failing after 2s
Build and test - essentials / linux mip_test CC=gcc SSL=BUILTIN (push) Failing after 2s
Build and test - essentials / linux test CC=gcc SSL=BUILTIN (push) Failing after 2s
Build and test - essentials / s390 (push) Failing after 2s
Build and test - essentials / armhf (push) Failing after 2s
Build and test - essentials / unamalgamated-mg_prefix (push) Failing after 2s
Build and test - essentials / windows mingw++ (push) Failing after 3s
Build and test - essentials / windows vc22 (push) Failing after 2s
Build and test - essentials / windows vc98 (push) Failing after 2s
Build and test - essentials / arm (push) Failing after 2s
Build and test - essentials / riscv (push) Failing after 2s
Build and test - essentials / tutorials (push) Failing after 2s
Build and test - essentials / infineon/xmc47_relax-make-baremetal-builtin (push) Failing after 3s
Build and test - essentials / infineon/xmc72_evk-make-baremetal-builtin (push) Failing after 2s
Build and test - essentials / infineon/xmc_plt2go_4400-make-baremetal-builtin (push) Failing after 2s
Build and test - essentials / nxp/frdm-mcxn947-make-baremetal-builtin (push) Failing after 3s
Build and test - essentials / nxp/frdm-mcxn947-make-freertos-builtin (push) Failing after 2s
Build and test - essentials / nxp/rt1020-evk-make-baremetal-builtin (push) Failing after 2s
Build and test - essentials / nxp/rt1060-evk-make-baremetal-builtin (push) Failing after 1s
Build and test - essentials / nxp/rt1170-evk-make-baremetal-builtin (push) Failing after 3s
Build and test - essentials / stm32/nucleo-f429zi/minimal (push) Failing after 3s
Build and test - essentials / stm32/nucleo-f746zg/minimal (push) Failing after 2s
Build and test - essentials / stm32/nucleo-h563zi/minimal (push) Failing after 2s
Build and test - essentials / stm32/nucleo-h723zg/minimal-bsd (push) Failing after 2s
Build and test - essentials / stm32/nucleo-h723zg/minimal (push) Failing after 3s
Build and test - essentials / stm32/nucleo-h743zi/minimal (push) Failing after 2s
Build and test - essentials / stm32/stm32h573i-dk/minimal (push) Failing after 2s
Build and test - essentials / ti/ek-tm4c1294xl-make-baremetal-builtin (push) Failing after 2s
Build and test - essentials / ti/ek-tm4c1294xl-make-freertos-builtin (push) Failing after 2s
Build and test - essentials / http/http-client/esp8266/http-client-server (push) Failing after 2s
Build and test - essentials / http/uart-bridge/esp32 (push) Failing after 2s
Build and test - essentials / rp/pico-rm2 (push) Failing after 2s
Build and test - essentials / stm32/nucleo-f429zi/minimal-rm2 (push) Failing after 2s
Build and test - essentials / stm32/nucleo-f746zg/minimal-rm2 (push) Failing after 2s
Build and test - essentials / stm32/nucleo-g031k8/minimal-w5500 (push) Failing after 2s
Build and test - essentials / esp32 (push) Failing after 2s
Build and test - essentials / http/device-dashboard/microchip/same54-xpro (push) Failing after 2s
Build and test - essentials / nxp/rt1020-evk-make-freertos-builtin (push) Failing after 2s
Build and test - essentials / nxp/rt1060-evk-make-freertos-builtin (push) Failing after 2s
Build and test - essentials / nxp/rt1170-evk-make-freertos-builtin (push) Failing after 2s
Build and test - essentials / renesas/ek-ra6m4-make-baremetal-builtin (push) Failing after 2s
Build and test - essentials / rp/pico-rndis (push) Failing after 2s
Build and test - essentials / rp/pico-w (push) Failing after 2s
Build and test - essentials / rp/w5500-evb-pico (push) Failing after 2s
Build and test - essentials / rp/w55rp20-evb-pico (push) Failing after 2s
Build and test - essentials / macos SSL= (push) Has been cancelled
Build and test - essentials / macos SSL=BUILTIN (push) Has been cancelled
Build and test - essentials / tutorials_win (push) Has been cancelled
Build and test - essentials / tutorials_mac (push) Has been cancelled

Enable multicast in NETC driver
This commit is contained in:
robertc2000 2026-08-25 10:56:47 +03:00 committed by GitHub
commit 6b5d358ede
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 2 deletions

View file

@ -28702,7 +28702,9 @@ struct netc_enetc { // 53.4.6.6
struct {
volatile uint32_t PSIPMAR0, PSIPMAR1, PSIVLANR, reserved0, PSICFGR0,
PSICFGR1, PSICFGR2;
volatile uint8_t reserved1[0x64];
volatile uint8_t reserved1[0x3c];
volatile uint32_t PSIMMHFR0, PSIMMHFR1;
volatile uint8_t reserved2[0x20];
} PSI[1];
};
@ -29045,7 +29047,18 @@ static size_t mg_tcpip_driver_netc_tx(const void *buf, size_t len,
return len;
}
static void mg_tcpip_driver_netc_update_hash_table(struct mg_tcpip_if *ifp) {
// mcast address has NETC XOR hash index 56 (RM 53.4.2.3.1.3.8.4.1)
NETC_ENETC1->PSI[0].PSIMMHFR0 = 0;
NETC_ENETC1->PSI[0].PSIMMHFR1 = MG_BIT(24);
(void) ifp;
}
static bool mg_tcpip_driver_netc_poll(struct mg_tcpip_if *ifp, bool s1) {
if (ifp->update_mac_hash_table) {
mg_tcpip_driver_netc_update_hash_table(ifp);
ifp->update_mac_hash_table = false;
}
if (!s1) return false;
struct mg_tcpip_driver_netc_data *d =
(struct mg_tcpip_driver_netc_data *) ifp->driver_data;

View file

@ -31,7 +31,9 @@ struct netc_enetc { // 53.4.6.6
struct {
volatile uint32_t PSIPMAR0, PSIPMAR1, PSIVLANR, reserved0, PSICFGR0,
PSICFGR1, PSICFGR2;
volatile uint8_t reserved1[0x64];
volatile uint8_t reserved1[0x3c];
volatile uint32_t PSIMMHFR0, PSIMMHFR1;
volatile uint8_t reserved2[0x20];
} PSI[1];
};
@ -374,7 +376,18 @@ static size_t mg_tcpip_driver_netc_tx(const void *buf, size_t len,
return len;
}
static void mg_tcpip_driver_netc_update_hash_table(struct mg_tcpip_if *ifp) {
// mcast address has NETC XOR hash index 56 (RM 53.4.2.3.1.3.8.4.1)
NETC_ENETC1->PSI[0].PSIMMHFR0 = 0;
NETC_ENETC1->PSI[0].PSIMMHFR1 = MG_BIT(24);
(void) ifp;
}
static bool mg_tcpip_driver_netc_poll(struct mg_tcpip_if *ifp, bool s1) {
if (ifp->update_mac_hash_table) {
mg_tcpip_driver_netc_update_hash_table(ifp);
ifp->update_mac_hash_table = false;
}
if (!s1) return false;
struct mg_tcpip_driver_netc_data *d =
(struct mg_tcpip_driver_netc_data *) ifp->driver_data;