diff options
| author | Akash Patel <akashp@codeaurora.org> | 2014-04-04 23:10:27 -0700 |
|---|---|---|
| committer | Akash Patel <akashp@codeaurora.org> | 2014-04-04 23:11:35 -0700 |
| commit | cd36bb161cd50a604e2e5fa99f9084345572f74b (patch) | |
| tree | 87e4e063a2b6c14c89796673e0e795641369d778 | |
| parent | 6dfbd071848fce41fc076f0f938c2f2a30144e20 (diff) | |
| parent | 3d50937ff2220c4fa07634e3176302eef5f120f7 (diff) | |
Release 1.0.0.83 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master'
* origin/caf/caf-wlan/master:
Cafstaging Release 1.0.0.83
Solved conflict marks.
qcacld: Fix build error for AP+AP change
Wlan: Change the log level for rrmGetMgmtTxPower log prints
wlan: Fix of crash issue with batch scan disabled
wlan: SME log level modification.
wlan: Missing error and info logs in PE disconnect path (Part 2)
wlan: Missing error and info logs in PE disconnect path (Part 1)
qcacld : Increase private data length in hdd ioctl
qcacld: CL 891938 - update fw common interface files
qca-cld: TX flow control x64 compile error fix
wlan: Logging enhancements in PE
wlan: Missing error and info logs in PE connect path (Part 1)
wlan: Missing error and info logs in PE connect path (Part 2)
wlan: Missing error and info logs in PE connect path (Part 3)
wlan: Missing error and info logs in PE connect path (Part 4 and 5)
VOSS:Changes to use vos_timer_get_system_time instead of jiffies_to_msecs.
Change-Id: I436354a8ca9ec679f0e5ce8e00dcc3dbb4c8d918
30 files changed, 1124 insertions, 592 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_hostapd.h b/CORE/HDD/inc/wlan_hdd_hostapd.h index 22abc8b59a07..3b084a365ce9 100644 --- a/CORE/HDD/inc/wlan_hdd_hostapd.h +++ b/CORE/HDD/inc/wlan_hdd_hostapd.h @@ -53,7 +53,7 @@ -------------------------------------------------------------------------*/ /* max length of command string in hostapd ioctl */ -#define HOSTAPD_IOCTL_COMMAND_STRLEN_MAX 4096 +#define HOSTAPD_IOCTL_COMMAND_STRLEN_MAX 8192 hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAddr, tANI_U8 *name); diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c index f5be3fac2356..b4c35b1b905e 100644 --- a/CORE/HDD/src/wlan_hdd_ipa.c +++ b/CORE/HDD/src/wlan_hdd_ipa.c @@ -1241,14 +1241,14 @@ static void hdd_ipa_clean_hdr(hdd_adapter_t *adapter) static void hdd_ipa_cleanup_iface(struct hdd_ipa_iface_context *iface_context) { - if (iface_context == NULL) - return; + if (iface_context == NULL) + return; - hdd_ipa_clean_hdr(iface_context->adapter); + hdd_ipa_clean_hdr(iface_context->adapter); - iface_context->adapter->ipa_context = NULL; - iface_context->adapter = NULL - iface_context->tl_context = NULL + iface_context->adapter->ipa_context = NULL; + iface_context->adapter = NULL; + iface_context->tl_context = NULL; } diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 09ea2435327d..065b99d37e6d 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -190,8 +190,7 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue, * Maximum buffer size used for returning the data back to user space */ #define WLAN_MAX_BUF_SIZE 1024 -#define WLAN_PRIV_DATA_MAX_LEN 4096 - +#define WLAN_PRIV_DATA_MAX_LEN 8192 /* * Driver miracast parameters 0-Disabled * 1-Source, 2-Sink diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c index b6a250beb740..df0d85e5f2a8 100644 --- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c +++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c @@ -517,8 +517,6 @@ void hdd_softap_tx_resume_cb(void *adapter_context, vos_timer_stop(&pAdapter->tx_flow_control_timer); } - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, - "Resume DEV 0x%x", (unsigned int)pAdapter->dev); netif_tx_wake_all_queues(pAdapter->dev); } return; diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 4418036a9cf9..6cd6699da2f7 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -42,9 +42,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 82 +#define QWLAN_VERSION_BUILD 83 -#define QWLAN_VERSIONSTR "1.0.0.82" +#define QWLAN_VERSIONSTR "1.0.0.83" #ifdef QCA_WIFI_2_0 diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c index 499bfc2d2c6a..3e7595aa444b 100644 --- a/CORE/MAC/src/pe/lim/limAssocUtils.c +++ b/CORE/MAC/src/pe/lim/limAssocUtils.c @@ -152,6 +152,7 @@ limCompareCapabilities(tpAniSirGlobal pMac, (pAssocReq->capabilityInfo.ibss) ) { // Requesting STA asserting IBSS capability. + limLog(pMac, LOG1,FL("Requesting STA asserting IBSS capability")); return false; } @@ -160,6 +161,7 @@ limCompareCapabilities(tpAniSirGlobal pMac, pAssocReq->capabilityInfo.cfPollReq) { // AP does not support PCF functionality + limLog(pMac, LOG1,FL(" AP does not support PCF functionality")); return false; } @@ -177,8 +179,8 @@ limCompareCapabilities(tpAniSirGlobal pMac, (pAssocReq->capabilityInfo.shortPreamble != pLocalCapabs->shortPreamble)) { - PELOG1(limLog(pMac, LOG1, - FL("Allowing a STA requesting short preamble while AP does not support it"));) + // Allowing a STA requesting short preamble while + // AP does not support it #if 0 // AP does not support short preamable return false; @@ -186,7 +188,7 @@ limCompareCapabilities(tpAniSirGlobal pMac, } - limLog(pMac, LOGW, "QoS in AssocReq: %d, local ShortP: %d", + limLog(pMac, LOG1, "QoS in AssocReq: %d, local capabs qos: %d", pAssocReq->capabilityInfo.qos, pLocalCapabs->qos); @@ -198,12 +200,14 @@ limCompareCapabilities(tpAniSirGlobal pMac, CSR - proper fix needs to be put in place*/ if ( 0 != vos_get_skip_11e_check()) { - limLog(pMac, LOG1, FL("Received unmatched QOS but cfg to suppress - continuing")); + limLog(pMac, LOG1, + FL("Received unmatched QOS but cfg to suppress - continuing")); } else { // AP does not support QoS capability - return false; + limLog(pMac, LOG1, FL("AP does not support QoS capability")); + return false; } } @@ -225,6 +229,11 @@ limCompareCapabilities(tpAniSirGlobal pMac, if(val) { if (pAssocReq->capabilityInfo.shortSlotTime != pLocalCapabs->shortSlotTime) + { + limLog(pMac, LOGE, + FL("AP rejects association as station doesnt support shortslot time")); + return false; + } return false; } } @@ -265,7 +274,6 @@ limCheckRxBasicRates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet,tpPESession p pRateSet = vos_mem_malloc(sizeof(tSirMacRateSet)); if (NULL == pRateSet) { - // Log error limLog(pMac, LOGP, FL("call to AllocateMemory failed for RATESET")); return false; @@ -378,22 +386,26 @@ limCheckMCSSet(tpAniSirGlobal pMac, tANI_U8* supportedMCSSet) validBytes = VALID_MCS_SIZE/8; //check if all the Basic MCS Bits are set in supported MCS bitmap - for(i=0; i<validBytes; i++) + for (i=0; i<validBytes; i++) { - if( (basicMCSSet[i] & supportedMCSSet[i]) != basicMCSSet[i]) - { - PELOGW(limLog(pMac, LOGW, FL("One of Basic MCS Set Rates is not supported by the Station."));) - return false; - } - } - - //check the last 5 bits of the valid MCS bitmap - if( ((basicMCSSet[i] & lastByteMCSMask) & (supportedMCSSet[i] & lastByteMCSMask)) != - (basicMCSSet[i] & lastByteMCSMask)) + if ((basicMCSSet[i] & supportedMCSSet[i]) != basicMCSSet[i]) { - PELOGW(limLog(pMac, LOGW, FL("One of Basic MCS Set Rates is not supported by the Station."));) + //Log is avaiable in calling function in file limProcessAssocReqFrame.c + limLog(pMac, LOGW, + FL("One of Basic MCS Set Rates is not supported by the Station.")); return false; } + } + + //check the last 5 bits of the valid MCS bitmap + if (((basicMCSSet[i] & lastByteMCSMask) & + (supportedMCSSet[i] & lastByteMCSMask)) != + (basicMCSSet[i] & lastByteMCSMask)) + { + limLog(pMac, LOGW, + FL("One of Basic MCS Set Rates is not supported by the Station.")); + return false; + } return true; } @@ -449,6 +461,7 @@ limCheckRxRSNIeMatch(tpAniSirGlobal pMac, tDot11fIERSN rxRSNIe,tpPESession pSess { if (pRSNIe->gp_cipher_suite[i] != rxRSNIe.gp_cipher_suite[i]) { + limLog(pMac, LOG3, FL("Invalid groupwise cipher suite")); return eSIR_MAC_INVALID_GROUP_CIPHER_STATUS; } } @@ -485,6 +498,7 @@ limCheckRxRSNIeMatch(tpAniSirGlobal pMac, tDot11fIERSN rxRSNIe,tpPESession pSess if ((!match) || ((staIsHT) && onlyNonHtCipher)) { + limLog(pMac, LOG1, FL("Invalid pairwise cipher suite")); return eSIR_MAC_INVALID_PAIRWISE_CIPHER_STATUS; } /* Check RSN capabilities @@ -492,6 +506,7 @@ limCheckRxRSNIeMatch(tpAniSirGlobal pMac, tDot11fIERSN rxRSNIe,tpPESession pSess */ if(((rxRSNIe.RSN_Cap[0] >> 0) & 0x1) == true) //this is supported by AP only { + limLog(pMac, LOG1, FL("Invalid RSN information element capabilities")); return eSIR_MAC_INVALID_RSN_IE_CAPABILITIES_STATUS; } @@ -505,7 +520,11 @@ limCheckRxRSNIeMatch(tpAniSirGlobal pMac, tDot11fIERSN rxRSNIe,tpPESession pSess if ((theyRequirePMF && theyArePMFCapable && !weArePMFCapable) || (weRequirePMF && !theyArePMFCapable)) { - limLog(pMac, LOG1, FL("Association fail, robust management frames policy violation")); + limLog(pMac, LOG1, FL("Association fail, robust management frames " + "policy violation theyRequirePMF =%d theyArePMFCapable %d " + "weArePMFCapable %d weRequirePMF %d theyArePMFCapable %d"), + theyRequirePMF,theyArePMFCapable,weArePMFCapable,weRequirePMF, + theyArePMFCapable); return eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION; } @@ -552,6 +571,7 @@ limCheckRxWPAIeMatch(tpAniSirGlobal pMac, tDot11fIEWPA rxWPAIe,tpPESession pSess { if (pWPAIe->multicast_cipher[i] != rxWPAIe.multicast_cipher[i]) { + limLog(pMac, LOG1, FL("Invalid groupwise cipher suite")); return eSIR_MAC_INVALID_GROUP_CIPHER_STATUS; } } @@ -588,6 +608,7 @@ limCheckRxWPAIeMatch(tpAniSirGlobal pMac, tDot11fIEWPA rxWPAIe,tpPESession pSess if ((!match) || ((staIsHT) && onlyNonHtCipher)) { + limLog(pMac, LOG1, FL("Invalid pairwise cipher suite")); return eSIR_MAC_CIPHER_SUITE_REJECTED_STATUS; } @@ -631,7 +652,7 @@ limCleanupRxPath(tpAniSirGlobal pMac, tpDphHashNode pStaDs,tpPESession psessionE tSirRetStatus retCode = eSIR_SUCCESS; - PELOG2(limLog( pMac, LOG2, FL("**Initiate cleanup"));) + limLog( pMac, LOG1, FL("**Initiate cleanup")); limAbortBackgroundScan( pMac ); @@ -750,6 +771,11 @@ limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr, tLimMlmDeauthCnf mlmDeauthCnf; tLimMlmPurgeStaInd mlmPurgeStaInd; + limLog(pMac, LOG1, FL("Sessionid: %d staDsAssocId: %d Trigger: %X " + "statusCode: %d staDsAddr: "MAC_ADDRESS_STR),psessionEntry->peSessionId, + staDsAssocId, mlmStaContext.cleanupTrigger, statusCode, + MAC_ADDR_ARRAY(staDsAddr)); + if ((psessionEntry->limSystemRole == eLIM_STA_ROLE)||(psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE)) { // Set BSSID at CFG to null @@ -945,6 +971,12 @@ limRejectAssociation(tpAniSirGlobal pMac, tSirMacAddr peerAddr, tANI_U8 subType, { tpDphHashNode pStaDs; + limLog(pMac, LOG1, FL("Sessionid: %d authType: %d subType: %d " + "addPreAuthContext: %d staId: %d deleteSta: %d rCode : %d " + "peerAddr: "MAC_ADDRESS_STR),psessionEntry->peSessionId, + authType, subType, addPreAuthContext, staId, deleteSta, rCode, + MAC_ADDR_ARRAY(peerAddr)); + if (addPreAuthContext) { // Create entry for this STA in pre-auth list @@ -1057,6 +1089,8 @@ limDecideApProtectionOnHt20Delete(tpAniSirGlobal pMac, if (psessionEntry->gLimHt20Params.numSta == 0) { // disable protection + limLog(pMac, LOG1, FL("No 11B STA exists, PESessionID %d"), + psessionEntry->peSessionId); limEnableHT20Protection(pMac, false, false, pBeaconParams,psessionEntry); } } @@ -1153,7 +1187,6 @@ limDecideApProtectionOnDelete(tpAniSirGlobal pMac, if (psessionEntry->gLim11bParams.numSta == 0) { // disable protection - PELOG1(limLog(pMac, LOG1, FL("No 11B STA exists"));) limEnable11gProtection(pMac, false, false, pBeaconParams,psessionEntry); } } @@ -1305,7 +1338,6 @@ void limDecideShortPreamble(tpAniSirGlobal pMac, if (psessionEntry->gLimNoShortParams.numNonShortPreambleSta == 0) { // enable short preamble - PELOG1(limLog(pMac, LOG1, FL("All associated STAs have short preamble support now."));) //reset the cache vos_mem_set((tANI_U8 *)&psessionEntry->gLimNoShortParams, sizeof(tLimNoShortParams), 0); @@ -1377,7 +1409,6 @@ limDecideShortSlot(tpAniSirGlobal pMac, tpDphHashNode pStaDs, (val && psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta == 0)) { // enable short slot time - PELOG1(limLog(pMac, LOG1, FL("All associated STAs have short slot time support now."));) //reset the cache vos_mem_set((tANI_U8 *)&psessionEntry->gLimNoShortSlotParams, sizeof(tLimNoShortSlotParams), 0); @@ -1394,7 +1425,6 @@ limDecideShortSlot(tpAniSirGlobal pMac, tpDphHashNode pStaDs, if (val && pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta == 0) { // enable short slot time - PELOG1(limLog(pMac, LOG1, FL("All associated STAs have short slot time support now."));) //reset the cache vos_mem_set((tANI_U8 *)&pMac->lim.gLimNoShortSlotParams, sizeof(tLimNoShortSlotParams), 0); @@ -1462,6 +1492,9 @@ limRestorePreReassocState(tpAniSirGlobal pMac, tANI_U8 chanNum, secChanOffset; tLimMlmReassocCnf mlmReassocCnf; + limLog(pMac, LOG1, FL("sessionid: %d protStatusCode: %d resultCode: %d"), + psessionEntry->smeSessionId, protStatusCode, resultCode); + psessionEntry->limMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_LINK_ESTABLISHED_STATE)); @@ -1830,7 +1863,7 @@ limPopulateOwnRateSet(tpAniSirGlobal pMac, PELOG2(limLog(pMac, LOG2, FL("MCS Rate Set Bitmap: "));) for(i=0; i<SIR_MAC_MAX_SUPPORTED_MCS_SET; i++) - PELOGW(limLog(pMac, LOG2,FL("%x ") , pRates->supportedMCSSet[i]);) + PELOG2(limLog(pMac, LOG2,FL("%x ") , pRates->supportedMCSSet[i]);) } #ifdef WLAN_FEATURE_11AC @@ -1980,7 +2013,7 @@ limPopulatePeerRateSet(tpAniSirGlobal pMac, } PELOG2(limLog(pMac, LOG2, FL("MCS Rate Set Bitmap: "));) for(i=0; i<SIR_MAC_MAX_SUPPORTED_MCS_SET; i++) - PELOGW(limLog(pMac, LOG2,FL("%x ") , pRates->supportedMCSSet[i]);) + PELOG2(limLog(pMac, LOG2,FL("%x ") , pRates->supportedMCSSet[i]);) } #ifdef WLAN_FEATURE_11AC limPopulateVhtMcsSet(pMac, pRates , pVHTCaps,psessionEntry); @@ -2327,6 +2360,9 @@ limAddSta( sirCopyMacAddr(staMac,psessionEntry->selfMacAddr); + limLog(pMac, LOG1, FL("sessionid: %d updateEntry = %d limsystemrole = %d "), + psessionEntry->smeSessionId, updateEntry, psessionEntry->limSystemRole); + pAddStaParams = vos_mem_malloc(sizeof(tAddStaParams)); if (NULL == pAddStaParams) { @@ -2349,6 +2385,9 @@ limAddSta( else pStaAddr = &staMac; + limLog(pMac, LOG1, FL(MAC_ADDRESS_STR": Subtype(Assoc/Reassoc): %d "), + MAC_ADDR_ARRAY(*pStaAddr), pStaDs->mlmStaContext.subType); + vos_mem_copy((tANI_U8 *) pAddStaParams->staMac, (tANI_U8 *) *pStaAddr, sizeof(tSirMacAddr)); vos_mem_copy((tANI_U8 *) pAddStaParams->bssId, @@ -2376,6 +2415,10 @@ limAddSta( pStaDs->valid = 0; pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ADD_STA_RSP_STATE; + limLog(pMac, LOG2, FL(" Assoc ID: %d wmmEnabled = %d listenInterval = %d" + " shortPreambleSupported: %d "), pAddStaParams->assocId, + pAddStaParams->wmmEnabled, pAddStaParams->listenInterval, + pAddStaParams->shortPreambleSupported); // This will indicate HAL to "allocate" a new STA index #ifdef FEATURE_WLAN_TDLS /* As there is corner case in-between add_sta and change_sta,if del_sta for other staIdx happened, @@ -2422,6 +2465,12 @@ limAddSta( #endif } +#ifdef WLAN_FEATURE_11AC + limLog(pMac, LOG2, FL("vhtCapable: %d "),pAddStaParams->vhtCapable); +#endif + limLog(pMac, LOG2, FL(" StaIdx: %d updateSta = %d htcapable = %d "), + pAddStaParams->staIdx,pAddStaParams->updateSta, + pAddStaParams->htCapable); pAddStaParams->greenFieldCapable = pStaDs->htGreenfield; pAddStaParams->maxAmpduDensity= pStaDs->htAMpduDensity; @@ -2434,6 +2483,19 @@ limAddSta( pAddStaParams->txChannelWidthSet = pStaDs->htSupportedChannelWidthSet; pAddStaParams->mimoPS = pStaDs->htMIMOPSState; + limLog(pMac, LOG2, FL(" greenFieldCapable: %d maxAmpduDensity = %d " + "maxAmpduDensity = %d"), pAddStaParams->greenFieldCapable, + pAddStaParams->maxAmpduDensity, pAddStaParams->maxAmpduSize); + + limLog(pMac, LOG2, FL("fDsssCckMode40Mhz: %d fShortGI20Mhz: %d " + "fShortGI40Mhz: %d"), pAddStaParams->fDsssCckMode40Mhz, + pAddStaParams->fShortGI20Mhz, pAddStaParams->fShortGI40Mhz); + + limLog(pMac, LOG2, FL("lsigTxopProtection: %d maxAmsduSize: %d " + "txChannelWidthSet: %d mimoPS: %d "), pAddStaParams->lsigTxopProtection, + pAddStaParams->maxAmsduSize,pAddStaParams->txChannelWidthSet, + pAddStaParams->mimoPS); + #ifdef WLAN_FEATURE_11AC if(pAddStaParams->vhtCapable) { @@ -2446,6 +2508,8 @@ limAddSta( ( STA_ENTRY_PEER == pStaDs->staType ) ? pStaDs->vhtBeamFormerCapable : psessionEntry->txBFIniFeatureEnabled ; #endif + limLog(pMac, LOG2, FL("vhtTxChannelWidthSet: %d vhtTxBFCapable: %d"), + pAddStaParams->vhtTxChannelWidthSet,pAddStaParams->vhtTxBFCapable); } #endif @@ -2642,16 +2706,19 @@ limAddSta( pAddStaParams->uAPSD |= pAddStaParams->uAPSD << 4; pAddStaParams->maxSPLen = pStaDs->qos.capability.qosInfo.maxSpLen; - limLog( pMac, LOG1, FL( "uAPSD = 0x%x, maxSpLen = %d" ), + limLog( pMac, LOG1, FL("uAPSD = 0x%x, maxSpLen = %d"), pAddStaParams->uAPSD, pAddStaParams->maxSPLen); } #ifdef WLAN_FEATURE_11W pAddStaParams->rmfEnabled = pStaDs->rmfEnabled; - limLog( pMac, LOG1, FL( "Adding station, station index %d, PMF enabled %d"), - pAddStaParams->staIdx, pAddStaParams->rmfEnabled); + limLog( pMac, LOG1, FL( "PMF enabled %d"), pAddStaParams->rmfEnabled); #endif + limLog(pMac, LOG2, FL("htLdpcCapable: %d vhtLdpcCapable: %d " + "p2pCapableSta: %d"), pAddStaParams->htLdpcCapable, + pAddStaParams->vhtLdpcCapable, pAddStaParams->p2pCapableSta); + //we need to defer the message until we get the response back from HAL. if (pAddStaParams->respReqd) SET_LIM_PROCESS_DEFD_MESGS(pMac, false); @@ -2813,8 +2880,12 @@ limDelSta( msgQ.bodyptr = pDelStaParams; msgQ.bodyval = 0; - limLog( pMac, LOG1, FL( "Sending SIR_HAL_DELETE_STA_REQ for STAID: %X and AssocID: %d" ), - pDelStaParams->staIdx, pDelStaParams->assocId); + limLog( pMac, LOG1, FL( "Sessionid %d :Sending SIR_HAL_DELETE_STA_REQ " + "for STAID: %X and AssocID: %d MAC : "MAC_ADDRESS_STR ), + pDelStaParams->sessionId, + pDelStaParams->staIdx, pDelStaParams->assocId, + MAC_ADDR_ARRAY(pStaDs->staAddr)); + MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type)); retCode = wdaPostCtrlMsg( pMac, &msgQ ); if( eSIR_SUCCESS != retCode) @@ -2935,7 +3006,7 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio } #endif //TO SUPPORT BT-AMP sirCopyMacAddr(staMac,psessionEntry->selfMacAddr); - + limLog(pMac, LOG1, FL(MAC_ADDRESS_STR": "),MAC_ADDR_ARRAY(staMac)); pAddStaParams = vos_mem_malloc(sizeof(tAddStaParams)); if (NULL == pAddStaParams) { @@ -3063,6 +3134,20 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio "CFG,setting value to default"));) pAddStaParams->fShortGI40Mhz = WNI_CFG_SHORT_GI_40MHZ_STADEF; } + limLog(pMac, LOG2, FL(" greenFieldCapable: %d maxAmpduDensity = %d " + "maxAmpduSize = %d"), pAddStaParams->greenFieldCapable, + pAddStaParams->maxAmpduDensity, pAddStaParams->maxAmpduSize); + + limLog(pMac, LOG2, FL("fDsssCckMode40Mhz: %d fShortGI20Mhz: %d " + "fShortGI40Mhz: %d lsigTxopProtection: %d"), + pAddStaParams->fDsssCckMode40Mhz, pAddStaParams->fShortGI20Mhz, + pAddStaParams->fShortGI40Mhz, pAddStaParams->lsigTxopProtection); + + limLog(pMac, LOG2, FL(" maxAmsduSize: %d txChannelWidthSet: %d " + "mimoPS: %d rifsMode %d delBASupport %d"), + pAddStaParams->maxAmsduSize, + pAddStaParams->txChannelWidthSet, pAddStaParams->mimoPS, + pAddStaParams->rifsMode, pAddStaParams->delBASupport ); } } #ifdef WLAN_FEATURE_11AC @@ -3072,6 +3157,8 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio limLog( pMac, LOG1, FL("VHT WIDTH SET %d"),pAddStaParams->vhtTxChannelWidthSet); } pAddStaParams->vhtTxBFCapable = psessionEntry->txBFIniFeatureEnabled; + limLog(pMac, LOG2, FL("vhtCapable: %d vhtTxBFCapable %d "), + pAddStaParams->vhtCapable, pAddStaParams->vhtTxBFCapable); // In 11ac mode, the hardware is capable of supporting 128K AMPDU size if ( IS_DOT11_MODE_VHT(selfStaDot11Mode) ) @@ -3108,6 +3195,20 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio //limFillSupportedRatesInfo(pMac, NULL, &pAddStaParams->supportedRates,psessionEntry); pAddStaParams->supportedRates.opRateMode = limGetStaRateMode((tANI_U8)selfStaDot11Mode); + limLog(pMac, LOG2, FL(" StaIdx: %d updateSta = %d htcapable = %d "), + pAddStaParams->staIdx,pAddStaParams->updateSta, + pAddStaParams->htCapable); + + limLog(pMac, LOG2, FL("htLdpcCapable: %d vhtLdpcCapable: %d " + "p2pCapableSta: %d"), + pAddStaParams->htLdpcCapable,pAddStaParams->vhtLdpcCapable, + pAddStaParams->p2pCapableSta); + + limLog(pMac, LOG2, FL(" sessionid: %d Assoc ID: %d listenInterval = %d" + " shortPreambleSupported: %d "), psessionEntry->smeSessionId, + pAddStaParams->assocId, pAddStaParams->listenInterval, + pAddStaParams->shortPreambleSupported); + msgQ.type = WDA_ADD_STA_REQ; // // FIXME_GEN4 @@ -3118,8 +3219,11 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio msgQ.bodyptr = pAddStaParams; msgQ.bodyval = 0; - limLog( pMac, LOGW, FL( "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ), - pAddStaParams->assocId); + limLog( pMac, LOGW, FL(MAC_ADDRESS_STR":Sessionid %d : " + "Sending SIR_HAL_ADD_STA_REQ... (aid %d)" ), + MAC_ADDR_ARRAY(pAddStaParams->staMac), + pAddStaParams->sessionId, + pAddStaParams->assocId); MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type)); if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ ))) @@ -3367,7 +3471,10 @@ limCheckAndAnnounceJoinSuccess(tpAniSirGlobal pMac, if( (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE)||(psessionEntry->limSystemRole == eLIM_STA_ROLE)) { - PELOG1(limLog(pMac, LOG1, FL("Received Beacon/PR with matching BSSID"));) + limLog(pMac, LOG1, FL("Received Beacon/PR with matching BSSID" + MAC_ADDRESS_STR "PESessionID %d"), + MAC_ADDR_ARRAY(psessionEntry->bssId), + psessionEntry->peSessionId ); // Deactivate Join Failure timer limDeactivateAndChangeTimer(pMac, eLIM_JOIN_FAIL_TIMER); @@ -3540,8 +3647,10 @@ limDelBss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tANI_U16 bssIdx,tpPESession pDelBssParams->respReqd = 1; vos_mem_copy(pDelBssParams->bssid, psessionEntry->bssId, sizeof(tSirMacAddr)); pDelBssParams->smesessionId = psessionEntry->smeSessionId; - PELOGW(limLog( pMac, LOGW, FL("Sending HAL_DELETE_BSS_REQ for BSSID: %X"), - pDelBssParams->bssIdx);) + PELOGW(limLog( pMac, LOGW, FL("Sessionid %d : Sending HAL_DELETE_BSS_REQ " + "for bss idx: %X BSSID:"MAC_ADDRESS_STR), pDelBssParams->sessionId, + pDelBssParams->bssIdx, + MAC_ADDR_ARRAY(psessionEntry->bssId));) //we need to defer the message until we get the response back from HAL. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); @@ -3624,6 +3733,12 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, psessionEntry->selfMacAddr, sizeof(tSirMacAddr)); + limLog(pMac, LOG1, FL("sessionid: %d updateEntry = %d limsystemrole = %d "), + psessionEntry->smeSessionId,updateEntry,psessionEntry->limSystemRole); + + limLog(pMac, LOG1, FL("BSSID: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pAddBssParams->bssId)); + if(psessionEntry->bssType == eSIR_BTAMP_AP_MODE) { pAddBssParams->bssType = eSIR_BTAMP_AP_MODE; @@ -3666,6 +3781,21 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pAddBssParams->llgCoexist = (tANI_U8) psessionEntry->beaconParams.llgCoexist; pAddBssParams->ht20Coexist = (tANI_U8) psessionEntry->beaconParams.ht20Coexist; + limLog(pMac, LOG2, FL(" BSS Type %d Beacon Interval: %d dtimPeriod: %d " + "cfpCount: %d"),pAddBssParams->bssType, pAddBssParams->beaconInterval, + pAddBssParams->dtimPeriod, pAddBssParams->cfParamSet.cfpCount); + + limLog(pMac, LOG2, FL(" cfpPeriod: %d cfpMaxDuration: %d cfpDurRemaining:" + " %d numRates: %d "),pAddBssParams->cfParamSet.cfpPeriod, + pAddBssParams->cfParamSet.cfpMaxDuration, + pAddBssParams->cfParamSet.cfpDurRemaining, + pAddBssParams->rateSet.numRates); + + limLog(pMac, LOG2, FL("nwType:%d shortSlotTimeSupported: %d" + "llaCoexist: %d llbCoexist: %d llgCoexist: %d ht20Coexist: %d"), + pAddBssParams->nwType, pAddBssParams->shortSlotTimeSupported, + pAddBssParams->llaCoexist, pAddBssParams->llbCoexist, + pAddBssParams->llgCoexist, pAddBssParams->ht20Coexist); // Use the advertised capabilities from the received beacon/PR @@ -3673,7 +3803,7 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) && ( pAssocRsp->HTCaps.present )) { pAddBssParams->htCapable = pAssocRsp->HTCaps.present; - + limLog(pMac, LOG2, FL("htCapable: %d"),pAddBssParams->htCapable); if ( pBeaconStruct->HTInfo.present ) { pAddBssParams->htOperMode = (tSirMacHTOperatingMode)pAssocRsp->HTInfo.opMode; @@ -3693,11 +3823,23 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pAddBssParams->llnNonGFCoexist = (tANI_U8)pAssocRsp->HTInfo.nonGFDevicesPresent; pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)pAssocRsp->HTInfo.lsigTXOPProtectionFullSupport; pAddBssParams->fRIFSMode = pAssocRsp->HTInfo.rifsMode; + + limLog(pMac, LOG2, FL("htOperMode: %d dualCTSProtection: %d " + "txChannelWidthSet: %d currentExtChannel: %d "), + pAddBssParams->htOperMode, pAddBssParams->dualCTSProtection, + pAddBssParams->txChannelWidthSet,pAddBssParams->currentExtChannel); + + limLog(pMac, LOG2, FL("llnNonGFCoexist: %d " + "fLsigTXOPProtectionFullSupport: %d fRIFSMode %d"), + pAddBssParams->llnNonGFCoexist, + pAddBssParams->fLsigTXOPProtectionFullSupport, + pAddBssParams->fRIFSMode); } } pAddBssParams->currentOperChannel = bssDescription->channelId; - + limLog(pMac, LOG2, FL("currentOperChannel %d"), + pAddBssParams->currentOperChannel); #ifdef WLAN_FEATURE_11AC if (psessionEntry->vhtCapability && ( pAssocRsp->VHTCaps.present )) { @@ -3753,6 +3895,10 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, { pAddBssParams->vhtCapable = 0; } + limLog(pMac, LOG2, FL("vhtCapable %d vhtTxChannelWidthSet %d " + "currentExtChannel %d"),pAddBssParams->vhtCapable, + pAddBssParams->vhtTxChannelWidthSet, + pAddBssParams->currentExtChannel); #endif @@ -3790,12 +3936,22 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pAddBssParams->staContext.maxSPLen = 0; pAddBssParams->staContext.shortPreambleSupported = (tANI_U8)pAssocRsp->capabilityInfo.shortPreamble; pAddBssParams->staContext.updateSta = updateEntry; + + limLog(pMac, LOG2, FL("StaContext: "MAC_ADDRESS_STR + " shortPreambleSupported: %d"), + MAC_ADDR_ARRAY(pAddBssParams->staContext.staMac), + pAddBssParams->staContext.shortPreambleSupported); + if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) && pBeaconStruct->HTCaps.present) { pAddBssParams->staContext.us32MaxAmpduDuration = 0; pAddBssParams->staContext.htCapable = 1; pAddBssParams->staContext.greenFieldCapable = ( tANI_U8 )pAssocRsp->HTCaps.greenField; pAddBssParams->staContext.lsigTxopProtection = ( tANI_U8 )pAssocRsp->HTCaps.lsigTXOPProtection; + limLog(pMac, LOG2,FL("StaContext htCapable: %d greenFieldCapable: %d " + "lsigTxopProtection: %d"), pAddBssParams->staContext.htCapable, + pAddBssParams->staContext.greenFieldCapable, + pAddBssParams->staContext.lsigTxopProtection); #ifdef WLAN_FEATURE_11AC if (psessionEntry->vhtCapability && pBeaconStruct->VHTCaps.present) { @@ -3823,6 +3979,11 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, { pAddBssParams->staContext.vhtTxChannelWidthSet = pAssocRsp->VHTOperation.chanWidth; //pMac->lim.apChanWidth; } + limLog(pMac, LOG2,FL("StaContext vhtCapable %d " + "vhtTxChannelWidthSet: %d vhtTxBFCapable: %d"), + pAddBssParams->staContext.vhtCapable, + pAddBssParams->staContext.vhtTxChannelWidthSet, + pAddBssParams->staContext.vhtTxBFCapable); #endif } else @@ -3904,6 +4065,25 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, if( pBeaconStruct->HTInfo.present ) pAddBssParams->staContext.rifsMode = pAssocRsp->HTInfo.rifsMode; + + limLog(pMac, LOG2, FL("StaContext txChannelWidthSet: %d mimoPS: %d" + " delBASupport: %d maxAmsduSize: %d"), + pAddBssParams->staContext.txChannelWidthSet, + pAddBssParams->staContext.mimoPS, + pAddBssParams->staContext.delBASupport, + pAddBssParams->staContext.maxAmsduSize); + + limLog(pMac, LOG2, FL("maxAmpduDensity: %d fDsssCckMode40Mhz: %d " + "fShortGI20Mhz: %d "),pAddBssParams->staContext.maxAmpduDensity, + pAddBssParams->staContext.fDsssCckMode40Mhz, + pAddBssParams->staContext.fShortGI20Mhz); + + limLog(pMac, LOG2, FL("fShortGI40Mh: %d maxAmpduSize: %d " + "htLdpcCapable: %d vhtLdpcCapable: %d"), + pAddBssParams->staContext.fShortGI40Mhz, + pAddBssParams->staContext.maxAmpduSize, + pAddBssParams->staContext.htLdpcCapable, + pAddBssParams->staContext.vhtLdpcCapable); } pAddBssParams->staContext.smesessionId = psessionEntry->smeSessionId; pAddBssParams->staContext.wpa_rsn = pBeaconStruct->rsnPresent; @@ -3950,6 +4130,8 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, #if defined WLAN_FEATURE_VOWIFI pAddBssParams->maxTxPower = psessionEntry->maxTxPower; + limLog(pMac, LOG2,FL("maxTxPower: %d"), + pAddBssParams->maxTxPower); #endif // FIXME_GEN4 - Any other value that can be used for initialization? pAddBssParams->status = eHAL_STATUS_SUCCESS; @@ -3966,6 +4148,8 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, #if defined WLAN_FEATURE_VOWIFI_11R pAddBssParams->extSetStaKeyParamValid = 0; + limLog(pMac, LOG2,FL("extSetStaKeyParamValid: %d"), + pAddBssParams->extSetStaKeyParamValid); #endif #ifdef WLAN_FEATURE_11W @@ -3983,6 +4167,15 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE; MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState)); + limLog(pMac, LOG2, FL("staContext wmmEnabled: %d encryptType: %d " + "p2pCapableSta: %d"),pAddBssParams->staContext.wmmEnabled, + pAddBssParams->staContext.encryptType, + pAddBssParams->staContext.p2pCapableSta); + + limLog(pMac, LOG2, FL("bSpectrumMgtEnabled: %d halPersona: %d setting " + "LimMlm state to %d"), pAddBssParams->bSpectrumMgtEnabled, + pAddBssParams->halPersona, psessionEntry->limMlmState); + //we need to defer the message until we get the response back from HAL. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); @@ -4063,7 +4256,11 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry vos_mem_copy(pAddBssParams->selfMacAddr, psessionEntry->selfMacAddr, sizeof(tSirMacAddr)); + limLog(pMac, LOG1, FL("sessionid: %d updateEntry = %d limsystemrole = %d "), + psessionEntry->smeSessionId,updateEntry,psessionEntry->limSystemRole); + limLog(pMac, LOG1, FL("BSSID: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pAddBssParams->bssId)); /* Incorrect BSS Type which caused UMA Descriptor to be overwritten on * top of an already established Infra link. This lead to issues in * concurrent data transfer. @@ -4096,11 +4293,26 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry pAddBssParams->llgCoexist = (tANI_U8) psessionEntry->beaconParams.llgCoexist; pAddBssParams->ht20Coexist = (tANI_U8) psessionEntry->beaconParams.ht20Coexist; + limLog(pMac, LOG2, FL(" BSS Type %d Beacon Interval: %d dtimPeriod: %d " + "cfpCount: %d"),pAddBssParams->bssType, pAddBssParams->beaconInterval, + pAddBssParams->dtimPeriod, pAddBssParams->cfParamSet.cfpCount); + + limLog(pMac, LOG2, FL(" cfpPeriod: %d cfpMaxDuration: %d cfpDurRemaining:" + " %d numRates: %d "),pAddBssParams->cfParamSet.cfpPeriod, + pAddBssParams->cfParamSet.cfpMaxDuration, + pAddBssParams->cfParamSet.cfpDurRemaining, + pAddBssParams->rateSet.numRates); + + limLog(pMac, LOG2, FL("nwType:%d shortSlotTimeSupported: %d" + "llaCoexist: %d llbCoexist: %d llgCoexist: %d ht20Coexist: %d"), + pAddBssParams->nwType, pAddBssParams->shortSlotTimeSupported, + pAddBssParams->llaCoexist, pAddBssParams->llbCoexist, + pAddBssParams->llgCoexist, pAddBssParams->ht20Coexist); // Use the advertised capabilities from the received beacon/PR if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) && ( pBeaconStruct->HTCaps.present )) { pAddBssParams->htCapable = pBeaconStruct->HTCaps.present; - + limLog(pMac, LOG2, FL("htCapable: %d"),pAddBssParams->htCapable); if ( pBeaconStruct->HTInfo.present ) { pAddBssParams->htOperMode = (tSirMacHTOperatingMode)pBeaconStruct->HTInfo.opMode; @@ -4121,11 +4333,23 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry pAddBssParams->llnNonGFCoexist = (tANI_U8)pBeaconStruct->HTInfo.nonGFDevicesPresent; pAddBssParams->fLsigTXOPProtectionFullSupport = (tANI_U8)pBeaconStruct->HTInfo.lsigTXOPProtectionFullSupport; pAddBssParams->fRIFSMode = pBeaconStruct->HTInfo.rifsMode; + + limLog(pMac, LOG2, FL("htOperMode: %d dualCTSProtection: %d " + "txChannelWidthSet: %d currentExtChannel: %d "), + pAddBssParams->htOperMode, pAddBssParams->dualCTSProtection, + pAddBssParams->txChannelWidthSet,pAddBssParams->currentExtChannel); + + limLog(pMac, LOG2, FL("llnNonGFCoexist: %d " + "fLsigTXOPProtectionFullSupport: %d fRIFSMode %d"), + pAddBssParams->llnNonGFCoexist, + pAddBssParams->fLsigTXOPProtectionFullSupport, + pAddBssParams->fRIFSMode); } } pAddBssParams->currentOperChannel = bssDescription->channelId; - + limLog(pMac, LOG2, FL("currentOperChannel %d"), + pAddBssParams->currentOperChannel); #ifdef WLAN_FEATURE_11AC if (psessionEntry->vhtCapability && ( pBeaconStruct->VHTCaps.present )) { @@ -4144,6 +4368,10 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry { pAddBssParams->vhtCapable = 0; } + limLog(pMac, LOG2, FL("vhtCapable %d vhtTxChannelWidthSet %d " + "currentExtChannel %d"),pAddBssParams->vhtCapable, + pAddBssParams->vhtTxChannelWidthSet, + pAddBssParams->currentExtChannel); #endif // Populate the STA-related parameters here @@ -4162,12 +4390,22 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry pAddBssParams->staContext.shortPreambleSupported = (tANI_U8)pBeaconStruct->capabilityInfo.shortPreamble; pAddBssParams->staContext.updateSta = updateEntry; + limLog(pMac, LOG2, FL("StaContext: "MAC_ADDRESS_STR + " shortPreambleSupported: %d"), + MAC_ADDR_ARRAY(pAddBssParams->staContext.staMac), + pAddBssParams->staContext.shortPreambleSupported); + if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) && ( pBeaconStruct->HTCaps.present )) { pAddBssParams->staContext.us32MaxAmpduDuration = 0; pAddBssParams->staContext.htCapable = 1; pAddBssParams->staContext.greenFieldCapable = ( tANI_U8 ) pBeaconStruct->HTCaps.greenField; pAddBssParams->staContext.lsigTxopProtection = ( tANI_U8 ) pBeaconStruct->HTCaps.lsigTXOPProtection; + limLog(pMac, LOG2, FL("StaContext htCapable: %d " + "greenFieldCapable: %d lsigTxopProtection: %d"), + pAddBssParams->staContext.htCapable, + pAddBssParams->staContext.greenFieldCapable, + pAddBssParams->staContext.lsigTxopProtection); #ifdef WLAN_FEATURE_11AC if (psessionEntry->vhtCapability && pBeaconStruct->VHTCaps.present) { @@ -4196,6 +4434,11 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry pAddBssParams->staContext.vhtTxChannelWidthSet = pBeaconStruct->VHTOperation.chanWidth; } + limLog(pMac, LOG2,FL("StaContext vhtCapable %d " + "vhtTxChannelWidthSet: %d vhtTxBFCapable: %d"), + pAddBssParams->staContext.vhtCapable, + pAddBssParams->staContext.vhtTxChannelWidthSet, + pAddBssParams->staContext.vhtTxBFCapable); #endif } else @@ -4271,6 +4514,24 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry if( pBeaconStruct->HTInfo.present ) pAddBssParams->staContext.rifsMode = pBeaconStruct->HTInfo.rifsMode; + limLog(pMac, LOG2, FL("StaContext txChannelWidthSet: %d mimoPS: %d" + " delBASupport: %d maxAmsduSize: %d"), + pAddBssParams->staContext.txChannelWidthSet, + pAddBssParams->staContext.mimoPS, + pAddBssParams->staContext.delBASupport, + pAddBssParams->staContext.maxAmsduSize); + + limLog(pMac, LOG2, FL("maxAmpduDensity: %d fDsssCckMode40Mhz: %d " + "fShortGI20Mhz: %d "),pAddBssParams->staContext.maxAmpduDensity, + pAddBssParams->staContext.fDsssCckMode40Mhz, + pAddBssParams->staContext.fShortGI20Mhz); + + limLog(pMac, LOG2, FL("fShortGI40Mh: %d maxAmpduSize: %d " + "htLdpcCapable: %d vhtLdpcCapable: %d"), + pAddBssParams->staContext.fShortGI40Mhz, + pAddBssParams->staContext.maxAmpduSize, + pAddBssParams->staContext.htLdpcCapable, + pAddBssParams->staContext.vhtLdpcCapable); } //If WMM IE or 802.11E IE is not present and AP is HT AP then enable WMM @@ -4307,6 +4568,8 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry #if defined WLAN_FEATURE_VOWIFI pAddBssParams->maxTxPower = psessionEntry->maxTxPower; + limLog(pMac, LOG2,FL("maxTxPower: %d"), + pAddBssParams->maxTxPower); #endif pAddBssParams->status = eHAL_STATUS_SUCCESS; @@ -4322,6 +4585,8 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry #if defined WLAN_FEATURE_VOWIFI_11R pAddBssParams->extSetStaKeyParamValid = 0; + limLog(pMac, LOG2,FL("extSetStaKeyParamValid: %d"), + pAddBssParams->extSetStaKeyParamValid); #endif #ifdef WLAN_FEATURE_11W @@ -4339,6 +4604,15 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState)); + limLog(pMac, LOG2, FL("staContext wmmEnabled: %d encryptType: %d " + "p2pCapableSta: %d"),pAddBssParams->staContext.wmmEnabled, + pAddBssParams->staContext.encryptType, + pAddBssParams->staContext.p2pCapableSta); + + limLog(pMac, LOG2, FL("bSpectrumMgtEnabled: %d halPersona: %d setting " + "LimMlm state to %d"), pAddBssParams->bSpectrumMgtEnabled, + pAddBssParams->halPersona, psessionEntry->limMlmState); + //we need to defer the message until we get the response back from HAL. SET_LIM_PROCESS_DEFD_MESGS(pMac, false); diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index fead607d7b60..476f4bb86401 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -86,8 +86,8 @@ limConvertSupportedChannels(tpAniSirGlobal pMac, if(assocReq->supportedChannels.length >= SIR_MAX_SUPPORTED_CHANNEL_LIST) { - limLog(pMac, LOG1, FL("Number of supported channels:%d is more than MAX"), - assocReq->supportedChannels.length); + limLog(pMac, LOG1, FL("Number of supported channels:%d is more than " + "MAX"), assocReq->supportedChannels.length); pMlmAssocInd->supportedChannels.numChnl = 0; return; } @@ -145,7 +145,8 @@ limConvertSupportedChannels(tpAniSirGlobal pMac, pMlmAssocInd->supportedChannels.numChnl = (tANI_U8) index; PELOG2(limLog(pMac, LOG2, - FL("Send AssocInd to WSM: spectrum ON, minPwr %d, maxPwr %d, numChnl %d"), + FL("Send AssocInd to WSM: spectrum ON, minPwr %d, maxPwr %d, " + "numChnl %d"), pMlmAssocInd->powerCap.minTxPower, pMlmAssocInd->powerCap.maxTxPower, pMlmAssocInd->supportedChannels.numChnl);) @@ -198,11 +199,18 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo); framelen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); + limLog(pMac, LOG1, FL("Received %s Req Frame on sessionid: %d systemrole %d" + " limMlmState %d from: "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + psessionEntry->peSessionId, psessionEntry->limSystemRole, + psessionEntry->limMlmState, MAC_ADDR_ARRAY(pHdr->sa)); + if (psessionEntry->limSystemRole == eLIM_STA_ROLE || psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE ) { - limLog(pMac, LOGE, FL("received unexpected ASSOC REQ subType=%d for role=%d"), - subType, psessionEntry->limSystemRole); - limPrintMacAddr(pMac, pHdr->sa, LOGE); + limLog(pMac, LOGE, FL("received unexpected ASSOC REQ on sessionid: %d " + "sys subType=%d for role=%d from: "MAC_ADDRESS_STR), + psessionEntry->peSessionId, + subType, psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa)); sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, WDA_GET_RX_MPDU_DATA(pRxPacketInfo), framelen); return; @@ -215,33 +223,33 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, { // Received Re/Assoc Req frame from a BC/MC address // Log error and ignore it - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, FL("received Assoc frame from a BC/MC address "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); - else - limLog(pMac, LOGW, FL("received ReAssoc frame from a BC/MC address "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); + limLog(pMac, LOGE, FL("Received %s Req on sessionid: %d frame from a " + "BC/MC address"MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + psessionEntry->peSessionId, + MAC_ADDR_ARRAY(pHdr->sa)); return; } - limLog(pMac, LOGW, FL("Received AssocReq Frame: "MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa)); sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG2, (tANI_U8 *) pBody, framelen); if (vos_mem_compare((tANI_U8* ) pHdr->sa, (tANI_U8 *) pHdr->da, (tANI_U8) (sizeof(tSirMacAddr)))) { + limLog(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as" + " SAP/GO")); limSendAssocRspMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_STATUS, 1, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as SAP/GO")); return ; } // If TKIP counter measures active send Assoc Rsp frame to station with eSIR_MAC_MIC_FAILURE_REASON if ((psessionEntry->bTkipCntrMeasActive) && (psessionEntry->limSystemRole == eLIM_AP_ROLE)) { + limLog(pMac, LOGE, FL("TKIP counter measure is active")); limSendAssocRspMgmtFrame(pMac, eSIR_MAC_MIC_FAILURE_REASON, 1, @@ -267,8 +275,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if (status != eSIR_SUCCESS) { - limLog(pMac, LOGW, FL("Parse error AssocRequest, length=%d from "),framelen); - limPrintMacAddr(pMac, pHdr->sa, LOGW); + limLog(pMac, LOGW, FL("Parse error AssocRequest, length=%d from "MAC_ADDRESS_STR), + framelen, MAC_ADDR_ARRAY(pHdr->sa)); limSendAssocRspMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_STATUS, 1, pHdr->sa, subType, 0, psessionEntry); goto error; } @@ -276,7 +284,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pAssocReq->assocReqFrame = vos_mem_malloc(framelen); if ( NULL == pAssocReq->assocReqFrame ) { - limLog(pMac, LOGE, FL("Unable to allocate memory for the assoc req, length=%d from "),framelen); + limLog(pMac, LOGE, FL("Unable to allocate memory for the assoc req, " + "length=%d from "),framelen); goto error; } @@ -295,6 +304,11 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pAssocReq, &localCapabilities,psessionEntry) == false) { + limLog(pMac, LOGW, FL("local caps mismatch received caps")); + limLog(pMac, LOGW, FL("Received %s Req with unsupported " + "capabilities from"MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); /** * Capabilities of requesting STA does not match with * local capabilities. Respond with 'unsupported capabilities' @@ -307,17 +321,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGW, FL("local caps mismatch received caps")); - - // Log error - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, - FL("received Assoc req with unsupported capabilities "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); - else - limLog(pMac, LOGW, - FL("received ReAssoc req with unsupported capabilities "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); goto error; } @@ -325,6 +328,12 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if (limCmpSSid(pMac, &pAssocReq->ssId, psessionEntry) == false) { + limLog(pMac, LOGW, FL("Received %s Req with unmatched ssid ( Received" + " SSID: %.*s current SSID: %.*s ) from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", pAssocReq->ssId.length, + pAssocReq->ssId.ssId, psessionEntry->ssId.length, + psessionEntry->ssId.ssId, MAC_ADDR_ARRAY(pHdr->sa)); + /** * Received Re/Association Request with either * Broadcast SSID OR with SSID that does not @@ -337,14 +346,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - // Log error - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, - FL("received Assoc req with unmatched SSID from ")); - else - limLog(pMac, LOGW, - FL("received ReAssoc req with unmatched SSID from ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } @@ -368,6 +369,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, } if (limCheckRxBasicRates(pMac, basicRates, psessionEntry) == false) { + limLog(pMac, LOGW, FL("Received %s Req with unsupported " + "rates from"MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); /** * Requesting STA does not support ALL BSS basic * rates. Respond with 'basic rates not supported' @@ -380,14 +385,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - // Log error - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, - FL("received Assoc req with unsupported rates from ")); - else - limLog(pMac, LOGW, - FL("received ReAssoc req with unsupported rates from")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } @@ -396,9 +393,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11G_ONLY) && ((!pAssocReq->extendedRatesPresent ) || (pAssocReq->HTCaps.present))) { + limLog(pMac, LOGE, FL("SOFTAP was in 11G only mode, rejecting legacy " + "STA : "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); limSendAssocRspMgmtFrame( pMac, eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS, 1, pHdr->sa, subType, 0, psessionEntry ); - limLog(pMac, LOGE, FL("SOFTAP was in 11G only mode, rejecting legacy STA's")); goto error; }//end if phyMode == 11G_only @@ -407,9 +405,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11N_ONLY) && (!pAssocReq->HTCaps.present)) { + limLog(pMac, LOGE, FL("SOFTAP was in 11N only mode, rejecting legacy " + "STA : "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); limSendAssocRspMgmtFrame( pMac, eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS, 1, pHdr->sa, subType, 0, psessionEntry ); - limLog(pMac, LOGE, FL("SOFTAP was in 11N only mode, rejecting legacy STA's")); goto error; }//end if PhyMode == 11N_only @@ -438,19 +437,19 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, /* One or more required information elements are missing, log the peers error */ if (!pAssocReq->powerCapabilityPresent) { - if(subType == LIM_ASSOC) - limLog(pMac, LOG1, FL("LIM Info: Missing Power capability IE in assoc request")); - else - limLog(pMac, LOG1, FL("LIM Info: Missing Power capability IE in Reassoc request")); + limLog(pMac, LOG1, FL("LIM Info: Missing Power capability " + "IE in %s Req from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); } if (!pAssocReq->supportedChannelsPresent) { - if(subType == LIM_ASSOC) - limLog(pMac, LOG1, FL("LIM Info: Missing Supported channel IE in assoc request")); - else - limLog(pMac, LOG1, FL("LIM Info: Missing Supported channel IE in Reassoc request")); + limLog(pMac, LOGW, FL("LIM Info: Missing Supported channel " + "IE in %s Req from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); + } - limPrintMacAddr(pMac, pHdr->sa, LOG1); } else { @@ -458,20 +457,20 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, status = limIsDot11hPowerCapabilitiesInRange(pMac, pAssocReq, psessionEntry); if (eSIR_SUCCESS != status) { - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, FL("LIM Info: Association MinTxPower(STA) > MaxTxPower(AP)")); - else - limLog(pMac, LOGW, FL("LIM Info: Reassociation MinTxPower(STA) > MaxTxPower(AP)")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); + limLog(pMac, LOGW, FL("LIM Info: MinTxPower(STA) > " + "MaxTxPower(AP) in %s Req from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); + } status = limIsDot11hSupportedChannelsValid(pMac, pAssocReq); if (eSIR_SUCCESS != status) { - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, FL("LIM Info: Association wrong supported channels (STA)")); - else - limLog(pMac, LOGW, FL("LIM Info: Reassociation wrong supported channels (STA)")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); + limLog(pMac, LOGW, FL("LIM Info: wrong supported " + "channels (STA) in %s Req from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); + } /* IEs are valid, use them if needed */ } @@ -491,6 +490,11 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if ( (pAssocReq->HTCaps.present) && (limCheckMCSSet(pMac, pAssocReq->HTCaps.supportedMCSSet) == false)) { + limLog(pMac, LOGW, FL("received %s req with unsupported" + "MCS Rate Set from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + MAC_ADDR_ARRAY(pHdr->sa)); + /** * Requesting STA does not support ALL BSS MCS basic Rate set rates. * Spec does not define any status code for this scenario. @@ -502,14 +506,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - // Log error - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, - FL("received Assoc req with unsupported MCS Rate Set from ")); - else - limLog(pMac, LOGW, - FL("received ReAssoc req with unsupported MCS Rate Set from")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } @@ -559,6 +555,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if ((pMac->lim.gWmmApsd.apsdEnable == 0) && (qInfo->ac_be || qInfo->ac_bk || qInfo->ac_vo || qInfo->ac_vi)) { + limLog(pMac, LOGW, + FL("Rejecting Re/Assoc req from STA: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa)); + limLog(pMac, LOGE, FL("APSD not enabled, qosInfo - 0x%x"), *qInfo); /** * Received Re/Association Request from @@ -573,9 +573,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGW, - FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); limLog(pMac, LOGE, FL("APSD not enabled, qosInfo - 0x%x"), *qInfo); goto error; } @@ -667,6 +664,10 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, if(eSIR_SUCCESS != (status = limCheckRxRSNIeMatch(pMac, Dot11fIERSN, psessionEntry, pAssocReq->HTCaps.present, &pmfConnection))) { + limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from " + "STA: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa)); + /* some IE is not properly sent */ /* received Association req frame with RSN IE but length is 0 */ limSendAssocRspMgmtFrame( @@ -676,14 +677,16 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } } else { + limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from " + "STA: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa)); + /* received Association req frame with RSN IE version wrong */ limSendAssocRspMgmtFrame( pMac, @@ -691,15 +694,14 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, 1, pHdr->sa, subType, 0,psessionEntry); - - limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } } else { + limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA:" + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); /* received Association req frame with RSN IE but length is 0 */ limSendAssocRspMgmtFrame( pMac, @@ -708,8 +710,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } @@ -726,6 +726,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, /* check the groupwise and pairwise cipher suites */ if(eSIR_SUCCESS != (status = limCheckRxWPAIeMatch(pMac, Dot11fIEWPA, psessionEntry, pAssocReq->HTCaps.present))) { + limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from " + "STA: "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); /* received Association req frame with WPA IE but mismatch */ limSendAssocRspMgmtFrame( pMac, @@ -733,15 +735,14 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, 1, pHdr->sa, subType, 0,psessionEntry); - - limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; } } else { + limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: " + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); /* received Association req frame with invalid WPA IE */ limSendAssocRspMgmtFrame( pMac, @@ -750,8 +751,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, pHdr->sa, subType, 0,psessionEntry); - limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); goto error; }/* end - if(pAssocReq->wpa.length) */ } /* end - if(pAssocReq->wpaPresent) */ @@ -810,15 +809,11 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON, //=9 pHdr->sa, psessionEntry, FALSE); - // Log error - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, - FL("received Assoc req from STA that does not have pre-auth context "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); - else - limLog(pMac, LOGW, - FL("received ReAssoc req from STA that does not have pre-auth context " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa)); + limLog(pMac, LOGW, FL("received %s req on sessionid: %d from STA " + "that does not have pre-auth context"MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", + psessionEntry->peSessionId, + MAC_ADDR_ARRAY(pHdr->sa)); goto error; } @@ -846,14 +841,16 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, #ifdef WLAN_DEBUG pMac->lim.gLimNumAssocReqDropInvldState++; #endif - limLog(pMac, LOG1, FL("received Assoc req in state %X from "), pStaDs->mlmStaContext.mlmState); + limLog(pMac, LOG1, FL("received Assoc req in state " + "%X from "), pStaDs->mlmStaContext.mlmState); } else { #ifdef WLAN_DEBUG pMac->lim.gLimNumReassocReqDropInvldState++; #endif - limLog(pMac, LOG1, FL("received ReAssoc req in state %X from "), pStaDs->mlmStaContext.mlmState); + limLog(pMac, LOG1, FL("received ReAssoc req in state %X" + " from "), pStaDs->mlmStaContext.mlmState); } limPrintMacAddr(pMac, pHdr->sa, LOG1); limPrintMlmState(pMac, LOG1, (tLimMlmStates) pStaDs->mlmStaContext.mlmState); @@ -955,12 +952,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, /** * STA is Associated ! */ - if (subType == LIM_ASSOC) - limLog(pMac, LOGW, FL("received Assoc req successful "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); - else - limLog(pMac, LOGW, FL("received ReAssoc req successful"MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa)); + limLog(pMac, LOGE, FL("Received %s Req successful from "MAC_ADDRESS_STR), + (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", MAC_ADDR_ARRAY(pHdr->sa)); /** * AID for this association will be same as the peer Index used in DPH table. @@ -993,9 +986,9 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, { // Could not add hash table entry at DPH limLog(pMac, LOGE, - FL("could not add hash entry at DPH for aid=%d, MacAddr:"), - peerIdx); - limPrintMacAddr(pMac, pHdr->sa, LOGE); + FL("could not add hash entry at DPH for aid=%d, MacAddr:" + MAC_ADDRESS_STR), + peerIdx,MAC_ADDR_ARRAY(pHdr->sa)); // Release AID limReleasePeerIdx(pMac, peerIdx, psessionEntry); @@ -1134,9 +1127,9 @@ if (limPopulateMatchingRateSet(pMac, { // Could not update hash table entry at DPH with rateset limLog(pMac, LOGE, - FL("could not update hash entry at DPH for aid=%d, MacAddr:"), - peerIdx); - limPrintMacAddr(pMac, pHdr->sa, LOGE); + FL("could not update hash entry at DPH for aid=%d, MacAddr: " + MAC_ADDRESS_STR), + peerIdx, MAC_ADDR_ARRAY(pHdr->sa)); // Release AID limReleasePeerIdx(pMac, peerIdx, psessionEntry); @@ -1189,7 +1182,8 @@ if (limPopulateMatchingRateSet(pMac, * Received Re/Association Request from * STA when UPASD is not supported. */ - limLog( pMac, LOGE, FL( "AP do not support UPASD REASSOC Failed" )); + limLog( pMac, LOGE, FL( "AP do not support UPASD " + "REASSOC Failed" )); /* During wlan fuzz tests for softAP when mal-formed assoc req is * sent to AP due to delSTA is not done in firmnware UMAC is * stuck in some bad state.if we set this flag delsta will happen @@ -1265,7 +1259,8 @@ if (limPopulateMatchingRateSet(pMac, // BTAMP: Add STA context at HW - issue WDA_ADD_STA_REQ to HAL if (limAddSta(pMac, pStaDs, false, psessionEntry) != eSIR_SUCCESS) { - limLog(pMac, LOGE, FL("could not Add STA with assocId=%d"), pStaDs->assocId); + limLog(pMac, LOGE, FL("could not Add STA with assocId=%d"), + pStaDs->assocId); limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType, true, pStaDs->mlmStaContext.authType, pStaDs->assocId, true, (tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS, psessionEntry); @@ -1287,7 +1282,8 @@ if (limPopulateMatchingRateSet(pMac, pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE; if(limDelSta(pMac, pStaDs, true, psessionEntry) != eSIR_SUCCESS) { - limLog(pMac, LOGE, FL("could not DEL STA with assocId=%d staId %d"), pStaDs->assocId, pStaDs->staIndex); + limLog(pMac, LOGE, FL("could not DEL STA with assocId=%d staId %d"), + pStaDs->assocId, pStaDs->staIndex); limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType, true, pStaDs->mlmStaContext.authType, pStaDs->assocId, true,(tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS, psessionEntry); @@ -1303,7 +1299,8 @@ if (limPopulateMatchingRateSet(pMac, /* use the same AID, already allocated */ if (limAddSta(pMac, pStaDs, false, psessionEntry) != eSIR_SUCCESS) { - limLog( pMac, LOGE, FL( "AP do not support UPASD REASSOC Failed" )); + limLog( pMac, LOGE, FL( "AP do not support UPASD " + "REASSOC Failed")); limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType, true, pStaDs->mlmStaContext.authType, pStaDs->assocId, true,(tSirResultCodes) eSIR_MAC_WME_REFUSED_STATUS, psessionEntry); @@ -1378,7 +1375,6 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p // Get the phyMode limGetPhyMode(pMac, &phyMode, psessionEntry); - // Extract pre-auth context for the peer BTAMP-STA, if any. // Determiine if its Assoc or ReAssoc Request @@ -1386,6 +1382,11 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p subType = LIM_REASSOC; else subType = LIM_ASSOC; + + limLog(pMac, LOG1, FL("Sessionid %d ssid %s subtype %d Associd %d staAddr " + MAC_ADDRESS_STR), psessionEntry->peSessionId, pAssocReq->ssId.ssId, + subType,pStaDs->assocId,MAC_ADDR_ARRAY(pStaDs->staAddr)); + if (subType == LIM_ASSOC || subType == LIM_REASSOC) { temp = sizeof(tLimMlmAssocInd); @@ -1418,7 +1419,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p } if (pAssocReq->rsnPresent && (NULL == wpsIe)) { - limLog(pMac, LOG2, FL("Assoc Req RSN IE len = %d"), pAssocReq->rsn.length); + limLog(pMac, LOG2, FL("Assoc Req RSN IE len = %d"), + pAssocReq->rsn.length); pMlmAssocInd->rsnIE.length = 2 + pAssocReq->rsn.length; pMlmAssocInd->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID; pMlmAssocInd->rsnIE.rsnIEdata[1] = pAssocReq->rsn.length; @@ -1444,7 +1446,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p { if((pMlmAssocInd->rsnIE.length + pAssocReq->wpa.length) >= SIR_MAC_MAX_IE_LENGTH) { - PELOGE(limLog(pMac, LOGE, FL("rsnIEdata index out of bounds %d"), pMlmAssocInd->rsnIE.length);) + PELOGE(limLog(pMac, LOGE, FL("rsnIEdata index out of bounds %d"), + pMlmAssocInd->rsnIE.length);) vos_mem_free(pMlmAssocInd); return; } @@ -1471,7 +1474,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p { if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WME_ENABLED, &tmp) != eSIR_SUCCESS) - limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), WNI_CFG_WME_ENABLED ); + limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), + WNI_CFG_WME_ENABLED ); /* check whether AP is enabled with WMM */ if(tmp) @@ -1504,7 +1508,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p pMlmReassocInd = vos_mem_malloc(temp); if (NULL == pMlmReassocInd) { - limLog(pMac, LOGP, FL("call to AllocateMemory failed for pMlmReassocInd")); + limLog(pMac, LOGP, FL("call to AllocateMemory failed for " + "pMlmReassocInd")); limReleasePeerIdx(pMac, pStaDs->assocId, psessionEntry); return; } @@ -1530,7 +1535,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p if (pAssocReq->rsnPresent && (NULL == wpsIe)) { - limLog(pMac, LOG2, FL("Assoc Req: RSN IE length = %d"), pAssocReq->rsn.length); + limLog(pMac, LOG2, FL("Assoc Req: RSN IE length = %d"), + pAssocReq->rsn.length); pMlmReassocInd->rsnIE.length = 2 + pAssocReq->rsn.length; pMlmReassocInd->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID; pMlmReassocInd->rsnIE.rsnIEdata[1] = pAssocReq->rsn.length; @@ -1547,7 +1553,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p pMlmReassocInd->supportedChannels.numChnl = (tANI_U8)(pAssocReq->supportedChannels.length / 2); limLog(pMac, LOG1, - FL("Sending Reassoc Ind: spectrum ON, minPwr %d, maxPwr %d, numChnl %d"), + FL("Sending Reassoc Ind: spectrum ON, minPwr %d, " + "maxPwr %d, numChnl %d"), pMlmReassocInd->powerCap.minTxPower, pMlmReassocInd->powerCap.maxTxPower, pMlmReassocInd->supportedChannels.numChnl); @@ -1567,7 +1574,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p /* This check is to avoid extra Sec IEs present incase of WPS */ if (pAssocReq->wpaPresent && (NULL == wpsIe)) { - limLog(pMac, LOG2, FL("Received WPA IE length in Assoc Req is %d"), pAssocReq->wpa.length); + limLog(pMac, LOG2, FL("Received WPA IE length in Assoc Req is %d"), + pAssocReq->wpa.length); pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length] = SIR_MAC_WPA_EID; pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length + 1] = pAssocReq->wpa.length; vos_mem_copy(&pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length + 2], @@ -1590,7 +1598,8 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p { if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WME_ENABLED, &tmp) != eSIR_SUCCESS) - limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), WNI_CFG_WME_ENABLED ); + limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), + WNI_CFG_WME_ENABLED ); /* check whether AP is enabled with WMM */ if(tmp) diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c index 5e5e4f8656d8..495b3ec64a81 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c @@ -326,11 +326,18 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub mlmAssocCnf.resultCode = eSIR_SME_SUCCESS; /* Update PE session Id*/ mlmAssocCnf.sessionId = psessionEntry->peSessionId; + limLog(pMac, LOG1, + FL("received Re/Assoc(%d) resp on sessionid: %d with systemrole: %d " + "and mlmstate: %d RSSI %d from "MAC_ADDRESS_STR),subType, + psessionEntry->peSessionId, + psessionEntry->limSystemRole,psessionEntry->limMlmState, + (uint)abs((tANI_S8)WDA_GET_RX_RSSI_DB(pRxPacketInfo)), + MAC_ADDR_ARRAY(pHdr->sa)); pBeaconStruct = vos_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { - limLog(pMac, LOGE, FL("Unable to allocate memory in limProcessAssocRspFrame") ); + limLog(pMac, LOGE, FL("Unable to allocate memory") ); return; } @@ -340,7 +347,7 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub // Should not have received Re/Association Response // frame on AP. Log error limLog(pMac, LOGE, - FL("received Re/Assoc response frame on role %d "), + FL("Should not recieved Re/Assoc Response in role %d "), psessionEntry->limSystemRole); vos_mem_free(pBeaconStruct); @@ -363,14 +370,15 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub /// Received unexpected Re/Association Response frame #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOG1(limLog(pMac, LOG1, FL("mlm state is set to %d session=%d"), + PELOG1(limLog(pMac, LOG1, FL("Recieved Re/Assoc rsp in unexpected " + "state %d on session=%d"), psessionEntry->limMlmState, psessionEntry->peSessionId);) #endif // Log error if (!pHdr->fc.retry) { limLog(pMac, LOGE, - FL("received Re/Assoc rsp frame in unexpected state")); + FL("received Re/Assoc rsp frame is not a retry frame")); limPrintMlmState(pMac, LOGE, psessionEntry->limMlmState); } vos_mem_free(pBeaconStruct); @@ -435,11 +443,6 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub return; } - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, - FL("Re/Assoc Resp Frame Received: BSSID " MAC_ADDRESS_STR " (RSSI %d)"), - MAC_ADDR_ARRAY(pHdr->bssId), - (uint)abs((tANI_S8)WDA_GET_RX_RSSI_DB(pRxPacketInfo))); - // Get pointer to Re/Association Response frame body pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo); @@ -466,6 +469,8 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub if( psessionEntry->assocRsp != NULL ) { + limLog(pMac, LOGW, FL("psessionEntry->assocRsp is not NULL freeing it " + "and setting NULL")); vos_mem_free(psessionEntry->assocRsp); psessionEntry->assocRsp = NULL; } @@ -505,6 +510,8 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub } else { + limLog(pMac, LOG1, FL("Ric is not present Setting RICDataLen 0 and ricData " + "as NULL")); psessionEntry->RICDataLen = 0; psessionEntry->ricData = NULL; } @@ -774,7 +781,10 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub } if (limCleanupRxPath(pMac, pStaDs,psessionEntry) != eSIR_SUCCESS) + { + PELOGE(limLog(pMac, LOGE, FL("Could not cleanup the rx path"));) goto assocReject; + } } vos_mem_free(pBeaconStruct); @@ -866,6 +876,7 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub } else { + PELOGE(limLog(pMac, LOGE, FL("could not update the bss entry"));) mlmAssocCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; mlmAssocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; } @@ -878,7 +889,11 @@ assocReject: || ((subType == LIM_REASSOC) && (psessionEntry->limMlmState == eLIM_MLM_WT_FT_REASSOC_RSP_STATE)) #endif ) { - PELOGE(limLog(pMac, LOGE, FL("Assoc Rejected by the peer. Reason: %d"), mlmAssocCnf.resultCode);) + PELOGE(limLog(pMac, LOGE, FL("Assoc Rejected by the peer. " + "mlmestate: %d sessionid %d Reason: %d MACADDR:" + MAC_ADDRESS_STR), psessionEntry->limMlmState, + psessionEntry->peSessionId, mlmAssocCnf.resultCode, + MAC_ADDR_ARRAY(pHdr->sa));) psessionEntry->limMlmState = eLIM_MLM_IDLE_STATE; MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState)); @@ -906,6 +921,7 @@ assocReject: /* CR: vos packet memory is leaked when assoc rsp timeouted/failed. */ /* notify TL that association is failed so that TL can flush the cached frame */ + PELOG1(limLog(pMac, LOG1, FL("notify TL that association is failed"));) WLANTL_AssocFailed (psessionEntry->staId); vos_mem_free(pBeaconStruct); diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c index 9ad362e9840d..797442ca8fd4 100644 --- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c @@ -179,16 +179,18 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse { // Received Auth frame from a BC/MC address // Log error and ignore it - PELOG1(limLog(pMac, LOG1, + PELOGE(limLog(pMac, LOGE, FL("received Auth frame from a BC/MC address - "));) - PELOG1( limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE( limPrintMacAddr(pMac, pHdr->sa, LOGE);) return; } - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, - FL("Auth Frame Received: BSSID " MAC_ADDRESS_STR " (RSSI %d)"), - MAC_ADDR_ARRAY(pHdr->bssId), + limLog(pMac, LOG1, + FL("Sessionid: %d System role : %d limMlmState: %d :Auth " + "Frame Received: BSSID: "MAC_ADDRESS_STR " (RSSI %d)"), + psessionEntry->peSessionId, psessionEntry->limSystemRole, + psessionEntry->limMlmState, MAC_ADDR_ARRAY(pHdr->bssId), (uint)abs((tANI_S8)WDA_GET_RX_RSSI_DB(pRxPacketInfo))); pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo); @@ -198,6 +200,7 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse //Restore default failure timeout if (VOS_P2P_CLIENT_MODE == psessionEntry->pePersona && psessionEntry->defaultAuthFailureTimeout) { + limLog(pMac, LOG1, FL("Restore default failure timeout")); ccmCfgSetInt(pMac,WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT , psessionEntry->defaultAuthFailureTimeout, NULL, eANI_BOOLEAN_FALSE); } @@ -239,15 +242,15 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse authFrame.authAlgoNumber = eSIR_SHARED_KEY; authFrame.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_4; authFrame.authStatusCode = eSIR_MAC_CHALLENGE_FAILURE_STATUS; + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame with wep bit set on role=%d " + MAC_ADDRESS_STR), psessionEntry->limSystemRole, + MAC_ADDR_ARRAY(pHdr->sa) );) limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame with wep bit set on role=%d "MAC_ADDRESS_STR), - psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa) );) - return; } @@ -290,6 +293,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse if (pAuthNode == NULL) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame from peer that has " + "no preauth context with WEP bit set "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa));) /** * No 'pre-auth' context exists for this STA that sent * an Authentication frame with FC bit set. @@ -304,13 +312,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame from peer that has " - "no preauth context with WEP bit set "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa));) - return; } else @@ -326,6 +327,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse (pAuthNode->mlmState != eLIM_MLM_AUTH_RSP_TIMEOUT_STATE)) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame from peer that is in state %d " + MAC_ADDRESS_STR), + pAuthNode->mlmState, MAC_ADDR_ARRAY(pHdr->sa));) /** * Should not have received Authentication frame * with WEP bit set in FC in other states. @@ -342,12 +348,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame from peer that is in state %d " - MAC_ADDRESS_STR), pAuthNode->mlmState, MAC_ADDR_ARRAY(pHdr->sa));) - return; } } @@ -362,6 +362,10 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse { if (!pKeyMapEntry->wepOn) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Auth frame3 from peer that has NULL key map entry " + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) /** * Key Mapping entry has null key. * Send Authentication frame @@ -376,12 +380,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Auth frame3 from peer that has NULL key map entry " - MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) - return; } // if (!pKeyMapEntry->wepOn) else @@ -393,8 +391,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse (tANI_U16) (frameLen-SIR_MAC_WEP_IV_LENGTH)); if (decryptResult == LIM_DECRYPT_ICV_FAIL) { - /// ICV failure - PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == LIM_DECRYPT_ICV_FAIL ..."));) + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame from peer that failed decryption, Addr " + MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) + limDeletePreAuthNode(pMac, pHdr->sa); authFrame.authAlgoNumber = eSIR_SHARED_KEY; @@ -408,17 +409,18 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame from peer that failed decryption, Addr " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) return; } - if ((sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry))) + if ((sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, + &rxAuthFrame)!=eSIR_SUCCESS ) || + ( !isAuthValid(pMac, &rxAuthFrame,psessionEntry))) + { + PELOGE(limLog(pMac, LOGE, FL( + "failed to convert Auth Frame to structure or Auth is not valid "));) return; - + } } // end if (pKeyMapEntry->key == NULL) } // if keyMappings has entry @@ -470,8 +472,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse (tANI_U16) (frameLen-SIR_MAC_WEP_IV_LENGTH)); if (decryptResult == LIM_DECRYPT_ICV_FAIL) { - PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == LIM_DECRYPT_ICV_FAIL ..."));) - /// ICV failure + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame from peer that failed decryption: " + MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) + /// ICV failure limDeletePreAuthNode(pMac, pHdr->sa); authFrame.authAlgoNumber = eSIR_SHARED_KEY; @@ -484,21 +489,25 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame from peer that failed decryption: " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) - return; } - if ((sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry))) + if ( ( sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, + &rxAuthFrame)!=eSIR_SUCCESS ) || + ( !isAuthValid(pMac, &rxAuthFrame, psessionEntry) ) ) + { + limLog(pMac, LOGE, + FL("failed to convert Auth Frame to structure or Auth is not valid ")); return; + } } // End of check for Key Mapping/Default key presence } else { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame3 from peer that while privacy option is turned OFF " + MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) /** * Privacy option is not implemented. * So reject Authentication frame received with @@ -517,21 +526,20 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame3 from peer that while privacy option is turned OFF " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) - return; } // else if (wlan_cfgGetInt(CFG_PRIVACY_OPTION_IMPLEMENTED)) } // if (fc.wep) else { - - - if ((sirConvertAuthFrame2Struct(pMac, pBody, frameLen, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry))) + if ( ( sirConvertAuthFrame2Struct(pMac, pBody, + frameLen, &rxAuthFrame)!=eSIR_SUCCESS ) || + ( !isAuthValid(pMac, &rxAuthFrame,psessionEntry) ) ) + { + PELOGE(limLog(pMac, LOGE, + FL("failed to convert Auth Frame to structure or Auth is " + "not valid "));) return; + } } @@ -650,7 +658,9 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse if (NULL != pStaDs) { - PELOGE(limLog(pMac, LOGE, FL("lim Delete Station Context (staId: %d, assocId: %d) "),pStaDs->staIndex, assocId);) + PELOGE(limLog(pMac, LOGE, + FL("lim Delete Station Context (staId: %d, assocId: %d) "), + pStaDs->staIndex, assocId);) limSendDeauthMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_REASON, (tANI_U8 *) pAuthNode->peerMacAddr, psessionEntry, FALSE); limTriggerSTAdeletion(pMac, pStaDs, psessionEntry); @@ -784,6 +794,12 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse cfgPrivacyOptImp = (tANI_U8)val; if (!cfgPrivacyOptImp) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Auth frame for unsupported auth algorithm %d " + MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, + MAC_ADDR_ARRAY(pHdr->sa));) + /** * Authenticator does not have WEP * implemented. @@ -803,13 +819,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Auth frame for unsupported auth algorithm %d " - MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, - MAC_ADDR_ARRAY(pHdr->sa));) - return; } else @@ -915,6 +924,12 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse break; default: + // Log error + PELOGE( limLog(pMac, LOGE, + FL("received Auth frame for unsupported auth algorithm %d " + MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, + MAC_ADDR_ARRAY(pHdr->sa));) + /** * Responding party does not support the * authentication algorithm requested by @@ -934,18 +949,17 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE( limLog(pMac, LOGE, - FL("received Auth frame for unsupported auth algorithm %d " - MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, - MAC_ADDR_ARRAY(pHdr->sa));) - return; } // end switch(pRxAuthFrameBody->authAlgoNumber) } // if (limIsAuthAlgoSupported(pRxAuthFrameBody->authAlgoNumber)) else { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Authentication frame for unsupported auth algorithm %d " + MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, + MAC_ADDR_ARRAY(pHdr->sa));) + /** * Responding party does not support the * authentication algorithm requested by sending party. @@ -961,12 +975,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Authentication frame for unsupported auth algorithm %d " - MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, - MAC_ADDR_ARRAY(pHdr->sa));) return; } //end if (limIsAuthAlgoSupported(pRxAuthFrameBody->authAlgoNumber)) break; @@ -1147,6 +1155,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse { if (pKeyMapEntry->key == NULL) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Auth frame from peer when key mapping key is NULL" + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) + /** * Key Mapping entry has null key. * Send Auth frame with @@ -1163,11 +1176,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Auth frame from peer when key mapping key is NULL" - MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) - limRestoreFromAuthState(pMac, eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER, eSIR_MAC_UNSPEC_FAILURE_REASON,psessionEntry); @@ -1307,6 +1315,12 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse if (pRxAuthFrameBody->authAlgoNumber != eSIR_SHARED_KEY) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Auth frame3 from peer with auth algo number %d " + MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, + MAC_ADDR_ARRAY(pHdr->sa));) + /** * Received Authentication frame3 with algorithm other than * Shared Key authentication type. Reject with Auth frame4 @@ -1321,13 +1335,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Auth frame3 from peer with auth algo number %d " - MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, - MAC_ADDR_ARRAY(pHdr->sa));) - return; } @@ -1341,6 +1348,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse */ if (!pHdr->fc.wep) { + // Log error + PELOGE(limLog(pMac, LOGE, + FL("received Auth frame3 from peer with no WEP bit set "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa));) + /// WEP bit is not set in FC of Auth Frame3 authFrame.authAlgoNumber = eSIR_SHARED_KEY; authFrame.authTransactionSeqNumber = @@ -1351,12 +1363,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGE, - FL("received Auth frame3 from peer with no WEP bit set "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa));) - return; } @@ -1364,7 +1370,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pHdr->sa); if (pAuthNode == NULL) { - /** + // Log error + PELOGE(limLog(pMac, LOGW, + FL("received AuthFrame3 from peer that has no preauth context " + MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) + /** * No 'pre-auth' context exists for * this STA that sent an Authentication * frame3. @@ -1380,17 +1390,16 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE(limLog(pMac, LOGW, - FL("received AuthFrame3 from peer that has no preauth context " - MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));) - return; } if (pAuthNode->mlmState == eLIM_MLM_AUTH_RSP_TIMEOUT_STATE) { + // Log error + limLog(pMac, LOGW, + FL("auth response timer timedout for peer " + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); + /** * Received Auth Frame3 after Auth Response timeout. * Reject by sending Auth Frame4 with @@ -1407,11 +1416,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - // Log error - limLog(pMac, LOGW, - FL("auth response timer timedout for peer ")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); - /// Delete pre-auth context of STA limDeletePreAuthNode(pMac, pHdr->sa); @@ -1483,7 +1487,11 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse } else { - /** + // Log error + PELOGE( limLog(pMac, LOGW, + FL("Challenge failure for peer "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa));) + /** * Challenge Failure. * Send Authentication frame4 with 'challenge failure' * status code and wait until Auth response timeout to @@ -1500,11 +1508,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse limSendAuthMgmtFrame(pMac, &authFrame, pHdr->sa, LIM_NO_WEP_IN_FC,psessionEntry); - - // Log error - PELOGE( limLog(pMac, LOGW, - FL("Challenge failure for peer "MAC_ADDRESS_STR), - MAC_ADDR_ARRAY(pHdr->sa));) return; } } // if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE || ... @@ -1522,9 +1525,9 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse // Log error PELOG1(limLog(pMac, LOG1, - FL("received unexpected Auth frame4 from peer in state %d, addr "), - psessionEntry->limMlmState);) - PELOG1( limPrintMacAddr(pMac, pHdr->sa, LOG1);) + FL("received unexpected Auth frame4 from peer in state %d, addr " + MAC_ADDRESS_STR), psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pHdr->sa));) return; } @@ -1676,27 +1679,29 @@ tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pBd, vo pBody = WDA_GET_RX_MPDU_DATA(pBd); frameLen = WDA_GET_RX_PAYLOAD_LEN(pBd); - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, - FL("Auth Frame Received: BSSID " MAC_ADDRESS_STR " (RSSI %d)"), - MAC_ADDR_ARRAY(pHdr->bssId), - (uint)abs((tANI_S8)WDA_GET_RX_RSSI_DB(pBd))); + limLog(pMac, LOG1, + FL("Auth Frame Received: BSSID "MAC_ADDRESS_STR" (RSSI %d)"), + MAC_ADDR_ARRAY(pHdr->bssId), + (uint)abs((tANI_S8)WDA_GET_RX_RSSI_DB(pBd))); // Check for the operating channel and see what needs to be done next. psessionEntry = pMac->ft.ftPEContext.psavedsessionEntry; if (psessionEntry == NULL) { - limLog(pMac, LOGW, FL("Error: Unable to find session id while in pre-auth phase for FT")); + limLog(pMac, LOGE, FL("Error: Unable to find session id while in pre-auth phase for FT")); return eSIR_FAILURE; } if (pMac->ft.ftPEContext.pFTPreAuthReq == NULL) { + limLog(pMac, LOGE, FL("Error: No FT")); // No FT in progress. return eSIR_FAILURE; } if (frameLen == 0) { + limLog(pMac, LOGE, FL("Error: Frame len = 0")); return eSIR_FAILURE; } #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG @@ -1712,6 +1717,7 @@ tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pBd, vo if (!vos_mem_compare(pMac->ft.ftPEContext.pFTPreAuthReq->preAuthbssId, pHdr->bssId, sizeof( tSirMacAddr ))) { + limLog(pMac, LOGE, FL("Error: NOT Same bssid as preauth BSSID")); // In this case SME if indeed has triggered a // pre auth it will time out. return eSIR_FAILURE; @@ -1763,6 +1769,7 @@ tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pBd, vo // Save off the auth resp. if ((sirConvertAuthFrame2Struct(pMac, pBody, frameLen, &rxAuthFrame) != eSIR_SUCCESS)) { + limLog(pMac, LOGE, FL("failed to convert Auth frame to struct")); limHandleFTPreAuthRsp(pMac, eSIR_FAILURE, NULL, 0, psessionEntry); return eSIR_FAILURE; } diff --git a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c index a52956088c12..9c8dfe8f76ee 100644 --- a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c @@ -96,8 +96,8 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p { PELOGE(limLog(pMac, LOGE, FL("received Deauth frame in DEAUTH_WT_STATE" - "(already processing previously received DEAUTH frame).." - "Dropping this.. Deauth Failed %d \n "),++pMac->lim.deauthMsgCnt);) + "(already processing previously received DEAUTH frame).." + "Dropping this.. Deauth Failed %d"),++pMac->lim.deauthMsgCnt);) } else { @@ -110,7 +110,7 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p { // Received Deauth frame from a BC/MC address // Log error and ignore it - PELOG1(limLog(pMac, LOG1, + PELOGE(limLog(pMac, LOGE, FL("received Deauth frame from a BC/MC address"));) return; @@ -120,7 +120,7 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p { // Received Deauth frame for a MC address // Log error and ignore it - PELOG1(limLog(pMac, LOG1, + PELOGE(limLog(pMac, LOGE, FL("received Deauth frame for a MC address"));) return; @@ -147,14 +147,18 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p reasonCode = sirReadU16(pBody); PELOGE(limLog(pMac, LOGE, - FL("received Deauth frame (mlm state = %s) with reason code %d from "), - limMlmStateStr(psessionEntry->limMlmState), reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOGE);) + FL("Received Deauth frame for Addr: "MAC_ADDRESS_STR" (mlm state = %s," + " sme state = %d systemrole = %d) with reason code %d from " + MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->da), + limMlmStateStr(psessionEntry->limMlmState), psessionEntry->limSmeState, + psessionEntry->limSystemRole, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) if (limCheckDisassocDeauthAckPending(pMac, (tANI_U8*)pHdr->sa)) { - PELOGW(limLog(pMac, LOGW, - FL("Ignore the Deauth received, while waiting for ack of disassoc/deauth"));) + PELOGE(limLog(pMac, LOGE, + FL("Ignore the Deauth received, while waiting for ack of " + "disassoc/deauth"));) limCleanUpDisassocDeauthReq(pMac,(tANI_U8*)pHdr->sa, 1); return; } @@ -172,10 +176,9 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p default: // Invalid reasonCode in received Deauthentication frame // Log error and ignore the frame - PELOG1(limLog(pMac, LOG1, - FL("received Deauth frame with invalid reasonCode %d from "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Deauth frame with invalid reasonCode %d from " + MAC_ADDRESS_STR), reasonCode, MAC_ADDR_ARRAY(pHdr->sa));) break; } @@ -196,10 +199,9 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p default: // Invalid reasonCode in received Deauth frame // Log error and ignore the frame - PELOG1(limLog(pMac, LOG1, - FL("received Deauth frame with invalid reasonCode %d from "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Deauth frame with invalid reasonCode %d from " + MAC_ADDRESS_STR), reasonCode, MAC_ADDR_ARRAY(pHdr->sa));) break; } @@ -208,10 +210,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p { // Received Deauth frame in either IBSS // or un-known role. Log and ignore it - limLog(pMac, LOG1, - FL("received Deauth frame with reasonCode %d in role %d from "), - reasonCode, psessionEntry->limSystemRole); - limPrintMacAddr(pMac, pHdr->sa, LOG1); + limLog(pMac, LOGE, + FL("received Deauth frame with reasonCode %d in role %d from " + MAC_ADDRESS_STR),reasonCode, psessionEntry->limSystemRole, + MAC_ADDR_ARRAY(pHdr->sa)); return; } @@ -240,9 +242,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p } if (limIsReassocInProgress(pMac,psessionEntry) || limIsReassocInProgress(pMac,pRoamSessionEntry)) { if (!IS_REASSOC_BSSID(pMac,pHdr->sa,psessionEntry)) { - PELOGE(limLog(pMac, LOGE, FL("Rcv Deauth from unknown/different AP while ReAssoc. Ignore "));) - limPrintMacAddr(pMac, pHdr->sa, LOGE); - limPrintMacAddr(pMac, psessionEntry->limReAssocbssId, LOGE); + PELOGE(limLog(pMac, LOGE, FL("Rcv Deauth from unknown/different " + "AP while ReAssoc. Ignore "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) + PELOGE(limLog(pMac, LOGE, FL(" limReAssocbssId : "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(psessionEntry->limReAssocbssId));) return; } @@ -250,9 +253,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p * Drop ReAssoc and Restore the Previous context( current connected AP). */ if (!IS_CURRENT_BSSID(pMac, pHdr->sa,psessionEntry)) { - PELOGE(limLog(pMac, LOGE, FL("received DeAuth from the New AP to which ReAssoc is sent "));) - limPrintMacAddr(pMac, pHdr->sa, LOGE); - limPrintMacAddr(pMac, psessionEntry->bssId, LOGE); + PELOGE(limLog(pMac, LOGE, FL("received DeAuth from the New AP to " + "which ReAssoc is sent "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));) + PELOGE(limLog(pMac, LOGE, FL(" psessionEntry->bssId: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(psessionEntry->bssId));) limRestorePreReassocState(pMac, eSIR_SME_REASSOC_REFUSED, reasonCode,psessionEntry); return; @@ -266,10 +270,13 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p if(psessionEntry->limSystemRole != eLIM_AP_ROLE ){ if (!IS_CURRENT_BSSID(pMac, pHdr->bssId, psessionEntry)) { - PELOGE(limLog(pMac, LOGE, FL("received DeAuth from an AP other than we're trying to join. Ignore. "));) + PELOGE(limLog(pMac, LOGE, FL("received DeAuth from an AP other " + "than we're trying to join. Ignore. "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pHdr->sa));) if (limSearchPreAuthList(pMac, pHdr->sa)) { - PELOG1(limLog(pMac, LOG1, FL("Preauth entry exist. Deleting... "));) + PELOG1(limLog(pMac, LOG1, FL("Preauth entry exist. " + "Deleting... "));) limDeletePreAuthNode(pMac, pHdr->sa); } return; @@ -294,9 +301,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p // Log error PELOG1(limLog(pMac, LOG1, - FL("received Deauth frame with failure code %d from "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + FL("received Deauth frame state %X with failure " + "code %d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) limRestoreFromAuthState(pMac, eSIR_SME_DEAUTH_WHILE_JOIN, reasonCode,psessionEntry); @@ -304,6 +312,11 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p return; case eLIM_MLM_AUTHENTICATED_STATE: + limLog(pMac, LOG1, + FL("received Deauth frame state %X with " + "reasonCode=%d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa)); /// Issue Deauth Indication to SME. vos_mem_copy((tANI_U8 *) &mlmDeauthInd.peerMacAddr, pHdr->sa, @@ -325,7 +338,12 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p * context. Delete local pre-auth context * if any and issue ASSOC_CNF to SME. */ - if (limSearchPreAuthList(pMac, pHdr->sa)) + limLog(pMac, LOG1, + FL("received Deauth frame state %X with " + "reasonCode=%d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa)); + if (limSearchPreAuthList(pMac, pHdr->sa)) limDeletePreAuthNode(pMac, pHdr->sa); if (psessionEntry->pLimMlmJoinReq) @@ -359,9 +377,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p case eLIM_MLM_WT_ADD_STA_RSP_STATE: psessionEntry->fDeauthReceived = true; PELOGW(limLog(pMac, LOGW, - FL("Received Deauth frame with Reason Code %d from Peer"), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOGW);) + FL("Received Deauth frame in state %X with Reason " + "Code %d from Peer"MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) return ; case eLIM_MLM_IDLE_STATE: @@ -370,9 +389,11 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p if ((NULL != pStaDs) && (STA_ENTRY_TDLS_PEER == pStaDs->staType)) { PELOGE(limLog(pMac, LOGE, - FL("received Deauth frame with reason code %d from Tdls peer"), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOGE);) + FL("received Deauth frame in state %X with " + "reason code %d from Tdls peer" + MAC_ADDRESS_STR), + psessionEntry->limMlmState,reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) limSendSmeTDLSDelStaInd(pMac, pStaDs, psessionEntry, reasonCode); return; @@ -395,20 +416,27 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p break; case eLIM_MLM_WT_REASSOC_RSP_STATE: + limLog(pMac, LOGE, + FL("received Deauth frame state %X with " + "reasonCode=%d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa)); break; case eLIM_MLM_WT_FT_REASSOC_RSP_STATE: PELOGE(limLog(pMac, LOGE, - FL("received Deauth frame in FT state %X with reasonCode=%d from "), - psessionEntry->limMlmState, reasonCode);) - limPrintMacAddr(pMac, pHdr->sa, LOGE); + FL("received Deauth frame in FT state %X with " + "reasonCode=%d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) break; default: - PELOG1(limLog(pMac, LOG1, - FL("received Deauth frame in state %X with reasonCode=%d from "), - psessionEntry->limMlmState, reasonCode);) - limPrintMacAddr(pMac, pHdr->sa, LOG1); + PELOGE(limLog(pMac, LOGE, + FL("received Deauth frame in state %X with " + "reasonCode=%d from "MAC_ADDRESS_STR), + psessionEntry->limMlmState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) return; } break; @@ -432,8 +460,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p * This is maintained by DPH and created by LIM. */ if (NULL == pStaDs) + { + limLog(pMac, LOGE, FL("pStaDs is NULL")); return; - + } if ((pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) || (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE)) @@ -442,10 +472,10 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p * Already in the process of deleting context for the peer * and received Deauthentication frame. Log and Ignore. */ - PELOG1(limLog(pMac, LOG1, - FL("received Deauth frame from peer that is in state %X, addr "), - pStaDs->mlmStaContext.mlmState); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Deauth frame from peer that is in state %X, addr " + MAC_ADDRESS_STR), + pStaDs->mlmStaContext.mlmState,MAC_ADDR_ARRAY(pHdr->sa));) return; } pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes)reasonCode; @@ -479,7 +509,8 @@ limProcessDeauthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession p psessionEntry->limAssocResponseData = NULL; } - PELOGE(limLog(pMac, LOGE, FL("Rcv Deauth from ReAssoc AP. Issue REASSOC_CNF. "));) + PELOGE(limLog(pMac, LOGE, FL("Rcv Deauth from ReAssoc AP. " + "Issue REASSOC_CNF. "));) /* * TODO: Instead of overloading eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE * it would have been good to define/use a different failure type. diff --git a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c index a5fe016e6d9e..f03d62c0b661 100644 --- a/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c @@ -90,7 +90,7 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession { // Received Disassoc frame from a BC/MC address // Log error and ignore it - PELOG1(limLog(pMac, LOG1, + PELOGE(limLog(pMac, LOGE, FL("received Disassoc frame from a BC/MC address"));) return; @@ -100,7 +100,7 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession { // Received Disassoc frame for a MC address // Log error and ignore it - PELOG1(limLog(pMac, LOG1, + PELOGE(limLog(pMac, LOGE, FL("received Disassoc frame for a MC address"));) return; @@ -125,9 +125,11 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession // Get reasonCode from Disassociation frame body reasonCode = sirReadU16(pBody); - PELOG2(limLog(pMac, LOG2, - FL("Received Disassoc frame (mlm state %d sme state %d), with reason code %d from "MAC_ADDRESS_STR), - psessionEntry->limMlmState, psessionEntry->limSmeState, reasonCode, MAC_ADDR_ARRAY(pHdr->sa));) + PELOG2(limLog(pMac, LOGE, + FL("Received Disassoc frame for Addr: "MAC_ADDRESS_STR"(mlm state=%s, sme state=%d)," + "with reason code %d from "MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->da), + limMlmStateStr(psessionEntry->limMlmState), psessionEntry->limSmeState, reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) /** * Extract 'associated' context for STA, if any. @@ -141,18 +143,19 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession * Disassociating STA is not associated. * Log error. */ - PELOG1(limLog(pMac, LOG1, - FL("received Disassoc frame from STA that does not have context reasonCode=%d, addr "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Disassoc frame from STA that does not have context " + "reasonCode=%d, addr "MAC_ADDRESS_STR), + reasonCode,MAC_ADDR_ARRAY(pHdr->sa));) return; } if (limCheckDisassocDeauthAckPending(pMac, (tANI_U8*)pHdr->sa)) { - PELOGW(limLog(pMac, LOGW, - FL("Ignore the DisAssoc received, while waiting for ack of disassoc/deauth"));) + PELOGE(limLog(pMac, LOGE, + FL("Ignore the DisAssoc received, while waiting " + "for ack of disassoc/deauth"));) limCleanUpDisassocDeauthReq(pMac,(tANI_U8*)pHdr->sa, 1); return; } @@ -165,7 +168,8 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession * drop/ignore the DisAssoc received */ if (!IS_REASSOC_BSSID(pMac,pHdr->sa,psessionEntry)) { - PELOGW(limLog(pMac, LOGW, FL("Ignore the DisAssoc received, while Processing ReAssoc with different/unknown AP"));) + PELOGE(limLog(pMac, LOGE, FL("Ignore the DisAssoc received, while " + "Processing ReAssoc with different/unknown AP"));) return; } /** If the Disassoc is received from the new AP to which we tried to ReAssociate @@ -197,10 +201,10 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession default: // Invalid reasonCode in received Disassociation frame - PELOG1(limLog(pMac, LOG1, - FL("received Disassoc frame with invalid reasonCode %d from "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Disassoc frame with invalid reasonCode " + "%d from "MAC_ADDRESS_STR), + reasonCode, MAC_ADDR_ARRAY(pHdr->sa));) break; } } @@ -233,10 +237,9 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession // as long as we're not about to channel switch if(psessionEntry->gLimChannelSwitch.state != eLIM_CHANNEL_SWITCH_IDLE) { - limLog(pMac, LOGW, + limLog(pMac, LOGE, FL("Ignoring disassoc frame due to upcoming " - "channel switch, from")); - limPrintMacAddr(pMac, pHdr->sa, LOGW); + "channel switch, from "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa)); return; } break; @@ -244,10 +247,10 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession default: // Invalid reasonCode in received Disassociation frame // Log error and ignore the frame - PELOG1(limLog(pMac, LOG1, - FL("received Disassoc frame with invalid reasonCode %d from "), - reasonCode); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Disassoc frame with invalid reasonCode " + "%d from "MAC_ADDRESS_STR), reasonCode, + MAC_ADDR_ARRAY(pHdr->sa));) return; } } @@ -255,20 +258,15 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession { // Received Disassociation frame in either IBSS // or un-known role. Log and ignore it - limLog(pMac, LOG1, - FL("received Disassoc frame with invalid reasonCode %d in role %d in sme state %d from "), - reasonCode, psessionEntry->limSystemRole, psessionEntry->limSmeState); - limPrintMacAddr(pMac, pHdr->sa, LOG1); + limLog(pMac, LOGE, + FL("received Disassoc frame with invalid reasonCode %d in role " + "%d in sme state %d from "MAC_ADDRESS_STR), reasonCode, + psessionEntry->limSystemRole, psessionEntry->limSmeState, + MAC_ADDR_ARRAY(pHdr->sa)); return; } - // Disassociation from peer MAC entity - - PELOG1(limLog(pMac, LOG1, - FL("Received Disassoc frame from sta with assocId=%d with reasonCode=%d. Peer MAC is "MAC_ADDRESS_STR), - pStaDs->assocId, reasonCode, MAC_ADDR_ARRAY(pHdr->sa));) - if ((pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_STA_RSP_STATE) || (pStaDs->mlmStaContext.mlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE)) { @@ -276,10 +274,9 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession * Already in the process of deleting context for the peer * and received Disassociation frame. Log and Ignore. */ - PELOG1(limLog(pMac, LOG1, - FL("received Disassoc frame in state %d from"), - pStaDs->mlmStaContext.mlmState); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Disassoc frame in state %d from "MAC_ADDRESS_STR), + pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa));) return; } @@ -290,10 +287,10 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession * Requesting STA is in some 'transient' state? * Log error. */ - PELOG1(limLog(pMac, LOG1, - FL("received Disassoc frame from peer that is in state %X, addr "), - pStaDs->mlmStaContext.mlmState); - limPrintMacAddr(pMac, pHdr->sa, LOG1);) + PELOGE(limLog(pMac, LOGE, + FL("received Disassoc frame from peer that is in state %X, addr " + MAC_ADDRESS_STR), + pStaDs->mlmStaContext.mlmState, MAC_ADDR_ARRAY(pHdr->sa));) } // if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC; @@ -317,7 +314,8 @@ limProcessDisassocFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession * failure result code. By design, SME will then issue "Disassoc" * and cleanup will happen at that time. */ - PELOGE(limLog(pMac, LOGE, FL("received Disassoc from AP while waiting for Reassoc Rsp"));) + PELOGE(limLog(pMac, LOGE, FL("received Disassoc from AP while waiting " + "for Reassoc Rsp"));) if (psessionEntry->limAssocResponseData) { vos_mem_free(psessionEntry->limAssocResponseData); diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index e49adac63c23..8458fd595f48 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -2175,12 +2175,18 @@ limProcessMlmPostJoinSuspendLink(tpAniSirGlobal pMac, eHalStatus status, tANI_U3 if( eHAL_STATUS_SUCCESS != status ) { - limLog(pMac, LOGE, FL("Suspend link(NOTIFY_BSS) failed. still proceeding with join")); + limLog(pMac, LOGE, FL("Sessionid %d Suspend link(NOTIFY_BSS) failed. " + "still proceeding with join"),psessionEntry->peSessionId); } psessionEntry->limPrevMlmState = psessionEntry->limMlmState; psessionEntry->limMlmState = eLIM_MLM_WT_JOIN_BEACON_STATE; MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState)); + limLog(pMac, LOG1, FL("Sessionid %d prev lim state %d new lim state %d " + "systemrole = %d"), psessionEntry->peSessionId, + psessionEntry->limPrevMlmState, + psessionEntry->limMlmState,psessionEntry->limSystemRole); + limDeactivateAndChangeTimer(pMac, eLIM_JOIN_FAIL_TIMER); //assign appropriate sessionId to the timer object @@ -2210,7 +2216,10 @@ limProcessMlmPostJoinSuspendLink(tpAniSirGlobal pMac, eHalStatus status, tANI_U3 #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) psessionEntry->pLimMlmReassocRetryReq = NULL; #endif - + limLog(pMac, LOG1, FL("[limProcessMlmJoinReq]: suspend link sucess(%d) " + "on sessionid: %d setting channel to: %d with secChanOffset:%d" + "and maxtxPower: %d"), status, psessionEntry->peSessionId, + chanNum, secChanOffset, psessionEntry->maxTxPower); limSetChannel(pMac, chanNum, secChanOffset, psessionEntry->maxTxPower, psessionEntry->peSessionId); return; @@ -2291,11 +2300,17 @@ limProcessMlmJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if( isLimSessionOffChannel(pMac, sessionId) ) { //suspend link + limLog(pMac, LOG1, FL("Suspend link as LimSession on sessionid %d" + "is off channel"),sessionId); limSuspendLink(pMac, eSIR_DONT_CHECK_LINK_TRAFFIC_BEFORE_SCAN, limProcessMlmPostJoinSuspendLink, (tANI_U32*)psessionEntry ); } else { + limLog(pMac, LOG1, FL("No need to Suspend link as LimSession on " + "sessionid %d is not off channel, calling " + "limProcessMlmPostJoinSuspendLink with status as SUCCESS"), + sessionId); //No need to suspend link. limProcessMlmPostJoinSuspendLink( pMac, eHAL_STATUS_SUCCESS, (tANI_U32*) psessionEntry ); @@ -2373,10 +2388,17 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) sessionId = pMac->lim.gpLimMlmAuthReq->sessionId; if((psessionEntry= peFindSessionBySessionId(pMac,sessionId) )== NULL) { - limLog(pMac, LOGP, FL("Session Does not exist for given sessionId")); + limLog(pMac, LOGP, FL("SessionId:%d Session Does not exist"),sessionId); return; } + limLog(pMac, LOG1,FL("Process Auth Req on sessionID %d Systemrole %d" + "mlmstate %d from: "MAC_ADDRESS_STR" with authtype %d"), sessionId, + psessionEntry->limSystemRole,psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pMac->lim.gpLimMlmAuthReq->peerMacAddr), + pMac->lim.gpLimMlmAuthReq->authType); + + /** * Expect Auth request only when: * 1. STA joined/associated with a BSS or @@ -2435,10 +2457,9 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) (preAuthNode->authType == pMac->lim.gpLimMlmAuthReq->authType))) { - PELOG2(limLog(pMac, LOG2, - FL("Already have pre-auth context with peer")); - limPrintMacAddr(pMac, pMac->lim.gpLimMlmAuthReq->peerMacAddr, - LOG2);) + limLog(pMac, LOG2, + FL("Already have pre-auth context with peer: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pMac->lim.gpLimMlmAuthReq->peerMacAddr)); mlmAuthCnf.resultCode = (tSirResultCodes) eSIR_MAC_SUCCESS_STATUS; @@ -2634,10 +2655,9 @@ limProcessMlmAssocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) // Log error PELOGW(limLog(pMac, LOGW, - FL("received unexpected MLM_ASSOC_CNF in state %X for role=%d, MAC addr= "), - psessionEntry->limMlmState, - psessionEntry->limSystemRole);) - limPrintMacAddr(pMac, pMlmAssocReq->peerMacAddr, LOGW); + FL("received unexpected MLM_ASSOC_CNF in state %X for role=%d, MAC addr= " + MAC_ADDRESS_STR), psessionEntry->limMlmState, + psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pMlmAssocReq->peerMacAddr));) limPrintMlmState(pMac, LOGW, psessionEntry->limMlmState); mlmAssocCnf.resultCode = eSIR_SME_INVALID_PARAMETERS; @@ -2695,11 +2715,17 @@ limProcessMlmReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if((psessionEntry = peFindSessionBySessionId(pMac,pMlmReassocReq->sessionId)) == NULL) { - PELOGE(limLog(pMac, LOGE,FL("Session Does not exist for given sessionId"));) + limLog(pMac, LOGE,FL("Session Does not exist for given sessionId %d"), + pMlmReassocReq->sessionId); vos_mem_free(pMlmReassocReq); return; } + limLog(pMac, LOG1,FL("Process ReAssoc Req on sessionID %d Systemrole %d" + "mlmstate %d from: "MAC_ADDRESS_STR), pMlmReassocReq->sessionId, + psessionEntry->limSystemRole, psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pMlmReassocReq->peerMacAddr)); + if (((psessionEntry->limSystemRole != eLIM_AP_ROLE) && (psessionEntry->limSystemRole != eLIM_BT_AMP_AP_ROLE)) && (psessionEntry->limMlmState == eLIM_MLM_LINK_ESTABLISHED_STATE)) { @@ -2782,12 +2808,12 @@ limProcessMlmReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) */ // Log error - PELOGW(limLog(pMac, LOGW, - FL("received unexpected MLM_REASSOC_CNF in state %X for role=%d, MAC addr= "), - psessionEntry->limMlmState, - psessionEntry->limSystemRole);) - limPrintMacAddr(pMac, pMlmReassocReq->peerMacAddr, - LOGW); + limLog(pMac, LOGW, + FL("received unexpected MLM_REASSOC_CNF in state %X for role=%d, " + "MAC addr= " + MAC_ADDRESS_STR), psessionEntry->limMlmState, + psessionEntry->limSystemRole, + MAC_ADDR_ARRAY(pMlmReassocReq->peerMacAddr)); limPrintMlmState(pMac, LOGW, psessionEntry->limMlmState); mlmReassocCnf.resultCode = eSIR_SME_INVALID_PARAMETERS; @@ -2835,11 +2861,17 @@ limProcessMlmDisassocReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_ if((psessionEntry = peFindSessionBySessionId(pMac,pMlmDisassocReq->sessionId))== NULL) { - PELOGE(limLog(pMac, LOGE, - FL("session does not exist for given sessionId"));) + limLog(pMac, LOGE, + FL("session does not exist for given sessionId %d"), + pMlmDisassocReq->sessionId); mlmDisassocCnf.resultCode = eSIR_SME_INVALID_PARAMETERS; goto end; } + limLog(pMac, LOG1,FL("Process DisAssoc Req on sessionID %d Systemrole %d" + "mlmstate %d from: "MAC_ADDRESS_STR), pMlmDisassocReq->sessionId, + psessionEntry->limSystemRole, psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pMlmDisassocReq->peerMacAddr)); + #if 0 if (wlan_cfgGetStr(pMac, WNI_CFG_BSSID, currentBssId, &cfg) != eSIR_SUCCESS) @@ -2903,8 +2935,9 @@ limProcessMlmDisassocReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_ * Log error */ PELOGW(limLog(pMac, LOGW, - FL("received MLM_DISASSOC_REQ for STA that either has no context or in some transit state, Addr= "));) - limPrintMacAddr(pMac, pMlmDisassocReq->peerMacAddr, LOGW); + FL("received MLM_DISASSOC_REQ for STA that either has no context " + "or in some transit state, Addr= " + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pMlmDisassocReq->peerMacAddr));) /// Prepare and Send LIM_MLM_DISASSOC_CNF @@ -3071,6 +3104,7 @@ void limCleanUpDisassocDeauthReq(tpAniSirGlobal pMac, void limProcessDisassocAckTimeout(tpAniSirGlobal pMac) { + limLog(pMac, LOG1, FL("")); limSendDisassocCnf(pMac); } @@ -3110,12 +3144,15 @@ limProcessMlmDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) } pMlmDisassocReq = (tLimMlmDisassocReq *) pMsgBuf; + limLog(pMac, LOG1,FL("Process DisAssoc Req on sessionID %d " + "from: "MAC_ADDRESS_STR), pMlmDisassocReq->sessionId, + MAC_ADDR_ARRAY(pMlmDisassocReq->peerMacAddr)); if((psessionEntry = peFindSessionBySessionId(pMac,pMlmDisassocReq->sessionId))== NULL) { - - PELOGE(limLog(pMac, LOGE, - FL("session does not exist for given sessionId"));) + limLog(pMac, LOGE, + FL("session does not exist for given sessionId %d"), + pMlmDisassocReq->sessionId); return; } @@ -3149,11 +3186,15 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 if((psessionEntry = peFindSessionBySessionId(pMac,pMlmDeauthReq->sessionId))== NULL) { - - PELOGE(limLog(pMac, LOGE, FL("session does not exist for given sessionId"));) + limLog(pMac, LOGE, FL("session does not exist for given sessionId %d"), + pMlmDeauthReq->sessionId); vos_mem_free(pMlmDeauthReq); return; } + limLog(pMac, LOG1,FL("Process Deauth Req on sessionID %d Systemrole %d" + "mlmstate %d from: "MAC_ADDRESS_STR), pMlmDeauthReq->sessionId, + psessionEntry->limSystemRole, psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr)); #if 0 if (wlan_cfgGetStr(pMac, WNI_CFG_BSSID, currentBssId, &cfg) != eSIR_SUCCESS) @@ -3184,13 +3225,12 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 currentBssId, sizeof(tSirMacAddr)) ) { - PELOGW(limLog(pMac, LOGW, - FL("received MLM_DEAUTH_REQ with invalid BSS id "));) - PELOGE(limLog(pMac, LOGE, FL("Peer MAC Addr : "));) - limPrintMacAddr(pMac, pMlmDeauthReq->peerMacAddr,LOGE); - - PELOGE(limLog(pMac, LOGE, FL("\n CFG BSSID Addr : "));) - limPrintMacAddr(pMac, currentBssId,LOGE); + limLog(pMac, LOGE, + FL("received MLM_DEAUTH_REQ with invalid BSS id " + "Peer MAC: "MAC_ADDRESS_STR " CFG BSSID Addr : " + MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr), + MAC_ADDR_ARRAY(currentBssId)); /// Prepare and Send LIM_MLM_DEAUTH_CNF @@ -3230,9 +3270,8 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 default: PELOGW(limLog(pMac, LOGW, - FL("received MLM_DEAUTH_REQ with in state %d for peer "), - psessionEntry->limMlmState);) - limPrintMacAddr(pMac, pMlmDeauthReq->peerMacAddr, LOGW); + FL("received MLM_DEAUTH_REQ with in state %d for peer "MAC_ADDRESS_STR), + psessionEntry->limMlmState,MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr));) limPrintMlmState(pMac, LOGW, psessionEntry->limMlmState); /// Prepare and Send LIM_MLM_DEAUTH_CNF @@ -3274,8 +3313,10 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 * Prepare and Send LIM_MLM_DEAUTH_CNF */ PELOGW(limLog(pMac, LOGW, - FL("received MLM_DEAUTH_REQ for STA that does not have context, Addr="));) - limPrintMacAddr(pMac, pMlmDeauthReq->peerMacAddr, LOGW); + FL("received MLM_DEAUTH_REQ in mlme state %d for STA that " + "does not have context, Addr="MAC_ADDRESS_STR), + psessionEntry->limMlmState, + MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr));) mlmDeauthCnf.resultCode = eSIR_SME_STA_NOT_AUTHENTICATED; @@ -3306,8 +3347,8 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 * some transit state. Log error. */ PELOGW(limLog(pMac, LOGW, - FL("received MLM_DEAUTH_REQ for STA that either has no context or in some transit state, Addr="));) - limPrintMacAddr(pMac, pMlmDeauthReq->peerMacAddr, LOGW); + FL("received MLM_DEAUTH_REQ for STA that either has no context or in some transit state, Addr=" + MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr));) /// Prepare and Send LIM_MLM_DEAUTH_CNF @@ -3350,6 +3391,7 @@ end: void limProcessDeauthAckTimeout(tpAniSirGlobal pMac) { + limLog(pMac, LOG1, FL("")); limSendDeauthCnf(pMac); } @@ -3390,10 +3432,14 @@ limProcessMlmDeauthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pMlmDeauthReq = (tLimMlmDeauthReq *) pMsgBuf; + limLog(pMac, LOG1,FL("Process Deauth Req on sessionID %d " + "from: "MAC_ADDRESS_STR), pMlmDeauthReq->sessionId, + MAC_ADDR_ARRAY(pMlmDeauthReq->peerMacAddr)); + if((psessionEntry = peFindSessionBySessionId(pMac,pMlmDeauthReq->sessionId))== NULL) { - - PELOGE(limLog(pMac, LOGE, FL("session does not exist for given sessionId"));) + limLog(pMac, LOGE, FL("session does not exist for given sessionId %d"), + pMlmDeauthReq->sessionId); return; } @@ -4179,12 +4225,14 @@ limProcessAuthFailureTimeout(tpAniSirGlobal pMac) #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT_LIM vos_log_rssi_pkt_type *pRssiLog = NULL; #endif //FEATURE_WLAN_DIAG_SUPPORT_LIM - if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimAuthFailureTimer.sessionId))== NULL) { limLog(pMac, LOGP,FL("Session Does not exist for given sessionID")); return; } + limLog(pMac, LOGE, FL("received AUTH failure timeout in sessionid %d " + "limMlmstate %X limSmeState %X"), psessionEntry->peSessionId, + psessionEntry->limMlmState, psessionEntry->limSmeState); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT_LIM WLAN_VOS_DIAG_LOG_ALLOC(pRssiLog, vos_log_rssi_pkt_type, LOG_WLAN_RSSI_UPDATE_C); @@ -4276,8 +4324,9 @@ limProcessAuthRspTimeout(tpAniSirGlobal pMac, tANI_U32 authIndex) * in unexpected state. Log error */ PELOGE(limLog(pMac, LOGE, - FL("received unexpected AUTH rsp timeout for MAC address ")); - limPrintMacAddr(pMac, pAuthNode->peerMacAddr, LOGE);) + FL("received AUTH rsp timeout in unexpected state " + "for MAC address: "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pAuthNode->peerMacAddr));) } else { @@ -4286,8 +4335,8 @@ limProcessAuthRspTimeout(tpAniSirGlobal pMac, tANI_U32 authIndex) pAuthNode->mlmState = eLIM_MLM_AUTH_RSP_TIMEOUT_STATE; pAuthNode->fTimerStarted = 0; PELOG1( limLog(pMac, LOG1, - FL("AUTH rsp timedout for MAC address ")); - limPrintMacAddr(pMac, pAuthNode->peerMacAddr, LOG1);) + FL("AUTH rsp timedout for MAC address "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(pAuthNode->peerMacAddr));) // Change timer to reactivate it in future limDeactivateAndChangePerStaIdTimer(pMac, diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c index 6b3e3f26e175..2a5b1202c3ae 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c @@ -3685,7 +3685,12 @@ static void limProcessSwitchChannelJoinReq(tpAniSirGlobal pMac, tpPESession pses { if (limSetLinkState(pMac, eSIR_LINK_BTAMP_PREASSOC_STATE, psessionEntry->bssId, psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS ) + { + PELOGE(limLog(pMac, LOGE, FL("Sessionid: %d Set link state " + "failed!! BSSID:"MAC_ADDRESS_STR),psessionEntry->peSessionId, + MAC_ADDR_ARRAY(psessionEntry->bssId));) goto error; + } } /* Update the lim global gLimTriggerBackgroundScanDuringQuietBss */ @@ -3704,6 +3709,10 @@ static void limProcessSwitchChannelJoinReq(tpAniSirGlobal pMac, tpPESession pses //assign appropriate sessionId to the timer object pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer.sessionId = psessionEntry->peSessionId; + limLog(pMac, LOG1, FL("Sessionid: %d Send Probe req on channel %d ssid: %s " + "BSSID: "MAC_ADDRESS_STR), psessionEntry->peSessionId, + psessionEntry->currentOperChannel, ssId.ssId, + MAC_ADDR_ARRAY(psessionEntry->pLimMlmJoinReq->bssDescription.bssId)); // include additional IE if there is limSendProbeReqMgmtFrame( pMac, &ssId, psessionEntry->pLimMlmJoinReq->bssDescription.bssId, psessionEntry->currentOperChannel/*chanNum*/, @@ -3806,6 +3815,7 @@ void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void *body) psessionEntry->chainMask = pChnlParams->chainMask; psessionEntry->smpsMode = pChnlParams->smpsMode; psessionEntry->channelChangeReasonCode = 0xBAD; + limLog(pMac, LOG1, FL("channelChangeReasonCode %d"),channelChangeReasonCode); switch(channelChangeReasonCode) { case LIM_SWITCH_CHANNEL_REASSOC: diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index e96b75a372cf..5a10284751e4 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1648,7 +1648,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pSmeJoinReq = vos_mem_malloc(nSize); if ( NULL == pSmeJoinReq ) { - limLog(pMac, LOGP, FL("call to AllocateMemory failed for pSmeJoinReq")); + limLog(pMac, LOGP, FL("call to AllocateMemory failed for " + "pSmeJoinReq")); retCode = eSIR_SME_RESOURCES_UNAVAILABLE; goto end; } @@ -1672,7 +1673,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) { if(peValidateBtJoinRequest(pMac)!= TRUE) { - limLog(pMac, LOGW, FL("Start Bss session not present::SME_JOIN_REQ in unexpected state")); + limLog(pMac, LOGW, FL("Start Bss session not present::" + "SME_JOIN_REQ in unexpected state")); retCode = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE; psessionEntry = NULL; goto end; @@ -1684,7 +1686,10 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if((psessionEntry = peFindSessionByBssid(pMac,pSmeJoinReq->bssDescription.bssId,&sessionId)) != NULL) { - limLog(pMac, LOGE, FL("Session Already exists for given BSSID")); + limLog(pMac, LOGE, FL("Session(%d) Already exists for BSSID: " + MAC_ADDRESS_STR" in limSmeState = %X"),sessionId, + MAC_ADDR_ARRAY(pSmeJoinReq->bssDescription.bssId), + psessionEntry->limSmeState); if(psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE && psessionEntry->smeSessionId == pSmeJoinReq->sessionId) @@ -1692,13 +1697,16 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) // Received eWNI_SME_JOIN_REQ for same // BSS as currently associated. // Log the event and send success - PELOGW(limLog(pMac, LOGW, FL("Received SME_JOIN_REQ for currently joined BSS"));) + PELOGW(limLog(pMac, LOGW, FL("Received SME_JOIN_REQ for " + "currently joined BSS"));) /// Send Join success response to host retCode = eSIR_SME_SUCCESS; goto end; } else { + PELOGE(limLog(pMac, LOGE, FL("SME_JOIN_REQ not for" + "currently joined BSS"));) retCode = eSIR_SME_REFUSED; psessionEntry = NULL; goto end; @@ -1770,17 +1778,20 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if (cfgSetInt(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, psessionEntry->txBFIniFeatureEnabled) != eSIR_SUCCESS) { - limLog(pMac, LOGP, FL("could not set WNI_CFG_VHT_SU_BEAMFORMEE_CAP at CFG")); + limLog(pMac, LOGP, FL("could not set " + "WNI_CFG_VHT_SU_BEAMFORMEE_CAP at CFG")); retCode = eSIR_LOGP_EXCEPTION; goto end; } VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO_MED, - "***__limProcessSmeJoinReq: txBFCsnValue=%d****", pSmeJoinReq->txBFCsnValue); + "***__limProcessSmeJoinReq: txBFCsnValue=%d****", + pSmeJoinReq->txBFCsnValue); if (cfgSetInt(pMac, WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED, pSmeJoinReq->txBFCsnValue) != eSIR_SUCCESS) { - limLog(pMac, LOGP, FL("could not set WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED at CFG")); + limLog(pMac, LOGP, FL("could not set " + "WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED at CFG")); retCode = eSIR_LOGP_EXCEPTION; goto end; } @@ -1817,7 +1828,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) /*Store Persona */ psessionEntry->pePersona = pSmeJoinReq->staPersona; VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO, - FL("PE PERSONA=%d cbMode %u"), psessionEntry->pePersona, pSmeJoinReq->cbMode); + FL("PE PERSONA=%d cbMode %u"), psessionEntry->pePersona, + pSmeJoinReq->cbMode); /* Copy the SSID from smejoinreq to session entry */ psessionEntry->ssId.length = pSmeJoinReq->ssId.length; @@ -1853,7 +1865,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) else { /* Throw an error and return and make sure to delete the session.*/ - limLog(pMac, LOGW, FL("received SME_JOIN_REQ with invalid bss type")); + limLog(pMac, LOGE, FL("received SME_JOIN_REQ with invalid" + " bss type %d"), psessionEntry->bssType); retCode = eSIR_SME_INVALID_PARAMETERS; goto end; } @@ -1874,7 +1887,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pMlmJoinReq = vos_mem_malloc(val); if ( NULL == pMlmJoinReq ) { - limLog(pMac, LOGP, FL("call to AllocateMemory failed for mlmJoinReq")); + limLog(pMac, LOGP, FL("call to AllocateMemory " + "failed for mlmJoinReq")); return; } (void) vos_mem_set((void *) pMlmJoinReq, val, 0); @@ -1942,7 +1956,9 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) psessionEntry->maxTxPower = VOS_MIN( regMax, (localPowerConstraint) ); #endif #if defined WLAN_VOWIFI_DEBUG - limLog( pMac, LOGE, "Regulatory max = %d, local power constraint = %d, max tx = %d", regMax, localPowerConstraint, psessionEntry->maxTxPower ); + limLog( pMac, LOGE, "Regulatory max = %d, local power constraint = %d," + " max tx = %d", regMax, localPowerConstraint, + psessionEntry->maxTxPower ); #endif if(!pMac->psOffloadEnabled) @@ -1995,17 +2011,11 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) psessionEntry->limSmeState = eLIM_SME_WT_JOIN_STATE; MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState)); - PELOG1(limLog(pMac, LOG1, FL("SME JoinReq: SSID %d.%c%c%c%c%c%c"), - psessionEntry->ssId.length, - psessionEntry->ssId.ssId[0], - psessionEntry->ssId.ssId[1], - psessionEntry->ssId.ssId[2], - psessionEntry->ssId.ssId[3], - psessionEntry->ssId.ssId[4], - psessionEntry->ssId.ssId[5]); - limLog(pMac, LOG1, FL("Channel %d, BSSID "MAC_ADDRESS_STR), - psessionEntry->currentOperChannel, - MAC_ADDR_ARRAY(psessionEntry->bssId));) + limLog(pMac, LOG1, FL("SME JoinReq:Sessionid %d SSID len %d SSID : %s " + "Channel %d, BSSID "MAC_ADDRESS_STR), pMlmJoinReq->sessionId, + psessionEntry->ssId.length,psessionEntry->ssId.ssId, + psessionEntry->currentOperChannel, + MAC_ADDR_ARRAY(psessionEntry->bssId)); /* Indicate whether spectrum management is enabled*/ psessionEntry->spectrumMgtEnabled = @@ -2018,7 +2028,8 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) else { /* Received eWNI_SME_JOIN_REQ un expected state */ - limLog(pMac, LOGE, FL("received unexpected SME_JOIN_REQ in state %X"), pMac->lim.gLimSmeState); + limLog(pMac, LOGE, FL("received unexpected SME_JOIN_REQ " + "in state %X"), pMac->lim.gLimSmeState); limPrintSmeState(pMac, LOGE, pMac->lim.gLimSmeState); retCode = eSIR_SME_UNEXPECTED_REQ_RESULT_CODE; psessionEntry = NULL; @@ -2047,7 +2058,8 @@ end: psessionEntry = NULL; } } - + limLog(pMac, LOG1, FL("Sending failure status limSendSmeJoinReassocRsp" + "on sessionid: %d with retCode = %d"),smesessionId, retCode); limSendSmeJoinReassocRsp(pMac, eWNI_SME_JOIN_RSP, retCode, eSIR_MAC_UNSPEC_FAILURE_STATUS,psessionEntry,smesessionId,smetransactionId); } /*** end __limProcessSmeJoinReq() ***/ @@ -2235,7 +2247,9 @@ __limProcessSmeReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) psessionEntry->maxTxPower = VOS_MIN( regMax, (localPowerConstraint) ); #if defined WLAN_VOWIFI_DEBUG - limLog( pMac, LOGE, "Regulatory max = %d, local power constraint = %d, max tx = %d", regMax, localPowerConstraint, psessionEntry->maxTxPower ); + limLog( pMac, LOGE, "Regulatory max = %d, local power constraint " + "= %d, max tx = %d", regMax, localPowerConstraint, + psessionEntry->maxTxPower ); #endif { #if 0 @@ -2436,8 +2450,6 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) tANI_U8 smesessionId; tANI_U16 smetransactionId; - PELOG1(limLog(pMac, LOG1,FL("received DISASSOC_REQ message"));) - if (pMsgBuf == NULL) { limLog(pMac, LOGE, FL("Buffer is Pointing to NULL")); @@ -2466,19 +2478,20 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) return; } - - PELOG1(limLog(pMac, LOG1, FL("received DISASSOC_REQ message. Reason: %d global SmeState: %d"), - smeDisassocReq.reasonCode, pMac->lim.gLimSmeState);) - - if((psessionEntry = peFindSessionByBssid(pMac,smeDisassocReq.bssId,&sessionId))== NULL) { - limLog(pMac, LOGE,FL("session does not exist for given bssId")); + limLog(pMac, LOGE,FL("session does not exist for given bssId "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(smeDisassocReq.bssId)); retCode = eSIR_SME_INVALID_PARAMETERS; disassocTrigger = eLIM_HOST_DISASSOC; goto sendDisassoc; } + limLog(pMac, LOG1, FL("received DISASSOC_REQ message on sessionid %d" + "Systemrole %d Reason: %u SmeState: %d from: "MAC_ADDRESS_STR), + smesessionId,psessionEntry->limSystemRole, + smeDisassocReq.reasonCode, pMac->lim.gLimSmeState, + MAC_ADDR_ARRAY(smeDisassocReq.peerMacAddr)); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_REQ_EVENT, psessionEntry, 0, smeDisassocReq.reasonCode); @@ -2504,6 +2517,8 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) limDeleteTDLSPeers(pMac, psessionEntry); #endif MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState)); + limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in " + "limSmeState: %d "),psessionEntry->limSmeState); break; case eLIM_SME_WT_DEAUTH_STATE: @@ -2514,7 +2529,8 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) */ psessionEntry->limSmeState= eLIM_SME_WT_DISASSOC_STATE; MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, psessionEntry->peSessionId, psessionEntry->limSmeState)); - limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in SME_WT_DEAUTH_STATE. ")); + limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in " + "SME_WT_DEAUTH_STATE. ")); break; case eLIM_SME_WT_DISASSOC_STATE: @@ -2527,11 +2543,14 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) * It will send a disassoc, which is ok. However, we can use the global flag * sendDisassoc to not send disassoc frame. */ - limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in SME_WT_DISASSOC_STATE. ")); + limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in " + "SME_WT_DISASSOC_STATE. ")); break; case eLIM_SME_JOIN_FAILURE_STATE: { /** Return Success as we are already in Disconnected State*/ + limLog(pMac, LOG1, FL("Rcvd SME_DISASSOC_REQ while in " + "eLIM_SME_JOIN_FAILURE_STATE. ")); if (pMac->lim.gLimRspReqd) { retCode = eSIR_SME_SUCCESS; disassocTrigger = eLIM_HOST_DISASSOC; @@ -2583,6 +2602,7 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if (smeDisassocReq.reasonCode == eLIM_LINK_MONITORING_DISASSOC) { /// Disassociation is triggered by Link Monitoring + limLog(pMac, LOG1, FL("**** Lost link with AP ****")); disassocTrigger = eLIM_LINK_MONITORING_DISASSOC; reasonCode = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON; } @@ -2594,6 +2614,7 @@ __limProcessSmeDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if (smeDisassocReq.doNotSendOverTheAir) { + limLog(pMac, LOG1, FL("do not send dissoc over the air")); sendDisassocFrame = 0; } // Trigger Disassociation frame to peer MAC entity @@ -2679,7 +2700,7 @@ __limProcessSmeDisassocCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) if (!limIsSmeDisassocCnfValid(pMac, &smeDisassocCnf, psessionEntry)) { - limLog(pMac, LOGW, FL("received invalid SME_DISASSOC_CNF message")); + limLog(pMac, LOGE, FL("received invalid SME_DISASSOC_CNF message")); return; } @@ -2728,8 +2749,9 @@ __limProcessSmeDisassocCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) pStaDs = dphLookupHashEntry(pMac, smeDisassocCnf.peerMacAddr, &aid, &psessionEntry->dph.dphHashTable); if (pStaDs == NULL) { - PELOGW(limLog(pMac, LOGW, FL("received DISASSOC_CNF for a STA that does not have context, addr= ")); - limPrintMacAddr(pMac, smeDisassocCnf.peerMacAddr, LOGW);) + PELOGE(limLog(pMac, LOGE, FL("received DISASSOC_CNF for a STA that " + "does not have context, addr= "MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(smeDisassocCnf.peerMacAddr));) return; } /* Delete FT session if there exists one */ @@ -2804,7 +2826,11 @@ __limProcessSmeDeauthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) return; } - + limLog(pMac, LOG1,FL("received DEAUTH_REQ message on sessionid %d " + "Systemrole %d with reasoncode %u in limSmestate %d from " + MAC_ADDRESS_STR), smesessionId, psessionEntry->limSystemRole, + smeDeauthReq.reasonCode, psessionEntry->limSmeState, + MAC_ADDR_ARRAY(smeDeauthReq.peerMacAddr)); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_REQ_EVENT, psessionEntry, 0, smeDeauthReq.reasonCode); #endif //FEATURE_WLAN_DIAG_SUPPORT @@ -2840,7 +2866,8 @@ __limProcessSmeDeauthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) * peer. Log error and send response to host. */ limLog(pMac, LOGE, - FL("received unexp SME_DEAUTH_REQ in state %X"),psessionEntry->limSmeState); + FL("received unexp SME_DEAUTH_REQ in state %X"), + psessionEntry->limSmeState); limPrintSmeState(pMac, LOGE, psessionEntry->limSmeState); if (pMac->lim.gLimRspReqd) @@ -2868,7 +2895,8 @@ __limProcessSmeDeauthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) default: limLog(pMac, LOGE, - FL("received unexpected SME_DEAUTH_REQ for role %X"),psessionEntry->limSystemRole); + FL("received unexpected SME_DEAUTH_REQ for role %X"), + psessionEntry->limSystemRole); return; } // end switch (pMac->lim.gLimSystemRole) diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 8b63ecf97801..dd1f82679a06 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -1464,6 +1464,7 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, tANI_BOOLEAN extractedExtCapFlag = eANI_BOOLEAN_FALSE; if(NULL == psessionEntry) { + limLog( pMac, LOGE, FL("psessionEntry is NULL")); return; } @@ -1623,7 +1624,8 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, if (wlan_cfgGetInt(pMac, WNI_CFG_ASSOC_RSP_ADDNIE_FLAG, &addnIEPresent) != eSIR_SUCCESS) { - limLog(pMac, LOGP, FL("Unable to get WNI_CFG_ASSOC_RSP_ADDNIE_FLAG")); + limLog(pMac, LOGP, FL("Unable to get " + "WNI_CFG_ASSOC_RSP_ADDNIE_FLAG")); return; } @@ -1633,7 +1635,8 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, if (wlan_cfgGetStrLen(pMac, WNI_CFG_ASSOC_RSP_ADDNIE_DATA, &addnIELen) != eSIR_SUCCESS) { - limLog(pMac, LOGP, FL("Unable to get WNI_CFG_ASSOC_RSP_ADDNIE_DATA length")); + limLog(pMac, LOGP, FL("Unable to get " + "WNI_CFG_ASSOC_RSP_ADDNIE_DATA length")); return; } @@ -1710,8 +1713,8 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac, nPayload, &nPayload ); if ( DOT11F_FAILED( nStatus ) ) { - limLog( pMac, LOGE, FL("Failed to pack an Association Response (0x%08x)."), - nStatus ); + limLog( pMac, LOGE, FL("Failed to pack an Association Response" + " (0x%08x)."), nStatus ); palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket ); return; // allocated! @@ -2259,19 +2262,14 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, if(NULL == psessionEntry) { - return; - } - - smeSessionId = psessionEntry->smeSessionId; - - if(NULL == psessionEntry->pLimJoinReq) - { + limLog(pMac, LOGE, FL("psessionEntry is NULL") ); return; } /* check this early to avoid unncessary operation */ if(NULL == psessionEntry->pLimJoinReq) { + limLog(pMac, LOGE, FL("psessionEntry->pLimJoinReq is NULL") ); return; } nAddIELen = psessionEntry->pLimJoinReq->addIEAssoc.length; @@ -2280,7 +2278,7 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, pFrm = vos_mem_malloc(sizeof(tDot11fAssocRequest)); if ( NULL == pFrm ) { - limLog(pMac, LOGE, FL("Unable to allocate memory in limSendAssocReqMgmtFrame") ); + limLog(pMac, LOGE, FL("Unable to allocate memory") ); return; } @@ -2440,7 +2438,8 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, if( (psessionEntry->pLimJoinReq != NULL) && (!psessionEntry->pLimJoinReq->bssDescription.aniIndicator)) { - limLog( pMac, LOG1, FL("Sending Assoc Req to Non-TQ AP, Turning off Greenfield")); + limLog( pMac, LOG1, FL("Sending Assoc Req to Non-TQ AP," + " Turning off Greenfield")); pFrm->HTCaps.greenField = WNI_CFG_GREENFIELD_CAPABILITY_DISABLE; } #endif @@ -2559,13 +2558,14 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, { limMergeExtCapIEStruct(&pFrm->ExtCap, &extractedExtCap); } - // That done, pack the Probe Request: + + // That done, pack the Assoc Request: nStatus = dot11fPackAssocRequest( pMac, pFrm, pFrame + sizeof(tSirMacMgmtHdr), nPayload, &nPayload ); if ( DOT11F_FAILED( nStatus ) ) { - limLog( pMac, LOGE, FL("Failed to pack a Probe Response (0x%0" + limLog( pMac, LOGE, FL("Failed to pack a Assoc Request (0x%0" "8x)."), nStatus ); palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, @@ -2575,8 +2575,8 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, } else if ( DOT11F_WARNED( nStatus ) ) { - limLog( pMac, LOGW, FL("There were warnings while packing a P" - "robe Response (0x%08x)."), nStatus ); + limLog( pMac, LOGW, FL("There were warnings while packing a Assoc" + "Request (0x%08x)."), nStatus ); } PELOG1(limLog( pMac, LOG1, FL("*** Sending Association Request length %d" @@ -2601,7 +2601,8 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, psessionEntry->assocReq = vos_mem_malloc(nPayload); if ( NULL == psessionEntry->assocReq ) { - PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));) + PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store " + "assoc request"));) } else { @@ -3507,8 +3508,12 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac, return; } - smeSessionId = psessionEntry->smeSessionId; - + limLog(pMac, LOG1, + FL("Sending Auth seq# %d status %d (%d) to "MAC_ADDRESS_STR), + pAuthFrameBody->authTransactionSeqNumber, + pAuthFrameBody->authStatusCode, + (pAuthFrameBody->authStatusCode == eSIR_MAC_SUCCESS_STATUS), + MAC_ADDR_ARRAY(peerMacAddr)); if (wepBit == LIM_WEP_IN_FC) { /// Auth frame3 to be sent with encrypted framebody @@ -3551,7 +3556,8 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac, } else { - limLog(pMac, LOG3, FL("Auth frame, Does not contain FTIES!!!")); + limLog(pMac, LOG3, FL("Auth frame, Does not contain " + "FTIES!!!")); frameLen += (2+SIR_MDIE_SIZE); } } @@ -3642,6 +3648,8 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac, if (limPopulateMacHeader(pMac, pFrame, SIR_MAC_MGMT_FRAME, SIR_MAC_MGMT_AUTH, peerMacAddr,psessionEntry->selfMacAddr) != eSIR_SUCCESS) { + limLog(pMac, LOGE, FL("call to limPopulateMacHeader failed for " + "AUTH frame")); palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket ); return; } @@ -3665,11 +3673,11 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac, vos_mem_copy(pBody, (tANI_U8 *) pAuthFrameBody, bodyLen); PELOG1(limLog(pMac, LOG1, - FL("*** Sending Auth seq# 3 status %d (%d) to"), + FL("*** Sending Auth seq# 3 status %d (%d) to"MAC_ADDRESS_STR), pAuthFrameBody->authStatusCode, - (pAuthFrameBody->authStatusCode == eSIR_MAC_SUCCESS_STATUS)); + (pAuthFrameBody->authStatusCode == eSIR_MAC_SUCCESS_STATUS), + MAC_ADDR_ARRAY(pMacHdr->da));) - limPrintMacAddr(pMac, pMacHdr->da, LOG1);) } else { @@ -3728,12 +3736,11 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac, #endif PELOG1(limLog(pMac, LOG1, - FL("*** Sending Auth seq# %d status %d (%d) to "), + FL("*** Sending Auth seq# %d status %d (%d) to "MAC_ADDRESS_STR), pAuthFrameBody->authTransactionSeqNumber, pAuthFrameBody->authStatusCode, - (pAuthFrameBody->authStatusCode == eSIR_MAC_SUCCESS_STATUS)); - - limPrintMacAddr(pMac, pMacHdr->da, LOG1);) + (pAuthFrameBody->authStatusCode == eSIR_MAC_SUCCESS_STATUS), + MAC_ADDR_ARRAY(pMacHdr->da));) } PELOG2(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG2, pFrame, frameLen);) @@ -4065,9 +4072,11 @@ limSendDisassocMgmtFrame(tpAniSirGlobal pMac, "isassociation (0x%08x)."), nStatus ); } - PELOG1(limLog( pMac, LOG1, FL("*** Sending Disassociation frame with rea" - "son %d to"), nReason ); - limPrintMacAddr( pMac, pMacHdr->da, LOG1 );) + limLog( pMac, LOG1, FL("***Sessionid %d Sending Disassociation frame with " + "reason %u and waitForAck %d to "MAC_ADDRESS_STR" ,From " + MAC_ADDRESS_STR), psessionEntry->peSessionId, nReason, waitForAck, + MAC_ADDR_ARRAY(pMacHdr->da), + MAC_ADDR_ARRAY(psessionEntry->selfMacAddr)); if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel)) || ( psessionEntry->pePersona == VOS_P2P_CLIENT_MODE ) || @@ -4247,10 +4256,11 @@ limSendDeauthMgmtFrame(tpAniSirGlobal pMac, limLog( pMac, LOGW, FL("There were warnings while packing a D" "e-Authentication (0x%08x)."), nStatus ); } - - PELOG1(limLog( pMac, LOG1, FL("*** Sending De-Authentication frame with rea" - "son %d to"), nReason ); - limPrintMacAddr( pMac, pMacHdr->da, LOG1 );) + limLog( pMac, LOG1, FL("***Sessionid %d Sending Deauth frame with " + "reason %u and waitForAck %d to "MAC_ADDRESS_STR" ,From " + MAC_ADDRESS_STR), psessionEntry->peSessionId, nReason, waitForAck, + MAC_ADDR_ARRAY(pMacHdr->da), + MAC_ADDR_ARRAY(psessionEntry->selfMacAddr)); if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel)) || ( psessionEntry->pePersona == VOS_P2P_CLIENT_MODE ) || diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c index 579b9eff0a4f..803b7c19d296 100644 --- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c +++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c @@ -1306,7 +1306,9 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac, return; } - + limLog(pMac, LOG1, FL("send eWNI_SME_DEAUTH_RSP with " + "retCode: %d for "MAC_ADDRESS_STR),reasonCode, + MAC_ADDR_ARRAY(peerMacAddr)); pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP; pSirSmeDisassocRsp->length = sizeof(tSirSmeDisassocRsp); //sessionId @@ -1354,7 +1356,9 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac, return; } - + limLog(pMac, LOG1, FL("send eWNI_SME_DISASSOC_IND with " + "retCode: %d for "MAC_ADDRESS_STR),reasonCode, + MAC_ADDR_ARRAY(peerMacAddr)); pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND; pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd); @@ -1751,7 +1755,9 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode return; } - + limLog(pMac, LOG1, FL("send eWNI_SME_DEAUTH_RSP with " + "retCode: %d for"MAC_ADDRESS_STR),reasonCode, + MAC_ADDR_ARRAY(peerMacAddr)); pSirSmeDeauthRsp->messageType = eWNI_SME_DEAUTH_RSP; pSirSmeDeauthRsp->length = sizeof(tSirSmeDeauthRsp); pSirSmeDeauthRsp->statusCode = reasonCode; @@ -1784,7 +1790,9 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode return; } - + limLog(pMac, LOG1, FL("send eWNI_SME_DEAUTH_IND with " + "retCode: %d for "MAC_ADDRESS_STR),reasonCode, + MAC_ADDR_ARRAY(peerMacAddr)); pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND; pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd); pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON; diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c index 34db4563b0b7..e7e4c0b54e74 100644 --- a/CORE/MAC/src/pe/lim/limSerDesUtils.c +++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c @@ -862,7 +862,7 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) if (!pJoinReq || !pBuf) { - PELOGE(limLog(pMac, LOGE, FL("NULL ptr received"));) + PELOGE(limLog(pMac, LOGE, FL("pJoinReq or pBuf is NULL"));) return eSIR_FAILURE; } @@ -877,32 +877,40 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) if (pJoinReq->messageType == eWNI_SME_JOIN_REQ) PELOG1(limLog(pMac, LOG3, FL("SME_JOIN_REQ length %d bytes is:"), len);) else - PELOG1(limLog(pMac, LOG3, FL("SME_REASSOC_REQ length %d bytes is:"), len);) + PELOG1(limLog(pMac, LOG3, FL("SME_REASSOC_REQ length %d bytes is:"), + len);) PELOG1(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, pTemp, len);) if (len < (tANI_S16) sizeof(tANI_U32)) { - PELOGE(limLog(pMac, LOGE, FL("len too short %d"), len);) + PELOGE(limLog(pMac, LOGE, FL("len %d is too short"), len);) return eSIR_FAILURE; } len -= sizeof(tANI_U32); // skip message header if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; - + } // Extract sessionId pJoinReq->sessionId = *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; - + } // Extract transactionId pJoinReq->transactionId = limGetU16(pBuf); pBuf += sizeof(tANI_U16); len -= sizeof(tANI_U16); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract ssId pJoinReq->ssId.length = *pBuf++; @@ -911,45 +919,66 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->ssId.length; len -= pJoinReq->ssId.length; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract selfMacAddr vos_mem_copy( pJoinReq->selfMacAddr, pBuf, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); len -= sizeof(tSirMacAddr); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract bsstype pJoinReq->bsstype = (tSirBssType) limGetU32(pBuf); pBuf += sizeof(tANI_U32); len -= sizeof(tANI_U32); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract dot11mode pJoinReq->dot11mode= *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract bssPersona pJoinReq->staPersona = *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract cbMode pJoinReq->cbMode = *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract uapsdPerAcBitmask pJoinReq->uapsdPerAcBitmask = *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // Extract operationalRateSet @@ -962,7 +991,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->operationalRateSet.numRates; len -= pJoinReq->operationalRateSet.numRates; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } // Extract extendedRateSet @@ -974,7 +1006,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->extendedRateSet.numRates; len -= pJoinReq->extendedRateSet.numRates; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } // Extract RSN IE @@ -998,7 +1033,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->rsnIE.length; len -= pJoinReq->rsnIE.length; // skip RSN IE if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } #ifdef FEATURE_WLAN_ESE @@ -1022,7 +1060,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->cckmIE.length; len -= pJoinReq->cckmIE.length; // skip CCKM IE if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } #endif @@ -1047,7 +1088,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->addIEScan.length; len -= pJoinReq->addIEScan.length; // skip add IE if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } pJoinReq->addIEAssoc.length = limGetU16(pBuf); @@ -1071,27 +1115,38 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += pJoinReq->addIEAssoc.length; len -= pJoinReq->addIEAssoc.length; // skip add IE if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } } pJoinReq->UCEncryptionType = limGetU32(pBuf); pBuf += sizeof(tANI_U32); len -= sizeof(tANI_U32); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } pJoinReq->MCEncryptionType = limGetU32(pBuf); pBuf += sizeof(tANI_U32); len -= sizeof(tANI_U32); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; - + } #ifdef WLAN_FEATURE_11W pJoinReq->MgmtEncryptionType = limGetU32(pBuf); pBuf += sizeof(tANI_U32); len -= sizeof(tANI_U32); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } #endif #ifdef WLAN_FEATURE_VOWIFI_11R @@ -1100,7 +1155,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += sizeof(tAniBool); len -= sizeof(tAniBool); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } #endif #ifdef FEATURE_WLAN_ESE @@ -1109,14 +1167,20 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += sizeof(tAniBool); len -= sizeof(tAniBool); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } //isESEconnection; pJoinReq->isESEconnection = (tAniBool)limGetU32(pBuf); pBuf += sizeof(tAniBool); len -= sizeof(tAniBool); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // TSPEC information pJoinReq->eseTspecInfo.numTspecs = *pBuf++; @@ -1126,7 +1190,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += sizeof(tTspecInfo)*SIR_ESE_MAX_TSPEC_IES; len -= sizeof(tTspecInfo)*SIR_ESE_MAX_TSPEC_IES; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } #endif #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR) @@ -1135,7 +1202,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += sizeof(tAniBool); len -= sizeof(tAniBool); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } #endif #ifdef FEATURE_WLAN_LFR @@ -1144,14 +1214,20 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pBuf += sizeof(tAniBool); len -= sizeof(tAniBool); if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } #endif //txLdpcIniFeatureEnabled pJoinReq->txLdpcIniFeatureEnabled= *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } //HT Config vos_mem_copy(&(pJoinReq->htConfig), pBuf, sizeof(tSirHTConfig)); @@ -1162,19 +1238,28 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pJoinReq->txBFIniFeatureEnabled= *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } //txBFCsnValue pJoinReq->txBFCsnValue= *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } //MuBformee pJoinReq->txMuBformee= *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } //enableVhtpAid pJoinReq->enableVhtpAid= *pBuf++; @@ -1228,7 +1313,6 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pJoinReq->powerCap.minTxPower = *pBuf++; pJoinReq->powerCap.maxTxPower = *pBuf++; len -=2; - limLog(pMac, LOG1, FL("Power Caps: Min power = %d, Max power = %d"), pJoinReq->powerCap.minTxPower, pJoinReq->powerCap.maxTxPower); pJoinReq->supportedChannels.numChnl = *pBuf++; len--; @@ -1247,7 +1331,10 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) pJoinReq->uapsdPerAcBitmask = *pBuf++; len--; if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE) + { + limLog(pMac, LOGE, FL("remaining len %d is too short"), len); return eSIR_FAILURE; + } // // NOTE - tSirBssDescription is now moved to the end @@ -1260,7 +1347,9 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf) PELOGE(limLog(pMac, LOGE, FL("get bss description failed"));) return eSIR_FAILURE; } - PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, (tANI_U8 *) &(pJoinReq->bssDescription), pJoinReq->bssDescription.length + 2);) + PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, + (tANI_U8 *) &(pJoinReq->bssDescription), + pJoinReq->bssDescription.length + 2);) pBuf += lenUsed; len -= lenUsed; diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c index b0457a0a89ef..b8cbb9e42242 100644 --- a/CORE/MAC/src/pe/rrm/rrmApi.c +++ b/CORE/MAC/src/pe/rrm/rrmApi.c @@ -117,7 +117,11 @@ rrmGetMgmtTxPower ( tpAniSirGlobal pMac, tpPESession pSessionEntry ) PELOGE(limLog( pMac, LOGE, "RrmGetMgmtTxPower called" );) #endif if( pSessionEntry == NULL ) + { + limLog( pMac, LOG3, "%s: txpower from rrmPEContext: %d", + __func__, pMac->rrm.rrmPEContext.txMgmtPower); return pMac->rrm.rrmPEContext.txMgmtPower; + } return pSessionEntry->txMgmtPower; } diff --git a/CORE/SERVICES/COMMON/wlan_module_ids.h b/CORE/SERVICES/COMMON/wlan_module_ids.h index 069441d39b41..1d59c19abf09 100644 --- a/CORE/SERVICES/COMMON/wlan_module_ids.h +++ b/CORE/SERVICES/COMMON/wlan_module_ids.h @@ -77,6 +77,7 @@ typedef enum { WLAN_MODULE_THERMAL_MGR, WLAN_MODULE_PHYERR_DFS, WLAN_MODULE_RMC, + WLAN_MODULE_NAN, WLAN_MODULE_ID_MAX, WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX, } WLAN_MODULE_ID; diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index f95c0ad0e5ff..9d571a0ca243 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -2637,6 +2637,15 @@ typedef struct { #define WMI_VDEV_TYPE_IBSS 0x3 #define WMI_VDEV_TYPE_MONITOR 0x4 +/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed +* by FW to execute the NAN specific WMI commands and also implement NAN specific +* operations like Network discovery, service provisioning and service +* subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create +* WMI command to create this VDEV once during initialization and host is not +* expected to use any VDEV specific WMI commands on this VDEV. +**/ +#define WMI_VDEV_TYPE_NAN 0x5 + /** values for vdev_subtype */ #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2 diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index decb79f1356a..c02750b48599 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 37 +#define __WMI_REVISION_ 38 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SME/src/ccm/ccmApi.c b/CORE/SME/src/ccm/ccmApi.c index f79ef2ab02fa..bef54fc92031 100644 --- a/CORE/SME/src/ccm/ccmApi.c +++ b/CORE/SME/src/ccm/ccmApi.c @@ -127,7 +127,7 @@ static eHalStatus sendCfg(tpAniSirGlobal pMac, tHddHandle hHdd, tCfgReq *req, tA status = palSendMBMessage(hHdd, msg) ; if (status != eHAL_STATUS_SUCCESS) { - smsLog( pMac, LOGW, FL("palSendMBMessage() failed")); + smsLog( pMac, LOGE, FL("palSendMBMessage() failed")); //No need to free msg. palSendMBMessage frees it. status = eHAL_STATUS_FAILURE ; } @@ -229,7 +229,7 @@ static void sendQueuedReqToMacSw(tpAniSirGlobal pMac, tHddHandle hHdd) req->state = eCCM_REQ_SENT; if (sendCfg(pMac, hHdd, req, eANI_BOOLEAN_TRUE) != eHAL_STATUS_SUCCESS) { - smsLog( pMac, LOGW, FL("sendCfg() failed")); + smsLog( pMac, LOGE, FL("sendCfg() failed")); palSpinLockTake(hHdd, pMac->ccm.lock); del_req(req, &pMac->ccm.reqQ) ; palSpinLockGive(hHdd, pMac->ccm.lock); @@ -308,7 +308,7 @@ static eHalStatus cfgSetSub(tpAniSirGlobal pMac, tHddHandle hHdd, tANI_U32 cfgId status = sendCfg(pMac, hHdd, req, eANI_BOOLEAN_TRUE) ; if (status != eHAL_STATUS_SUCCESS) { - smsLog( pMac, LOGW, FL("sendCfg() failed")); + smsLog( pMac, LOGE, FL("sendCfg() failed")); palSpinLockTake(hHdd, pMac->ccm.lock); del_req(req, &pMac->ccm.reqQ); palSpinLockGive(hHdd, pMac->ccm.lock); diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 3997d66eba85..680af17c8f1a 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -368,10 +368,10 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode) v_U8_t cntryCodeLength; if(NULL == apCntryCode) { - smsLog( pMac, LOGW, FL(" Invalid country Code Pointer") ); + smsLog( pMac, LOGE, FL(" Invalid country Code Pointer") ); return eHAL_STATUS_FAILURE; } - smsLog( pMac, LOGW, FL(" country Code %.2s"), apCntryCode ); + smsLog( pMac, LOG1, FL(" country Code %.2s"), apCntryCode ); /* To get correct Regulatory domain from NV table * 2 character Country code should be used * 3rd charater is optional for indoor/outdoor setting */ @@ -2856,7 +2856,8 @@ eHalStatus csrRoamIssueDeauth( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoam status = csrSendMBDeauthReqMsg( pMac, sessionId, bssId, eSIR_MAC_DEAUTH_LEAVING_BSS_REASON ); if(!HAL_STATUS_SUCCESS(status)) { - smsLog(pMac, LOGW, FL("csrSendMBDeauthReqMsg failed with status %d"), status); + smsLog(pMac, LOGE, FL("csrSendMBDeauthReqMsg failed with status %d Session ID: %d" + MAC_ADDRESS_STR ), status, sessionId, MAC_ADDR_ARRAY(bssId)); } return (status); @@ -4108,7 +4109,8 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, if(!HAL_STATUS_SUCCESS(csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISASSOC_REQ, FALSE ))) { - smsLog(pMac, LOGW, FL(" fail to issue disassociate")); + smsLog(pMac, LOGE, FL(" fail to issue disassociate with Session ID %d"), + sessionId); eRoamState = eCsrStopRoaming; } } @@ -5574,7 +5576,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman pSirBssDesc = &pSmeStartBssRsp->bssDescription; if( !HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs( pMac, pSirBssDesc, &pIes )) ) { - smsLog(pMac, LOG2, FL("cannot parse IBSS IEs")); + smsLog(pMac, LOGW, FL("cannot parse IBSS IEs")); roamInfo.pBssDesc = pSirBssDesc; //We need to associate_complete it first, becasue Associate_start already indicated. csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, @@ -7582,7 +7584,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res tCsrRoamSession *pSession; if(NULL == pEntry) { - smsLog(pMac, LOGW, " CFG_CNF with active list empty"); + smsLog(pMac, LOGE, " CFG_CNF with active list empty"); return; } pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link); @@ -7631,7 +7633,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res &pSession->bssParams, &pCommand->u.roamCmd.roamProfile, pBssDesc, pCommand->u.roamCmd.roamId ))) { - smsLog(pMac, LOGW, " CSR start BSS failed"); + smsLog(pMac, LOGE, " CSR start BSS failed"); //We need to complete the command csrRoamComplete(pMac, eCsrStartBssFailure, NULL); } @@ -7640,7 +7642,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res { if (!pCommand->u.roamCmd.pRoamBssEntry) { - smsLog(pMac, LOGW, " pRoamBssEntry is NULL"); + smsLog(pMac, LOGE, " pRoamBssEntry is NULL"); //We need to complete the command csrRoamComplete(pMac, eCsrJoinFailure, NULL); return; @@ -8870,7 +8872,7 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile } else { - smsLog(pMac, LOGW, FL("Channel list empty")); + smsLog(pMac, LOGE, FL("Channel list empty")); status = eHAL_STATUS_FAILURE; break; } @@ -11786,7 +11788,7 @@ static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCs if(Channel == 0) { - smsLog(pMac, LOGW, " CSR cannot find a channel to start IBSS"); + smsLog(pMac, LOGE, " CSR cannot find a channel to start IBSS"); } else { @@ -14771,7 +14773,7 @@ eHalStatus csrSendMBStatsReqMsg( tpAniSirGlobal pMac, tANI_U32 statsMask, pMsg = vos_mem_malloc(sizeof(tAniGetPEStatsReq)); if ( NULL == pMsg ) { - smsLog(pMac, LOG1, " csrSendMBStatsReqMsg: failed to allocate mem for stats req "); + smsLog(pMac, LOGE, FL( "Failed to allocate mem for stats req ")); return eHAL_STATUS_FAILURE; } // need to initiate a stats request to PE @@ -14783,7 +14785,7 @@ eHalStatus csrSendMBStatsReqMsg( tpAniSirGlobal pMac, tANI_U32 statsMask, status = palSendMBMessage(pMac->hHdd, pMsg ); if(!HAL_STATUS_SUCCESS(status)) { - smsLog(pMac, LOG1, " csrSendMBStatsReqMsg: failed to send down the stats req "); + smsLog(pMac, LOG1, FL("Failed to send down the stats req ")); } return status; } @@ -15292,7 +15294,7 @@ eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac, pMsg = vos_mem_malloc(sizeof(tAniGetRssiReq)); if ( NULL == pMsg ) { - smsLog(pMac, LOGE, " csrGetRoamRssi: failed to allocate mem for req"); + smsLog(pMac, LOGE, FL("Failed to allocate mem for req")); return eHAL_STATUS_FAILURE; } // need to initiate a stats request to PE @@ -15305,7 +15307,7 @@ eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac, status = palSendMBMessage(pMac->hHdd, pMsg ); if(!HAL_STATUS_SUCCESS(status)) { - smsLog(pMac, LOG1, " csrGetRoamRssi: failed to send down the rssi req"); + smsLog(pMac, LOGE, FL(" Failed to send down get rssi req")); //pMsg is freed by palSendMBMessage status = eHAL_STATUS_FAILURE; } @@ -16237,7 +16239,7 @@ void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInf if(!pEntry) { //list empty - smsLog(pMac, LOGW, "csrRoamRemoveEntryFromPeStatsReqList: List empty, no stats req for PE"); + smsLog(pMac, LOGE, FL(" List empty, no stats req for PE")); return; } while( pEntry ) @@ -16245,7 +16247,7 @@ void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInf pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrPeStatsReqInfo, link ); if( pTempStaEntry && pTempStaEntry->statsMask == pPeStaEntry->statsMask) { - smsLog(pMac, LOGW, "csrRoamRemoveEntryFromPeStatsReqList: match found"); + smsLog(pMac, LOGW, FL("Match found")); if(pTempStaEntry->timerRunning) { vosStatus = vos_timer_stop( &pTempStaEntry->hPeStatsTimer ); @@ -16323,12 +16325,12 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask, tANI_U8 counter = 0; if(!callback) { - smsLog(pMac, LOGE, FL("csrRoamReportStatistics:cannot report callback NULL")); + smsLog(pMac, LOGE, FL("Cannot report callback NULL")); return; } if(!statsMask) { - smsLog(pMac, LOGE, FL("csrRoamReportStatistics:cannot report statsMask is 0")); + smsLog(pMac, LOGE, FL("Cannot report statsMask is 0")); return; } pStats = stats; @@ -16341,43 +16343,43 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask, switch(counter) { case eCsrSummaryStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:summary stats")); + smsLog( pMac, LOG2, FL("Summary stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.summaryStatsInfo, sizeof(tCsrSummaryStatsInfo)); pStats += sizeof(tCsrSummaryStatsInfo); break; case eCsrGlobalClassAStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassA stats")); + smsLog( pMac, LOG2, FL("ClassA stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.classAStatsInfo, sizeof(tCsrGlobalClassAStatsInfo)); pStats += sizeof(tCsrGlobalClassAStatsInfo); break; case eCsrGlobalClassBStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassB stats")); + smsLog( pMac, LOG2, FL("ClassB stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.classBStatsInfo, sizeof(tCsrGlobalClassBStatsInfo)); pStats += sizeof(tCsrGlobalClassBStatsInfo); break; case eCsrGlobalClassCStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassC stats")); + smsLog( pMac, LOG2, FL("ClassC stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.classCStatsInfo, sizeof(tCsrGlobalClassCStatsInfo)); pStats += sizeof(tCsrGlobalClassCStatsInfo); break; case eCsrGlobalClassDStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassD stats")); + smsLog( pMac, LOG2, FL("ClassD stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.classDStatsInfo, sizeof(tCsrGlobalClassDStatsInfo)); pStats += sizeof(tCsrGlobalClassDStatsInfo); break; case eCsrPerStaStats: - smsLog( pMac, LOG2, FL("csrRoamReportStatistics:PerSta stats")); + smsLog( pMac, LOG2, FL("PerSta stats")); vos_mem_copy( pStats, (tANI_U8 *)&pMac->roam.perStaStatsInfo[staId], sizeof(tCsrPerStaStatsInfo)); pStats += sizeof(tCsrPerStaStatsInfo); break; default: - smsLog( pMac, LOG1, FL("csrRoamReportStatistics:unknown stats type")); + smsLog( pMac, LOGE, FL("Unknown stats type and counter %d"), counter); break; } } @@ -17042,16 +17044,14 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth tCsrRoamInfo roamInfo; #endif -#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - smsLog( pMac, LOG1, FL("Preauth response status code 0x%x"), pFTPreAuthRsp->status); -#endif #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING status = csrNeighborRoamPreauthRspHandler(pMac, pFTPreAuthRsp->status); if (status != eHAL_STATUS_SUCCESS) { /* * Bail out if pre-auth was not even processed. */ - smsLog(pMac, LOGW, FL("Preauth was not processed: %d"), status); + smsLog(pMac, LOGE,FL("Preauth was not processed: %d SessionID: %d"), + status, pFTPreAuthRsp->smeSessionId); return; } #endif diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 9dbe0855cf66..7652eed2714c 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -2493,7 +2493,7 @@ eHalStatus csrScanFilter11dResult(tpAniSirGlobal pMac) if (!HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, pMac->roam.validChannelList, &len))) { - smsLog( pMac, LOG1, "Failed to get Channel list from CFG"); + smsLog( pMac, LOGE, "Failed to get Channel list from CFG"); } pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_LOCK ); diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index 79367a7326d3..f688d8ff75b5 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -358,7 +358,7 @@ VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_ if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { //err msg - smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus); + smsLog(pMac, LOGE, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus); vosStatus = VOS_STATUS_E_FAILURE; } #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD @@ -492,7 +492,7 @@ VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac, v_U8_t nei if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { //err msg - smsLog(pMac, LOGW, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus); + smsLog(pMac, LOGE, FL(" Couldn't register csrNeighborRoamNeighborLookupDOWNCallback with TL: Status = %d"), vosStatus); vosStatus = VOS_STATUS_E_FAILURE; } #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD @@ -1262,7 +1262,7 @@ static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac) if (NULL == pNeighborBssNode) { - smsLog(pMac, LOG1, FL("Roamable AP list is empty.. ")); + smsLog(pMac, LOGW, FL("Roamable AP list is empty.. ")); return eHAL_STATUS_FAILURE; } else @@ -2001,7 +2001,6 @@ static VOS_STATUS csrNeighborRoamHandleEmptyScanResult(tpAniSirGlobal pMac) /* Stop neighbor scan timer */ vos_timer_stop(&pNeighborRoamInfo->neighborScanTimer); - /* * Increase the neighbor lookup threshold by 3 dB * after every scan cycle. NOTE: uEmptyScanCount diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index cd3db8cf1e6e..00cdecf968e3 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -3113,7 +3113,7 @@ eHalStatus csrValidateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId, break; default : - smsLog(pMac, LOG1, FL(" Persona not supported : %d"),currBssPersona); + smsLog(pMac, LOGE, FL(" Persona not supported : %d"),currBssPersona); return eHAL_STATUS_FAILURE; } } @@ -6154,7 +6154,7 @@ v_CountryInfoSource_t source } else { - smsLog(pMac, LOGE, FL(" doesn't match country %c%c, status %d"), pCountry[0], pCountry[1], vosStatus); + smsLog(pMac, LOGW, FL(" Couldn't find domain for country code %c%c"), pCountry[0], pCountry[1]); status = eHAL_STATUS_INVALID_PARAMETER; } } diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c index 44f300a0796e..14b630e8836a 100644 --- a/CORE/SME/src/p2p/p2p_Api.c +++ b/CORE/SME/src/p2p/p2p_Api.c @@ -1616,7 +1616,7 @@ eHalStatus P2P_ListenStateDiscoverable(tHalHandle hHal, tANI_U8 sessionId, pMac->p2pContext[sessionId].listenDuration = P2P_LISTEN_TIMEOUT_HIGH; if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED) { - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with diration %d on channel %d", + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d", __func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel); p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel, pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback, @@ -1648,7 +1648,7 @@ eHalStatus P2P_ListenStateDiscoverable(tHalHandle hHal, tANI_U8 sessionId, if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED) { - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with diration %d on channel %d", + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d", __func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel); p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel, pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback, diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index f7dae7ff3ff4..b05afd705ab9 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -4491,7 +4491,7 @@ eHalStatus sme_RequestStandby ( MTRACE(macTraceNew(pMac, VOS_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_REQUEST_STANDBY, NO_SESSION, 0)); - smsLog( pMac, LOG1, FL("") ); + smsLog( pMac, LOG1, FL(" called") ); status = sme_AcquireGlobalLock( &pMac->sme ); if ( HAL_STATUS_SUCCESS( status ) ) { diff --git a/CORE/VOSS/src/vos_trace.c b/CORE/VOSS/src/vos_trace.c index ea81ece70c25..6827aaca9ab7 100644 --- a/CORE/VOSS/src/vos_trace.c +++ b/CORE/VOSS/src/vos_trace.c @@ -59,6 +59,7 @@ Include Files ------------------------------------------------------------------------*/ #include <vos_trace.h> +#include <aniGlobal.h> /*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ @@ -239,10 +240,10 @@ void kmsgwconnBuffWrite(const char *wconnlogstrRead) const char *pwconnlogstr = wconnlogstrRead; static const char num[16] = {'0','1','2','3','4','5','6','7','8','9','A', 'B','C','D','E','F'}; - unsigned int timetick; + v_TIME_t timetick; int bits; /*timetick for now returns 32 bit number*/ - timetick = ( jiffies_to_msecs(jiffies) / 10 ); + timetick = vos_timer_get_system_time(); bits = sizeof(timetick) * 8/*number of bits in a byte*/; kmsgwconnstrlogchar('['); diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h index 8d8c00b670ff..7f0b3331432e 100644 --- a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h +++ b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h @@ -437,10 +437,8 @@ typedef enum /* WLAN FW LPHB config request */ WDI_LPHB_CFG_REQ = 85, -#ifdef FEATURE_WLAN_BATCH_SCAN /* WLAN FW set batch scan request */ WDI_SET_BATCH_SCAN_REQ = 86, -#endif /*WLAN DAL Set Max Tx Power Per band Request*/ WDI_SET_MAX_TX_POWER_PER_BAND_REQ = 87, @@ -471,12 +469,10 @@ typedef enum /* Send Rate Update Indication */ WDI_RATE_UPDATE_IND, -#ifdef FEATURE_WLAN_BATCH_SCAN /*Send stop batch scan indication to FW*/ WDI_STOP_BATCH_SCAN_IND, /*Send stop batch scan indication to FW*/ WDI_TRIGGER_BATCH_SCAN_RESULT_IND, -#endif /*Keep adding the indications to the max request such that we keep them sepparate */ @@ -739,9 +735,7 @@ typedef enum /* WLAN FW LPHB Config response */ WDI_LPHB_CFG_RESP = 84, -#ifdef FEATURE_WLAN_BATCH_SCAN - WDI_SET_BATCH_SCAN_RESP = 85, -#endif + WDI_SET_BATCH_SCAN_RESP = 85, WDI_SET_MAX_TX_POWER_PER_BAND_RSP = 86, @@ -804,9 +798,7 @@ typedef enum /* Periodic Tx Pattern Indication from FW to Host */ WDI_HAL_PERIODIC_TX_PTRN_FW_IND = WDI_HAL_IND_MIN + 16, -#ifdef FEATURE_WLAN_BATCH_SCAN WDI_BATCHSCAN_RESULT_IND = WDI_HAL_IND_MIN + 17, -#endif WDI_MAX_RESP }WDI_ResponseEnumType; |
