summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/mac/src/pe/sch/sch_api.c76
1 files changed, 24 insertions, 52 deletions
diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c
index 50d540ce41f1..27be3caafb65 100644
--- a/core/mac/src/pe/sch/sch_api.c
+++ b/core/mac/src/pe/sch/sch_api.c
@@ -156,12 +156,10 @@ void sch_send_start_scan_rsp(tpAniSirGlobal pMac)
tSirMsgQ 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,11 +195,6 @@ 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"),
- size);
-
beaconParams = qdf_mem_malloc(sizeof(tSendbeaconParams));
if (NULL == beaconParams)
return eSIR_MEM_ALLOC_FAILED;
@@ -225,7 +218,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);
@@ -233,7 +226,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;
@@ -260,13 +253,9 @@ 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"),
+ 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"));
-
if (LIM_IS_AP_ROLE(psessionEntry) &&
(pMac->sch.schObject.fBeaconChanged)) {
retCode = lim_send_probe_rsp_template_to_hal(pMac,
@@ -275,10 +264,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
DefProbeRspIeBitmap
[0]);
if (eSIR_SUCCESS != retCode) {
- /* check whether we have to free any memory */
- sch_log(pMac, LOGE,
- FL
- ("FAILED to send probe response template with retCode %d"),
+ pe_err("FAILED to send probe response template with retCode %d",
retCode);
}
}
@@ -307,7 +293,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) &&
@@ -364,8 +350,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;
}
@@ -380,8 +365,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;
}
@@ -398,7 +382,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;
}
@@ -425,14 +409,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);
}
@@ -458,15 +440,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) {
@@ -474,15 +455,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;
@@ -496,14 +473,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);
@@ -538,25 +512,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;
}
@@ -564,12 +536,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,