georgerobotics / cyw43-driver

Other
79 stars 42 forks source link

Fix race in AP interface set up. #107

Closed eightycc closed 7 months ago

eightycc commented 9 months ago

Resolves race condition in #106 by moving the call to cyw43_wifi_ap_set_up after the call to cyw43_cb_tcpip_init in cyw43_wifi_set_up. Since bringing the link up by cyw43_wifi_ap_set_up completes asynchronously it is now guaranteed that the setting of NETIF_FLAG_LINK_UP will not get clobbered by cyw43_cb_tcpip_init if it finishes too early.

This will also resolve https://github.com/adafruit/circuitpython/issues/8718.

dpgeorge commented 7 months ago

Thanks for this, it's a good fix. Sorry it didn't get merged earlier.