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
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new EasyMesh (EM) bus event to publish client disassociation statistics, including per-STA traffic counters, the disassociation reason code, and a basic placeholder for Wi-Fi 7 MLO “Affiliated STA Metrics”.
Changes:
Introduces a new EM bus event name (Device.WiFi.EM.ClientDisassocStats) and registers it in em_init().
Publishes a JSON payload on STA disassociation, using cached per-STA counters when available.
Adds initial (placeholder) MLO affiliated STA metrics emission and improves some validation/return codes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File
Description
source/apps/em/wifi_em.h
Adds the bus event name constant for client disassociation stats.
source/apps/em/wifi_em.c
Publishes the new disassociation stats event and registers it on the EM bus.
Hi @santhoshg6, the unified-wifi-mesh side of this is up for review: rdkcentral/unified-wifi-mesh#806. The agent subscribes to Device.WiFi.EM.ClientDisassocStats and sends the Client Disassociation Stats message from it, and the controller publishes DisassociationEvent.Disassociated!. We tested both changes together on a device.
#806 depends on this PR. Could you address the open review comments so it can move forward?
MLO affiliated entries use duplicate MLD addresses
source/apps/em/wifi_em.c:1827
Even when MLO metadata is available, this uses the MLD address for every valid link, producing duplicate STA identifiers. cli_LinkInfo[link_idx].cli_LinkAddress is the per-link address already populated/used by the monitor (source/stats/wifi_monitor.c:2166); serialize that address for each affiliated entry instead.
Stale reverse-index entries survive MLO link replacement
source/apps/em/wifi_em.c:400
When the sampled MLO link changes, this removes only the mapping for the new link_key; older link keys for the same primary MLD remain in link_mac_map. After the primary stats entry is removed on one disassociation, a later event using one of those stale keys resolves to a deleted primary key and is published without cached counters. Remove or otherwise invalidate all reverse-index entries that point to the primary key when replacing/removing that client.
This issue also appears on line 1781 of the same file.
- Publish client disassociation stats over EM bus
- Include traffic counters and reason code in JSON payload
- Add basic MLO affiliated STA metrics support
- Improve validation and error handling
- Fix return codes and memory handling
I have addressed all the review comments and updated the PR accordingly. Could you please review it and merge it if everything looks good?
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.