Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/TR181-WiFi-USGv2.XML
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,12 @@ INSTMSMT_PH2 -->
<func_Rollback>SSID_Rollback</func_Rollback>
</functions>
<parameters>
<parameter>
<name>MLDUnit</name>
<type>int</type>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According BBF.
MLDUnit type should be: int(-1,0:24).
in XML format: int[-1:24]

<syntax>int</syntax>
<writable>true</writable>
</parameter>
<parameter>
<name>Enable</name>
<type>boolean</type>
Expand Down
69 changes: 66 additions & 3 deletions source/dml/tr_181/ml/cosa_wifi_dml.c
Original file line number Diff line number Diff line change
Expand Up @@ -5415,10 +5415,28 @@ SSID_GetParamIntValue
)
{
/* check the parameter name and return the corresponding value */
UNREFERENCED_PARAMETER(hInsContext);
UNREFERENCED_PARAMETER(ParamName);
UNREFERENCED_PARAMETER(pInt);
wifi_vap_info_t *pcfg = (wifi_vap_info_t *)hInsContext;

if (pcfg == NULL)
{
wifi_util_dbg_print(WIFI_DMCLI,"%s:%d Null pointer get fail\n", __FUNCTION__,__LINE__);
return FALSE;
}

if( AnscEqualString(ParamName, "MLDUnit", TRUE))
{
if (isVapSTAMesh(pcfg->vap_index)) {
wifi_util_dbg_print(WIFI_DMCLI,"%s:%d VAP is sta\n", __FUNCTION__,__LINE__);
*pInt = -1;
return FALSE;
}
if (pcfg->u.bss_info.mld_info.common_info.mld_enable == FALSE) {
*pInt = -1;
} else {
*pInt = pcfg->u.bss_info.mld_info.common_info.mld_id;
}
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
Expand Down Expand Up @@ -5912,8 +5930,53 @@ SSID_SetParamIntValue
int iValue
)
{
wifi_vap_info_t *pcfg = (wifi_vap_info_t *)hInsContext;

if (pcfg == NULL)
{
wifi_util_dbg_print(WIFI_DMCLI,"%s:%d Null pointer get fail\n", __FUNCTION__,__LINE__);
return FALSE;
}

uint8_t instance_number = (uint8_t)convert_vap_name_to_index(&((webconfig_dml_t *)get_webconfig_dml())->hal_cap.wifi_prop, pcfg->vap_name) +1;
wifi_vap_info_t *vapInfo = (wifi_vap_info_t *) get_dml_cache_vap_info(instance_number-1);

if (vapInfo == NULL)
{
wifi_util_dbg_print(WIFI_DMCLI,"%s:%d Unable to get VAP info for instance_number:%d\n", __FUNCTION__,__LINE__,instance_number);
return FALSE;
}
/* check the parameter name and set the corresponding value */
if( AnscEqualString(ParamName, "MLDUnit", TRUE))
{
BOOL tmp_mld_enable = FALSE;

if (isVapSTAMesh(pcfg->vap_index)) {
wifi_util_error_print(WIFI_DMCLI,"%s:%d VAP is sta VAP\n", __FUNCTION__, __LINE__);
return FALSE;
}
if (iValue < -1 || iValue > MLD_UNIT_COUNT) {
wifi_util_error_print(WIFI_DMCLI,"%s:%d Invalid MLDUnit value %d\n", __FUNCTION__,__LINE__,iValue);
return FALSE;
}
wifi_util_info_print(WIFI_DMCLI,"%s:%d MLD Unit %d\n", __FUNCTION__, __LINE__, iValue);
tmp_mld_enable = (iValue == -1) ? FALSE : TRUE;
if (vapInfo->u.bss_info.mld_info.common_info.mld_enable == tmp_mld_enable) {
if (tmp_mld_enable == FALSE && vapInfo->u.bss_info.mld_info.common_info.mld_id == UNDEFINED_MLD_ID)
return TRUE;
if (tmp_mld_enable == TRUE && vapInfo->u.bss_info.mld_info.common_info.mld_id == (UINT)iValue)
return TRUE;
}
wifi_util_dbg_print(WIFI_DMCLI,"%s:%d Updating MLD Unit to value %d\n", __FUNCTION__, __LINE__, iValue);
vapInfo->u.bss_info.mld_info.common_info.mld_enable = tmp_mld_enable;
if (vapInfo->u.bss_info.mld_info.common_info.mld_enable)
vapInfo->u.bss_info.mld_info.common_info.mld_id = iValue;
else
vapInfo->u.bss_info.mld_info.common_info.mld_id = UNDEFINED_MLD_ID;

set_dml_cache_vap_config_changed(instance_number - 1);
return TRUE;
}
/* CcspTraceWarning(("Unsupported parameter '%s'\n", ParamName)); */
return FALSE;
}
Expand Down
Loading