mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 04:12:08 -05:00
qcacld-3.0: sme: Remove excessive logs
Below API's logs failure with caller information,
So no need logs at caller.
qdf_mem_malloc_atomic()
qdf_mem_malloc()
wmi_buf_alloc()
qdf_nbuf_alloc()
wmi_unified_cmd_send()
Change-Id: I18dc9026be41bf1bf63fa2b1eec89b2ea18dc0bf
CRs-Fixed: 2331224
This commit is contained in:
parent
2746f07242
commit
0ef7708fe8
11 changed files with 273 additions and 720 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -35,11 +35,9 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
|
|||
|
||||
pSession->ftSmeContext.pUsrCtx =
|
||||
qdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx));
|
||||
|
||||
if (NULL == pSession->ftSmeContext.pUsrCtx) {
|
||||
sme_err("Memory allocation failure");
|
||||
if (!pSession->ftSmeContext.pUsrCtx)
|
||||
return;
|
||||
}
|
||||
|
||||
pSession->ftSmeContext.pUsrCtx->pMac = pMac;
|
||||
pSession->ftSmeContext.pUsrCtx->sessionId = sessionId;
|
||||
|
||||
|
|
@ -155,8 +153,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|||
/* Save the FT IEs */
|
||||
session->ftSmeContext.auth_ft_ies =
|
||||
qdf_mem_malloc(ft_ies_length);
|
||||
if (NULL == session->ftSmeContext.auth_ft_ies) {
|
||||
sme_err("Mem alloc failed for auth_ft_ies");
|
||||
if (!session->ftSmeContext.auth_ft_ies) {
|
||||
sme_release_global_lock(&mac_ctx->sme);
|
||||
return;
|
||||
}
|
||||
|
|
@ -201,8 +198,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|||
/* Save the FT IEs */
|
||||
session->ftSmeContext.reassoc_ft_ies =
|
||||
qdf_mem_malloc(ft_ies_length);
|
||||
if (NULL == session->ftSmeContext.reassoc_ft_ies) {
|
||||
sme_err("Mem alloc fail for reassoc_ft_ie");
|
||||
if (!session->ftSmeContext.reassoc_ft_ies) {
|
||||
sme_release_global_lock(&mac_ctx->sme);
|
||||
return;
|
||||
}
|
||||
|
|
@ -253,7 +249,7 @@ QDF_STATUS sme_ft_send_update_key_ind(tpAniSirGlobal mac, uint32_t session_id,
|
|||
msglen = sizeof(tSirFTUpdateKeyInfo);
|
||||
|
||||
msg = qdf_mem_malloc(msglen);
|
||||
if (NULL == msg)
|
||||
if (!msg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
msg->messageType = eWNI_SME_FT_UPDATE_KEY;
|
||||
|
|
|
|||
|
|
@ -149,10 +149,9 @@ static QDF_STATUS sme_ps_enable_ps_req_params(tpAniSirGlobal mac_ctx,
|
|||
enum ps_state ps_state;
|
||||
|
||||
enable_ps_req_params = qdf_mem_malloc(sizeof(*enable_ps_req_params));
|
||||
if (NULL == enable_ps_req_params) {
|
||||
sme_err("Memory allocation failed for enable_ps_req_params");
|
||||
if (!enable_ps_req_params)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (ps_param->uapsd_per_ac_bit_mask) {
|
||||
enable_ps_req_params->psSetting = eSIR_ADDON_ENABLE_UAPSD;
|
||||
sme_ps_fill_uapsd_req_params(mac_ctx,
|
||||
|
|
@ -189,10 +188,8 @@ static QDF_STATUS sme_ps_disable_ps_req_params(tpAniSirGlobal mac_ctx,
|
|||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
disable_ps_req_params = qdf_mem_malloc(sizeof(*disable_ps_req_params));
|
||||
if (NULL == disable_ps_req_params) {
|
||||
sme_err("Memory allocation failed for sDisablePsParams");
|
||||
if (!disable_ps_req_params)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
disable_ps_req_params->psSetting = eSIR_ADDON_NOTHING;
|
||||
disable_ps_req_params->sessionid = session_id;
|
||||
|
|
@ -223,10 +220,8 @@ static QDF_STATUS sme_ps_enable_uapsd_req_params(tpAniSirGlobal mac_ctx,
|
|||
|
||||
enable_uapsd_req_params =
|
||||
qdf_mem_malloc(sizeof(*enable_uapsd_req_params));
|
||||
if (NULL == enable_uapsd_req_params) {
|
||||
sme_err("Memory allocation failed for enable_uapsd_req_params");
|
||||
if (!enable_uapsd_req_params)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
sme_ps_fill_uapsd_req_params(mac_ctx,
|
||||
&enable_uapsd_req_params->uapsdParams,
|
||||
|
|
@ -265,10 +260,8 @@ static QDF_STATUS sme_ps_disable_uapsd_req_params(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
disable_uapsd_req_params =
|
||||
qdf_mem_malloc(sizeof(*disable_uapsd_req_params));
|
||||
if (NULL == disable_uapsd_req_params) {
|
||||
sme_err("Mem alloc failed for disable_uapsd_req_params");
|
||||
if (!disable_uapsd_req_params)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
disable_uapsd_req_params->sessionid = session_id;
|
||||
status = sme_post_ps_msg_to_wma(WMA_DISABLE_UAPSD_REQ,
|
||||
|
|
@ -433,10 +426,8 @@ QDF_STATUS sme_ps_timer_flush_sync(tHalHandle hal, uint8_t session_id)
|
|||
}
|
||||
|
||||
req = qdf_mem_malloc(sizeof(*req));
|
||||
if (!req) {
|
||||
sme_err("out of memory");
|
||||
if (!req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (ps_parm->uapsd_per_ac_bit_mask) {
|
||||
req->psSetting = eSIR_ADDON_ENABLE_UAPSD;
|
||||
|
|
@ -637,11 +628,8 @@ QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx,
|
|||
}
|
||||
|
||||
request_buf = qdf_mem_malloc(sizeof(tSirHostOffloadReq));
|
||||
if (NULL == request_buf) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("Not able to allocate memory for host offload request"));
|
||||
if (!request_buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
|
||||
|
||||
|
|
@ -692,11 +680,9 @@ QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx,
|
|||
qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
|
||||
|
||||
request_buf = qdf_mem_malloc(sizeof(*request_buf));
|
||||
if (NULL == request_buf) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"Not able to allocate memory for NS offload request");
|
||||
if (!request_buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
*request_buf = *request;
|
||||
|
||||
msg.type = WMA_SET_NS_OFFLOAD;
|
||||
|
|
|
|||
|
|
@ -188,10 +188,8 @@ static QDF_STATUS csr_sae_callback(tpAniSirGlobal mac_ctx,
|
|||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||
if (!roam_info) {
|
||||
sme_err("qdf_mem_malloc failed for SAE");
|
||||
if (!roam_info)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
roam_info->sae_info = sae_info;
|
||||
|
||||
|
|
@ -520,13 +518,10 @@ static QDF_STATUS csr_roam_init_globals(tpAniSirGlobal pMac)
|
|||
* sizeof(struct csr_roam_session);
|
||||
|
||||
csr_roam_roam_session = qdf_mem_malloc(buf_size);
|
||||
|
||||
if (csr_roam_roam_session) {
|
||||
pMac->roam.roamSession = csr_roam_roam_session;
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
} else {
|
||||
sme_err("%s: Failed to allocate %d bytes",
|
||||
__func__, buf_size);
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
|
|
@ -767,12 +762,9 @@ static void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx,
|
|||
if (!prefer_5g)
|
||||
return;
|
||||
|
||||
tmp_list = (tSirUpdateChanParam *)
|
||||
qdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel);
|
||||
if (tmp_list == NULL) {
|
||||
sme_err("Memory allocation failed");
|
||||
tmp_list = qdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel);
|
||||
if (!tmp_list)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fist copy Non-DFS 5g channels */
|
||||
for (i = 0; i < num_channel; i++) {
|
||||
|
|
@ -855,11 +847,8 @@ static void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx,
|
|||
(sizeof(tSirUpdateChanParam) * num_channel);
|
||||
chan_list_greedy = qdf_mem_malloc(buf_size);
|
||||
chan_list_non_greedy = qdf_mem_malloc(buf_size);
|
||||
if (!chan_list_greedy || !chan_list_non_greedy) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to allocate memory for tSirUpdateChanList");
|
||||
return;
|
||||
}
|
||||
if (!chan_list_greedy || !chan_list_non_greedy)
|
||||
goto scan_list_sort_error;
|
||||
/*
|
||||
* fixed_greedy_chan_list is an evaluated channel list based on most of
|
||||
* the enterprise wifi deployments and the order of the channels
|
||||
|
|
@ -1073,12 +1062,9 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac)
|
|||
(sizeof(tSirUpdateChanParam) * (numChan));
|
||||
|
||||
csr_init_operating_classes((tHalHandle) pMac);
|
||||
pChanList = (tSirUpdateChanList *) qdf_mem_malloc(bufLen);
|
||||
if (!pChanList) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to allocate memory for tSirUpdateChanList");
|
||||
pChanList = qdf_mem_malloc(bufLen);
|
||||
if (!pChanList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
for (i = 0; i < pScan->base_channels.numChannels; i++) {
|
||||
struct csr_sta_roam_policy_params *roam_policy =
|
||||
|
|
@ -1800,8 +1786,7 @@ QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac,
|
|||
qdf_mem_malloc(pNeighborRoamInfo->cfgParams.channelInfo.
|
||||
numOfChannels);
|
||||
|
||||
if (NULL == pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
|
||||
sme_err("Memory Allocation for CFG Channel List failed");
|
||||
if (!pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
|
||||
pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = 0;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
|
@ -1924,9 +1909,7 @@ QDF_STATUS csr_create_roam_scan_channel_list(tpAniSirGlobal pMac,
|
|||
}
|
||||
currChannelListInfo->ChannelList
|
||||
= qdf_mem_malloc(outNumChannels * sizeof(uint8_t));
|
||||
if (NULL == currChannelListInfo->ChannelList) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL,
|
||||
"Failed to allocate memory for roam scan channel list");
|
||||
if (!currChannelListInfo->ChannelList) {
|
||||
currChannelListInfo->numOfChannels = 0;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
|
@ -5901,10 +5884,9 @@ static enum csr_join_state csr_roam_join_next_bss(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
|
||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||
if (!roam_info) {
|
||||
sme_err("failed to allocate memory");
|
||||
if (!roam_info)
|
||||
return eCsrStopRoaming;
|
||||
}
|
||||
|
||||
qdf_mem_copy(&roam_info->bssid, &session->joinFailStatusCode.bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
/*
|
||||
|
|
@ -6722,12 +6704,8 @@ static void csr_roam_synch_clean_up(tpAniSirGlobal mac, uint8_t session_id)
|
|||
|
||||
roam_offload_failed = qdf_mem_malloc(
|
||||
sizeof(struct roam_offload_synch_fail));
|
||||
if (NULL == roam_offload_failed) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: unable to allocate memory for roam synch fail",
|
||||
__func__);
|
||||
if (!roam_offload_failed)
|
||||
return;
|
||||
}
|
||||
|
||||
roam_offload_failed->session_id = session_id;
|
||||
msg.type = WMA_ROAM_OFFLOAD_SYNCH_FAIL;
|
||||
|
|
@ -7245,7 +7223,6 @@ static QDF_STATUS populate_fils_params_join_rsp(tpAniSirGlobal mac_ctx,
|
|||
|
||||
roam_info->fils_join_rsp = qdf_mem_malloc(sizeof(*fils_join_rsp));
|
||||
if (!roam_info->fils_join_rsp) {
|
||||
sme_err("fils_join_rsp malloc fails!");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto free_fils_join_rsp;
|
||||
}
|
||||
|
|
@ -7255,7 +7232,6 @@ static QDF_STATUS populate_fils_params_join_rsp(tpAniSirGlobal mac_ctx,
|
|||
if (!roam_fils_info->fils_pmk) {
|
||||
qdf_mem_free(roam_info->fils_join_rsp);
|
||||
roam_info->fils_join_rsp = NULL;
|
||||
sme_err("fils_pmk malloc fails!");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto free_fils_join_rsp;
|
||||
}
|
||||
|
|
@ -7978,10 +7954,8 @@ static void update_profile_fils_info(struct csr_roam_profile *des_profile,
|
|||
|
||||
des_profile->fils_con_info =
|
||||
qdf_mem_malloc(sizeof(struct cds_fils_connection_info));
|
||||
if (!des_profile->fils_con_info) {
|
||||
sme_err("failed to allocate memory");
|
||||
if (!des_profile->fils_con_info)
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_mem_copy(des_profile->fils_con_info,
|
||||
src_profile->fils_con_info,
|
||||
|
|
@ -7989,10 +7963,8 @@ static void update_profile_fils_info(struct csr_roam_profile *des_profile,
|
|||
|
||||
des_profile->hlp_ie =
|
||||
qdf_mem_malloc(src_profile->hlp_ie_len);
|
||||
if (!des_profile->hlp_ie) {
|
||||
sme_err("failed to allocate memory for hlp ie");
|
||||
if (!des_profile->hlp_ie)
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_mem_copy(des_profile->hlp_ie, src_profile->hlp_ie,
|
||||
src_profile->hlp_ie_len);
|
||||
|
|
@ -8220,11 +8192,8 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac,
|
|||
qdf_mem_set(pDstProfile, sizeof(struct csr_roam_profile), 0);
|
||||
|
||||
pDstProfile->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr));
|
||||
if (NULL == pDstProfile->BSSIDs.bssid) {
|
||||
if (!pDstProfile->BSSIDs.bssid) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
sme_err("failed to allocate memory for BSSID "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(pSrcProfile->bssid.bytes));
|
||||
goto end;
|
||||
}
|
||||
pDstProfile->BSSIDs.numOfBSSIDs = 1;
|
||||
|
|
@ -8233,11 +8202,8 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac,
|
|||
if (pSrcProfile->SSID.length > 0) {
|
||||
pDstProfile->SSIDs.SSIDList =
|
||||
qdf_mem_malloc(sizeof(tCsrSSIDInfo));
|
||||
if (NULL == pDstProfile->SSIDs.SSIDList) {
|
||||
if (!pDstProfile->SSIDs.SSIDList) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
sme_err("failed to allocate memory for SSID "
|
||||
MAC_ADDRESS_STR,
|
||||
MAC_ADDR_ARRAY(pSrcProfile->bssid.bytes));
|
||||
goto end;
|
||||
}
|
||||
pDstProfile->SSIDs.numOfSSIDs = 1;
|
||||
|
|
@ -8251,9 +8217,8 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac,
|
|||
if (pSrcProfile->nAddIEAssocLength) {
|
||||
pDstProfile->pAddIEAssoc =
|
||||
qdf_mem_malloc(pSrcProfile->nAddIEAssocLength);
|
||||
if (NULL == pDstProfile->pAddIEAssoc) {
|
||||
if (!pDstProfile->pAddIEAssoc) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
sme_err("failed to allocate mem for additional ie");
|
||||
goto end;
|
||||
}
|
||||
pDstProfile->nAddIEAssocLength = pSrcProfile->nAddIEAssocLength;
|
||||
|
|
@ -8539,10 +8504,8 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
|
|||
}
|
||||
|
||||
first_ap_profile = qdf_mem_malloc(sizeof(*first_ap_profile));
|
||||
if (NULL == first_ap_profile) {
|
||||
sme_err("malloc fails for first_ap_profile");
|
||||
if (!first_ap_profile)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* Initialize the count before proceeding with the Join requests */
|
||||
pSession->join_bssid_count = 0;
|
||||
|
|
@ -9238,14 +9201,9 @@ QDF_STATUS csr_roam_save_connected_information(tpAniSirGlobal pMac,
|
|||
if (pProfile->nAddIEAssocLength) {
|
||||
pConnectProfile->pAddIEAssoc =
|
||||
qdf_mem_malloc(pProfile->nAddIEAssocLength);
|
||||
if (NULL == pConnectProfile->pAddIEAssoc)
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
else
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
sme_err("Failed to allocate memory for IE");
|
||||
if (!pConnectProfile->pAddIEAssoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pConnectProfile->nAddIEAssocLength =
|
||||
pProfile->nAddIEAssocLength;
|
||||
qdf_mem_copy(pConnectProfile->pAddIEAssoc,
|
||||
|
|
@ -10032,10 +9990,9 @@ csr_check_profile_in_scan_cache(tpAniSirGlobal mac_ctx,
|
|||
{
|
||||
QDF_STATUS status;
|
||||
*scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
|
||||
if (NULL == *scan_filter) {
|
||||
sme_err("alloc for ScanFilter failed");
|
||||
if (!*scan_filter)
|
||||
return false;
|
||||
}
|
||||
|
||||
(*scan_filter)->scan_filter_for_roam = 1;
|
||||
status = csr_roam_prepare_filter_from_profile(mac_ctx,
|
||||
&neighbor_roam_info->csrNeighborRoamProfile,
|
||||
|
|
@ -10088,11 +10045,8 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
roamInfo = qdf_mem_malloc(sizeof(*roamInfo));
|
||||
|
||||
if (!roamInfo) {
|
||||
sme_err("failed to allocate memory");
|
||||
if (!roamInfo)
|
||||
return;
|
||||
}
|
||||
|
||||
if (CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(pMac, sessionId)) {
|
||||
sme_debug("***eCsrNothingToJoin***");
|
||||
|
|
@ -10168,7 +10122,6 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac,
|
|||
qdf_mem_free(roamInfo);
|
||||
return;
|
||||
} else {
|
||||
sme_err("pCurRoamProfile memory alloc failed");
|
||||
QDF_ASSERT(0);
|
||||
csr_dequeue_command(pMac);
|
||||
}
|
||||
|
|
@ -10342,10 +10295,8 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf)
|
|||
pIbssPeerInd = (tSmeIbssPeerInd *) pSmeRsp;
|
||||
sme_err("Peer departed ntf from LIM in joining state");
|
||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||
if (!roam_info) {
|
||||
sme_err("failed to allocate memory for roam_info");
|
||||
if (!roam_info)
|
||||
break;
|
||||
}
|
||||
|
||||
roam_info->staId = (uint8_t) pIbssPeerInd->staId;
|
||||
qdf_copy_macaddr(&roam_info->peerMac, &pIbssPeerInd->peer_addr);
|
||||
|
|
@ -10933,10 +10884,8 @@ csr_create_fils_realm_hash(struct cds_fils_connection_info *fils_con_info,
|
|||
return false;
|
||||
|
||||
hash = qdf_mem_malloc(SHA256_DIGEST_SIZE);
|
||||
if (!hash) {
|
||||
sme_err("malloc fails in fils realm");
|
||||
if (!hash)
|
||||
return false;
|
||||
}
|
||||
|
||||
data[0] = fils_con_info->realm;
|
||||
qdf_get_hash(SHA256_CRYPTO_TYPE, 1, data,
|
||||
|
|
@ -11435,10 +11384,8 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
|
|||
tSmeCmd *cmd;
|
||||
|
||||
cmd = qdf_mem_malloc(sizeof(*cmd));
|
||||
if (NULL == cmd) {
|
||||
sme_err("memory allocation failed for size: %zu", sizeof(*cmd));
|
||||
if (!cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if AP dis-associated us because of MIC failure. If so,
|
||||
|
|
@ -12301,10 +12248,9 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
|
|||
|
||||
msg = qdf_mem_malloc(sizeof(
|
||||
struct sme_obss_ht40_scanind_msg));
|
||||
if (NULL == msg) {
|
||||
sme_err("Malloc failed");
|
||||
if (!msg)
|
||||
return;
|
||||
}
|
||||
|
||||
msg->msg_type = eWNI_SME_HT40_OBSS_SCAN_IND;
|
||||
msg->length =
|
||||
sizeof(struct sme_obss_ht40_scanind_msg);
|
||||
|
|
@ -13007,10 +12953,8 @@ QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal mac_ctx,
|
|||
QDF_STATUS status;
|
||||
|
||||
del_sta_self_req = qdf_mem_malloc(sizeof(struct del_sta_self_params));
|
||||
if (NULL == del_sta_self_req) {
|
||||
sme_err(" mem alloc failed for tDelStaSelfParams");
|
||||
if (!del_sta_self_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
qdf_mem_copy(del_sta_self_req->self_mac_addr,
|
||||
sme_command->u.delStaSessionCmd.selfMacAddr,
|
||||
|
|
@ -13341,7 +13285,6 @@ int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel)
|
|||
uint16_t cfgId = 0;
|
||||
int8_t maxTxPwr = 0;
|
||||
uint8_t *pCountryInfo = NULL;
|
||||
QDF_STATUS status;
|
||||
uint8_t count = 0;
|
||||
uint8_t firstChannel;
|
||||
uint8_t maxChannels;
|
||||
|
|
@ -13356,16 +13299,9 @@ int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel)
|
|||
return maxTxPwr;
|
||||
|
||||
pCountryInfo = qdf_mem_malloc(cfgLength);
|
||||
if (NULL == pCountryInfo)
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
else
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: failed to allocate memory, status = %d",
|
||||
__func__, status);
|
||||
if (!pCountryInfo)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (wlan_cfg_get_str(pMac, cfgId, (uint8_t *)pCountryInfo,
|
||||
&cfgLength) != QDF_STATUS_SUCCESS) {
|
||||
goto error;
|
||||
|
|
@ -16903,10 +16839,8 @@ QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
|
|||
WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE == rsp->sub_type))) {
|
||||
sme_debug("send SET IE msg to PE");
|
||||
msg = qdf_mem_malloc(sizeof(*msg));
|
||||
if (NULL == msg) {
|
||||
sme_err("Memory allocation failed");
|
||||
if (!msg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
msg->msg_type = eWNI_SME_SET_IE_REQ;
|
||||
msg->session_id = rsp->session_id;
|
||||
|
|
@ -16993,10 +16927,8 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac,
|
|||
struct scheduler_msg msg = {0};
|
||||
|
||||
add_sta_self_req = qdf_mem_malloc(sizeof(struct add_sta_self_params));
|
||||
if (NULL == add_sta_self_req) {
|
||||
sme_err("Unable to allocate memory for tAddSelfStaParams");
|
||||
if (!add_sta_self_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (!(pMac->mlme_cfg)) {
|
||||
pe_err("Mlme cfg NULL");
|
||||
|
|
@ -17509,10 +17441,9 @@ QDF_STATUS csr_send_mb_stats_req_msg(tpAniSirGlobal pMac, uint32_t statsMask,
|
|||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
pMsg = qdf_mem_malloc(sizeof(tAniGetPEStatsReq));
|
||||
if (NULL == pMsg) {
|
||||
sme_err("Failed to allocate mem for stats req ");
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* need to initiate a stats request to PE */
|
||||
pMsg->msgType = eWNI_SME_GET_STATISTICS_REQ;
|
||||
pMsg->msgLen = (uint16_t) sizeof(tAniGetPEStatsReq);
|
||||
|
|
@ -17765,10 +17696,8 @@ struct csr_statsclient_reqinfo *csr_roam_insert_entry_into_list(
|
|||
true)) {
|
||||
|
||||
pNewStaEntry = qdf_mem_malloc(sizeof(struct csr_statsclient_reqinfo));
|
||||
if (NULL == pNewStaEntry) {
|
||||
sme_err("couldn't allocate memory for the entry");
|
||||
if (!pNewStaEntry)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pNewStaEntry->callback = pStaEntry->callback;
|
||||
pNewStaEntry->pContext = pStaEntry->pContext;
|
||||
|
|
@ -17843,11 +17772,9 @@ QDF_STATUS csr_get_snr(tpAniSirGlobal pMac,
|
|||
uint32_t sessionId = CSR_SESSION_ID_INVALID;
|
||||
tAniGetSnrReq *pMsg;
|
||||
|
||||
pMsg = (tAniGetSnrReq *) qdf_mem_malloc(sizeof(tAniGetSnrReq));
|
||||
if (NULL == pMsg) {
|
||||
sme_err("failed to allocate mem for req");
|
||||
pMsg = qdf_mem_malloc(sizeof(tAniGetSnrReq));
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
status = csr_roam_get_session_id_from_bssid(pMac, &bssId, &sessionId);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
|
|
@ -18466,11 +18393,9 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx,
|
|||
#endif /* FEATURE_WLAN_ESE */
|
||||
|
||||
req_buf = qdf_mem_malloc(sizeof(tSirRoamOffloadScanReq));
|
||||
if (NULL == req_buf) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"Mem alloc for roam scan offload req failed");
|
||||
if (!req_buf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
req_buf->Command = command;
|
||||
/*
|
||||
* If command is STOP, then pass down ScanOffloadEnabled as Zero. This
|
||||
|
|
@ -18831,10 +18756,8 @@ QDF_STATUS csr_invoke_neighbor_report_request(uint8_t session_id,
|
|||
}
|
||||
|
||||
invoke_params = qdf_mem_malloc(sizeof(*invoke_params));
|
||||
if (!invoke_params) {
|
||||
sme_err("Memory allocation failure");
|
||||
if (!invoke_params)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
invoke_params->vdev_id = session_id;
|
||||
invoke_params->send_resp_to_host = send_resp_to_host;
|
||||
|
|
@ -19246,11 +19169,9 @@ csr_create_per_roam_request(tpAniSirGlobal mac_ctx,
|
|||
struct wmi_per_roam_config_req *req_buf = NULL;
|
||||
|
||||
req_buf = qdf_mem_malloc(sizeof(struct wmi_per_roam_config_req));
|
||||
if (!req_buf) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"Mem alloc for per roam req failed");
|
||||
if (!req_buf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
req_buf->vdev_id = session_id;
|
||||
req_buf->per_config.enable =
|
||||
mac_ctx->mlme_cfg->lfr.per_roam_enable;
|
||||
|
|
@ -20456,10 +20377,8 @@ QDF_STATUS csr_roam_update_config(tpAniSirGlobal mac_ctx, uint8_t session_id,
|
|||
}
|
||||
|
||||
msg = qdf_mem_malloc(sizeof(*msg));
|
||||
if (NULL == msg) {
|
||||
sme_err("malloc failed");
|
||||
if (!msg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
msg->messageType = eWNI_SME_UPDATE_CONFIG;
|
||||
msg->sme_session_id = session_id;
|
||||
|
|
@ -20649,7 +20568,6 @@ QDF_STATUS csr_roam_start_beacon_req(tpAniSirGlobal pMac,
|
|||
tSirStartBeaconIndication *pMsg;
|
||||
|
||||
pMsg = qdf_mem_malloc(sizeof(tSirStartBeaconIndication));
|
||||
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
|
|
@ -20684,15 +20602,11 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac,
|
|||
|
||||
/* following buffer will be freed by consumer (PE) */
|
||||
pLocalBuffer = qdf_mem_malloc(pModifyIE->ieBufferlength);
|
||||
|
||||
if (NULL == pLocalBuffer) {
|
||||
sme_err("Memory Allocation Failure!!!");
|
||||
if (!pLocalBuffer)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
pModifyAddIEInd = qdf_mem_malloc(sizeof(tSirModifyIEsInd));
|
||||
if (NULL == pModifyAddIEInd) {
|
||||
sme_err("Memory Allocation Failure!!!");
|
||||
if (!pModifyAddIEInd) {
|
||||
qdf_mem_free(pLocalBuffer);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
|
@ -20752,8 +20666,7 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac,
|
|||
if (pUpdateIE->ieBufferlength != 0) {
|
||||
/* Following buffer will be freed by consumer (PE) */
|
||||
pLocalBuffer = qdf_mem_malloc(pUpdateIE->ieBufferlength);
|
||||
if (NULL == pLocalBuffer) {
|
||||
sme_err("Memory Allocation Failure!!!");
|
||||
if (!pLocalBuffer) {
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer,
|
||||
|
|
@ -20761,11 +20674,8 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
pUpdateAddIEs = qdf_mem_malloc(sizeof(tSirUpdateIEsInd));
|
||||
if (NULL == pUpdateAddIEs) {
|
||||
sme_err("Memory Allocation Failure!!!");
|
||||
if (pLocalBuffer != NULL)
|
||||
qdf_mem_free(pLocalBuffer);
|
||||
|
||||
if (!pUpdateAddIEs) {
|
||||
qdf_mem_free(pLocalBuffer);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
|
|
@ -21367,13 +21277,11 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
|
||||
len = sizeof(*cmd);
|
||||
cmd = qdf_mem_malloc(len);
|
||||
if (!cmd) {
|
||||
sme_err("Memory allocation failed");
|
||||
if (!cmd)
|
||||
/* Probably the fail response will also fail during malloc.
|
||||
* Still proceeding to send response!
|
||||
*/
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* For hidden SSID case, if there is any scan command pending
|
||||
* it needs to be cleared before issuing set HW mode
|
||||
|
|
@ -21442,11 +21350,9 @@ fail:
|
|||
if (cmd)
|
||||
qdf_mem_free(cmd);
|
||||
param = qdf_mem_malloc(sizeof(*param));
|
||||
if (!param) {
|
||||
sme_err(
|
||||
"Malloc fail: Fail to send response to SME");
|
||||
if (!param)
|
||||
return;
|
||||
}
|
||||
|
||||
sme_err("Sending set HW fail response to SME");
|
||||
param->status = SET_HW_MODE_STATUS_ECANCELED;
|
||||
param->cfgd_hw_mode_index = 0;
|
||||
|
|
@ -21485,13 +21391,11 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
|
||||
len = sizeof(*cmd);
|
||||
cmd = qdf_mem_malloc(len);
|
||||
if (!cmd) {
|
||||
sme_err("Memory allocation failed");
|
||||
if (!cmd)
|
||||
/* Probably the fail response will also fail during malloc.
|
||||
* Still proceeding to send response!
|
||||
*/
|
||||
goto fail;
|
||||
}
|
||||
|
||||
cmd->message_type = eWNI_SME_SET_DUAL_MAC_CFG_REQ;
|
||||
cmd->length = len;
|
||||
|
|
@ -21518,11 +21422,9 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
return;
|
||||
fail:
|
||||
param = qdf_mem_malloc(sizeof(*param));
|
||||
if (!param) {
|
||||
sme_err(
|
||||
"Malloc fail: Fail to send response to SME");
|
||||
if (!param)
|
||||
return;
|
||||
}
|
||||
|
||||
sme_err("Sending set dual mac fail response to SME");
|
||||
param->status = SET_HW_MODE_STATUS_ECANCELED;
|
||||
msg.type = eWNI_SME_SET_DUAL_MAC_CFG_RESP;
|
||||
|
|
@ -21560,10 +21462,8 @@ void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
|
||||
len = sizeof(*cmd);
|
||||
cmd = qdf_mem_malloc(len);
|
||||
if (!cmd) {
|
||||
sme_err("Memory allocation failed");
|
||||
if (!cmd)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
cmd->message_type = eWNI_SME_SET_ANTENNA_MODE_REQ;
|
||||
cmd->length = len;
|
||||
|
|
@ -21587,11 +21487,9 @@ void csr_process_set_antenna_mode(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
return;
|
||||
fail:
|
||||
param = qdf_mem_malloc(sizeof(*param));
|
||||
if (!param) {
|
||||
sme_err(
|
||||
"Malloc fail: Fail to send response to SME");
|
||||
if (!param)
|
||||
return;
|
||||
}
|
||||
|
||||
sme_err("Sending set dual mac fail response to SME");
|
||||
param->status = SET_ANTENNA_MODE_STATUS_ECANCELED;
|
||||
msg.type = eWNI_SME_SET_ANTENNA_MODE_RESP;
|
||||
|
|
@ -21628,13 +21526,11 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
|
||||
len = sizeof(*msg);
|
||||
msg = qdf_mem_malloc(len);
|
||||
if (!msg) {
|
||||
sme_err("Memory allocation failed");
|
||||
if (!msg)
|
||||
/* Probably the fail response is also fail during malloc.
|
||||
* Still proceeding to send response!
|
||||
*/
|
||||
goto fail;
|
||||
}
|
||||
|
||||
msg->msgType = eWNI_SME_NSS_UPDATE_REQ;
|
||||
msg->msgLen = sizeof(*msg);
|
||||
|
|
@ -21652,11 +21548,9 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command)
|
|||
return;
|
||||
fail:
|
||||
param = qdf_mem_malloc(sizeof(*param));
|
||||
if (!param) {
|
||||
sme_err(
|
||||
"Malloc fail: Fail to send response to SME");
|
||||
if (!param)
|
||||
return;
|
||||
}
|
||||
|
||||
sme_err("Sending nss update fail response to SME");
|
||||
param->tx_status = QDF_STATUS_E_FAILURE;
|
||||
param->session_id = command->u.nss_update_cmd.session_id;
|
||||
|
|
@ -21694,10 +21588,8 @@ static void csr_copy_fils_join_rsp_roam_info(struct csr_roam_info *roam_info,
|
|||
struct fils_join_rsp_params *roam_fils_info;
|
||||
|
||||
roam_info->fils_join_rsp = qdf_mem_malloc(sizeof(*roam_fils_info));
|
||||
if (!roam_info->fils_join_rsp) {
|
||||
sme_err("fils_join_rsp malloc fails!");
|
||||
if (!roam_info->fils_join_rsp)
|
||||
return;
|
||||
}
|
||||
|
||||
roam_fils_info = roam_info->fils_join_rsp;
|
||||
cds_copy_hlp_info(&roam_synch_data->dst_mac,
|
||||
|
|
@ -21836,9 +21728,7 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
|
|||
ps_global_info->remain_in_power_active_till_dhcp = false;
|
||||
session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
|
||||
roam_info = qdf_mem_malloc(sizeof(struct csr_roam_info));
|
||||
if (NULL == roam_info) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
FL("LFR3: Mem Alloc failed for roam info"));
|
||||
if (!roam_info) {
|
||||
session->roam_synch_in_progress = false;
|
||||
qdf_mem_free(ies_local);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
|
@ -21939,8 +21829,7 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
|
|||
SIR_MAC_HDR_LEN_3A;
|
||||
roam_info->pbFrames = qdf_mem_malloc(roam_info->nBeaconLength +
|
||||
roam_info->nAssocReqLength + roam_info->nAssocRspLength);
|
||||
if (NULL == roam_info->pbFrames) {
|
||||
sme_err("no memory available");
|
||||
if (!roam_info->pbFrames) {
|
||||
session->roam_synch_in_progress = false;
|
||||
if (roam_info)
|
||||
qdf_mem_free(roam_info);
|
||||
|
|
|
|||
|
|
@ -300,10 +300,8 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
|
||||
roam_info = qdf_mem_malloc(sizeof(struct csr_roam_info));
|
||||
if (!roam_info) {
|
||||
sme_err("Failed to allocate memory for roam_info");
|
||||
if (!roam_info)
|
||||
goto roam_completion;
|
||||
}
|
||||
|
||||
if (session->scan_info.roambssentry) {
|
||||
scan_result = GET_BASE_ADDR(session->scan_info.roambssentry,
|
||||
|
|
@ -430,11 +428,9 @@ static void csr_scan_add_result(tpAniSirGlobal mac_ctx,
|
|||
|
||||
buf = qdf_nbuf_alloc(NULL, qdf_roundup(buf_len, 4),
|
||||
0, 4, false);
|
||||
if (!buf) {
|
||||
sme_err("Failed to allocate wbuf for mgmt rx len (%u)",
|
||||
buf_len);
|
||||
if (!buf)
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_nbuf_put_tail(buf, buf_len);
|
||||
qdf_nbuf_set_protocol(buf, ETH_P_CONTROL);
|
||||
|
||||
|
|
@ -500,10 +496,8 @@ static bool csr_scan_save_bss_description(tpAniSirGlobal pMac,
|
|||
cbAllocated = sizeof(struct tag_csrscan_result) + cbBSSDesc;
|
||||
|
||||
pCsrBssDescription = qdf_mem_malloc(cbAllocated);
|
||||
if (!pCsrBssDescription) {
|
||||
sme_err(" Failed to allocate memory for pCsrBssDescription");
|
||||
if (!pCsrBssDescription)
|
||||
return false;
|
||||
}
|
||||
|
||||
pCsrBssDescription->AgingCount =
|
||||
(int32_t) pMac->roam.configParam.agingCount;
|
||||
|
|
@ -1203,10 +1197,8 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx,
|
|||
sizeof(scan_result->Result.BssDescriptor.length);
|
||||
|
||||
temp = qdf_mem_malloc(sizeof(struct tag_csrscan_result) + bss_len);
|
||||
if (!temp) {
|
||||
sme_err("bss mem fail");
|
||||
if (!temp)
|
||||
goto error;
|
||||
}
|
||||
|
||||
temp->AgingCount = scan_result->AgingCount;
|
||||
temp->preferValue = scan_result->preferValue;
|
||||
|
|
@ -1494,11 +1486,8 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id,
|
|||
session->scan_info.scan_reason = eCsrScanForSsid;
|
||||
session->scan_info.roam_id = roam_id;
|
||||
req = qdf_mem_malloc(sizeof(*req));
|
||||
if (!req) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("Failed to allocate memory"));
|
||||
if (!req)
|
||||
goto error;
|
||||
}
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_macaddr_from_psoc(mac_ctx->psoc,
|
||||
pdev_id,
|
||||
|
|
@ -1817,10 +1806,8 @@ QDF_STATUS csr_scan_abort_mac_scan(tpAniSirGlobal mac_ctx, uint32_t vdev_id,
|
|||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
req = qdf_mem_malloc(sizeof(*req));
|
||||
if (!req) {
|
||||
sme_err("Failed to allocate memory");
|
||||
if (!req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* Get NL global context from objmgr*/
|
||||
if (vdev_id == INVAL_VDEV_ID)
|
||||
|
|
@ -1944,10 +1931,9 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac,
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
pNewBssDescriptor = qdf_mem_malloc(size);
|
||||
if (NULL == pNewBssDescriptor) {
|
||||
sme_err("memory allocation failed");
|
||||
if (pNewBssDescriptor)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
qdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size);
|
||||
/* change the BSSID & channel as passed */
|
||||
qdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes,
|
||||
|
|
@ -2005,11 +1991,8 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac,
|
|||
(SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET);
|
||||
scan_res_ptr = qdf_mem_malloc(sizeof(struct tag_csrscan_result) +
|
||||
length);
|
||||
if (scan_res_ptr == NULL) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
" fail to allocate memory for frame");
|
||||
if (!scan_res_ptr)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
qdf_mem_copy(&scan_res_ptr->Result.BssDescriptor,
|
||||
bss_desc_ptr,
|
||||
|
|
@ -2660,11 +2643,8 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(tpAniSirGlobal mac_ctx,
|
|||
ieFields[0]) + ie_len);
|
||||
alloc_len = sizeof(struct tag_csrscan_result) + bss_len;
|
||||
bss = qdf_mem_malloc(alloc_len);
|
||||
|
||||
if (!bss) {
|
||||
sme_err("could not allocate bss");
|
||||
if (!bss)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
bss->AgingCount =
|
||||
(int32_t) mac_ctx->roam.configParam.agingCount;
|
||||
|
|
@ -2966,7 +2946,6 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal mac_ctx,
|
|||
|
||||
ret_list = qdf_mem_malloc(sizeof(struct scan_result_list));
|
||||
if (!ret_list) {
|
||||
sme_err("pRetList is NULL");
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
|
@ -3018,14 +2997,11 @@ QDF_STATUS csr_scan_get_result_for_bssid(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
|
||||
scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
|
||||
if (!scan_filter) {
|
||||
sme_err("Failed to allocated memory for scan_filter");
|
||||
if (!scan_filter)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
scan_filter->BSSIDs.bssid = qdf_mem_malloc(sizeof(*bssid));
|
||||
if (!scan_filter->BSSIDs.bssid) {
|
||||
sme_err("Failed to allocate memory for BSSIDs");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto free_filter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,10 +323,9 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
|
|||
/* Finished all checks, now add it to candidate list */
|
||||
bss_info =
|
||||
qdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo));
|
||||
if (NULL == bss_info) {
|
||||
sme_err("Memory alloc fail");
|
||||
if (!bss_info)
|
||||
continue;
|
||||
}
|
||||
|
||||
bss_info->pBssDescription =
|
||||
qdf_mem_malloc(descr->length +
|
||||
sizeof(descr->length));
|
||||
|
|
@ -334,7 +333,6 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
|
|||
qdf_mem_copy(bss_info->pBssDescription, descr,
|
||||
descr->length + sizeof(descr->length));
|
||||
} else {
|
||||
sme_err("Memory alloc fail");
|
||||
qdf_mem_free(bss_info);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,9 +103,7 @@ void csr_neighbor_roam_send_lfr_metric_event(
|
|||
struct csr_roam_info *roam_info;
|
||||
|
||||
roam_info = qdf_mem_malloc(sizeof(struct csr_roam_info));
|
||||
if (NULL == roam_info) {
|
||||
sme_err("Memory allocation failed!");
|
||||
} else {
|
||||
if (roam_info) {
|
||||
qdf_mem_copy((void *)roam_info->bssid.bytes,
|
||||
(void *)bssid, sizeof(struct qdf_mac_addr));
|
||||
csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
|
||||
|
|
@ -374,10 +372,8 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
|
|||
pScanFilter->BSSIDs.bssid =
|
||||
qdf_mem_malloc(sizeof(tSirMacAddr) *
|
||||
pScanFilter->BSSIDs.numOfBSSIDs);
|
||||
if (NULL == pScanFilter->BSSIDs.bssid) {
|
||||
sme_err("Scan Filter BSSID mem alloc failed");
|
||||
if (!pScanFilter->BSSIDs.bssid)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* Populate the BSSID from handoff info received from HDD */
|
||||
for (i = 0; i < pScanFilter->BSSIDs.numOfBSSIDs; i++) {
|
||||
|
|
@ -394,10 +390,9 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
|
|||
pScanFilter->SSIDs.SSIDList =
|
||||
qdf_mem_malloc(sizeof(tCsrSSIDInfo) *
|
||||
pScanFilter->SSIDs.numOfSSIDs);
|
||||
if (NULL == pScanFilter->SSIDs.SSIDList) {
|
||||
sme_err("Scan Filter SSID mem alloc failed");
|
||||
if (!pScanFilter->SSIDs.SSIDList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
for (i = 0; i < roam_params->num_ssid_allowed_list; i++) {
|
||||
pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1;
|
||||
pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0;
|
||||
|
|
@ -413,10 +408,9 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
|
|||
pScanFilter->SSIDs.numOfSSIDs = 1;
|
||||
pScanFilter->SSIDs.SSIDList =
|
||||
qdf_mem_malloc(sizeof(tCsrSSIDInfo));
|
||||
if (NULL == pScanFilter->SSIDs.SSIDList) {
|
||||
sme_err("Scan Filter SSID mem alloc failed");
|
||||
if (!pScanFilter->SSIDs.SSIDList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
pScanFilter->SSIDs.SSIDList->handoffPermitted = 1;
|
||||
pScanFilter->SSIDs.SSIDList->ssidHidden = 0;
|
||||
pScanFilter->SSIDs.SSIDList->SSID.length =
|
||||
|
|
@ -453,8 +447,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
|
|||
pScanFilter->ChannelInfo.numOfChannels = num_ch;
|
||||
pScanFilter->ChannelInfo.ChannelList =
|
||||
qdf_mem_malloc(num_ch * sizeof(uint8_t));
|
||||
if (NULL == pScanFilter->ChannelInfo.ChannelList) {
|
||||
sme_err("Scan Filter Ch list mem alloc failed");
|
||||
if (!pScanFilter->ChannelInfo.ChannelList) {
|
||||
qdf_mem_free(pScanFilter->SSIDs.SSIDList);
|
||||
pScanFilter->SSIDs.SSIDList = NULL;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
|
@ -1277,11 +1270,9 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId)
|
|||
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList =
|
||||
qdf_mem_malloc(pMac->roam.configParam.neighborRoamConfig.
|
||||
neighborScanChanList.numChannels);
|
||||
if (NULL ==
|
||||
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
|
||||
sme_err("Memory Allocation for CFG Channel List failed");
|
||||
if (!pNeighborRoamInfo->cfgParams.channelInfo.ChannelList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
} else {
|
||||
pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
|
||||
}
|
||||
|
|
@ -1491,10 +1482,9 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
|
|||
|
||||
roam_id = GET_NEXT_ROAM_ID(&mac_ctx->roam);
|
||||
profile = qdf_mem_malloc(sizeof(struct csr_roam_profile));
|
||||
if (NULL == profile) {
|
||||
sme_err("Memory alloc failed");
|
||||
if (!profile)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
status =
|
||||
csr_roam_copy_profile(mac_ctx, profile,
|
||||
session->pCurRoamProfile);
|
||||
|
|
@ -1508,8 +1498,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
|
|||
profile->BSSIDs.bssid =
|
||||
qdf_mem_malloc(sizeof(tSirMacAddr) *
|
||||
profile->BSSIDs.numOfBSSIDs);
|
||||
if (NULL == profile->BSSIDs.bssid) {
|
||||
sme_err("mem alloc failed for BSSID");
|
||||
if (!profile->BSSIDs.bssid) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -1527,8 +1516,7 @@ static QDF_STATUS csr_neighbor_roam_process_handoff_req(
|
|||
qdf_mem_malloc(sizeof(*profile->
|
||||
ChannelInfo.ChannelList) *
|
||||
profile->ChannelInfo.numOfChannels);
|
||||
if (NULL == profile->ChannelInfo.ChannelList) {
|
||||
sme_err("mem alloc failed for ChannelList");
|
||||
if (!profile->ChannelInfo.ChannelList) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto end;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -524,21 +524,16 @@ QDF_STATUS csr_roam_issue_ft_preauth_req(tpAniSirGlobal mac_ctx,
|
|||
}
|
||||
|
||||
auth_req_len = sizeof(tSirFTPreAuthReq);
|
||||
preauth_req = (tpSirFTPreAuthReq) qdf_mem_malloc(auth_req_len);
|
||||
if (NULL == preauth_req) {
|
||||
sme_err("Memory allocation for FT Preauth request failed");
|
||||
preauth_req = qdf_mem_malloc(auth_req_len);
|
||||
if (!preauth_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* Save the SME Session ID. We need it while processing preauth resp */
|
||||
csr_session->ftSmeContext.smeSessionId = session_id;
|
||||
|
||||
preauth_req->pbssDescription =
|
||||
(tpSirBssDescription) qdf_mem_malloc(sizeof(bss_desc->length)
|
||||
preauth_req->pbssDescription = qdf_mem_malloc(sizeof(bss_desc->length)
|
||||
+ bss_desc->length);
|
||||
if (NULL == preauth_req->pbssDescription) {
|
||||
sme_err("Memory allocation for FT Preauth request failed");
|
||||
if (!preauth_req->pbssDescription)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
preauth_req->messageType = eWNI_SME_FT_PRE_AUTH_REQ;
|
||||
|
||||
|
|
@ -694,10 +689,9 @@ void csr_roam_ft_pre_auth_rsp_processor(tpAniSirGlobal mac_ctx,
|
|||
|
||||
csr_session->ftSmeContext.reassoc_ft_ies =
|
||||
qdf_mem_malloc(ft_ies_length);
|
||||
if (NULL == csr_session->ftSmeContext.reassoc_ft_ies) {
|
||||
sme_err("Memory allocation failed for ft_ies");
|
||||
if (!csr_session->ftSmeContext.reassoc_ft_ies)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Copy the RIC IEs to reassoc IEs */
|
||||
qdf_mem_copy(((uint8_t *) csr_session->ftSmeContext.
|
||||
reassoc_ft_ies),
|
||||
|
|
|
|||
|
|
@ -87,12 +87,9 @@ QDF_STATUS sme_nan_request(tpNanRequestReq input)
|
|||
|
||||
data_len = sizeof(tNanRequest) + input->request_data_len;
|
||||
data = qdf_mem_malloc(data_len);
|
||||
|
||||
if (data == NULL) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("Memory allocation failure"));
|
||||
if (!data)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
data->request_data_len = input->request_data_len;
|
||||
if (input->request_data_len) {
|
||||
qdf_mem_copy(data->request_data,
|
||||
|
|
|
|||
|
|
@ -1205,13 +1205,9 @@ static enum sme_qos_statustype sme_qos_internal_setup_req(tpAniSirGlobal pMac,
|
|||
/* we received an expected "good" status */
|
||||
/* create an entry in the flow list */
|
||||
pentry = qdf_mem_malloc(sizeof(*pentry));
|
||||
if (!pentry) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the new entry in the Flow List",
|
||||
__func__, __LINE__);
|
||||
if (!pentry)
|
||||
return SME_QOS_STATUS_SETUP_FAILURE_RSP;
|
||||
}
|
||||
|
||||
pentry->ac_type = ac;
|
||||
pentry->HDDcontext = HDDcontext;
|
||||
pentry->QoSCallback = QoSCallback;
|
||||
|
|
@ -1553,16 +1549,10 @@ static enum sme_qos_statustype sme_qos_internal_setup_req(tpAniSirGlobal pMac,
|
|||
status)) {
|
||||
/* we received an expected "good" status */
|
||||
/* create an entry in the flow list */
|
||||
pentry =
|
||||
(struct sme_qos_flowinfoentry *)
|
||||
qdf_mem_malloc(sizeof(*pentry));
|
||||
if (!pentry) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the new entry in the Flow List",
|
||||
__func__, __LINE__);
|
||||
pentry = qdf_mem_malloc(sizeof(*pentry));
|
||||
if (!pentry)
|
||||
return SME_QOS_STATUS_SETUP_FAILURE_RSP;
|
||||
}
|
||||
|
||||
pentry->ac_type = ac;
|
||||
pentry->HDDcontext = HDDcontext;
|
||||
pentry->QoSCallback = QoSCallback;
|
||||
|
|
@ -1825,14 +1815,10 @@ static enum sme_qos_statustype sme_qos_internal_modify_req(tpAniSirGlobal pMac,
|
|||
* Flow List Once we have decided on OTA exchange needed or
|
||||
* not we can delete the original one from the List
|
||||
*/
|
||||
pNewEntry = (struct sme_qos_flowinfoentry *) qdf_mem_malloc(
|
||||
sizeof(*pNewEntry));
|
||||
if (!pNewEntry) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the new entry in the Flow List",
|
||||
__func__, __LINE__);
|
||||
pNewEntry = qdf_mem_malloc(sizeof(*pNewEntry));
|
||||
if (!pNewEntry)
|
||||
return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP;
|
||||
}
|
||||
|
||||
pNewEntry->ac_type = ac;
|
||||
pNewEntry->sessionId = sessionId;
|
||||
pNewEntry->HDDcontext = flow_info->HDDcontext;
|
||||
|
|
@ -3495,14 +3481,9 @@ static QDF_STATUS sme_qos_ft_aggr_qos_req(tpAniSirGlobal mac_ctx, uint8_t
|
|||
|
||||
session = &sme_qos_cb.sessionInfo[session_id];
|
||||
|
||||
aggr_req = (tSirAggrQosReq *) qdf_mem_malloc(sizeof(tSirAggrQosReq));
|
||||
|
||||
if (!aggr_req) {
|
||||
/* err msg */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("couldn't allocate memory for the msg buffer"));
|
||||
aggr_req = qdf_mem_malloc(sizeof(tSirAggrQosReq));
|
||||
if (!aggr_req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
aggr_req->messageType = eWNI_SME_FT_AGGR_QOS_REQ;
|
||||
aggr_req->length = sizeof(tSirAggrQosReq);
|
||||
|
|
@ -3942,14 +3923,10 @@ static QDF_STATUS sme_qos_add_ts_req(tpAniSirGlobal pMac,
|
|||
}
|
||||
|
||||
pSession = &sme_qos_cb.sessionInfo[sessionId];
|
||||
pMsg = (tSirAddtsReq *) qdf_mem_malloc(sizeof(tSirAddtsReq));
|
||||
if (!pMsg) {
|
||||
/* err msg */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the msg buffer",
|
||||
__func__, __LINE__);
|
||||
pMsg = qdf_mem_malloc(sizeof(tSirAddtsReq));
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
pMsg->messageType = eWNI_SME_ADDTS_REQ;
|
||||
pMsg->length = sizeof(tSirAddtsReq);
|
||||
pMsg->sessionId = sessionId;
|
||||
|
|
@ -4056,14 +4033,10 @@ static QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac,
|
|||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: %d: invoked on session %d for AC %d",
|
||||
__func__, __LINE__, sessionId, ac);
|
||||
pMsg = (tSirDeltsReq *) qdf_mem_malloc(sizeof(tSirDeltsReq));
|
||||
if (!pMsg) {
|
||||
/* err msg */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the msg buffer",
|
||||
__func__, __LINE__);
|
||||
pMsg = qdf_mem_malloc(sizeof(tSirDeltsReq));
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* get pointer to the TSPEC being deleted */
|
||||
pSession = &sme_qos_cb.sessionInfo[sessionId];
|
||||
pACInfo = &pSession->ac_info[ac];
|
||||
|
|
@ -6287,15 +6260,10 @@ static QDF_STATUS sme_qos_buffer_cmd(struct sme_qos_cmdinfo *pcmd,
|
|||
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: %d: Invoked", __func__, __LINE__);
|
||||
pentry = (struct sme_qos_cmdinfoentry *) qdf_mem_malloc(sizeof(
|
||||
struct sme_qos_cmdinfoentry));
|
||||
if (!pentry) {
|
||||
/* err msg */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: Memory allocation failure",
|
||||
__func__, __LINE__);
|
||||
pentry = qdf_mem_malloc(sizeof(struct sme_qos_cmdinfoentry));
|
||||
if (!pentry)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
/* copy the entire CmdInfo */
|
||||
pentry->cmdInfo = *pcmd;
|
||||
|
||||
|
|
@ -6495,13 +6463,10 @@ static QDF_STATUS sme_qos_save_assoc_info(struct sme_qos_sessioninfo *pSession,
|
|||
bssLen = pAssoc_info->pBssDesc->length +
|
||||
sizeof(pAssoc_info->pBssDesc->length);
|
||||
/* save the bss Descriptor */
|
||||
pBssDesc = (tSirBssDescription *) qdf_mem_malloc(bssLen);
|
||||
if (!pBssDesc) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: %d: couldn't allocate memory for the bss Descriptor",
|
||||
__func__, __LINE__);
|
||||
pBssDesc = qdf_mem_malloc(bssLen);
|
||||
if (!pBssDesc)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
qdf_mem_copy(pBssDesc, pAssoc_info->pBssDesc, bssLen);
|
||||
pSession->assocInfo.pBssDesc = pBssDesc;
|
||||
/* save the apsd info from assoc */
|
||||
|
|
|
|||
|
|
@ -185,10 +185,9 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx,
|
|||
do {
|
||||
length = sizeof(tSirBeaconReportXmitInd);
|
||||
beacon_rep = qdf_mem_malloc(length);
|
||||
if (NULL == beacon_rep) {
|
||||
sme_err("Unable to allocate memory for beacon report");
|
||||
if (!beacon_rep)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
beacon_rep->messageType = eWNI_SME_BEACON_REPORT_RESP_XMIT_IND;
|
||||
beacon_rep->length = length;
|
||||
beacon_rep->uDialogToken = rrm_ctx->token;
|
||||
|
|
@ -431,12 +430,9 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
|
|||
filter.BSSIDs.bssid = (struct qdf_mac_addr *)&rrm_ctx->bssId;
|
||||
|
||||
if (rrm_ctx->ssId.length) {
|
||||
filter.SSIDs.SSIDList =
|
||||
(tCsrSSIDInfo *) qdf_mem_malloc(sizeof(tCsrSSIDInfo));
|
||||
if (filter.SSIDs.SSIDList == NULL) {
|
||||
sme_err("qdf_mem_malloc failed");
|
||||
filter.SSIDs.SSIDList = qdf_mem_malloc(sizeof(tCsrSSIDInfo));
|
||||
if (!filter.SSIDs.SSIDList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
filter.SSIDs.SSIDList->SSID.length =
|
||||
rrm_ctx->ssId.length;
|
||||
|
|
@ -523,14 +519,12 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
|
|||
scanresults_arr = qdf_mem_malloc(num_scan_results *
|
||||
sizeof(next_result));
|
||||
if (!scanresults_arr) {
|
||||
sme_err("Failed to allocate scanresults_arr");
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto rrm_send_scan_results_done;
|
||||
}
|
||||
|
||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||
if (NULL == roam_info) {
|
||||
sme_err("malloc failed");
|
||||
if (!roam_info) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto rrm_send_scan_results_done;
|
||||
}
|
||||
|
|
@ -760,10 +754,9 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
|
|||
uint32_t chan_num;
|
||||
|
||||
req = qdf_mem_malloc(sizeof(*req));
|
||||
if (!req) {
|
||||
sme_debug("Failed to allocate memory");
|
||||
if (!req)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
|
||||
mac_ctx->psoc,
|
||||
session_id,
|
||||
|
|
@ -937,10 +930,9 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac,
|
|||
/* Add all the channel in the regulatory domain. */
|
||||
wlan_cfg_get_str_len(pMac, WNI_CFG_VALID_CHANNEL_LIST, &len);
|
||||
pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len);
|
||||
if (pSmeRrmContext->channelList.ChannelList == NULL) {
|
||||
sme_err("qdf_mem_malloc failed");
|
||||
if (!pSmeRrmContext->channelList.ChannelList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
csr_get_cfg_valid_channels(pMac, pSmeRrmContext->channelList.
|
||||
ChannelList, &len);
|
||||
pSmeRrmContext->channelList.numOfChannels = (uint8_t) len;
|
||||
|
|
@ -958,10 +950,8 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac,
|
|||
len += pBeaconReq->channelList.numChannels;
|
||||
|
||||
pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len);
|
||||
if (pSmeRrmContext->channelList.ChannelList == NULL) {
|
||||
sme_err("qdf_mem_malloc failed");
|
||||
if (!pSmeRrmContext->channelList.ChannelList)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (pBeaconReq->channelInfo.channelNum != 255) {
|
||||
if (csr_roam_is_channel_valid
|
||||
|
|
@ -1056,10 +1046,8 @@ QDF_STATUS sme_rrm_neighbor_report_request(tpAniSirGlobal pMac, uint8_t
|
|||
}
|
||||
|
||||
pMsg = qdf_mem_malloc(sizeof(tSirNeighborReportReqInd));
|
||||
if (NULL == pMsg) {
|
||||
sme_err("Unable to allocate memory for Neighbor request");
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
rrm_ll_purge_neighbor_cache(pMac,
|
||||
&pMac->rrm.rrmSmeContext.neighborReportCache);
|
||||
|
|
@ -1287,8 +1275,7 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac,
|
|||
for (i = 0; i < pNeighborRpt->numNeighborReports; i++) {
|
||||
pNeighborReportDesc =
|
||||
qdf_mem_malloc(sizeof(tRrmNeighborReportDesc));
|
||||
if (NULL == pNeighborReportDesc) {
|
||||
sme_err("Failed to alloc memory for RRM report desc");
|
||||
if (!pNeighborReportDesc) {
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto end;
|
||||
|
||||
|
|
@ -1296,8 +1283,7 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac,
|
|||
|
||||
pNeighborReportDesc->pNeighborBssDescription =
|
||||
qdf_mem_malloc(sizeof(tSirNeighborBssDescription));
|
||||
if (NULL == pNeighborReportDesc->pNeighborBssDescription) {
|
||||
sme_err("Failed to alloc mem for RRM BSS Description");
|
||||
if (!pNeighborReportDesc->pNeighborBssDescription) {
|
||||
qdf_mem_free(pNeighborReportDesc);
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Reference in a new issue