diff --git a/source/webconfig/wifi_decoder.c b/source/webconfig/wifi_decoder.c index 7959f9578..ebfec9f93 100644 --- a/source/webconfig/wifi_decoder.c +++ b/source/webconfig/wifi_decoder.c @@ -4846,6 +4846,15 @@ webconfig_error_t decode_wifiradiocap(wifi_platform_property_t *wifi_prop, cJSON radio_cap->rdk_radio_index = value_object->valuedouble; + + value_object = cJSON_GetObjectItem(object, "Mode"); + if ((value_object == NULL) || (cJSON_IsNumber(value_object) == false)) { + wifi_util_error_print(WIFI_WEBCONFIG, "%s:%d: Validation Failed\n", __func__, __LINE__); + return webconfig_error_decode; + } + + radio_cap->mode[0] = value_object->valuedouble; + /*allowed_channels*/ allowed_channels = cJSON_GetObjectItem(object, "PossibleChannels"); if (allowed_channels == NULL) { diff --git a/source/webconfig/wifi_easymesh_translator.c b/source/webconfig/wifi_easymesh_translator.c index 9bcaaf671..f7142f935 100644 --- a/source/webconfig/wifi_easymesh_translator.c +++ b/source/webconfig/wifi_easymesh_translator.c @@ -429,7 +429,7 @@ static webconfig_error_t translate_radio_capability_to_easymesh(wifi_platform_pr memcpy(em_ht_cap->ruid, cap_info->ruid.mac, sizeof(mac_address_t)); memcpy(em_vht_cap->ruid, cap_info->ruid.mac, sizeof(mac_address_t)); memcpy(em_he_cap->ruid, cap_info->ruid.mac, sizeof(mac_address_t)); - + cap_info->mode = radio_cap->mode[0]; // HT capabilities em_ht_cap->ht_sprt_40mhz = (radio_cap->ht_capab & (1 << 1)) ? 1 : 0; em_ht_cap->gi_sprt_40mhz = (radio_cap->ht_capab & (1 << 6)) ? 1 : 0; diff --git a/source/webconfig/wifi_encoder.c b/source/webconfig/wifi_encoder.c index 2522bcd01..c26dceb78 100644 --- a/source/webconfig/wifi_encoder.c +++ b/source/webconfig/wifi_encoder.c @@ -2210,6 +2210,7 @@ webconfig_error_t encode_wifiradiocap(wifi_platform_property_t *wifi_prop, cJSON cJSON_AddItemToArray(radio_obj, object); cJSON_AddNumberToObject(object, "PhyIndex", radiocap->index); cJSON_AddNumberToObject(object, "RadioIndex", radiocap->rdk_radio_index); + cJSON_AddNumberToObject(object, "Mode", radiocap->mode[0]); for (freq_band_count = 0; freq_band_count < radiocap->numSupportedFreqBand; freq_band_count++) { (void)memcpy(channels_list, radiocap->channel_list[freq_band_count].channels_list, sizeof(*channels_list) * radiocap->channel_list[freq_band_count].num_channels);