You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reason for change: Add RBUS event publishing for active Wi-Fi / POD client presence. Guard low-power functionality with LPM_MANAGER_SUPPORT.
Test Procedure: Validate by no clients connected, atleast one WiFi client, atleast one POD client and confirm the LPM state changes as expected
Risks: Medium
Priority: P1
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Query OneWifi for associated devices on the mesh backhaul access points when no active WiFi clients are known to LM Lite. This prevents low-power idle behavior while mesh pods are connected.
Wrap ActiveWiFiClientsPresent state tracking, RBUS handlers, event registration, and related declarations with LPM_MANAGER_SUPPORT to prevent low-power manager code from being built when the feature is disabled.
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
1 out of 2 committers have signed the CLA. ✅ snayak002c ❌ JYMatanki You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.
Check the XHS host table for active Wi-Fi and MLD clients when resource optimization is disabled, ensuring low-power client detection includes SSID 3/4 devices.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Presence reporting can miss XHS clients in resource-optimized builds and leave subscribers with stale state after entering bridge mode.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Optimized builds miss XHS-only Wi-Fi clients
source/lm/lm_main.c:2916
With both LPM_MANAGER_SUPPORT and RESOURCE_OPTIMIZATION enabled, an XHS-only connection is reported as no active Wi-Fi clients. Wifi_ServerSyncHost() routes SSID 3/4 updates into a branch compiled out in optimized builds (lines 3950–4087), so these clients are absent from lmHosts as well as XlmHosts. The remaining fallback checks only backhaul APs 13/14. Both GET and published events can therefore report false while an XHS client is connected. Query the XHS association counts directly in optimized builds, or retain minimal XHS association tracking, before reporting absence.
Bridge mode skips publication after host removal
source/lm/lm_main.c:3150
The publisher runs only in the non-bridge branch. If true was published before entering bridge mode, the bridge branch clears lmHosts with Hosts_RmHosts() but never calls the publisher while bridge mode remains active. With no XHS clients or pods, GET then returns false while an existing subscriber receives no update and can retain true indefinitely. The consumer's initial GET after subscribing does not cover this later transition. Move the low-power publication check outside the bridge/non-bridge conditional so it also observes host removal.
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Reason for change:Rbus publish for active wifi clients
Test Procedure: Rbus publish when clients connect or disconnect
Risks: High
Priority: P1
Priority: P1
Reconcile active-client count during host-table teardown
source/lm/lm_main.c:3185
[P2] The new counter is never reconciled when the bridge-mode path calls Hosts_RmHosts(), which deletes the main host table without running active-state transitions. If Wi-Fi clients were active before that cleanup, returning to router mode leaves a positive count even with no clients or pods; subsequent connects/disconnects retain the stale offset. Reconcile the counter during host-table teardown/rebuild while preserving any XHS contribution, or derive presence from the current host tables instead.
Hosts_RmHosts() clears the host table during bridge mode without decrementing or resetting this counter. After router mode resumes, rebuilding the table can count clients again, leaving a positive total even after every client disconnects and indefinitely reporting presence. Reconcile the counter when hosts are removed, under the appropriate locks, while preserving any separately tracked XHS clients.
Prevent stale polling results from overwriting newer publications
source/lm/lm_main.c:3193
After polling reads zero clients and releases the count mutex, a Wi-Fi connection can publish true while the pod query runs; the poll can then overwrite it with its stale false result. LpmPublishMutex serializes publications but not their snapshots, so consumers can see false absence until the next poll. Coordinate sampling with publication, or use a state generation to discard outdated observations before publishing.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The supplied review evidence identifies unresolved presence-tracking and notification errors that can leave the low-power manager out of sync with actual connectivity.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Presence reporting can remain incorrect because last-POD disconnects are not published, bridge-mode host removal leaves stale counts, and concurrent updates can publish outdated state.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
With RESOURCE_OPTIMIZATION disabled, resetting the combined Wi-Fi/XHS counter while XHS entries remain active can cause later Wi-Fi events to falsely report that no clients are active.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Reason for change: Add RBUS event publishing for active Wi-Fi / POD client presence. Guard low-power functionality with LPM_MANAGER_SUPPORT.
Test Procedure: Validate by no clients connected, atleast one WiFi client, atleast one POD client and confirm the LPM state changes as expected
Risks: Medium
Priority: P1