Skip to content

Commit 7a45cb6

Browse files
committed
extmod/network_wiznet5k: Adjust ip types for ipv6.
1 parent 51979b6 commit 7a45cb6

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
@@ -305,11 +305,11 @@ STATIC err_t wiznet5k_netif_init(struct netif *netif) {
305305

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

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