Skip to content

Commit

Permalink
Merge pull request #4 from sanjaynayakk/RDKBDEV-2755
Browse files Browse the repository at this point in the history
RDKBDEV-2755 : Update WAN and Virtual Interface Selection Logic.
  • Loading branch information
guto86 authored Jul 17, 2024
2 parents fa31775 + 20a0202 commit f593fb6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/TR-181/middle_layer_src/pppmgr_dml_ppp_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,21 @@ static int PppMgr_GetWanIfaceInstance (UINT InstanceNumber, int * WanIfaceInstan
// for each Wan Interface
for (iIfaceCount = 1; iIfaceCount <= iTotalNoofEntries; iIfaceCount++)
{
#if defined(WAN_MANAGER_UNIFICATION_ENABLED)
// get Selection Status
snprintf(acTmpQueryParam, sizeof(acTmpQueryParam),WAN_INTERFACE_SELECTION_STATUS, iIfaceCount);
if (ANSC_STATUS_FAILURE == DmlPppMgrGetParamValues(WAN_COMPONENT_NAME, WAN_DBUS_PATH, acTmpQueryParam, acTmpReturnValue))
{
CcspTraceError(("%s %d Failed to get param value %s\n", __FUNCTION__, __LINE__, acTmpQueryParam));
return ANSC_STATUS_FAILURE;
}

CcspTraceInfo(("%s %d - Wan Instance %d is %s\n", __FUNCTION__, __LINE__, iIfaceCount, acTmpReturnValue));
if (strcmp(acTmpReturnValue,"Selected") != 0)
{
continue;
}
#endif
// get total no of VirtualInterface
snprintf(acTmpQueryParam, sizeof(acTmpQueryParam), WAN_NO_OF_VIRTUAL_IFACE_PARAM_NAME, iIfaceCount);
if (ANSC_STATUS_FAILURE == DmlPppMgrGetParamValues(WAN_COMPONENT_NAME, WAN_DBUS_PATH, acTmpQueryParam, acTmpReturnValue))
Expand Down
1 change: 1 addition & 0 deletions source/TR-181/middle_layer_src/pppmgr_dml_ppp_apis.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
#define WAN_NOE_PARAM_NAME "Device.X_RDK_WanManager.InterfaceNumberOfEntries"
#define WAN_PHY_PATH_PARAM_NAME "Device.X_RDK_WanManager.Interface.%d.BaseInterface"
#define WAN_IFACE_NAME "Device.X_RDK_WanManager.Interface.%d.VirtualInterface.1.Name"
#define WAN_INTERFACE_SELECTION_STATUS "Device.X_RDK_WanManager.Interface.%d.Selection.Status"
#else
#define PPP_LCP_STATUS_PARAM_NAME "Device.X_RDK_WanManager.CPEInterface.%d.PPP.LCPStatus"
#define PPP_LINK_STATUS_PARAM_NAME "Device.X_RDK_WanManager.CPEInterface.%d.PPP.LinkStatus"
Expand Down

0 comments on commit f593fb6

Please sign in to comment.