diff --git a/extmod/modnetwork.c b/extmod/modnetwork.c index e05bfdb11d..b698ee4cf4 100644 --- a/extmod/modnetwork.c +++ b/extmod/modnetwork.c @@ -163,4 +163,6 @@ mp_obj_t mod_network_nic_ifconfig(struct netif *netif, size_t n_args, const mp_o #endif +MP_REGISTER_ROOT_POINTER(mp_obj_list_t mod_network_nic_list); + #endif // MICROPY_PY_NETWORK diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 3bff3e474d..0603d82166 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -244,8 +244,6 @@ extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_PORT_ROOT_POINTERS \ struct _machine_timer_obj_t *timer_table[MICROPY_HW_PIT_NUM_CHANNELS]; \ void *machine_pin_irq_objects[MICROPY_HW_NUM_PIN_IRQS]; \ - /* list of registered NICs */ \ - mp_obj_list_t mod_network_nic_list; \ /* root pointers defined by a board */ \ MICROPY_BOARD_ROOT_POINTERS \ diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h index 11b106999a..badcce8e6f 100644 --- a/ports/renesas-ra/mpconfigport.h +++ b/ports/renesas-ra/mpconfigport.h @@ -185,9 +185,6 @@ /* pointers to all UART objects (if they have been created) */ \ struct _machine_uart_obj_t *machine_uart_obj_all[MICROPY_HW_MAX_UART + MICROPY_HW_MAX_LPUART]; \ \ - /* list of registered NICs */ \ - /* mp_obj_list_t mod_network_nic_list; */ \ - \ /* root pointers for sub-systems */ \ \ /* root pointers defined by a board */ \ diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 8b7cb7ca42..182a3db02d 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -135,12 +135,6 @@ #define MICROPY_BOARD_ENTER_BOOTLOADER(nargs, args) #endif -#if MICROPY_PY_NETWORK -#define NETWORK_ROOT_POINTERS mp_obj_list_t mod_network_nic_list; -#else -#define NETWORK_ROOT_POINTERS -#endif - #if MICROPY_PY_BLUETOOTH #define MICROPY_PORT_ROOT_POINTER_BLUETOOTH struct _machine_uart_obj_t *mp_bthci_uart; #else @@ -227,7 +221,6 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_wiznet5k; void *rp2_uart_rx_buffer[2]; \ void *rp2_uart_tx_buffer[2]; \ void *machine_i2s_obj[2]; \ - NETWORK_ROOT_POINTERS \ MICROPY_BOARD_ROOT_POINTERS \ MICROPY_PORT_ROOT_POINTER_BLUETOOTH \ diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index bf7183a81d..83986296c9 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -272,9 +272,6 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_cc3k; /* USB_VCP IRQ callbacks (if they have been set) */ \ mp_obj_t pyb_usb_vcp_irq[MICROPY_HW_USB_CDC_NUM]; \ \ - /* list of registered NICs */ \ - mp_obj_list_t mod_network_nic_list; \ - \ /* root pointers defined by a board */ \ MICROPY_BOARD_ROOT_POINTERS \