extmod/network_cyw43: Disconnect STA if making inactive. #17305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
esp32 port will disconnect if
active(0)
is called on a STA interface, but rp2 port stays associated without this change.Noticed while running
multi_wlan
tests for #17272 with aboot.py
file in place that associates to my local network, as this test currently callsactive(0)
during init to disable any previous activity.This work was funded through GitHub Sponsors.
Testing
multi_wlan
tests on RPI_PICO_W and RPI_PICO2_W with this change and aboot.py
that associates to my local network. These tests now pass. Didn't test cyw43 on other ports, but happy to test more if necessary.cyw43_wifi_leave()
in corner cases (when interface inactive, already disconnected, mid-connection attempt, etc.) It does occasionally seem to reportjoin
state after being made inactive part-way through a connection attempt, which might indicate a driver race/bug(?) However it's generally consistent, and I think this change is still an improvement.Trade-offs and Alternatives
cyw43_wifi_set_up(..., CYW43_ITF_STA, false, ...)
currently a no-op.