summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRashmi Ramanna <c_ramanr@qti.qualcomm.com>2014-01-07 11:44:07 +0530
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-04-22 11:48:41 +0530
commite7dc1017500d17763dece2385754bc4ee2a741c7 (patch)
tree964cdcd41270550f245493f857f15f622f0cacd4
parent45799d49e9cb6c67f247d375abfcb3f6e73f2e02 (diff)
P2P: Log enhancement in offload and non offload scan path in PE.
Added extra log messages in offload and non offload scan path in PE which helps to debug scan related issues in PE layer. Change-Id: I489ac06ae92948644ba1fed349df5c15cf3bac61 CRs-Fixed: 643107
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c13
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c15
-rw-r--r--CORE/MAC/src/pe/lim/limSmeReqUtils.c38
3 files changed, 50 insertions, 16 deletions
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index b2e261450caa..e7a8ded819cf 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -238,12 +238,13 @@ limDeferMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg)
if (retCode == TX_SUCCESS)
{
- limLog(pMac, LOG1,
- FL("Deferred message(0x%X) limSmeState %d (prev sme state %d) sysRole %d mlm state %d (prev mlm state %d)"),
- pMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState,
- pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState,
- pMac->lim.gLimPrevMlmState);
- MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DEFERRED));)
+ limLog(pMac, LOG1,
+ FL("Deferred message(0x%X) limSmeState %d (prev sme state %d)"
+ " sysRole %d mlm state %d (prev mlm state %d)"),
+ pMsg->type, pMac->lim.gLimSmeState, pMac->lim.gLimPrevSmeState,
+ pMac->lim.gLimSystemRole, pMac->lim.gLimMlmState,
+ pMac->lim.gLimPrevMlmState);
+ MTRACE(macTraceMsgRx(pMac, NO_SESSION, LIM_TRACE_MAKE_RXMSG(pMsg->type, LIM_MSG_DEFERRED));)
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 05d0b160b3f6..688b0a5b0b21 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -180,6 +180,7 @@ __limFreshScanReqd(tpAniSirGlobal pMac, tANI_U8 returnFreshResults)
}
}
+
limLog(pMac, LOG1, FL("FreshScanReqd: %d "), validState);
if( (validState) && (returnFreshResults & SIR_BG_SCAN_RETURN_FRESH_RESULTS))
@@ -1163,7 +1164,9 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
pMac->lim.fOffloadScanPending = 1;
if (pScanReq->p2pSearch)
pMac->lim.fOffloadScanP2PSearch = 1;
+
limLog(pMac, LOG1, FL("Processed Offload Scan Request Successfully"));
+
return eHAL_STATUS_SUCCESS;
}
@@ -1254,7 +1257,9 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
!pMac->lim.gScanInPowersave &&
!limIsSystemInActiveState(pMac)))
{
- limLog(pMac, LOGE, FL("SCAN is disabled or SCAN in power save is disabled and system is in power save."));
+ limLog(pMac, LOGE, FL("SCAN is disabled or SCAN in power save"
+ " is disabled and system is in power save."));
+
limSendSmeScanRsp(pMac, offsetof(tSirSmeScanRsp,bssDescription[0]), eSIR_SME_INVALID_PARAMETERS, pScanReq->sessionId, pScanReq->transactionId);
return;
}
@@ -1356,6 +1361,7 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
limLog(pMac, LOG1,
FL("Scan all channels as Number of channels is 0"));
+
// Scan all channels
len = sizeof(tLimMlmScanReq) +
(sizeof( pScanReq->channelList.channelNumber ) * (WNI_CFG_VALID_CHANNEL_LIST_LEN - 1)) +
@@ -1511,6 +1517,8 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
if (pMac->fScanOffload)
limFlushp2pScanResults(pMac);
+ limLog(pMac, LOG1, FL("Cached scan results are returned "));
+
if (pScanReq->returnFreshResults & SIR_BG_SCAN_PURGE_RESUTLS)
{
// Discard previously cached scan results
@@ -5583,8 +5591,9 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
}
limLog(pMac, LOGE,
- FL("Error: Scan Disabled.Return with error status for SME Message %s(%d)"),
- limMsgStr(pMsg->type), pMsg->type);
+ FL("Error: Scan Disabled."
+ " Return with error status for SME Message %s(%d)"),
+ limMsgStr(pMsg->type), pMsg->type);
return bufConsumed;
}
diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
index fdb14544e274..81439b4e249b 100644
--- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c
+++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
@@ -857,7 +857,7 @@ limIsSmeScanReqValid(tpAniSirGlobal pMac, tpSirSmeScanReq pScanReq)
{
if (pScanReq->ssId[i].length > SIR_MAC_MAX_SSID_LENGTH)
{
- limLog(pMac, LOGE,
+ limLog(pMac, LOGE,
FL("Requested SSID length > SIR_MAC_MAX_SSID_LENGTH"));
valid = false;
goto end;
@@ -868,8 +868,11 @@ limIsSmeScanReqValid(tpAniSirGlobal pMac, tpSirSmeScanReq pScanReq)
limLog(pMac, LOGE, FL("Invalid BSS Type"));
valid = false;
}
+
if (limIsGroupAddr(pScanReq->bssId) && !limIsAddrBC(pScanReq->bssId))
{
+ limLog(pMac, LOGE, FL("Invalid BSS Type"));
+
valid = false;
limLog(pMac, LOGE, FL("BSSID is group addr and is not Broadcast Addr"));
}
@@ -878,24 +881,45 @@ limIsSmeScanReqValid(tpAniSirGlobal pMac, tpSirSmeScanReq pScanReq)
valid = false;
limLog(pMac, LOGE, FL("Invalid Scan Type"));
}
+
if (pScanReq->channelList.numChannels > SIR_MAX_NUM_CHANNELS)
{
valid = false;
limLog(pMac, LOGE, FL("Number of Channels > SIR_MAX_NUM_CHANNELS"));
}
+ if (limIsGroupAddr(pScanReq->bssId) && !limIsAddrBC(pScanReq->bssId))
+ {
+ valid = false;
+ limLog(pMac, LOGE, FL("BSSID is group addr and is not Broadcast Addr"));
+ }
+ if (!(pScanReq->scanType == eSIR_PASSIVE_SCAN || pScanReq->scanType == eSIR_ACTIVE_SCAN))
+ {
+ valid = false;
+ limLog(pMac, LOGE, FL("Invalid Scan Type"));
+ }
+ if (pScanReq->channelList.numChannels > SIR_MAX_NUM_CHANNELS)
+ {
+ valid = false;
+ limLog(pMac, LOGE, FL("Number of Channels > SIR_MAX_NUM_CHANNELS"));
+ }
+
+
+
/*
** check min/max channelTime range
**/
if (valid)
{
- if ((pScanReq->scanType == eSIR_ACTIVE_SCAN) &&
- (pScanReq->maxChannelTime < pScanReq->minChannelTime))
- {
- limLog(pMac, LOGE, FL("Max Channel Time < Min Channel Time"));
- valid = false;
+ if ((pScanReq->scanType == eSIR_ACTIVE_SCAN) &&
+ (pScanReq->maxChannelTime < pScanReq->minChannelTime))
+ {
+ limLog(pMac, LOGE, FL("Max Channel Time < Min Channel Time"));
+ valid = false;
+ goto end;
}
- }
+ }
+
end:
return valid;
} /*** end limIsSmeScanReqValid() ***/