diff options
author | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2010-10-01 14:22:47 -0700 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2010-10-02 00:28:23 -0700 |
commit | 2dbe72ffede51a5fde325eccdbeaece74f0d122c (patch) | |
tree | f442e72abe9e815ef3492a393e243c944b22a3ce | |
parent | 438666d6dba0e1ae888463cc9ad69a2f33738ce3 (diff) |
cleanup: fix a long list of warnings caused by statics
Replace with static inline function macros or just remove the unused
ones. Dirty, but cleaner than what it was.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
12 files changed, 110 insertions, 103 deletions
diff --git a/InfraStack/OSAgnostic/Common/CommonServices/L4ConfigurationManager.c b/InfraStack/OSAgnostic/Common/CommonServices/L4ConfigurationManager.c index c51793e..b658a7d 100644 --- a/InfraStack/OSAgnostic/Common/CommonServices/L4ConfigurationManager.c +++ b/InfraStack/OSAgnostic/Common/CommonServices/L4ConfigurationManager.c @@ -445,7 +445,7 @@ BOOL L4Configurations_getLedBlinkRate(UINT8 LEDBlinkRate[], LPCTSTR name_of_subk for(i=0; i<NUM_OF_LED_BLINK_RATE; i++) { - Valent[i].ve_valuename = OSAL_LED_REG_ARR[i]; + Valent[i].ve_valuename = OSAL_LED_REG_ARR(i); } readFromReg = OSAL_ConfigController_GetMultValues(name_of_subkey, Valent, NUM_OF_LED_BLINK_RATE, regBuffer, sizeof(regBuffer)); diff --git a/InfraStack/OSAgnostic/Common/L5Common/L5Common.h b/InfraStack/OSAgnostic/Common/L5Common/L5Common.h index 03f765f..037ccd5 100644 --- a/InfraStack/OSAgnostic/Common/L5Common/L5Common.h +++ b/InfraStack/OSAgnostic/Common/L5Common/L5Common.h @@ -144,15 +144,17 @@ typedef enum _L5_EVENT L5_EVENT_DRIVER_DISCONNECTED } L5_EVENT; -#define L5_EVENT_COUNT 4 - -#define L5_EVENT_STR(l5event) (l5event < L5_EVENT_COUNT ? L5EventStrArr[l5event] :"Ilegal") - -static char* L5EventStrArr[] = { - "<Disconnected>", - "<Other Disconnected>", - "<Driver Up>", - "<Driver Down>" +static inline +const char *L5_EVENT_STR(unsigned index) +{ + static const char *strs[] = { + "<Disconnected>", + "<Other Disconnected>", + "<Driver Up>", + "<Driver Down>" + }; + static const unsigned index_max = sizeof(strs) / sizeof(strs[0]); + return index < index_max? strs[index] : "Illegal"; }; typedef enum _THREAD_ID @@ -281,4 +283,4 @@ extern tL5DispatcherFunctions *GetL5Funcs(); extern tUtilityFunctions *GetUtilsFuncs(); -#endif
\ No newline at end of file +#endif diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/L4_db/NDnSAgent_DB_if.h b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/L4_db/NDnSAgent_DB_if.h index b3c874b..863e4e5 100644 --- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/L4_db/NDnSAgent_DB_if.h +++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/L4_db/NDnSAgent_DB_if.h @@ -117,8 +117,7 @@ #define DEFAULT_TRUE_LOWER "true" #define UPDATER_FILE_NAME "WiMaxUpdateManager.exe" -static char defaultPreamble[] = "ffffffffffffffffffffffffffffff"; -static char C_L4DB_EMPTY_STRING[] = ""; +#define C_L4DB_EMPTY_STRING "" typedef enum _Any_t { @@ -1286,4 +1285,4 @@ wmx_Status_t L4db_GetContactInfoByPath( pContactsInfo_t contactInfo, char* path wmx_Status_t L4db_WMFComplianceVersion(char* WMFComplianceVersion, UINT32 WMFComplianceVersionLen); wmx_Status_t L4db_PNMUpdate(wmx_pSystemStateUpdate systemStateUpdate, BOOL* channelChanged); wmx_Status_t L4db_GetPNM(PPNM_COMMDEV_CHANNEL_INFO bufferOut, UINT32 *bufferSize); -#endif //_NDNS_AGENT_DB_IF_
\ No newline at end of file +#endif //_NDNS_AGENT_DB_IF_ diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent.c b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent.c index f65fd92..d789cf1 100644 --- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent.c +++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent.c @@ -327,7 +327,7 @@ wmx_Status_t SetConnectMode(wmx_pUserConnectMode_t pConnectMode, UINT32 bufferSi wmx_Status_t status = WMX_ST_FAIL; UNREFERENCED_PARAMETER(bufferSize); - TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "SetConnectMode(IN). systemState=%s, pConnectMode = [%d]", NDnSSystemStates[g_ndnsContext.systemState], *pConnectMode); + TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "SetConnectMode(IN). systemState=%s, pConnectMode = [%d]", NDnSSystemStates(g_ndnsContext.systemState), *pConnectMode); // in case a scan/connect process is taking place, notify device if(L4C_GetInitialCoexMode() == WMX_MODE_CM && g_ndnsContext.processStarted) { @@ -1351,7 +1351,7 @@ wmx_Status_t L4C_SetControllerModeEx(wmx_pSystemStateUpdate systemStateUpdate, B if (systemStateUpdate->SystemState != UnInitialized) { TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "L4C_SetControllerModeEx(IN): systemStateUpdate=%s, swRfStatus=%d, hwRfStatus=%d", - NDnSSystemStates[systemStateUpdate->SystemState], systemStateUpdate->rfSwitchesStatus.swRfStatus, + NDnSSystemStates(systemStateUpdate->SystemState), systemStateUpdate->rfSwitchesStatus.swRfStatus, systemStateUpdate->rfSwitchesStatus.hwRfStatus); } else @@ -1713,7 +1713,7 @@ wmx_Status_t L4C_SetPS(wmx_LinkLossType_t linkLossType, BOOL delayStart, BOOL is //g_ndnsContext.currentScanType = SCAN_TYPE_PREFERRED; - TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "Link Loss config: Type = %s, Delay = %d sec, Repetitions = %d", wmx_LinkLossType_tStr[linkLossType], delayTime, repetitionsCount); + TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "Link Loss config: Type = %s, Delay = %d sec, Repetitions = %d", wmx_LinkLossType_tStr(linkLossType), delayTime, repetitionsCount); TRACE(TR_MOD_NDNS_AGENT, TR_SEV_DEBUG, "L4C_SetPS(OUT)"); return L4S_SetPSCfg(mcp, numChannels, @@ -1776,7 +1776,7 @@ wmx_Status_t L4C_SetWS(wmx_LinkLossType_t linkLossType, BOOL delayStart, BOOL is //g_ndnsContext.currentScanType = SCAN_TYPE_WIDE; - TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "Link Loss config: Type = %s, Delay = %d sec, Repetitions = %d", wmx_LinkLossType_tStr[linkLossType], delayTime, repetitionsCount); + TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "Link Loss config: Type = %s, Delay = %d sec, Repetitions = %d", wmx_LinkLossType_tStr(linkLossType), delayTime, repetitionsCount); return L4S_SetWhileSCfg(mcp, numChannels, @@ -1821,7 +1821,7 @@ wmx_Status_t L4C_StartScan(wmx_ScanType_t scanType, wmx_LinkLossType_t linkLossT wmx_Status_t status = WMX_ST_OK; TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "L4C_StartScan(IN): type = <%s>\tlink loss type = <%s>\ttrigger = <%s%s>", - wmx_ScanType_tStr[scanType], wmx_LinkLossType_tStr[linkLossType], + wmx_ScanType_tStr(scanType), wmx_LinkLossType_tStr(linkLossType), (g_ndnsContext.isSingleManualScan == TRUE ? NDNS_STR_MANUAL : NDNS_STR_AUTOMATIC), (delayStart == TRUE ? NDNS_STR_DELAYED : "")); @@ -1873,7 +1873,7 @@ wmx_Status_t L4C_StartManualScanPhase2(wmx_ScanType_t scanType, BOOL isInternal) L4CState fsmState = FSM_GetState(&g_ndnsContext.fsm); TRACE(TR_MOD_NDNS_AGENT, TR_SEV_DEBUG, "L4C_StartManualScanPhase2(IN) - scanType=%s, isInternal=%d", - wmx_ScanType_tStr[scanType], isInternal); + wmx_ScanType_tStr(scanType), isInternal); L4S_Reset(TRUE); // reset the L4Scanner if (!FSM_SetStateIfNotEqual(&g_ndnsContext.fsm, L4C_SINGLE_SCAN, L4C_SINGLE_SCAN) && @@ -2296,7 +2296,7 @@ void L4C_ApplyNextScanParams(wmx_ScanType_t scanType, TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "L4C_ApplyNextScanParams (IN) - scanType=%s, scanStatus=%d, isResumeScan=%d, isScanCycleComplete=%d, numOfNSPs=%d", - wmx_ScanType_tStr[scanType], scanStatus, isResumeScan, isScanCycleComplete, numOfNSPs); + wmx_ScanType_tStr(scanType), scanStatus, isResumeScan, isScanCycleComplete, numOfNSPs); if (isResumeScan) { OSAL_atomic_exchange(&g_ndnsContext.isResumeScan, TRUE); @@ -3196,7 +3196,7 @@ wmx_Status_t NDnSAgent_GetLinkStatus( UINT32 *bufferLength, UINT8 *buffer ) fIsCacheState = (g_ndnsContext.systemState == Idle); - TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_DEBUG, "NDnSAgent_GetLinkStatus - device status = %s", NDnSSystemStates[g_ndnsContext.systemState>=UnknownState?UnknownState:g_ndnsContext.systemState]); + TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_DEBUG, "NDnSAgent_GetLinkStatus - device status = %s", NDnSSystemStates(g_ndnsContext.systemState>=UnknownState?UnknownState:g_ndnsContext.systemState)); //get the information also for cases the AppSrv reset while in DataPathConnected if( !fIsCacheState || @@ -3423,7 +3423,7 @@ void L4C_TaskHandler(UINT32 internalRequestID, void *buffer, UINT32 bufferLength { // only when getting to Ready state TRACE(TR_MOD_NDNS_AGENT, TR_SEV_DEBUG, "State is not ready or scanner is stil scanning: system state=%s, scanner state=%s", - NDnSSystemStates[systemState], + NDnSSystemStates(systemState), ScannerStateStr[L4S_GetScannerState()]); L4C_ScheduleTask(Task_StartManualScan); // start Connect on the next Ready state } @@ -4548,7 +4548,7 @@ void NDnSAgent_OnProgressDualFlush(L4C_Task task, DualFlushOp ExecuteTask, UINT3 } else { - TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "NDnSAgent_OnProgressDualFlush - scheduling the task '%s' for the next Ready state (current state=%s)", L4C_TaskStr[task], NDnSSystemStates[systemState]); + TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "NDnSAgent_OnProgressDualFlush - scheduling the task '%s' for the next Ready state (current state=%s)", L4C_TaskStr[task], NDnSSystemStates(systemState)); // we are still not in Ready state - schedule the Connect task to be executed // only when getting to Ready state L4C_ScheduleTask(task); // start the task on the next Ready state diff --git a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c index 7d52c61..093f4a5 100644 --- a/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c +++ b/InfraStack/OSAgnostic/WiMax/Agents/NDnS/Source/NDnSAgent_CBs.c @@ -210,7 +210,7 @@ void WMX_EXT_CALL_CONV NDnSAgent_SystemStateUpdate( wmx_pSystemStateUpdate syste free(pSendIndData); TRACE(TR_MOD_NDNS_AGENT, TR_SEV_NOTICE, "NDnSAgent_SystemStateUpdate: SystemState=%s, ConnectState=%s, swRf=%d, hwRf=%d", - NDnSSystemStates[systemStateUpdate->SystemState>=UnknownState?UnknownState:systemStateUpdate->SystemState], + NDnSSystemStates(systemStateUpdate->SystemState>=UnknownState?UnknownState:systemStateUpdate->SystemState), wmxConnectProgressInfoName(systemStateUpdate->ConnectProgress>=Registration?NotApplicable:systemStateUpdate->ConnectProgress), systemStateUpdate->rfSwitchesStatus.swRfStatus, systemStateUpdate->rfSwitchesStatus.hwRfStatus); diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_2.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_2.h index 64ff77f..93f948e 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_2.h +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_2.h @@ -55,12 +55,18 @@ typedef enum _wmx_ConnectionState_t UnknownConnectionState }wmx_ConnectionState_t, *wmx_pConnectionState_t; -static char *ConnectionStateName[] = { - "ConnectionStateRfOff", - "Disconnected", - "OutOfZone", - "Connected", - "UnknownConnectionState" +static inline +const char * ConnectionStateName(unsigned index) +{ + static const char *strs[] = { + "ConnectionStateRfOff", + "Disconnected", + "OutOfZone", + "Connected", + "UnknownConnectionState" + }; + static const unsigned index_max = sizeof(strs) / sizeof(strs[0]); + return index < index_max? strs[index] : "Illegal"; }; /// <summary> /// The signature defintion of a wmx_pConnectionStateUpdateCB_t callback function. @@ -147,4 +153,4 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_RegisterConnectionStateUpdate /// <returns>A wmx_Status_t value indicating the API call's success/error.</returns> wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_UnregisterConnectionStateUpdateCB(); -#endif // _WMX_SDK_NDS_2_Hchar
\ No newline at end of file +#endif // _WMX_SDK_NDS_2_Hchar diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h index 1942455..05fc677 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_3.h @@ -207,25 +207,6 @@ typedef enum _wmx_UserConnectStatus_t UnknownConnectStatus } wmx_UserConnectStatus_t, *wmx_pUserConnectStatus_t; -static char *wmxUserConnectStatusName[] = { - "UserConnectSuccessful", - "UserConnectCancelled", - "UserConnectFailToConnectToNW", - "UserConnectFailToConnectRanging", - "UserConnectFailToConnectSBC", - "UserConnectFailToConnectEAPAuth", - "UserConnectFailToConnect3WayHandshake", - "UserConnectFailToConnectREG", - "UserConnectFailToConnectDatapath", - "UserConnectFailToConnectCoexNoRf", - "UserConnectDisconnectDreg", - "UserConnectDisconnectAbort", - "UserConnectDisconnectReset", - "UserConnectDisconnectDrop", - "UserConnectFailed", - "UnknownConnectStatus" -}; - /// <summary> /// Type definition for a struct containing information about the link's status. /// (i.e. the status of the link between the device and the network it is connected to). @@ -1153,4 +1134,4 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetConnectedAsCurrentPreferre wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetWMFComplianceVersion(char *WMFComplianceVersion, UINT32 WMFComplianceVersionLen); wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetNonce(WIMAX_API_NONCE_BLOB_P pNonce,UINT32 *pNonceSize); -#endif // _WMX_SDK_NDS_3_H
\ No newline at end of file +#endif // _WMX_SDK_NDS_3_H diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h index f94eceb..2dc5f37 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/Include/wmxSDK_Nds_Cmn.h @@ -261,12 +261,18 @@ typedef enum _wmx_ScanType_t SCAN_TYPE_DIRECT } wmx_ScanType_t, *wmx_pScanType_t; -static char *wmx_ScanType_tStr[] = { - "Preferred Scan", - "Wide Scan", - "Scan for reconnect", - "Scan for auto connect", - "Direct Scan" +static inline +const char * wmx_ScanType_tStr(unsigned index) +{ + static const char *strs[] = { + "Preferred Scan", + "Wide Scan", + "Scan for reconnect", + "Scan for auto connect", + "Direct Scan" + }; + static const unsigned index_max = sizeof(strs) / sizeof(strs[0]); + return index < index_max? strs[index] : "Illegal"; }; typedef enum _wmx_LinkLossType_t @@ -276,10 +282,16 @@ typedef enum _wmx_LinkLossType_t LinkLossType_Infinite } wmx_LinkLossType_t; -static char* wmx_LinkLossType_tStr[] = { - "Short Link Loss", - "Long Link Loss", - "Infinite Link Loss" +static inline +const char * wmx_LinkLossType_tStr(unsigned index) +{ + static const char *strs[] = { + "Short Link Loss", + "Long Link Loss", + "Infinite Link Loss" + }; + static const unsigned index_max = sizeof(strs) / sizeof(strs[0]); + return index < index_max? strs[index] : "Illegal"; }; typedef enum _wmx_ConnectionType_t @@ -340,24 +352,30 @@ typedef enum _wmx_SystemState_t UnknownState }wmx_SystemState_t, *wmx_pSystemState_t; -static char* NDnSSystemStates[] = { - "UnInitialized", - "Config", - "Initialized", - "Production", - "RfOff", - "Ready", - "Scan", +static inline +const char * NDnSSystemStates(unsigned index) +{ + static const char *strs[] = { + "UnInitialized", + "Config", + "Initialized", + "Production", + "RfOff", + "Ready", + "Scan", // "OOZ", // "Standby", - "Connecting", - "WimaxConnected", - "DataPathConnected", - "Idle", + "Connecting", + "WimaxConnected", + "DataPathConnected", + "Idle", // "SleepActive", - "Disconnecting", - "RfShutDown", - "UnknownState" + "Disconnecting", + "RfShutDown", + "UnknownState" + }; + static const unsigned index_max = sizeof(strs) / sizeof(strs[0]); + return index < index_max? strs[index] : "Illegal"; }; typedef enum _wmx_ProvisioningOperation_t diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c index 196b7f0..ccbafa7 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_2.c @@ -102,7 +102,7 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetSystemState( wmx_pSystemSt } TRACE(TR_MOD_WRAPPER_LOGS, TR_SEV_NOTICE, "wmx_GetSystemState(OUT). SystemState=%s, ConnectState=%s, swRf=%d, hwRf=%d", - NDnSSystemStates[*systemState>=UnknownState?UnknownState:*systemState], + NDnSSystemStates(*systemState>=UnknownState?UnknownState:*systemState), wmxConnectProgressInfoName(*connectProgressInfo>=Registration?NotApplicable:*connectProgressInfo), rfSwitchesStatus->swRfStatus, rfSwitchesStatus->hwRfStatus); @@ -270,7 +270,7 @@ wmx_Status_t WMX_WRAPPER_API WMX_EXT_CALL_CONV wmx_GetConnectionState( wmx_pConn } wmxNds_SystemStateToConnectionState(connectionState, systemState); - TRACE(TR_MOD_WRAPPER_LOGS, TR_SEV_NOTICE, "wmx_GetConnectionState(OUT). state %s)",ConnectionStateName[*connectionState>=UnknownConnectionState?UnknownConnectionState:*connectionState]); + TRACE(TR_MOD_WRAPPER_LOGS, TR_SEV_NOTICE, "wmx_GetConnectionState(OUT). state %s)",ConnectionStateName(*connectionState>=UnknownConnectionState?UnknownConnectionState:*connectionState)); return WMX_ST_OK; } diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_IndHandler.c b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_IndHandler.c index bc96210..1bd3407 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_IndHandler.c +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_IndHandler.c @@ -84,7 +84,7 @@ void wmxNds_CBsCaller( UINT32 internalRequestID, void *buffer, UINT32 bufferLeng TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_INFO, "got connection state update"); if ( NULL != ConnectionStateUpdateCB ) { - TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_NOTICE, "Calling ConnectionStateUpdate callback. ConnectionState=%s",ConnectionStateName[*(wmx_pConnectionState_t)buffer>=UnknownConnectionState?UnknownConnectionState:*(wmx_pConnectionState_t)buffer]); + TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_NOTICE, "Calling ConnectionStateUpdate callback. ConnectionState=%s",ConnectionStateName(*(wmx_pConnectionState_t)buffer>=UnknownConnectionState?UnknownConnectionState:*(wmx_pConnectionState_t)buffer)); ConnectionStateUpdateCB( *(wmx_pConnectionState_t)buffer ); } break; @@ -388,7 +388,7 @@ wmx_Status_t wmxNds_StateReportArrived( ReportState_type stateReport ) // update the system state wmxNds_DriverSystemStateToSystemState( &(systemStateUpdate.SystemState), stateReport.SystemState.value ); - TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_INFO, "System State Arrived: %s", NDnSSystemStates[systemStateUpdate.SystemState]); + TRACE(TR_MOD_NDNS_WRAPPER, TR_SEV_INFO, "System State Arrived: %s", NDnSSystemStates(systemStateUpdate.SystemState)); old_SystemState = GetCurrentSystemState(); diff --git a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_InternalStructs.h b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_InternalStructs.h index c65d026..51bbe33 100644 --- a/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_InternalStructs.h +++ b/InfraStack/OSAgnostic/WiMax/Wrappers/NDnS/wmxSDK_Nds_InternalStructs.h @@ -61,12 +61,6 @@ typedef enum _wmx_AgingStatus_t AgingStatus_Remove } wmx_AgingStatus_t, *wmx_pAgingStatus_t; -static char *wmx_AgingStatus_tStr[] = { - "New", - "Old", - "Remove (filtered)" -}; - // TODO: Oran - check if a similar enum has already been defined typedef enum _wmx_ConnectType_t { @@ -155,4 +149,4 @@ typedef struct _wmx_UserSystemStateUpdate // wmx_APDOContactInfo_t apdoContactInfo; //} wmx_UserAPDOStatusUpdate, *wmx_pUserAPDOStatusUpdate; -#endif // _WMX_SDK_NDS_INTERNAL_STRUCTS_H
\ No newline at end of file +#endif // _WMX_SDK_NDS_INTERNAL_STRUCTS_H diff --git a/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_win_config_controller_defines.h b/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_win_config_controller_defines.h index f80a1fd..98bec34 100644 --- a/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_win_config_controller_defines.h +++ b/InfraStack/OSDependent/Linux/OSAL/Services/wimax_osal_win_config_controller_defines.h @@ -494,21 +494,28 @@ //## Value verify between the different OEMs //## Comment There would be a list of REG_DWORD define as �A� ,�B� ��M� that indicate the on time for each behavior. //## Comment In addition the last key which call "PowerSave" indicate the on time for Power Save behavior -static char * OSAL_LED_REG_ARR[] = {("A"), -("B"), -("C"), -("D"), -("E"), -("F"), -("G"), -("H"), -("I"), -("J"), -("K"), -("L"), -("M"), -("PowerSave")}; - +static inline +const char * OSAL_LED_REG_ARR(unsigned index) +{ + static const char *strs[] = { + ("A"), + ("B"), + ("C"), + ("D"), + ("E"), + ("F"), + ("G"), + ("H"), + ("I"), + ("J"), + ("K"), + ("L"), + ("M"), + ("PowerSave") + }; + return strs[index]; +} + //## End Root path //## General Comment under the Root path Software\\Intel\\WiMAX\\LED\\LEDBlinkRate\\OffBlinkRate we define the same array //## General Comment (same key names) for the off time |