summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-06 16:45:29 +0900
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-13 01:28:32 -0700
commit9df5daa4c103226dfd25a931416e90c14ce667c1 (patch)
tree61be587650d96dce5405e75936eb11b362964854
parent2929c8bb5eb325f903ea7ea3477118e6b7075e5b (diff)
CommonAPI: provide the OS interface name of the WiMAX device
Otherwise there is no way for the client application to know which interface the "Common API" device refers to. This is needed so other things can be done with it (like launching DHCP clients, etc). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
-rw-r--r--InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c b/InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c
index dd33bb9..0bc0a74 100644
--- a/InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c
+++ b/InfraStack/OSAgnostic/WiMax/Wrappers/CommonAPI/wimaxapi.c
@@ -992,9 +992,8 @@ WIMAX_API_RET WIMAX_API GetErrorString(WIMAX_API_DEVICE_ID_P pDeviceId, WIMAX_AP
*pLength = (UINT32)strlen("WIMAX_API_RET_INTEL_NO_RF");
OSAL_CAPI_strcpy_s(buffer, TEXT_LEN(*pLength)+1, TEXT("WIMAX_API_RET_INTEL_NO_RF"));
break;
- }
-
- return WIMAX_API_RET_SUCCESS;
+ }
+ return WIMAX_API_RET_SUCCESS;
}
//Device detection, association and initialization
WIMAX_API_RET WIMAX_API WiMaxAPIOpen(WIMAX_API_DEVICE_ID_P pDeviceId)
@@ -1554,6 +1553,8 @@ WIMAX_API_RET WIMAX_API GetListDevice(WIMAX_API_DEVICE_ID_P pDeviceId, WIMAX_API
{
wmx_CtrlStatus_t ctrlStatus;
WIMAX_API_RET wmxRet;
+ char ifname[DEFULT_STR_SIZE];
+ char append[sizeof(ifname) + sizeof(" if:") + 1];
char deviceName[MAX_SIZE_OF_STRING_BUFFER] = {0};
BOOL retStatus;
@@ -1611,6 +1612,10 @@ WIMAX_API_RET WIMAX_API GetListDevice(WIMAX_API_DEVICE_ID_P pDeviceId, WIMAX_API
}
}
+ L4Configurations_getInterfaceName(ifname);
+ snprintf(append, sizeof(append), " if:%s", ifname);
+ strncat(pHwDeviceIdList->deviceName, append,
+ sizeof(pHwDeviceIdList->deviceName) - strlen(pHwDeviceIdList->deviceName));
TRACE(TR_MOD_COMMON_API, TR_SEV_NOTICE, "GetListDevice(OUT). Device name = %s", pHwDeviceIdList->deviceName);
return WIMAX_API_RET_SUCCESS;
}