From 24d240adcff4280f213aa5c61230661593879e13 Mon Sep 17 00:00:00 2001 From: rnayan132_comcast Date: Fri, 18 Sep 2026 07:02:19 +0000 Subject: [PATCH] RDKB-66764, RDKB-66765, RDKB-66766 - Wi-Fi Experience Index feature. Reason for change: Added Device.X_RDKCENTRAL-COM_WEI.Diagnostic.Enable to configure WEI_DIAGNOSTIC_COUNTERS bundle Test Procedure: Connect multiple clients and verify the WEI_DIAGNOSTIC_COUNTERS bundle Risks: low Signed-off-by: Raghava_Nayani@comcast.com --- config/rdkb-wifi.ovsschema | 9 +++++++++ lib/inc/schema_gen.h | 3 +++ source/core/wifi_ctrl_rbus_handlers.c | 2 ++ source/core/wifi_ctrl_wei_rfc.h | 3 +++ source/db/wifi_db_apis.c | 10 ++++++++-- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/config/rdkb-wifi.ovsschema b/config/rdkb-wifi.ovsschema index 4a0c9a98a5..bf5b5f7887 100644 --- a/config/rdkb-wifi.ovsschema +++ b/config/rdkb-wifi.ovsschema @@ -2219,6 +2219,15 @@ "min": 0, "max": 1 } + }, + "diagnostic_enable": { + "type": { + "key": { + "type": "boolean" + }, + "min": 0, + "max": 1 + } } }, "indexes": [ diff --git a/lib/inc/schema_gen.h b/lib/inc/schema_gen.h index aa7dad1c44..145bd17b5a 100644 --- a/lib/inc/schema_gen.h +++ b/lib/inc/schema_gen.h @@ -1741,6 +1741,7 @@ PJS_OVS_INT(lq_client_threshold) \ PJS_OVS_BOOL(lq_client_detail_enable) \ PJS_OVS_STRING(lq_client_whitelist, 256 + 1) \ + PJS_OVS_BOOL(diagnostic_enable) \ ) #define PJS_GEN_TABLE \ @@ -3465,6 +3466,7 @@ COLUMN(lq_client_threshold) \ COLUMN(lq_client_detail_enable) \ COLUMN(lq_client_whitelist) \ + COLUMN(diagnostic_enable) \ #define SCHEMA__AWLAN_Node__id "id" #define SCHEMA__AWLAN_Node__model "model" @@ -4777,3 +4779,4 @@ #define SCHEMA__Wifi_Wei_Rfc_Config__lq_client_threshold "lq_client_threshold" #define SCHEMA__Wifi_Wei_Rfc_Config__lq_client_detail_enable "lq_client_detail_enable" #define SCHEMA__Wifi_Wei_Rfc_Config__lq_client_whitelist "lq_client_whitelist" +#define SCHEMA__Wifi_Wei_Rfc_Config__diagnostic_enable "diagnostic_enable" diff --git a/source/core/wifi_ctrl_rbus_handlers.c b/source/core/wifi_ctrl_rbus_handlers.c index e9a5a0a964..bd5f5cea20 100644 --- a/source/core/wifi_ctrl_rbus_handlers.c +++ b/source/core/wifi_ctrl_rbus_handlers.c @@ -2090,6 +2090,8 @@ static wei_param_entry_t g_wei_param_table[] = { WEI_FIELD(WEI_LQ_CLIENT_THRESHOLD_DMPATH, FIELD_UINT, lq.client_threshold), WEI_FIELD(WEI_LQ_CLIENT_DETAIL_ENABLE_DMPATH, FIELD_BOOL, lq.client_detail_enable), WEI_FIELD(WEI_LQ_CLIENT_WHITELIST_DMPATH, FIELD_STRING, lq.client_whitelist), + + WEI_FIELD(WEI_DIAGNOSTIC_ENABLE_DMPATH, FIELD_BOOL, wei_diagnostic_enable), }; #define WEI_PARAM_TABLE_COUNT (sizeof(g_wei_param_table) / sizeof(g_wei_param_table[0])) diff --git a/source/core/wifi_ctrl_wei_rfc.h b/source/core/wifi_ctrl_wei_rfc.h index ac6a4f82d5..b33f314fc0 100644 --- a/source/core/wifi_ctrl_wei_rfc.h +++ b/source/core/wifi_ctrl_wei_rfc.h @@ -50,6 +50,8 @@ extern "C" { //WEI endpoint for ignite #define WEI_IGNITE_ENABLE_DMPATH "Device.X_RDKCENTRAL-COM_WEI.Ignite.Enable" +#define WEI_DIAGNOSTIC_ENABLE_DMPATH "Device.X_RDKCENTRAL-COM_WEI.Diagnostic.Enable" + /* ---- Staying-Connected (SC) TR-181 parameter paths (WiFi-DB owned) ---- */ #define WEI_SC_HOME_ENABLE_DMPATH "Device.X_RDKCENTRAL-COM_WEI.SC.Home.Enable" #define WEI_SC_HOME_THRESHOLD_DMPATH "Device.X_RDKCENTRAL-COM_WEI.SC.Home.Threshold" @@ -116,6 +118,7 @@ typedef struct { wei_rfc_pillar_config_t sc; wei_rfc_pillar_config_t gc; wei_rfc_pillar_config_t lq; + bool wei_diagnostic_enable; } wei_rfc_dml_parameters_t; /* Field type tags for the WEI RFC parameter descriptor table (drives the diff --git a/source/db/wifi_db_apis.c b/source/db/wifi_db_apis.c index 3411bcbd06..5f4614a8b3 100644 --- a/source/db/wifi_db_apis.c +++ b/source/db/wifi_db_apis.c @@ -349,6 +349,8 @@ static void wei_rfc_schema_to_dml(const struct schema_Wifi_Wei_Rfc_Config *cfg, dml->lq.client_threshold = (uint32_t)cfg->lq_client_threshold; dml->lq.client_detail_enable = cfg->lq_client_detail_enable; snprintf(dml->lq.client_whitelist, sizeof(dml->lq.client_whitelist), "%s", cfg->lq_client_whitelist); + + dml->wei_diagnostic_enable = cfg->diagnostic_enable; } static void wei_rfc_dml_to_schema(const wei_rfc_dml_parameters_t *dml, struct schema_Wifi_Wei_Rfc_Config *cfg) @@ -386,6 +388,8 @@ static void wei_rfc_dml_to_schema(const wei_rfc_dml_parameters_t *dml, struct sc cfg->lq_client_threshold = (int)dml->lq.client_threshold; cfg->lq_client_detail_enable = dml->lq.client_detail_enable; snprintf(cfg->lq_client_whitelist, sizeof(cfg->lq_client_whitelist), "%s", dml->lq.client_whitelist); + + cfg->diagnostic_enable = dml->wei_diagnostic_enable; } /************************************************************************************ @@ -424,11 +428,12 @@ void callback_Wifi_Wei_Rfc_Config(ovsdb_update_monitor_t *mon, struct schema_Wif wifi_util_dbg_print(WIFI_DB, "%s:%d WEI RFC Config New/Modify wei_enable=%d lq_dur=%u " - "sc(h_en=%d c_en=%d) gc(h_en=%d c_en=%d) lq(h_en=%d c_en=%d)\r\n", + "sc(h_en=%d c_en=%d) gc(h_en=%d c_en=%d) lq(h_en=%d c_en=%d) diag_en=%d\r\n", __func__, __LINE__, rfc_param->wei_enable, rfc_param->lq_meas_duration, rfc_param->sc.home_enable, rfc_param->sc.client_enable, rfc_param->gc.home_enable, rfc_param->gc.client_enable, - rfc_param->lq.home_enable, rfc_param->lq.client_enable); + rfc_param->lq.home_enable, rfc_param->lq.client_enable, + rfc_param->wei_diagnostic_enable); /* Marshal onto the ctrl thread (this callback runs on the wifidb event-loop * thread); field_id=-1 means "already applied to the DB-mirror cache above, @@ -6671,6 +6676,7 @@ void wifidb_init_wei_rfc_config_default(wei_rfc_dml_parameters_t *config) defaults.radio_2g_max_phy = WEI_RFC_RADIO_2G_MAX_PHY_DEFAULT; defaults.radio_5g_max_phy = WEI_RFC_RADIO_5G_MAX_PHY_DEFAULT; defaults.radio_6g_max_phy = WEI_RFC_RADIO_6G_MAX_PHY_DEFAULT; + defaults.wei_diagnostic_enable = true; memcpy(config, &defaults, sizeof(defaults)); }