Skip to content

[SL-UP] Refactor Platform WiFi events - #1191

Merged
Rohan Sahay (rosahay-silabs) merged 67 commits into
release_2.10-1.6.1from
refactor/platform-wifi-events
Sep 23, 2026
Merged

Rohan Sahay (rosahay-silabs) merged 67 commits into
release_2.10-1.6.1from
refactor/platform-wifi-events

Conversation

@rosahay-silabs

@rosahay-silabs Rohan Sahay (rosahay-silabs) commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move WiFi reconnect/retry out of WifiInterface into ConnectivityManagerImpl, so station connect/disconnect/reconnect is driven by one state machine.
  • Rename Silabs platform WiFi events (kWFXSystemEvent → kPlatformSLEvent, add public kSLSystemEvent) and replace ConfigureStationMode() with EnableStationMode().
  • Track last disconnect reason and map SiWx status codes to NetworkCommissioningStatusEnum (NC status reporting still has TODOs to use it).

Related issues

N/A

Testing

  • manually tested commissioning
  • reconnection of access point due to loss of access point
  • reconnection due to device reboot

…improved error handling and clarity. Simplify exit logic by removing unnecessary exit label.
… handling to streamline the connection process.
…tials if the station is provisioned before connecting to a new network. Add comments for clarity on the connection process.
…essages for WiFi events and streamline state transitions by removing unnecessary checks. Enhance error handling in setting WiFi station mode and improve clarity in DriveStationState logic.
…itialize mLastDisconnectionReason to kUnknownError for improved error tracking.
Map join/disconnect failures to disconnection reasons and let ConnectivityManager drive station state.
Map join/disconnect failures to disconnection reasons and let ConnectivityManager drive station state.
@silabs-matter-ci-bot silabs-matter-ci-bot Bot added the sl-up This TAG indicates that this commit needs to be upstreamed to CSA before its next release. label Sep 12, 2026
Comment thread src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp Outdated
Comment thread src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp Outdated
Comment thread src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp
Comment thread src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp Outdated
Comment thread src/platform/silabs/wifi/SiWx/WifiInterfaceImpl.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp Outdated
Comment thread examples/platform/silabs/MatterConfig.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp Outdated
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/NetworkCommissioningWiFiDriver.cpp Outdated
Comment thread src/platform/silabs/NetworkCommissioningWiFiDriver.cpp Outdated
Comment thread src/platform/silabs/NetworkCommissioningWiFiDriver.cpp Outdated
…t by replacing TEMPORARY_RETURN_IGNORED with ReturnOnFailure
…ilure with LogErrorOnFailure in WiFi state management and scanning processes
…iguration by consolidating error handling for SSID and PSK
…king status updates and refining state transition checks
… logging for connection and disconnection events
@sabollim-silabs

Copy link
Copy Markdown
Contributor

bugbot review

@cursor

cursor Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
Changes core WiFi station lifecycle, reconnection, and network commissioning error reporting on Silicon Labs; regressions could affect pairing, reconnect after AP loss/reboot, and ICD/LIT disconnect paths.

Overview
Refactors Silicon Labs WiFi so connect, disconnect, and reconnect are owned by ConnectivityManagerImpl instead of timer-based retries inside WifiInterface.

The station state machine gains explicit auto-connect and pending-disconnect handling, timed reconnect after failures, and a new _DisconnectNetwork() path used by network commissioning. Platform WiFi events are renamed (kWFXSystemEvent → kPlatformSLEvent; public kSLSystemEvent), and station setup moves from ConfigureStationMode() to EnableStationMode() / optional disable. WifiInterface drops its retry timer; SiWx stores the last disconnect reason, maps Si91x status codes to NetworkCommissioningStatusEnum, and reports failures through NotifyDisconnection. SlWiFiDriver loads credentials via RevertConfiguration, routes connects through ConnectivityMgr().DisconnectNetwork() / station mode toggles, and surfaces connect/status callbacks using mapped disconnect reasons instead of auto-committing on success. WiFi shell commands register SlWiFiDriver when SL_WIFI is enabled.

Reviewed by Cursor Bugbot for commit 7df0bd3. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/NetworkCommissioningWiFiDriver.cpp
…ducing previous state tracking and adjusting auto-connect logic
@rosahay-silabs

Copy link
Copy Markdown
Contributor Author

bugbot review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/NetworkCommissioningWiFiDriver.cpp
…elated to LIT connect management in ConnectivityManager
@rosahay-silabs

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
…cing managed disconnect state and adjusting auto-connect logic
…WiFi disconnection handling and auto-connect logic
@rosahay-silabs

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
…te transitions and improving auto-connect logic
@rosahay-silabs

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7df0bd3. Configure here.

Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
Comment thread src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp
@rosahay-silabs
Rohan Sahay (rosahay-silabs) merged commit 287203e into release_2.10-1.6.1 Sep 23, 2026
87 checks passed
@rosahay-silabs
Rohan Sahay (rosahay-silabs) deleted the refactor/platform-wifi-events branch September 23, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sl-up This TAG indicates that this commit needs to be upstreamed to CSA before its next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants