diff options
| author | Sushant Kaushik <skaushik@qti.qualcomm.com> | 2015-06-18 15:58:21 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-07-13 07:09:01 -0700 |
| commit | f1874d53bfeb9639a5ffc8018f896e6ecabc978b (patch) | |
| tree | 740092bc8ef029f7439a1362e85ddb9c8e9785f4 /CORE/MAC/src | |
| parent | 6e7dc36544f603900e0143ee8882c8305a2e7344 (diff) | |
wlan: Changes in Protocol Stack logs from numerical values to string.
prima to qcacld-2.0 propagation
As a part of logging enhancement,to make logs more
interactive, changed pmcstate,scanType etc from
numerical values to human readable string in
Protocol stack.
Change-Id: I589088c2c5fd0afa106a1d0773a2ff525b0dd083
CRs-Fixed: 638916
Diffstat (limited to 'CORE/MAC/src')
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessBeaconFrame.c | 3 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 10 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limRoamingAlgo.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSmeReqUtils.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.c | 53 |
5 files changed, 68 insertions, 6 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c index 43c591eeb57c..bdc4ddf51a85 100644 --- a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c @@ -295,7 +295,8 @@ limProcessBeaconFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo) } // end of (eLIM_MLM_WT_PROBE_RESP_STATE) || (eLIM_MLM_PASSIVE_SCAN_STATE) else { - limLog(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %d"), pMac->lim.gLimMlmState); + limLog(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %s (%d)"), + limMlmStateStr(pMac->lim.gLimMlmState), pMac->lim.gLimMlmState); limPrintMlmState(pMac, LOG1, pMac->lim.gLimMlmState); #ifdef WLAN_DEBUG pMac->lim.gLimUnexpBcnCnt++; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 8741c193ecb1..782815c44ecf 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1323,7 +1323,9 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) #endif pScanReq = (tpSirSmeScanReq) pMsgBuf; - limLog(pMac, LOG1, FL("SME SCAN REQ numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %d mode %d rsp %d"), + limLog(pMac, LOG1,FL("SME SCAN REQ numChan %d min %d max %d IELen %d" + "first %d fresh %d unique %d type %s (%d)" + " mode %s (%d)rsp %d"), pScanReq->channelList.numChannels, pScanReq->minChannelTime, pScanReq->maxChannelTime, @@ -1331,9 +1333,11 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pScanReq->returnAfterFirstMatch, pScanReq->returnFreshResults, pScanReq->returnUniqueResults, + lim_ScanTypetoString(pScanReq->scanType), pScanReq->scanType, - pScanReq->backgroundScanMode, - pMac->lim.gLimRspReqd ? 1 : 0); + lim_BackgroundScanModetoString(pScanReq->backgroundScanMode), + pScanReq->backgroundScanMode, pMac->lim.gLimRspReqd ? 1 : 0); + /* Since scan req always requires a response, we will overwrite response required here. * This is added esp to take care of the condition where in p2p go case, we hold the scan req and diff --git a/CORE/MAC/src/pe/lim/limRoamingAlgo.c b/CORE/MAC/src/pe/lim/limRoamingAlgo.c index 045d5c544d70..b44504681ce6 100644 --- a/CORE/MAC/src/pe/lim/limRoamingAlgo.c +++ b/CORE/MAC/src/pe/lim/limRoamingAlgo.c @@ -268,7 +268,9 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac) smeScanReq.uIEFieldOffset = sizeof(tSirSmeScanReq); backgroundScan = limSelectsBackgroundScanMode(pMac); - PELOG1(limLog(pMac, LOG1, FL("Performing (mode %d) Background Scan "), backgroundScan);) + PELOG1(limLog(pMac, LOG1, FL("Performing (mode %s (%d)) Background Scan"), + lim_BackgroundScanModetoString(backgroundScan), + backgroundScan);) smeScanReq.backgroundScanMode = backgroundScan; //determine whether to send the results or not, If so, notify the BG scan results to SME diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c index 2d2ce7f8f255..9bace4478822 100644 --- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c +++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c @@ -495,7 +495,9 @@ limIsSmeStartBssReqValid(tpAniSirGlobal pMac, tANI_U8 valid = true; PELOG1(limLog(pMac, LOG1, - FL("Parsed START_BSS_REQ fields are bssType=%d, channelId=%d, SSID len=%d, rsnIE len=%d, nwType=%d, rateset len=%d"), + FL("Parsed START_BSS_REQ fields are bssType=%s (%d), channelId=%d," + " SSID len=%d, rsnIE len=%d, nwType=%d, rateset len=%d"), + lim_BssTypetoString(pStartBssReq->bssType), pStartBssReq->bssType, pStartBssReq->channelId, pStartBssReq->ssId.length, diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index cf1fb4f6bf4d..c020da4a35fc 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -6929,6 +6929,59 @@ void limProcessAddStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ) } +/** + * lim_ScanTypetoString(): converts scan type enum to string. + * @scanType: enum value of scanType. + */ +const char * lim_ScanTypetoString(const v_U8_t scanType) +{ + switch (scanType) + { + CASE_RETURN_STRING( eSIR_PASSIVE_SCAN ); + CASE_RETURN_STRING( eSIR_ACTIVE_SCAN ); + CASE_RETURN_STRING( eSIR_BEACON_TABLE ); + default: + return "Unknown ScanType"; + } +} + +/** + * lim_BssTypetoString(): converts bss type enum to string. + * @bssType: enum value of bssType. + */ + +const char * lim_BssTypetoString(const v_U8_t bssType) +{ + switch (bssType) + { + CASE_RETURN_STRING( eSIR_INFRASTRUCTURE_MODE ); + CASE_RETURN_STRING( eSIR_INFRA_AP_MODE ); + CASE_RETURN_STRING( eSIR_IBSS_MODE ); + CASE_RETURN_STRING( eSIR_BTAMP_STA_MODE ); + CASE_RETURN_STRING( eSIR_BTAMP_AP_MODE ); + CASE_RETURN_STRING( eSIR_AUTO_MODE ); + default: + return "Unknown BssType"; + } +} + +/** + * lim_BackgroundScanModetoString():converts BG scan type to string. + * @mode: enum value of BG scan type. + */ + +const char *lim_BackgroundScanModetoString(const v_U8_t mode) +{ + switch (mode) + { + CASE_RETURN_STRING( eSIR_AGGRESSIVE_BACKGROUND_SCAN ); + CASE_RETURN_STRING( eSIR_NORMAL_BACKGROUND_SCAN ); + CASE_RETURN_STRING( eSIR_ROAMING_SCAN ); + default: + return "Unknown BgScanMode"; + } +} + void limProcessDelStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ) { |
