qcacld-3.0: Replace sch_log() with pe_* log levels in sch_api.c

Replace sch_log() with pe_* appropriate log levels in sch_api.c.

Change-Id: I1b9b4af2b22b37da22b3b615a64b0394839d26ff
CRs-Fixed: 2020798
This commit is contained in:
Srinivas Girigowda 2017-03-19 21:28:38 -07:00 • committed by Sandeep Puligilla
commit 6c3b6477ff

View file

@ -156,12 +156,10 @@ void sch_send_start_scan_rsp(tpAniSirGlobal pMac)
struct scheduler_msg msgQ;
uint32_t retCode;
PELOG1(sch_log(pMac, LOG1, FL("Sending LIM message to go into scan"));)
msgQ.type = SIR_SCH_START_SCAN_RSP;
retCode = lim_post_msg_api(pMac, &msgQ);
if (retCode != eSIR_SUCCESS)
sch_log(pMac, LOGE,
FL("Posting START_SCAN_RSP to LIM failed, reason=%X"),
pe_err("Posting START_SCAN_RSP to LIM failed, reason=%X",
retCode);
}
@ -197,8 +195,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
tpSendbeaconParams beaconParams = NULL;
tSirRetStatus retCode;
sch_log(pMac, LOG2,
FL("Indicating HAL to copy the beacon template [%d bytes] to memory"),
pe_debug("Indicating HAL to copy the beacon template [%d bytes] to memory",
size);
if (LIM_IS_AP_ROLE(psessionEntry) &&
@ -206,11 +203,9 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
retCode = lim_send_probe_rsp_template_to_hal(pMac,
psessionEntry,
&psessionEntry->DefProbeRspIeBitmap[0]);
if (eSIR_SUCCESS != retCode) {
sch_log(pMac, LOGE,
FL("FAILED to send probe response template with retCode %d"),
if (eSIR_SUCCESS != retCode)
pe_err("FAILED to send probe response template with retCode %d",
retCode);
}
}
beaconParams = qdf_mem_malloc(sizeof(tSendbeaconParams));
@ -236,7 +231,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
if ((pMac->sch.schObject.p2pIeOffset != 0) &&
(pMac->sch.schObject.p2pIeOffset <
psessionEntry->schBeaconOffsetBegin)) {
sch_log(pMac, LOGE, FL("Invalid p2pIeOffset:[%d]"),
pe_err("Invalid p2pIeOffset:[%d]",
pMac->sch.schObject.p2pIeOffset);
QDF_ASSERT(0);
qdf_mem_free(beaconParams);
@ -244,7 +239,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
}
beaconParams->p2pIeOffset = pMac->sch.schObject.p2pIeOffset;
#ifdef WLAN_SOFTAP_FW_BEACON_TX_PRNT_LOG
sch_log(pMac, LOGE, FL("TimIeOffset:[%d]"), beaconParams->TimIeOffset);
pe_err("TimIeOffset:[%d]", beaconParams->TimIeOffset);
#endif
beaconParams->beacon = beaconPayload;
@ -270,14 +265,11 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
retCode = wma_post_ctrl_msg(pMac, &msgQ);
if (eSIR_SUCCESS != retCode) {
sch_log(pMac, LOGE,
FL("Posting SEND_BEACON_REQ to HAL failed, reason=%X"),
if (eSIR_SUCCESS != retCode)
pe_err("Posting SEND_BEACON_REQ to HAL failed, reason=%X",
retCode);
} else {
sch_log(pMac, LOG2,
FL("Successfully posted WMA_SEND_BEACON_REQ to HAL"));
}
else
pe_debug("Successfully posted WMA_SEND_BEACON_REQ to HAL");
return retCode;
}
@ -302,7 +294,7 @@ static uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal pMac,
elem_len = ptr[1];
left -= 2;
if (elem_len > left) {
sch_log(pMac, LOGE, FL("Invalid IEs"));
pe_err("Invalid IEs");
return eSIR_FAILURE;
}
if ((elem_id == eid) &&
@ -359,8 +351,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
addIeWoP2pIe = qdf_mem_malloc(psessionEntry->addIeParams.
probeRespDataLen);
if (NULL == addIeWoP2pIe) {
sch_log(pMac, LOGE,
FL("FAILED to alloc memory when removing P2P IE"));
pe_err("FAILED to alloc memory when removing P2P IE");
return eSIR_MEM_ALLOC_FAILED;
}
@ -375,8 +366,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
/*need to check the data length */
addIE = qdf_mem_malloc(addnIELenWoP2pIe);
if (NULL == addIE) {
sch_log(pMac, LOGE,
FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 length"));
pe_err("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 length");
qdf_mem_free(addIeWoP2pIe);
return eSIR_MEM_ALLOC_FAILED;
}
@ -393,7 +383,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
status = lim_strip_extcap_update_struct(pMac, addIE,
&addn_ielen, &extracted_extcap);
if (eSIR_SUCCESS != status) {
sch_log(pMac, LOG1, FL("extcap not extracted"));
pe_debug("extcap not extracted");
} else {
extcap_present = true;
}
@ -420,14 +410,12 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
nStatus = dot11f_get_packed_probe_response_size(pMac,
&psessionEntry->probeRespFrame, &nPayload);
if (DOT11F_FAILED(nStatus)) {
sch_log(pMac, LOGE,
FL("Failed to calculate the packed size for a Probe Response (0x%08x)."),
pe_err("Failed to calculate the packed size for a Probe Response (0x%08x)",
nStatus);
/* We'll fall back on the worst case scenario: */
nPayload = sizeof(tDot11fProbeResponse);
} else if (DOT11F_WARNED(nStatus)) {
sch_log(pMac, LOGE,
FL("There were warnings while calculating the packed size for a Probe Response (0x%08x)."),
pe_err("There were warnings while calculating the packed size for a Probe Response (0x%08x)",
nStatus);
}
@ -453,15 +441,14 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
nPayload, &nPayload);
if (DOT11F_FAILED(nStatus)) {
sch_log(pMac, LOGE,
FL("Failed to pack a Probe Response (0x%08x)."),
pe_err("Failed to pack a Probe Response (0x%08x)",
nStatus);
qdf_mem_free(addIE);
return retCode; /* allocated! */
} else if (DOT11F_WARNED(nStatus)) {
sch_log(pMac, LOGE, FL("There were warnings while packing a P"
"robe Response (0x%08x)."), nStatus);
pe_warn("There were warnings while packing a P"
"robe Response (0x%08x)", nStatus);
}
if (addnIEPresent) {
@ -469,15 +456,11 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
&addIE[0], addn_ielen);
}
/* free the allocated Memory */
qdf_mem_free(addIE);
pprobeRespParams = qdf_mem_malloc(sizeof(tSendProbeRespParams));
if (NULL == pprobeRespParams) {
sch_log(pMac, LOGE,
FL
("lim_send_probe_rsp_template_to_hal: HAL probe response params malloc failed for bytes %d"),
nBytes);
pe_err("malloc failed for bytes %d", nBytes);
} else {
sir_copy_mac_addr(pprobeRespParams->bssId, psessionEntry->bssId);
pprobeRespParams->pProbeRespTemplate = pFrame2Hal;
@ -491,14 +474,11 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
retCode = wma_post_ctrl_msg(pMac, &msgQ);
if (eSIR_SUCCESS != retCode) {
/* free the allocated Memory */
sch_log(pMac, LOGE,
FL
("lim_send_probe_rsp_template_to_hal: FAIL bytes %d retcode[%X]"),
pe_err("lim_send_probe_rsp_template_to_hal: FAIL bytes %d retcode[%X]",
nBytes, retCode);
qdf_mem_free(pprobeRespParams);
} else {
sch_log(pMac, LOGD,
pe_debug(
FL
("lim_send_probe_rsp_template_to_hal: Probe response template msg posted to HAL of bytes %d"),
nBytes);
@ -533,25 +513,23 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr,
/* Populate the TA fields */
status = populate_dot11f_timing_advert_frame(mac_ctx, &frame);
if (status) {
sch_log(mac_ctx, LOGE, FL("Error populating TA frame %x"),
status);
pe_err("Error populating TA frame %x", status);
return status;
}
status = dot11f_get_packed_timing_advertisement_frame_size(mac_ctx,
&frame, &payload_size);
if (DOT11F_FAILED(status)) {
sch_log(mac_ctx, LOGE, FL("Error getting packed frame size %x"),
status);
pe_err("Error getting packed frame size %x", status);
return status;
} else if (DOT11F_WARNED(status)) {
sch_log(mac_ctx, LOGW, FL("Warning getting packed frame size"));
pe_warn("Warning getting packed frame size");
}
buf_size = sizeof(tSirMacMgmtHdr) + payload_size;
*buf = qdf_mem_malloc(buf_size);
if (*buf == NULL) {
sch_log(mac_ctx, LOGE, FL("Cannot allocate memory"));
pe_err("Cannot allocate memory");
return eSIR_FAILURE;
}
@ -559,12 +537,12 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr,
status = dot11f_pack_timing_advertisement_frame(mac_ctx, &frame,
*buf + sizeof(tSirMacMgmtHdr), buf_size -
sizeof(tSirMacMgmtHdr), &payload_size);
sch_log(mac_ctx, LOGE, FL("TA payload size2 = %d"), payload_size);
pe_err("TA payload size2 = %d", payload_size);
if (DOT11F_FAILED(status)) {
sch_log(mac_ctx, LOGE, FL("Error packing frame %x"), status);
pe_err("Error packing frame %x", status);
goto fail;
} else if (DOT11F_WARNED(status)) {
sch_log(mac_ctx, LOGE, FL("Warning packing frame"));
pe_warn("Warning packing frame");
}
lim_populate_mac_header(mac_ctx, *buf, SIR_MAC_MGMT_FRAME,