RDKBWIFI-454: Added station RSSI (unassociated STA statistics) implementation#1157
RDKBWIFI-454: Added station RSSI (unassociated STA statistics) implementation#1157vlad-safonov wants to merge 13 commits into
Conversation
|
b'## Copyright scan failure |
173a212 to
ac79d94
Compare
|
b'## Copyright scan failure |
|
I have read the CLA Document and I hereby sign the CLA |
|
b'## Copyright scan failure |
ec58522 to
ca4a5a3
Compare
|
b'## Copyright scan failure |
|
Hi @vlad-safonov : Please add a credit for MaxLinear to the end of the NOTICE file at the top level in this component: and I will clear off the checks. |
|
b'## WARNING: A Blackduck scan failure has been waived A prior failure has been upvoted
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for unassociated station (NaSta) RSSI statistics by introducing a new WebConfig subdoc (UnassocStaQuery), wiring it into the controller apply path, and exposing a new RBUS method Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta that publishes results asynchronously via Device.WiFi.EM.NaStaResponse.
Changes:
- Add
UnassocStaQueryWebConfig subdoc with request decode + response encode. - Add controller apply logic to call
wifi_getNASta()and publish an async RBUS response event. - Add an RBUS test utility (
wifi_rbus) plus MXL-specific scaffolding forwifi_api2.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| source/webconfig/wifi_webconfig.c | Registers the new webconfig_subdoc_type_nasta_query subdoc. |
| source/webconfig/wifi_webconfig_nasta.c | Implements NaSta query decode and response encode logic. |
| source/webconfig/Makefile.am | Adds wifi_webconfig_nasta.c to libwifi_webconfig sources. |
| source/test/wifi_rbus.c | New RBUS CLI tool to invoke X_RDKCENTRAL-COM_GetNaSta and print async response. |
| source/test/Makefile.am | Builds and links the new wifi_rbus test utility. |
| source/core/wifi_ctrl_wifiapi_handlers.c | Adds MXL-gated inclusion of extra wifi_api2 entries (currently problematic). |
| source/core/wifi_ctrl_webconfig.c | Adds webconfig_nasta_apply() to execute HAL calls and publish response event. |
| source/core/wifi_ctrl_rbus_handlers.c | Adds RBUS method handler get_NaSta and registers method/event elements. |
| source/core/wifi_ctrl_queue_handlers.c | Routes new queue subtype wifi_event_webconfig_set_data_nasta through webconfig decode/apply. |
| source/core/mxl_wifi_ctrl_wifiapi_handlers.h | Declares MXL wifi_api2 list macro and handler prototype (currently mismatched). |
| source/core/mxl_wifi_ctrl_wifiapi_handlers.c | Adds MXL handler implementation for wifi_getNASta (scaffolding). |
| source/core/Makefile.am | Conditionally builds MXL handler implementation when MXL_WIFI is enabled. |
| include/wifi_webconfig.h | Adds new subdoc/object types and decoded data fields for NaSta. |
| include/wifi_events.h | Adds new event subtype wifi_event_webconfig_set_data_nasta. |
| include/wifi_base.h | Adds NaSta RBUS method/event names and query/response structures and limits. |
| configure.ac | Adds AM_CONDITIONAL([MXL_WIFI], ...). |
| NOTICE | Adds MaxLinear 2026 notice entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5c0537b to
abf59e3
Compare
1f4f726 to
0affe1a
Compare
| /* Extract VapIndex (injected by RBUS handler) */ | ||
| cJSON *vap_idx_obj = cJSON_GetObjectItem(json, "VapIndex"); | ||
| if (vap_idx_obj && cJSON_IsNumber(vap_idx_obj)) { | ||
| query->vap_index = (unsigned int)cJSON_GetNumberValue(vap_idx_obj); | ||
| } | ||
|
|
| cJSON_AddNumberToObject(json, "VapIndex", vap_idx - 1); | ||
| enriched_str = cJSON_PrintUnformatted(json); |
| webconfig_decode(config, data, raw); | ||
| webconfig_data_free(data); |
| if (outParams != NULL) { | ||
| char *ack = strdup("{\"Status\":\"Accepted\"}"); | ||
| if (ack != NULL) { | ||
| outParams->value.data_type = bus_data_type_string; | ||
| outParams->value.raw_data.bytes = ack; | ||
| outParams->value.raw_data_len = strlen(ack); | ||
| } | ||
| } |
| wifi_util_error_print(WIFI_CTRL, "%s:%d Failed to parse JSON input\r\n", __func__, __LINE__); | ||
| return bus_error_invalid_input; | ||
| } | ||
| cJSON_AddNumberToObject(json, "VapIndex", vap_idx - 1); |
b73d7a6 to
15a907d
Compare
| #define HOTSPOT_CLIENT_DHCP_FAILURE_DISCONNECTED "Device.X_COMCAST-COM_GRE.Hotspot.RejectAssociatedClient" | ||
| #define WIFI_STUCK_DETECT_FILE_NAME "/nvram/wifi_stuck_detect" | ||
| #define WIFI_ACCESSPOINT_GET_NASTA "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta" | ||
| #define WIFI_NASTA_RESPONSE_EVENT "Device.WiFi.EM.NaStaResponse" |
There was a problem hiding this comment.
For Device.WiFi.EM.XXXX specific data, can we maintain in wifi_em files
There was a problem hiding this comment.
we will review and address all comments
| { WIFI_ACCESSPOINT_GET_NASTA, bus_element_type_method, | ||
| { NULL, NULL, NULL, NULL, NULL, get_NaSta }, slow_speed, ZERO_TABLE, | ||
| { bus_data_type_string, true, 0, 0, 0, NULL } }, | ||
| { WIFI_NASTA_RESPONSE_EVENT, bus_element_type_event, |
There was a problem hiding this comment.
This event seems specific to Easymesh only right? If so, can this be managed in wifi_em.c including the publish part?
15a907d to
efafdd2
Compare
| if (outParams != NULL) { | ||
| char *ack = strdup("{\"Status\":\"Accepted\"}"); | ||
| if (ack != NULL) { | ||
| outParams->value.data_type = bus_data_type_string; | ||
| outParams->value.raw_data.bytes = ack; | ||
| outParams->value.raw_data_len = strlen(ack); | ||
| } | ||
| } |
…_NaSta and rbus handlers integration
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
3fac0de to
06ec7b7
Compare
| wifi_util_error_print(WIFI_CTRL, "%s:%d Failed to parse JSON input\r\n", __func__, __LINE__); | ||
| return bus_error_invalid_input; | ||
| } | ||
| cJSON_AddNumberToObject(json, "VapIndex", vap_idx - 1); |
| config->subdocs[webconfig_subdoc_type_ignite].translate_to_subdoc = translate_to_ignite_subdoc; | ||
| config->subdocs[webconfig_subdoc_type_ignite].translate_from_subdoc = translate_from_ignite_subdoc; | ||
|
|
||
| //webconfig_subdoc_type_nasta_query |
| } | ||
|
|
||
| cJSON *oc_val = cJSON_GetObjectItem(opclass_obj, "opclass"); | ||
| if (!oc_val || !cJSON_IsNumber(oc_val)) { |
| } | ||
|
|
||
| cJSON *ch_val = cJSON_GetObjectItem(chan_obj, "channel"); | ||
| if (!ch_val || !cJSON_IsNumber(ch_val)) { |
| outParams->value.data_type = bus_data_type_string; | ||
| outParams->value.raw_data.bytes = ack; | ||
| outParams->value.raw_data_len = strlen(ack) + 1; | ||
| } |
| if (ack != NULL) { | ||
| outParams->value.data_type = bus_data_type_string; | ||
| outParams->value.raw_data.bytes = ack; | ||
| outParams->value.raw_data_len = strlen(ack) + 1; |
| /* Extract VapIndex (injected by RBUS handler) */ | ||
| cJSON *vap_idx_obj = cJSON_GetObjectItem(json, "VapIndex"); | ||
| if (vap_idx_obj && cJSON_IsNumber(vap_idx_obj)) { | ||
| query->vap_index = (unsigned int)cJSON_GetNumberValue(vap_idx_obj); | ||
| } |
Reason for change: added implementation of new RBUS method "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta". Aslo added support unassoc STA datamodel in the Easymesh translator
Dependent PR: rdk-wifi-hal/#721, rdkb-halif-wifi/#109
Test procedure: Execute rbus request:
Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaStawith Json string, e.g.
and subscribe for rbus event
Device.WiFi.EM.NaStaResponse:, expect to get response, like thisNote: Channel parameter:
The primary channel is expected in "UnassocStaQuery" JSON. "op_class" and primary channel are used internally to calculate center frequency and bandwidth.
RCPI:
Priority: P2
Risks: Low