@@ -202,50 +202,50 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) {
202
202
}
203
203
204
204
mp_obj_t common_hal_wifi_radio_get_ipv4_gateway (wifi_radio_obj_t * self ) {
205
- if (! netif_is_up ( NETIF_STA ) ) {
205
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_STA ) != CYW43_LINK_UP ) {
206
206
return mp_const_none ;
207
207
}
208
208
return common_hal_ipaddress_new_ipv4address (NETIF_STA -> gw .addr );
209
209
}
210
210
211
211
mp_obj_t common_hal_wifi_radio_get_ipv4_gateway_ap (wifi_radio_obj_t * self ) {
212
- if (! netif_is_up ( NETIF_AP ) ) {
212
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_AP ) != CYW43_LINK_UP ) {
213
213
return mp_const_none ;
214
214
}
215
215
return common_hal_ipaddress_new_ipv4address (NETIF_AP -> gw .addr );
216
216
}
217
217
218
218
mp_obj_t common_hal_wifi_radio_get_ipv4_subnet (wifi_radio_obj_t * self ) {
219
- if (! netif_is_up ( NETIF_STA ) ) {
219
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_STA ) != CYW43_LINK_UP ) {
220
220
return mp_const_none ;
221
221
}
222
222
return common_hal_ipaddress_new_ipv4address (NETIF_STA -> netmask .addr );
223
223
}
224
224
225
225
mp_obj_t common_hal_wifi_radio_get_ipv4_subnet_ap (wifi_radio_obj_t * self ) {
226
- if (! netif_is_up ( NETIF_AP ) ) {
226
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_AP ) != CYW43_LINK_UP ) {
227
227
return mp_const_none ;
228
228
}
229
229
return common_hal_ipaddress_new_ipv4address (NETIF_AP -> netmask .addr );
230
230
}
231
231
232
232
mp_obj_t common_hal_wifi_radio_get_ipv4_address (wifi_radio_obj_t * self ) {
233
- if (! netif_is_up ( NETIF_STA ) ) {
233
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_STA ) != CYW43_LINK_UP ) {
234
234
return mp_const_none ;
235
235
}
236
236
return common_hal_ipaddress_new_ipv4address (NETIF_STA -> ip_addr .addr );
237
237
}
238
238
239
239
mp_obj_t common_hal_wifi_radio_get_ipv4_address_ap (wifi_radio_obj_t * self ) {
240
- if (! netif_is_up ( NETIF_AP ) ) {
240
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_AP ) != CYW43_LINK_UP ) {
241
241
return mp_const_none ;
242
242
}
243
243
return common_hal_ipaddress_new_ipv4address (NETIF_AP -> ip_addr .addr );
244
244
}
245
245
246
246
mp_obj_t common_hal_wifi_radio_get_ipv4_dns (wifi_radio_obj_t * self ) {
247
247
uint32_t addr = dns_getserver (0 )-> addr ;
248
- if (! netif_is_up ( NETIF_STA ) || addr == 0 ) {
248
+ if (cyw43_tcpip_link_status ( & cyw43_state , CYW43_ITF_STA ) != CYW43_LINK_UP || addr == 0 ) {
249
249
return mp_const_none ;
250
250
}
251
251
return common_hal_ipaddress_new_ipv4address (addr );
0 commit comments