RDKBWIFI-359: BTM Query support#1115
Open
prashant-singh1 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds BTM (BSS Transition Management) Query handling so that when a STA sends a BTM Query without a neighbor list, OneWiFi triggers a neighbor scan, filters candidates to local SSIDs, and responds with a BTM Request containing a candidate list.
Changes:
- Add new HAL event subtypes for WNM action frames and for sending BTM requests.
- Detect WNM action frames from received ACTION frames and route them to the EM app for BTM Query handling.
- Build/sort BTM candidates from neighbor scan results and send BTM Requests via the HAL.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| source/core/wifi_events.c | Adds string mappings for new event subtypes. |
| source/core/wifi_ctrl.c | Classifies ACTION frames as WNM vs public/DPP for event routing. |
| source/core/wifi_ctrl_queue_handlers.c | Adds BTM Request construction/sending and wires new event handling. |
| source/apps/em/wifi_em.h | Introduces WNM/802.11 constants and SSID list limits used by BTM logic. |
| source/apps/em/wifi_em.c | Implements BTM Query parsing, neighbor scan trigger, and candidate filtering. |
| include/wifi_events.h | Adds new event subtype enum values. |
| include/wifi_base.h | Adds em_btm_req_ctrl_msg_t and extends scan results with freq. |
Comments suppressed due to low confidence (1)
source/core/wifi_ctrl_queue_handlers.c:4510
wifi_event_hal_wnm_action_frameis generated inmgmt_wifi_frame_recv(), buthandle_hal_indication()has no case for it, so every WNM action frame will hit the default branch and log an error even though the event is forwarded to apps later. Add an explicitcase wifi_event_hal_wnm_action_frame:(either to dispatch appropriately or to no-op) to avoid noisy/incorrect error logs.
case wifi_event_hal_wps_results:
process_wps_results_event(data);
break;
case wifi_event_hal_send_btm_req:
process_btm_request_send_event(data, len);
break;
default:
wifi_util_error_print(WIFI_CTRL, "[%s]:WIFI hal handler not supported this event %s\r\n",
__FUNCTION__, wifi_event_subtype_to_string(subtype));
break;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: prashant-singh1 <prashant.singh8521@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
BTM Query Handling Enhancements in OneWiFi
The required changes to handle BTM (BSS Transition Management) queries in OneWiFi have been implemented.
When a BTM query is received without a neighbor list, the system now:
Observations & Planned Improvements
The following observations were identified and will be addressed in separate tickets:
Neighbor Scan Duration
Current scan duration is approximately 5 seconds, which is longer than expected. As discussed with Narendra: