Skip to content

Commit 797bdde

Browse files
committed
extmod/network_wiznet5k: Adjust ip types for ipv6.
1 parent 73e2444 commit 797bdde

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

extmod/network_wiznet5k.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ STATIC err_t wiznet5k_netif_init(struct netif *netif) {
304304

305305
STATIC void wiznet5k_lwip_init(wiznet5k_obj_t *self) {
306306
ip_addr_t ipconfig[4];
307-
ipconfig[0].addr = 0;
308-
ipconfig[1].addr = 0;
309-
ipconfig[2].addr = 0;
310-
ipconfig[3].addr = 0;
311-
netif_add(&self->netif, &ipconfig[0], &ipconfig[1], &ipconfig[2], self, wiznet5k_netif_init, ethernet_input);
307+
IP_ADDR4(ipconfig[0], 0, 0, 0, 0);
308+
IP_ADDR4(ipconfig[1], 0, 0, 0, 0);
309+
IP_ADDR4(ipconfig[2], 0, 0, 0, 0);
310+
IP_ADDR4(ipconfig[3], 0, 0, 0, 0);
311+
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);
312312
self->netif.name[0] = 'e';
313313
self->netif.name[1] = '0';
314314
netif_set_default(&self->netif);
@@ -801,7 +801,7 @@ STATIC mp_obj_t wiznet5k_isconnected(mp_obj_t self_in) {
801801
wizphy_getphylink() == PHY_LINK_ON
802802
&& IS_ACTIVE(self)
803803
#if WIZNET5K_WITH_LWIP_STACK
804-
&& self->netif.ip_addr.addr != 0
804+
&& ip_2_ip4(&self->netif.ip_addr)->addr != 0
805805
#endif
806806
);
807807
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy