summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 5d1796f2b397..5c85d03974ae 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -391,6 +391,7 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
{
tSmeCmd *pRetCmd = NULL, *pTempCmd = NULL;
tListElem *pEntry;
+ static int smeCommandQueueFull = 0;
pEntry = csrLLRemoveHead( &pMac->sme.smeCmdFreeList, LL_ACCESS_LOCK );
@@ -402,6 +403,8 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
if ( pEntry )
{
pRetCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
+ /* reset when free list is available */
+ smeCommandQueueFull = 0;
}
else {
int idx = 1;
@@ -426,11 +429,14 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
//dump what is in the pending queue
csrLLLock(&pMac->sme.smeCmdPendingList);
pEntry = csrLLPeekHead( &pMac->sme.smeCmdPendingList, LL_ACCESS_NOLOCK );
- while(pEntry)
+ while(pEntry && !smeCommandQueueFull)
{
pTempCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
- smsLog( pMac, LOGE, "Out of command buffer.... SME pending command #%d (0x%X)",
- idx++, pTempCmd->command );
+ /* Print only 1st five commands from pending queue. */
+ if (idx <= 5)
+ smsLog( pMac, LOGE, "Out of command buffer.... SME pending command #%d (0x%X)",
+ idx, pTempCmd->command );
+ idx++;
if( eSmeCsrCommandMask & pTempCmd->command )
{
//CSR command is stuck. See what the reason code is for that command
@@ -438,6 +444,8 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac )
}
pEntry = csrLLNext( &pMac->sme.smeCmdPendingList, pEntry, LL_ACCESS_NOLOCK );
}
+ /* Increament static variable so that it prints pending command only once*/
+ smeCommandQueueFull++;
csrLLUnlock(&pMac->sme.smeCmdPendingList);
//There may be some more command in CSR's own pending queue