diff options
| author | Felix Dörre <felix@dogcraft.de> | 2022-08-25 18:02:43 +0000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-02-16 11:51:12 +1100 |
| commit | 223e0d9a5b116246bda1621201e77945ac5746fe (patch) | |
| tree | f2a2a8ca6ab7921c9c952628c414f8d4f9287cd8 | |
| parent | 628abf8f25a7705a2810fffe2ca6ae652c532896 (diff) | |
extmod/network_wiznet5k: Adjust IP types for IPv6.
Signed-off-by: Felix Dörre <felix@dogcraft.de>
| -rw-r--r-- | extmod/network_wiznet5k.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/extmod/network_wiznet5k.c b/extmod/network_wiznet5k.c index d49ee8614..d4841e017 100644 --- a/extmod/network_wiznet5k.c +++ b/extmod/network_wiznet5k.c @@ -305,11 +305,11 @@ STATIC err_t wiznet5k_netif_init(struct netif *netif) { STATIC void wiznet5k_lwip_init(wiznet5k_obj_t *self) { ip_addr_t ipconfig[4]; - ipconfig[0].addr = 0; - ipconfig[1].addr = 0; - ipconfig[2].addr = 0; - ipconfig[3].addr = 0; - netif_add(&self->netif, &ipconfig[0], &ipconfig[1], &ipconfig[2], self, wiznet5k_netif_init, ethernet_input); + IP_ADDR4(&ipconfig[0], 0, 0, 0, 0); + IP_ADDR4(&ipconfig[1], 0, 0, 0, 0); + IP_ADDR4(&ipconfig[2], 0, 0, 0, 0); + IP_ADDR4(&ipconfig[3], 0, 0, 0, 0); + netif_add(&self->netif, ip_2_ip4(&ipconfig[0]), ip_2_ip4(&ipconfig[1]), ip_2_ip4(&ipconfig[2]), self, wiznet5k_netif_init, ethernet_input); self->netif.name[0] = 'e'; self->netif.name[1] = '0'; netif_set_default(&self->netif); @@ -802,7 +802,7 @@ STATIC mp_obj_t wiznet5k_isconnected(mp_obj_t self_in) { wizphy_getphylink() == PHY_LINK_ON && IS_ACTIVE(self) #if WIZNET5K_WITH_LWIP_STACK - && self->netif.ip_addr.addr != 0 + && ip_2_ip4(&self->netif.ip_addr)->addr != 0 #endif ); } |
