qcacld-3.0: Replace lim_log() with pe_* log levels in lim_process_disassoc_frame.c

Replace lim_log() with pe_* appropriate log levels in lim_process_disassoc_frame.c

Change-Id: I51c4c4f4d41277e125ce77ed6c02bf7c49cc8da4
CRs-Fixed: 1093093
This commit is contained in:
Nishank Aggarwal
2017-03-23 14:34:34 +05:30
committed by snandini
parent e6aa210ead
commit fb8ddce67b

View File

@@ -91,22 +91,19 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
if (lim_is_group_addr(pHdr->sa)) { if (lim_is_group_addr(pHdr->sa)) {
/* Received Disassoc frame from a BC/MC address */ /* Received Disassoc frame from a BC/MC address */
/* Log error and ignore it */ /* Log error and ignore it */
lim_log(pMac, LOGE, pe_err("received Disassoc frame from a BC/MC address");
FL("received Disassoc frame from a BC/MC address"));
return; return;
} }
if (lim_is_group_addr(pHdr->da) && !lim_is_addr_bc(pHdr->da)) { if (lim_is_group_addr(pHdr->da) && !lim_is_addr_bc(pHdr->da)) {
/* Received Disassoc frame for a MC address */ /* Received Disassoc frame for a MC address */
/* Log error and ignore it */ /* Log error and ignore it */
lim_log(pMac, LOGE, pe_err("received Disassoc frame for a MC address");
FL("received Disassoc frame for a MC address"));
return; return;
} }
if (!lim_validate_received_frame_a1_addr(pMac, if (!lim_validate_received_frame_a1_addr(pMac,
pHdr->da, psessionEntry)) { pHdr->da, psessionEntry)) {
lim_log(pMac, LOGE, pe_err("rx frame doesn't have valid a1 address, drop it");
FL("rx frame doesn't have valid a1 address, drop it"));
return; return;
} }
@@ -118,8 +115,7 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
* but ACK from this STA is lost, in this case 2nd * but ACK from this STA is lost, in this case 2nd
* disassoc frame is already in transmission queue * disassoc frame is already in transmission queue
*/ */
lim_log(pMac, LOGE, pe_err("AP is sending disassoc after ACK lost");
FL("AP is sending disassoc after ACK lost..."));
return; return;
} }
} }
@@ -128,16 +124,13 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
if (psessionEntry->limRmfEnabled if (psessionEntry->limRmfEnabled
&& (WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) & && (WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) &
DPU_FEEDBACK_UNPROTECTED_ERROR)) { DPU_FEEDBACK_UNPROTECTED_ERROR)) {
lim_log(pMac, LOGE, pe_err("received an unprotected disassoc from AP");
FL("received an unprotected disassoc from AP"));
/* /*
* When 11w offload is enabled then * When 11w offload is enabled then
* firmware should not fwd this frame * firmware should not fwd this frame
*/ */
if (LIM_IS_STA_ROLE(psessionEntry) && pMac->pmf_offload) { if (LIM_IS_STA_ROLE(psessionEntry) && pMac->pmf_offload) {
lim_log(pMac, LOGE, pe_err("11w offload is enable,unprotected disassoc is not expected");
FL("11w offload is enable,unprotected disassoc is not expected")
);
return; return;
} }
@@ -158,10 +151,9 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
/* Get reasonCode from Disassociation frame body */ /* Get reasonCode from Disassociation frame body */
reasonCode = sir_read_u16(pBody); reasonCode = sir_read_u16(pBody);
lim_log(pMac, LOG1, pe_err("Received Disassoc frame for Addr: " MAC_ADDRESS_STR
FL("Received Disassoc frame for Addr: " MAC_ADDRESS_STR
"(mlm state=%s, sme state=%d RSSI=%d)," "(mlm state=%s, sme state=%d RSSI=%d),"
"with reason code %d [%s] from " MAC_ADDRESS_STR), "with reason code %d [%s] from " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pHdr->da), MAC_ADDR_ARRAY(pHdr->da),
lim_mlm_state_str(psessionEntry->limMlmState), lim_mlm_state_str(psessionEntry->limMlmState),
psessionEntry->limSmeState, frame_rssi, reasonCode, psessionEntry->limSmeState, frame_rssi, reasonCode,
@@ -181,17 +173,14 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
* Disassociating STA is not associated. * Disassociating STA is not associated.
* Log error. * Log error.
*/ */
lim_log(pMac, LOGE, pe_err("received Disassoc frame from STA that does not have context"
FL("received Disassoc frame from STA that does not have context " "reasonCode=%d, addr " MAC_ADDRESS_STR,
"reasonCode=%d, addr " MAC_ADDRESS_STR),
reasonCode, MAC_ADDR_ARRAY(pHdr->sa)); reasonCode, MAC_ADDR_ARRAY(pHdr->sa));
return; return;
} }
if (lim_check_disassoc_deauth_ack_pending(pMac, (uint8_t *) pHdr->sa)) { if (lim_check_disassoc_deauth_ack_pending(pMac, (uint8_t *) pHdr->sa)) {
lim_log(pMac, LOGE, pe_err("Ignore the DisAssoc received, while waiting for ack of disassoc/deauth");
FL("Ignore the DisAssoc received, while waiting "
"for ack of disassoc/deauth"));
lim_clean_up_disassoc_deauth_req(pMac, (uint8_t *) pHdr->sa, 1); lim_clean_up_disassoc_deauth_req(pMac, (uint8_t *) pHdr->sa, 1);
return; return;
} }
@@ -204,17 +193,14 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
* drop/ignore the DisAssoc received * drop/ignore the DisAssoc received
*/ */
if (!IS_REASSOC_BSSID(pMac, pHdr->sa, psessionEntry)) { if (!IS_REASSOC_BSSID(pMac, pHdr->sa, psessionEntry)) {
lim_log(pMac, LOGE, pe_err("Ignore the DisAssoc received, while Processing ReAssoc with different/unknown AP");
FL("Ignore the DisAssoc received, while "
"Processing ReAssoc with different/unknown AP"));
return; return;
} }
/** If the Disassoc is received from the new AP to which we tried to ReAssociate /** If the Disassoc is received from the new AP to which we tried to ReAssociate
* Drop ReAssoc and Restore the Previous context( current connected AP). * Drop ReAssoc and Restore the Previous context( current connected AP).
*/ */
if (!IS_CURRENT_BSSID(pMac, pHdr->sa, psessionEntry)) { if (!IS_CURRENT_BSSID(pMac, pHdr->sa, psessionEntry)) {
lim_log(pMac, LOGW, pe_debug("received Disassoc from the New AP to which ReAssoc is sent");
FL("received Disassoc from the New AP to which ReAssoc is sent "));
lim_restore_pre_reassoc_state(pMac, lim_restore_pre_reassoc_state(pMac,
eSIR_SME_REASSOC_REFUSED, eSIR_SME_REASSOC_REFUSED,
reasonCode, reasonCode,
@@ -238,10 +224,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
default: default:
/* Invalid reasonCode in received Disassociation frame */ /* Invalid reasonCode in received Disassociation frame */
lim_log(pMac, LOGE, pe_warn("received Disassoc frame with invalid reasonCode: %d from " MAC_ADDRESS_STR,
FL("received Disassoc frame with invalid reasonCode " reasonCode, MAC_ADDR_ARRAY(pHdr->sa));
"%d from " MAC_ADDRESS_STR), reasonCode,
MAC_ADDR_ARRAY(pHdr->sa));
break; break;
} }
} else if (LIM_IS_STA_ROLE(psessionEntry) && } else if (LIM_IS_STA_ROLE(psessionEntry) &&
@@ -256,11 +240,7 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
/* as long as we're not about to channel switch */ /* as long as we're not about to channel switch */
if (psessionEntry->gLimChannelSwitch.state != if (psessionEntry->gLimChannelSwitch.state !=
eLIM_CHANNEL_SWITCH_IDLE) { eLIM_CHANNEL_SWITCH_IDLE) {
lim_log(pMac, LOGE, pe_err("Ignoring disassoc frame due to upcoming channel switch, from "MAC_ADDRESS_STR,
FL
("Ignoring disassoc frame due to upcoming "
"channel switch, from "
MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(pHdr->sa)); MAC_ADDR_ARRAY(pHdr->sa));
return; return;
} }
@@ -272,9 +252,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
} else { } else {
/* Received Disassociation frame in either IBSS */ /* Received Disassociation frame in either IBSS */
/* or un-known role. Log and ignore it */ /* or un-known role. Log and ignore it */
lim_log(pMac, LOG1, pe_err("received Disassoc frame with invalid reasonCode: %d in role:"
FL("received Disassoc frame with invalid reasonCode %d in role " "%d in sme state: %d from " MAC_ADDRESS_STR, reasonCode,
"%d in sme state %d from " MAC_ADDRESS_STR), reasonCode,
GET_LIM_SYSTEM_ROLE(psessionEntry), psessionEntry->limSmeState, GET_LIM_SYSTEM_ROLE(psessionEntry), psessionEntry->limSmeState,
MAC_ADDR_ARRAY(pHdr->sa)); MAC_ADDR_ARRAY(pHdr->sa));
@@ -287,9 +266,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
* Already in the process of deleting context for the peer * Already in the process of deleting context for the peer
* and received Disassociation frame. Log and Ignore. * and received Disassociation frame. Log and Ignore.
*/ */
lim_log(pMac, LOG1, pe_err("received Disassoc frame in state: %d from"
FL("received Disassoc frame in state %d from " MAC_ADDRESS_STR, pStaDs->mlmStaContext.mlmState,
MAC_ADDRESS_STR), pStaDs->mlmStaContext.mlmState,
MAC_ADDR_ARRAY(pHdr->sa)); MAC_ADDR_ARRAY(pHdr->sa));
return; return;
} }
@@ -316,9 +294,8 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
eLIM_MLM_WT_ASSOC_CNF_STATE) eLIM_MLM_WT_ASSOC_CNF_STATE)
pStaDs->mlmStaContext.updateContext = 1; pStaDs->mlmStaContext.updateContext = 1;
lim_log(pMac, LOG1, pe_err("received Disassoc frame from peer that is in state: %X, addr "MAC_ADDRESS_STR,
FL("received Disassoc frame from peer that is in state %X, addr " pStaDs->mlmStaContext.mlmState,
MAC_ADDRESS_STR), pStaDs->mlmStaContext.mlmState,
MAC_ADDR_ARRAY(pHdr->sa)); MAC_ADDR_ARRAY(pHdr->sa));
} /* if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */ } /* if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */
@@ -343,8 +320,7 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
* failure result code. By design, SME will then issue "Disassoc" * failure result code. By design, SME will then issue "Disassoc"
* and cleanup will happen at that time. * and cleanup will happen at that time.
*/ */
lim_log(pMac, LOGD, pe_debug("received Disassoc from AP while waiting for Reassoc Rsp");
FL("received Disassoc from AP while waiting for Reassoc Rsp"));
if (psessionEntry->limAssocResponseData) { if (psessionEntry->limAssocResponseData) {
qdf_mem_free(psessionEntry->limAssocResponseData); qdf_mem_free(psessionEntry->limAssocResponseData);