We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae699ba + 95c1d84 commit ab83c98Copy full SHA for ab83c98
ports/raspberrypi/common-hal/wifi/Radio.c
@@ -161,7 +161,15 @@ void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self) {
161
// (by tcpip_link_status). However since ap disconnection isn't working
162
// either, this is not an issue.
163
cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP);
164
-
+ const size_t timeout_ms = 500;
165
+ uint64_t start = port_get_raw_ticks(NULL);
166
+ uint64_t deadline = start + timeout_ms;
167
+ while (port_get_raw_ticks(NULL) < deadline && (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_STA) != CYW43_LINK_DOWN)) {
168
+ RUN_BACKGROUND_TASKS;
169
+ if (mp_hal_is_interrupted()) {
170
+ break;
171
+ }
172
173
bindings_cyw43_wifi_enforce_pm();
174
}
175
0 commit comments