diff --git a/examples/rp2040/pico-rmii/driver_rp2040_rmii.c b/examples/rp2040/pico-rmii/driver_rp2040_rmii.c index 5a244d24..b61bd450 100644 --- a/examples/rp2040/pico-rmii/driver_rp2040_rmii.c +++ b/examples/rp2040/pico-rmii/driver_rp2040_rmii.c @@ -256,7 +256,6 @@ static bool mg_tcpip_driver_rp2040_rmii_init(struct mg_tcpip_if *ifp) { (struct mg_tcpip_driver_rp2040_rmii_data *) ifp->driver_data; uint rx_sm_addr, tx_sm_addr; s_ifp = ifp; - if (ifp->queue.len == 0) ifp->queue.len = 8192; rx_sm_addr = pio_add_program(pio0, &rmii_rx_program); tx_sm_addr = pio_add_program(pio0, &rmii_tx_program); smi_wr_addr = pio_add_program(pio0, &smi_wr_program); @@ -338,7 +337,7 @@ static void rx_irq(void) { } static size_t mg_tcpip_driver_rp2040_rmii_rx(void *buf, size_t buflen, struct mg_tcpip_if *ifp) { - size_t len = mg_tcpip_qread(buf, ifp); + size_t len = 0; // mg_tcpip_qread(buf, ifp); if (len == 0) return 0; len -= 4; // exclude CRC from frame length uint32_t crc = crc_calc(buf, len); // calculate CRC and compare diff --git a/examples/rp2040/pico-rndis-dashboard/main.c b/examples/rp2040/pico-rndis-dashboard/main.c index 07846396..1ebd3292 100644 --- a/examples/rp2040/pico-rndis-dashboard/main.c +++ b/examples/rp2040/pico-rndis-dashboard/main.c @@ -56,13 +56,13 @@ int main(void) { mg_mgr_init(&mgr); // and attach it to the MIP interface mg_timer_add(&mgr, 500, MG_TIMER_REPEAT, blink_cb, &mgr); - struct mg_tcpip_driver driver = {.tx = usb_tx, .rx = mg_tcpip_driver_rx, .up = usb_up}; + struct mg_tcpip_driver driver = {.tx = usb_tx, .up = usb_up}; struct mg_tcpip_if mif = {.mac = {2, 0, 1, 2, 3, 0x77}, .ip = mg_htonl(MG_U32(192, 168, 3, 1)), .mask = mg_htonl(MG_U32(255, 255, 255, 0)), .enable_dhcp_server = true, .driver = &driver, - .queue.len = 4096}; + .recv_queue.size = 4096}; s_ifp = &mif; mg_tcpip_init(&mgr, &mif); tusb_init(); diff --git a/examples/stm32/nucleo-f429zi-rndis/main.c b/examples/stm32/nucleo-f429zi-rndis/main.c index ba6dd324..b4bbe32e 100644 --- a/examples/stm32/nucleo-f429zi-rndis/main.c +++ b/examples/stm32/nucleo-f429zi-rndis/main.c @@ -88,8 +88,7 @@ int main(void) { MG_INFO(("Init TCP/IP stack ...")); - struct mg_tcpip_driver driver = { - .tx = usb_tx, .rx = mg_tcpip_driver_rx, .up = usb_up}; + struct mg_tcpip_driver driver = {.tx = usb_tx, .up = usb_up}; struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), .ip = mg_htonl(MG_U32(192, 168, 3, 1)), .mask = mg_htonl(MG_U32(255, 255, 255, 0)), diff --git a/examples/stm32/nucleo-f746zg-rndis/main.c b/examples/stm32/nucleo-f746zg-rndis/main.c index 8aee5af3..6bf7ff83 100644 --- a/examples/stm32/nucleo-f746zg-rndis/main.c +++ b/examples/stm32/nucleo-f746zg-rndis/main.c @@ -88,14 +88,13 @@ int main(void) { MG_INFO(("Init TCP/IP stack ...")); - struct mg_tcpip_driver driver = { - .tx = usb_tx, .rx = mg_tcpip_driver_rx, .up = usb_up}; + struct mg_tcpip_driver driver = {.tx = usb_tx, .up = usb_up}; struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), .ip = mg_htonl(MG_U32(192, 168, 3, 1)), .mask = mg_htonl(MG_U32(255, 255, 255, 0)), .enable_dhcp_server = true, .driver = &driver, - .queue.len = 4096}; + .recv_queue.size = 4096}; s_ifp = &mif; mg_tcpip_init(&mgr, &mif); mg_timer_add(&mgr, 500, MG_TIMER_REPEAT, blink_cb, &mgr);