summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@codeaurora.org>2016-10-19 15:53:58 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-24 16:45:13 -0700
commit6a8dcdff2b6654e8bd6a7dc1ed326f9e59b20430 (patch)
tree442fb2db924eeb435c5684b0d50269345019ddd7
parentaf901441736fe03d34e675f5bdd83ddc69334062 (diff)
qcacld-3.0: Remove redundant mem zero after malloc in MAC
Remove redundant qdf_mem_zero after qdf_mem_malloc since output of qdf_mem_malloc already gives zeroed memory[i.e. kzalloc]. Change-Id: Icdf64ffbf858201dfa315ab3c75bb32d5eca5fa8 CRs-Fixed: 1079679
-rw-r--r--core/mac/src/pe/lim/lim_admit_control.c2
-rw-r--r--core/mac/src/pe/lim/lim_api.c4
-rw-r--r--core/mac/src/pe/lim/lim_assoc_utils.c13
-rw-r--r--core/mac/src/pe/lim/lim_ft.c4
-rw-r--r--core/mac/src/pe/lim/lim_ft_preauth.c3
-rw-r--r--core/mac/src/pe/lim/lim_p2p.c4
-rw-r--r--core/mac/src/pe/lim/lim_process_action_frame.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_assoc_req_frame.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_message_queue.c2
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_host_roam.c4
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_req_messages.c1
-rw-r--r--core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c3
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c18
-rw-r--r--core/mac/src/pe/lim/lim_process_tdls.c3
-rw-r--r--core/mac/src/pe/lim/lim_prop_exts_utils.c1
-rw-r--r--core/mac/src/pe/lim/lim_scan_result_utils.c2
-rw-r--r--core/mac/src/pe/lim/lim_security_utils.c8
-rw-r--r--core/mac/src/pe/lim/lim_send_frames_host_roam.c1
-rw-r--r--core/mac/src/pe/lim/lim_send_management_frames.c5
-rw-r--r--core/mac/src/pe/lim/lim_send_messages.c5
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c20
-rw-r--r--core/mac/src/pe/lim/lim_session.c3
-rw-r--r--core/mac/src/pe/lim/lim_timer_utils.c2
-rw-r--r--core/mac/src/pe/lim/lim_utils.c4
-rw-r--r--core/mac/src/pe/nan/nan_datapath.c1
-rw-r--r--core/mac/src/pe/rrm/rrm_api.c14
-rw-r--r--core/mac/src/pe/sch/sch_api.c1
-rw-r--r--core/mac/src/pe/sch/sch_beacon_gen.c5
-rw-r--r--core/mac/src/sys/legacy/src/system/src/mac_init_api.c3
-rw-r--r--core/mac/src/sys/legacy/src/utils/src/parser_api.c5
30 files changed, 3 insertions, 142 deletions
diff --git a/core/mac/src/pe/lim/lim_admit_control.c b/core/mac/src/pe/lim/lim_admit_control.c
index 2ed47a0ab019..7c361f37ece2 100644
--- a/core/mac/src/pe/lim/lim_admit_control.c
+++ b/core/mac/src/pe/lim/lim_admit_control.c
@@ -933,7 +933,6 @@ lim_send_hal_msg_add_ts(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0);
pAddTsParam->staIdx = staIdx;
pAddTsParam->tspecIdx = tspecIdx;
qdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE));
@@ -997,7 +996,6 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac,
msg.type = WMA_DEL_TS_REQ;
msg.bodyptr = pDelTsParam;
msg.bodyval = 0;
- qdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0);
/* filling message parameters. */
pDelTsParam->staIdx = staIdx;
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 8597146e1eba..901c564df9da 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -779,9 +779,6 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, struct cds_config_info *cds_cfg)
goto pe_open_psession_fail;
}
- qdf_mem_set(pMac->lim.gpSession,
- sizeof(tPESession) * pMac->lim.maxBssId, 0);
-
pMac->lim.mgmtFrameSessionId = 0xff;
pMac->lim.tdls_frm_session_id = NO_SESSION;
pMac->lim.deferredMsgCnt = 0;
@@ -2045,7 +2042,6 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx,
mac_ctx->roam.pReassocResp = NULL;
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(roam_sync_ind_ptr->join_rsp, join_rsp_len);
lim_log(mac_ctx, LOG1, FL("Session RicLength = %d"),
ft_session_ptr->RICDataLen);
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 8d914ee6e11c..266f9afcf607 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -2148,7 +2148,6 @@ lim_add_sta(tpAniSirGlobal mac_ctx,
FL("Unable to allocate memory during ADD_STA"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) add_sta_params, sizeof(tAddStaParams), 0);
if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry) ||
LIM_IS_NDI_ROLE(session_entry))
@@ -2558,8 +2557,6 @@ lim_del_sta(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0);
-
/* */
/* DPH contains the STA index only for "peer" STA entries. */
/* LIM global contains "self" STA index */
@@ -2703,7 +2700,6 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
FL("Unable to allocate memory during ADD_STA"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
/* / Add STA context at MAC HW (BMU, RHP & TFP) */
qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
@@ -3361,7 +3357,6 @@ lim_del_bss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, uint16_t bssIdx,
FL("Unable to allocate memory during ADD_BSS"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0);
pDelBssParams->sessionId = psessionEntry->peSessionId; /* update PE session Id */
@@ -3559,9 +3554,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
FL("Unable to allocate memory during ADD_BSS"));
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
- } else
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams),
- 0);
+ }
qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
sizeof(tSirMacAddr));
@@ -4101,8 +4094,6 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update
goto returnFailure;
}
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
-
lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
lim_get_ielen_from_bss_description(bssDescription),
pBeaconStruct);
@@ -4804,7 +4795,6 @@ void lim_send_sme_unprotected_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameT
("AllocateMemory failed for tSirSmeUnprotectedMgmtFrameInd"));
return;
}
- qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
pSirSmeMgmtFrame->sessionId = sessionId;
pSirSmeMgmtFrame->frameType = frameType;
@@ -4847,7 +4837,6 @@ void lim_send_sme_tsm_ie_ind(tpAniSirGlobal pMac, tpPESession psessionEntry,
FL("AllocateMemory failed for tSirSmeTsmIEInd"));
return;
}
- qdf_mem_set((void *)pSirSmeTsmIeInd, sizeof(tSirSmeTsmIEInd), 0);
pSirSmeTsmIeInd->sessionId = psessionEntry->smeSessionId;
pSirSmeTsmIeInd->tsmIe.tsid = tid;
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index d4e02035613d..80bfec84cfef 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -157,8 +157,6 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
-
lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
lim_get_ielen_from_bss_description(bssDescription),
pBeaconStruct);
@@ -862,7 +860,6 @@ lim_ft_send_aggr_qos_rsp(tpAniSirGlobal pMac, uint8_t rspReqd,
FL("AllocateMemory failed for tSirAggrQosRsp"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_FT_AGGR_QOS_RSP;
rsp->sessionId = smesessionId;
rsp->length = sizeof(*rsp);
@@ -991,7 +988,6 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf
return eSIR_FAILURE;
}
- qdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0);
pAggrAddTsParam->staIdx = psessionEntry->staId;
/* Fill in the sessionId specific to PE */
pAggrAddTsParam->sessionId = sessionId;
diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c
index 6195a041f3c0..cca7f81fa040 100644
--- a/core/mac/src/pe/lim/lim_ft_preauth.c
+++ b/core/mac/src/pe/lim/lim_ft_preauth.c
@@ -597,7 +597,6 @@ void lim_post_ft_pre_auth_rsp(tpAniSirGlobal mac_ctx,
QDF_ASSERT(ft_pre_auth_rsp != NULL);
return;
}
- qdf_mem_zero(ft_pre_auth_rsp, rsp_len);
lim_log(mac_ctx, LOG1, FL("Auth Rsp = %p"), ft_pre_auth_rsp);
if (session) {
@@ -679,8 +678,6 @@ QDF_STATUS lim_send_preauth_scan_offload(tpAniSirGlobal mac_ctx,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq));
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = scan_offload_req;
msg.bodyval = 0;
diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c
index e6af69c753df..8c2318b5292c 100644
--- a/core/mac/src/pe/lim/lim_p2p.c
+++ b/core/mac/src/pe/lim/lim_p2p.c
@@ -90,8 +90,6 @@ static QDF_STATUS lim_send_hal_req_remain_on_chan_offload(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq));
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
@@ -390,7 +388,6 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType,
FL("AllocateMemory failed for eWNI_SME_LISTEN_RSP"));
return;
}
- qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
pSirSmeMgmtFrame->frame_len = frameLen;
pSirSmeMgmtFrame->sessionId = sessionId;
@@ -754,7 +751,6 @@ tSirRetStatus __lim_process_sme_no_a_update(tpAniSirGlobal pMac, uint32_t *pMsgB
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pMsgNoA, sizeof(tP2pPsConfig), 0);
pMsgNoA->opp_ps = pNoA->opp_ps;
pMsgNoA->ctWindow = pNoA->ctWindow;
pMsgNoA->duration = pNoA->duration;
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index 3f5b634c0e15..455828a6b04f 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -422,8 +422,6 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(ext_cng_chan_ind,
- sizeof(*ext_cng_chan_ind));
ext_cng_chan_ind->session_id =
session_entry->smeSessionId;
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index c1d77bfb5f9c..5d7fe2487091 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -1863,7 +1863,6 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
FL("Allocate Memory failed in assoc_req"));
return;
}
- qdf_mem_set((void *)assoc_req, sizeof(*assoc_req), 0);
/* Parse Assoc Request frame */
if (false == lim_chk_assoc_req_parse_error(mac_ctx, hdr, session,
@@ -2198,7 +2197,6 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
FL("AllocateMemory failed for assoc_ind"));
return;
}
- qdf_mem_set(assoc_ind, temp, 0);
qdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
(uint8_t *) sta_ds->staAddr, sizeof(tSirMacAddr));
assoc_ind->aid = sta_ds->assocId;
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index 2229f7f9bae7..381e186d5bb8 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -521,7 +521,6 @@ __lim_pno_match_fwd_bcn_probepsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info,
}
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
- qdf_mem_zero(result, sizeof(*result) + ie_len);
/* Received frame does not have request id, hence set 0 */
result->request_id = 0;
@@ -574,7 +573,6 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info,
}
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
- qdf_mem_zero(result, sizeof(*result) + ie_len);
/* Received frame does not have request id, hence set 0 */
result->requestId = 0;
diff --git a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
index cb16a1e43ca5..00e22ecef258 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_host_roam.c
@@ -425,9 +425,6 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
if (NULL ==
pMac->lim.pSessionEntry->pLimMlmReassocRetryReq)
goto end;
- qdf_mem_set(pMac->lim.pSessionEntry->
- pLimMlmReassocRetryReq,
- sizeof(tLimMlmReassocReq), 0);
qdf_mem_copy(pMac->lim.pSessionEntry->
pLimMlmReassocRetryReq,
psessionEntry->pLimMlmReassocReq,
@@ -472,7 +469,6 @@ void lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac,
FL("Unable to allocate memory during ADD_STA"));
goto end;
}
- qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
/* / Add STA context at MAC HW (BMU, RHP & TFP) */
qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 6819abd894a8..7cf6c5eef08e 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -491,7 +491,6 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(addbss_param, sizeof(tAddBssParams), 0);
/* Fill in tAddBssParams members */
qdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId,
sizeof(tSirMacAddr));
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 668b63696bb2..bd61bb43c4a0 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -586,8 +586,6 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg)
FL("mlmAuthReq :Memory alloc failed "));
return;
}
- qdf_mem_set((uint8_t *) auth_req,
- sizeof(tLimMlmAuthReq), 0);
if (session_entry->limSmeState ==
eLIM_SME_WT_AUTH_STATE) {
sir_copy_mac_addr(auth_req->peerMacAddr,
@@ -3197,7 +3195,6 @@ void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry)
)
return;
}
- qdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0);
qdf_mem_copy((void *)pBeaconGenParams->bssId,
(void *)psessionEntry->bssId, QDF_MAC_ADDR_SIZE);
limMsg.bodyptr = pBeaconGenParams;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 8528b912e356..e488b5f6cead 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -157,8 +157,6 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg)
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
req_msg->hw_mode_index = buf->set_hw.hw_mode_index;
req_msg->reason = buf->set_hw.reason;
/* Other parameters are not needed for WMA */
@@ -230,8 +228,6 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_zero(req_msg, len);
-
req_msg->scan_config = buf->set_dual_mac.scan_config;
req_msg->fw_mode_config = buf->set_dual_mac.fw_mode_config;
/* Other parameters are not needed for WMA */
@@ -676,7 +672,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
goto end;
}
- qdf_mem_set((void *)sme_start_bss_req, size, 0);
qdf_mem_copy(sme_start_bss_req, msg_buf,
sizeof(tSirSmeStartBssReq));
if (!lim_is_sme_start_bss_req_valid(mac_ctx,
@@ -880,9 +875,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto free;
}
- qdf_mem_set(session->parsedAssocReq,
- (session->dph.dphHashTable.size *
- sizeof(tpSirAssocReq)), 0);
}
if (!sme_start_bss_req->channelId &&
@@ -975,8 +967,6 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
goto free;
}
- qdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0);
-
/* Copy SSID to the MLM start structure */
qdf_mem_copy((uint8_t *) &mlm_start_req->ssId,
(uint8_t *) &sme_start_bss_req->ssId,
@@ -1288,8 +1278,6 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
- qdf_mem_set((uint8_t *) pScanOffloadReq, len, 0);
-
msg.type = WMA_START_SCAN_OFFLOAD_REQ;
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
@@ -1584,7 +1572,6 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)sme_join_req, n_size, 0);
(void)qdf_mem_copy((void *)sme_join_req, (void *)msg_buf,
n_size);
@@ -1872,7 +1859,6 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)mlm_join_req, val, 0);
/* PE SessionId is stored as a part of JoinReq */
mlm_join_req->sessionId = session->peSessionId;
@@ -2097,7 +2083,6 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx,
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
- (void)qdf_mem_set((void *)reassoc_req, size, 0);
(void)qdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size);
if (!lim_is_sme_join_req_valid(mac_ctx,
@@ -4660,9 +4645,6 @@ skip_match:
qdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) +
sme_req->matchLen);
if (lim_mgmt_regn != NULL) {
- qdf_mem_set((void *)lim_mgmt_regn,
- sizeof(struct mgmt_frm_reg_info) +
- sme_req->matchLen, 0);
lim_mgmt_regn->frameType = sme_req->frameType;
lim_mgmt_regn->matchLen = sme_req->matchLen;
lim_mgmt_regn->sessionId = sme_req->sessionId;
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index 7b2e5cae97a3..6c16ae4b4dbb 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -3316,9 +3316,6 @@ tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) tdls_req_params,
- sizeof(tTdlsLinkEstablishParams), 0);
-
tdls_req_params->staIdx = stads->staIndex;
tdls_req_params->isResponder = tdls_req->isResponder;
tdls_req_params->uapsdQueues = tdls_req->uapsdQueues;
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index c263b366d36e..629f32b8a002 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -127,7 +127,6 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
return;
}
- qdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0);
*qos_cap = 0;
*prop_cap = 0;
*uapsd = 0;
diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c
index 9bed13a0f534..6b19f0c3a107 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/core/mac/src/pe/lim/lim_scan_result_utils.c
@@ -389,8 +389,6 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(bssdescr, frame_len);
-
/* In scan state, store scan result. */
lim_collect_bss_description(mac_ctx, bssdescr, bpr, rx_packet_info,
scanning);
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index a76eea60c45c..c5938c2b923d 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -842,9 +842,7 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac,
/* Respond to SME with error code */
mlmSetKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
- } else
- qdf_mem_set((void *)pSetBssKeyParams,
- sizeof(tSetBssKeyParams), 0);
+ }
/* Update the WMA_SET_BSSKEY_REQ parameters */
pSetBssKeyParams->bssIdx = psessionEntry->bssIdx;
@@ -943,9 +941,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac,
lim_log(pMac, LOGP,
FL("Unable to allocate memory during SET_BSSKEY"));
return;
- } else
- qdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams),
- 0);
+ }
/* Update the WMA_SET_STAKEY_REQ parameters */
pSetStaKeyParams->staIdx = staIdx;
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index 50c86a6ff657..2039955c7e17 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -487,7 +487,6 @@ void lim_send_retry_reassoc_req_frame(tpAniSirGlobal pMac,
pTmpMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
if (NULL == pTmpMlmReassocReq)
goto end;
- qdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0);
qdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq,
sizeof(tLimMlmReassocReq));
}
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 94248e13a9c4..2cd0f854db31 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -579,8 +579,6 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(&extracted_ext_cap, sizeof(extracted_ext_cap));
-
/*
* Fill out 'frm', after which we'll just hand the struct off to
* 'dot11f_pack_probe_response'.
@@ -1659,8 +1657,6 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
-
if (add_ie_len && pe_session->is_ext_caps_present) {
qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
0);
@@ -4023,7 +4019,6 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac,
qdf_mem_free(frm);
return eSIR_FAILURE;
}
- qdf_mem_set((uint8_t *) frm, sizeof(*frm), 0);
frm->Category.category = SIR_MAC_ACTION_RRM;
frm->Action.action = SIR_MAC_RRM_RADIO_MEASURE_RPT;
diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c
index 8233822f0284..3222cf08c613 100644
--- a/core/mac/src/pe/lim/lim_send_messages.c
+++ b/core/mac/src/pe/lim/lim_send_messages.c
@@ -103,7 +103,6 @@ tSirRetStatus lim_send_cf_params(tpAniSirGlobal pMac, uint8_t bssIdx,
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
}
- qdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0);
pCFParams->cfpCount = cfpCount;
pCFParams->cfpPeriod = cfpPeriod;
pCFParams->bssIdx = bssIdx;
@@ -227,7 +226,6 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac,
"Unable to allocate memory for Switch Ch Params"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pChnlParams, sizeof(tSwitchChannelParams), 0);
pChnlParams->channelNumber = chnlNumber;
pChnlParams->ch_center_freq_seg0 = ch_center_freq_seg0;
pChnlParams->ch_center_freq_seg1 = ch_center_freq_seg1;
@@ -491,7 +489,6 @@ tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state,
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
pLinkStateParams->callback = callback;
pLinkStateParams->callbackArg = callbackArg;
@@ -534,7 +531,6 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
/* Copy Mac address */
sir_copy_mac_addr(pLinkStateParams->bssid, bssId);
@@ -593,7 +589,6 @@ tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac,
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- qdf_mem_set((uint8_t *) pBeaconFilterMsg, msgSize, 0);
/* Fill in capability Info and mask */
/* Don't send this message if no active Infra session is found. */
pBeaconFilterMsg->capabilityInfo = psessionEntry->limCurrentBssCaps;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 6b524cfbb080..ab2fcb67c14c 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -462,7 +462,6 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
return;
}
- qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
sme_join_rsp->beaconLength = 0;
sme_join_rsp->assocReqLength = 0;
sme_join_rsp->assocRspLength = 0;
@@ -480,7 +479,6 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
FL("MemAlloc fail - JOIN/REASSOC_RSP"));
return;
}
- qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
if (result_code == eSIR_SME_SUCCESS) {
sta_ds = dph_get_hash_entry(mac_ctx,
DPH_STA_HASH_INDEX_PEER,
@@ -592,8 +590,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
return;
}
- qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
-
} else {
/* subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID */
ieOffset = sizeof(tAniBeaconStruct) + SIR_MAC_B_PR_SSID_OFFSET;
@@ -611,7 +607,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
size = sizeof(tSirSmeStartBssRsp);
if (resultCode == eSIR_SME_SUCCESS) {
@@ -769,7 +764,6 @@ lim_post_sme_scan_rsp_message(tpAniSirGlobal pMac,
FL("AllocateMemory failed for eWNI_SME_SCAN_RSP"));
return;
}
- qdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0);
pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
pSirSmeScanRsp->statusCode = resultCode;
@@ -1697,7 +1691,6 @@ lim_send_sme_addts_rsp(tpAniSirGlobal pMac, uint8_t rspReqd, uint32_t status,
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_ADDTS_RSP;
rsp->rc = status;
rsp->rsp.status = (enum eSirMacStatusCodes)status;
@@ -1746,7 +1739,6 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status
lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
if (psessionEntry != NULL) {
@@ -1797,7 +1789,6 @@ lim_send_sme_delts_ind(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, uint16_t ai
lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND"));
return;
}
- qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_DELTS_IND;
rsp->rc = eSIR_SUCCESS;
@@ -1949,9 +1940,6 @@ lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen),
- 0);
-
qdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes,
peerMacAddr, QDF_MAC_ADDR_SIZE);
pNewPeerInd->staId = staIndex;
@@ -2180,7 +2168,6 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
goto err;
}
- qdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0);
csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT;
csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd);
qdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId,
@@ -2275,7 +2262,6 @@ void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMa
PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
return;
}
- qdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0);
qdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes,
(uint8_t *) peerMacAddr, QDF_MAC_ADDR_SIZE);
pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
@@ -2378,9 +2364,6 @@ lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal pMac,
return;
}
- qdf_mem_set((void *)pSmeSwithChnlParams,
- sizeof(tSwitchChannelParams), 0);
-
qdf_mem_copy(pSmeSwithChnlParams, pChnlParams,
sizeof(tSwitchChannelParams));
@@ -2501,7 +2484,6 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
return;
}
- qdf_mem_set((void *)pChanSwTxResponse, length, 0);
pChanSwTxResponse->sessionId =
psessionEntry->smeSessionId;
pChanSwTxResponse->chanSwIeTxStatus =
@@ -2526,8 +2508,6 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
("AllocateMemory failed for beacon_tx_comp_rsp_ptr"));
return;
}
- qdf_mem_set((void *)beacon_tx_comp_rsp_ptr,
- sizeof(*beacon_tx_comp_rsp_ptr), 0);
beacon_tx_comp_rsp_ptr->session_id =
psessionEntry->smeSessionId;
beacon_tx_comp_rsp_ptr->tx_status = QDF_STATUS_SUCCESS;
diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c
index 7498c075a6dd..1bd3a4025af7 100644
--- a/core/mac/src/pe/lim/lim_session.c
+++ b/core/mac/src/pe/lim/lim_session.c
@@ -314,9 +314,6 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
session_ptr->dph.dphHashTable.pDphNodeArray = NULL;
return NULL;
}
- qdf_mem_set(session_ptr->gpLimPeerIdxpool,
- sizeof(*session_ptr->gpLimPeerIdxpool) * (numSta + 1),
- 0);
session_ptr->freePeerIdxHead = 0;
session_ptr->freePeerIdxTail = 0;
session_ptr->gLimNumOfCurrentSTAs = 0;
diff --git a/core/mac/src/pe/lim/lim_timer_utils.c b/core/mac/src/pe/lim/lim_timer_utils.c
index bf4ad5968be6..cb244dd65d96 100644
--- a/core/mac/src/pe/lim/lim_timer_utils.c
+++ b/core/mac/src/pe/lim/lim_timer_utils.c
@@ -310,8 +310,6 @@ uint32_t lim_create_timers(tpAniSirGlobal pMac)
lim_log(pMac, LOGP, FL("AllocateMemory failed!"));
goto err_timer;
}
- qdf_mem_zero(pMac->lim.gLimPreAuthTimerTable.pTable,
- cfgValue * sizeof(tLimPreAuthNode *));
for (i = 0; i < cfgValue; i++) {
pMac->lim.gLimPreAuthTimerTable.pTable[i] =
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index f76cf455e1fc..0518ae8fe92d 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -4961,8 +4961,6 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
goto error1;
}
- qdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0);
-
if (pSta->wmeEnabled)
qdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec),
sizeof(tSirMacTspecIE));
@@ -4993,7 +4991,6 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));)
goto error3;
}
- qdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0);
if (pSta->wmeEnabled)
qdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec),
@@ -5248,7 +5245,6 @@ void lim_frame_transmission_control(tpAniSirGlobal pMac, tLimQuietTxMode type,
return;
}
- qdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0);
status = __lim_fill_tx_control_params(pMac, pTxCtrlMsg, type, mode);
if (status != QDF_STATUS_SUCCESS) {
qdf_mem_free(pTxCtrlMsg);
diff --git a/core/mac/src/pe/nan/nan_datapath.c b/core/mac/src/pe/nan/nan_datapath.c
index 3bed714cdf2c..62ec69af98ec 100644
--- a/core/mac/src/pe/nan/nan_datapath.c
+++ b/core/mac/src/pe/nan/nan_datapath.c
@@ -286,7 +286,6 @@ static void lim_ndp_delete_peers(tpAniSirGlobal mac_ctx,
return;
}
- qdf_mem_zero(deleted_peers, num_peers * sizeof(*deleted_peers));
for (i = 0; i < num_peers; i++) {
lim_log(mac_ctx, LOG1,
FL("ndp_map[%d]: MAC: " MAC_ADDRESS_STR " num_active %d"),
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 51a2712141e9..c1a282e78946 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -386,7 +386,6 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(pSmeNeighborRpt, length, 0);
/* Allocated memory for pSmeNeighborRpt...will be freed by other module */
@@ -641,8 +640,6 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac,
}
- qdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0);
-
/* Allocated memory for pSmeBcnReportReq....will be freed by other modulea */
qdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId,
sizeof(tSirMacAddr));
@@ -838,9 +835,6 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_zero(report, beacon_xmit_ind->numBssDesc *
- sizeof(*report));
-
for (bss_desc_count = 0; bss_desc_count <
beacon_xmit_ind->numBssDesc; bss_desc_count++) {
beacon_report =
@@ -956,7 +950,6 @@ static void rrm_process_beacon_request_failure(tpAniSirGlobal pMac,
("Unable to allocate memory during RRM Req processing"));
return;
}
- qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
pReport->token = pCurrentReq->token;
pReport->type = SIR_MAC_RRM_BEACON_TYPE;
@@ -1023,8 +1016,6 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(*report) *
- (rrm_req->num_MeasurementRequest - index), 0);
lim_log(mac_ctx, LOG3,
FL("rrm beacon type refused of %d report in beacon table"),
*num_report);
@@ -1044,7 +1035,6 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
return eSIR_MEM_ALLOC_FAILED;
}
lim_log(mac_ctx, LOG3, FL(" Processing Beacon Report request"));
- qdf_mem_set(curr_req, sizeof(*curr_req), 0);
curr_req->dialog_token = rrm_req->DialogToken.token;
curr_req->token = rrm_req->
MeasurementRequest[index].measurement_token;
@@ -1090,8 +1080,6 @@ tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(*report) *
- (rrm_req->num_MeasurementRequest - index), 0);
lim_log(mac_ctx, LOG3, FL("rrm beacon type incapable of %d report "),
*num_report);
}
@@ -1134,7 +1122,6 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(tSirMacRadioMeasureReport), 0);
lim_log(mac_ctx, LOGE, FL("No requestIes in the measurement request, sending incapable report"));
report->incapable = 1;
num_report = 1;
@@ -1157,7 +1144,6 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during RRM Req processing"));
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set(report, sizeof(tSirMacRadioMeasureReport), 0);
lim_log(mac_ctx, LOGE, FL("Allocated memory for report"));
report->incapable = 1;
report->type = rrm_req->MeasurementRequest[0].measurement_type;
diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c
index 2eb27f8e73ec..1debe34dfa74 100644
--- a/core/mac/src/pe/sch/sch_api.c
+++ b/core/mac/src/pe/sch/sch_api.c
@@ -597,7 +597,6 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr,
sch_log(mac_ctx, LOGE, FL("Cannot allocate memory"));
return eSIR_FAILURE;
}
- qdf_mem_zero(*buf, buf_size);
payload_size = 0;
status = dot11f_pack_timing_advertisement_frame(mac_ctx, &frame,
diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c
index 082834e5e71d..22c5738be6b4 100644
--- a/core/mac/src/pe/sch/sch_beacon_gen.c
+++ b/core/mac/src/pe/sch/sch_beacon_gen.c
@@ -219,9 +219,6 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
mac->fc.fromDS = 0;
mac->fc.toDS = 0;
- /* Now set the beacon body */
- qdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0);
-
/* Skip over the timestamp (it'll be updated later). */
bcn_1->BeaconInterval.interval =
session->beaconParams.beaconInterval;
@@ -279,8 +276,6 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
FL("Warnings while packing a tDot11fBeacon1(0x%08x.)."),
n_status);
}
- /*changed to correct beacon corruption */
- qdf_mem_set((uint8_t *) bcn_2, sizeof(tDot11fBeacon2), 0);
session->schBeaconOffsetBegin = offset + (uint16_t) n_bytes;
sch_log(mac_ctx, LOG1, FL("Initialized beacon begin, offset %d"),
offset);
diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
index 5e86c7e1f02e..8c0c432dae7e 100644
--- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
+++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
@@ -124,9 +124,6 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd,
if (NULL == p_mac)
return eSIR_MEM_ALLOC_FAILED;
- /* Initialize the p_mac structure */
- qdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0);
-
/*
* Set various global fields of p_mac here
* (Could be platform dependant as some variables in p_mac are platform
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index eea1199143ba..3a2751528b0f 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -2327,8 +2327,6 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0);
-
/* delegate to the framesc-generated code, */
status = dot11f_unpack_probe_response(pMac, pFrame, nFrame, pr);
if (DOT11F_FAILED(status)) {
@@ -2624,7 +2622,6 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac,
}
/* Zero-init our [out] parameter, */
qdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
- qdf_mem_set((uint8_t *) ar, sizeof(tDot11fAssocRequest), 0);
/* delegate to the framesc-generated code, */
status = dot11f_unpack_assoc_request(pMac, pFrame, nFrame, ar);
@@ -3829,8 +3826,6 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
return eSIR_MEM_ALLOC_FAILED;
}
- qdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0);
-
/* get the MAC address out of the BD, */
qdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6);