diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2016-03-01 10:33:54 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-03-24 11:58:16 -0700 |
| commit | 600c3a00be1b7a73e72c94bbb4a2c6f2446c8b6e (patch) | |
| tree | bcc9f45faeb25d45687e421fcdaa664a448e8530 | |
| parent | df2b26883dba2ebd84b2830d75d06acdbfff7219 (diff) | |
qcacld-3.0: Add QDF mem API's
Replace CDF mem API's with QDF mem API's
Change-Id: Icf247b4dc5b26f4b960dcb98e323b096c1d6076c
CRs-Fixed: 981188
167 files changed, 4972 insertions, 6125 deletions
diff --git a/core/bmi/src/bmi.c b/core/bmi/src/bmi.c index ffc6966a09e6..36b44c976f3a 100644 --- a/core/bmi/src/bmi.c +++ b/core/bmi/src/bmi.c @@ -77,8 +77,8 @@ QDF_STATUS bmi_init(struct ol_context *ol_ctx) if (!info->bmi_cmd_buff) { info->bmi_cmd_buff = - cdf_os_mem_alloc_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, - &info->bmi_cmd_da, 0); + qdf_mem_alloc_consistent(cdf_dev, cdf_dev->dev, MAX_BMI_CMDBUF_SZ, + &info->bmi_cmd_da); if (!info->bmi_cmd_buff) { BMI_ERR("No Memory for BMI Command"); return QDF_STATUS_E_NOMEM; @@ -87,8 +87,8 @@ QDF_STATUS bmi_init(struct ol_context *ol_ctx) if (!info->bmi_rsp_buff) { info->bmi_rsp_buff = - cdf_os_mem_alloc_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, - &info->bmi_rsp_da, 0); + qdf_mem_alloc_consistent(cdf_dev, cdf_dev->dev, MAX_BMI_CMDBUF_SZ, + &info->bmi_rsp_da); if (!info->bmi_rsp_buff) { BMI_ERR("No Memory for BMI Response"); goto end; @@ -96,7 +96,7 @@ QDF_STATUS bmi_init(struct ol_context *ol_ctx) } return QDF_STATUS_SUCCESS; end: - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_cmd_buff, info->bmi_cmd_da, 0); info->bmi_cmd_buff = NULL; return QDF_STATUS_E_NOMEM; @@ -113,14 +113,14 @@ void bmi_cleanup(struct ol_context *ol_ctx) } if (info->bmi_cmd_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_cmd_buff, info->bmi_cmd_da, 0); info->bmi_cmd_buff = NULL; info->bmi_cmd_da = 0; } if (info->bmi_rsp_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_rsp_buff, info->bmi_rsp_da, 0); info->bmi_rsp_buff = NULL; info->bmi_rsp_da = 0; @@ -167,7 +167,7 @@ bmi_get_target_info(struct bmi_target_info *targ_info, } cid = BMI_GET_TARGET_INFO; - cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); + qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); length = sizeof(struct bmi_target_info); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid), @@ -178,7 +178,7 @@ bmi_get_target_info(struct bmi_target_info *targ_info, return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(targ_info, bmi_rsp_buff, length); + qdf_mem_copy(targ_info, bmi_rsp_buff, length); return QDF_STATUS_SUCCESS; } @@ -243,8 +243,8 @@ QDF_STATUS bmi_read_soc_register(uint32_t address, uint32_t *param, qdf_dma_addr_t rsp = info->bmi_rsp_da; bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); - cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); - cdf_mem_set(bmi_rsp_buff, 0, sizeof(cid) + sizeof(address)); + qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); + qdf_mem_set(bmi_rsp_buff, 0, sizeof(cid) + sizeof(address)); if (info->bmi_done) { BMI_DBG("Command disallowed"); @@ -257,9 +257,9 @@ QDF_STATUS bmi_read_soc_register(uint32_t address, uint32_t *param, cid = BMI_READ_SOC_REGISTER; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); param_len = sizeof(*param); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, @@ -268,7 +268,7 @@ QDF_STATUS bmi_read_soc_register(uint32_t address, uint32_t *param, BMI_DBG("Unable to read from the device; status:%d", status); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(param, bmi_rsp_buff, sizeof(*param)); + qdf_mem_copy(param, bmi_rsp_buff, sizeof(*param)); BMI_DBG("BMI Read SOC Register: Exit value: %d", *param); return QDF_STATUS_SUCCESS; @@ -288,7 +288,7 @@ QDF_STATUS bmi_write_soc_register(uint32_t address, uint32_t param, qdf_dma_addr_t rsp = info->bmi_rsp_da; bmi_assert(BMI_COMMAND_FITS(size)); - cdf_mem_set(bmi_cmd_buff, 0, size); + qdf_mem_set(bmi_cmd_buff, 0, size); if (info->bmi_done) { BMI_DBG("Command disallowed"); @@ -301,11 +301,11 @@ QDF_STATUS bmi_write_soc_register(uint32_t address, uint32_t param, cid = BMI_WRITE_SOC_REGISTER; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), ¶m, sizeof(param)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), ¶m, sizeof(param)); offset += sizeof(param); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, NULL, NULL, 0); @@ -333,7 +333,7 @@ bmilz_data(uint8_t *buffer, uint32_t length, struct ol_context *ol_ctx) qdf_dma_addr_t rsp = info->bmi_rsp_da; bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header)); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); if (info->bmi_done) { BMI_ERR("Command disallowed"); @@ -350,11 +350,11 @@ bmilz_data(uint8_t *buffer, uint32_t length, struct ol_context *ol_ctx) txlen = (remaining < (BMI_DATASZ_MAX - header)) ? remaining : (BMI_DATASZ_MAX - header); offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - cdf_mem_copy(&(bmi_cmd_buff[offset]), + qdf_mem_copy(&(bmi_cmd_buff[offset]), &buffer[length - remaining], txlen); offset += txlen; status = hif_exchange_bmi_msg(scn, cmd, rsp, @@ -390,7 +390,7 @@ QDF_STATUS bmi_sign_stream_start(uint32_t address, uint8_t *buffer, qdf_dma_addr_t rsp = info->bmi_rsp_da; bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header)); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); if (info->bmi_done) { BMI_ERR("Command disallowed"); @@ -416,14 +416,14 @@ QDF_STATUS bmi_sign_stream_start(uint32_t address, uint8_t *buffer, } offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(offset); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); + qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); offset += txlen; status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, NULL, @@ -453,7 +453,7 @@ bmilz_stream_start(uint32_t address, struct ol_context *ol_ctx) qdf_dma_addr_t rsp = info->bmi_rsp_da; bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); - cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); + qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); if (info->bmi_done) { BMI_DBG("Command disallowed"); @@ -464,9 +464,9 @@ bmilz_stream_start(uint32_t address, struct ol_context *ol_ctx) cid = BMI_LZ_STREAM_START; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, NULL, NULL, 0); @@ -494,7 +494,7 @@ bmi_fast_download(uint32_t address, uint8_t *buffer, /* copy the last word into a zero padded buffer */ if (unaligned_bytes) - cdf_mem_copy(&last_word, &buffer[last_word_offset], + qdf_mem_copy(&last_word, &buffer[last_word_offset], unaligned_bytes); status = bmilz_data(buffer, last_word_offset, ol_ctx); diff --git a/core/bmi/src/bmi_1.c b/core/bmi/src/bmi_1.c index adcf117c2f45..df51f625f6eb 100644 --- a/core/bmi/src/bmi_1.c +++ b/core/bmi/src/bmi_1.c @@ -58,9 +58,9 @@ bmi_read_memory(uint32_t address, bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length))); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + sizeof(cid) + + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length)); - cdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + sizeof(cid) + + qdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + sizeof(cid) + sizeof(address) + sizeof(length)); BMI_DBG("BMI Read: device: 0x%p, address: 0x%x, length: %d", @@ -74,12 +74,12 @@ bmi_read_memory(uint32_t address, rxlen = (remaining < BMI_DATASZ_MAX) ? remaining : BMI_DATASZ_MAX; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen)); offset += sizeof(length); /* note we reuse the same buffer to receive on */ @@ -91,11 +91,11 @@ bmi_read_memory(uint32_t address, return QDF_STATUS_E_FAILURE; } if (remaining == rxlen) { - cdf_mem_copy(&buffer[length - remaining + align], + qdf_mem_copy(&buffer[length - remaining + align], bmi_rsp_buff, rxlen - align); /* last align bytes are invalid */ } else { - cdf_mem_copy(&buffer[length - remaining + align], + qdf_mem_copy(&buffer[length - remaining + align], bmi_rsp_buff, rxlen); } remaining -= rxlen; @@ -133,7 +133,7 @@ QDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length, } bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header)); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); BMI_DBG("BMI Write Memory:device: 0x%p, address: 0x%x, length: %d", scn, address, length); @@ -155,14 +155,14 @@ QDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length, txlen = (BMI_DATASZ_MAX - header); } offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); + qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); offset += txlen; status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, NULL, NULL, @@ -207,8 +207,8 @@ bmi_execute(uint32_t address, A_UINT32 *param, struct ol_context *ol_ctx) } bmi_assert(BMI_COMMAND_FITS(size)); - cdf_mem_set(bmi_cmd_buff, 0, size); - cdf_mem_set(bmi_rsp_buff, 0, size); + qdf_mem_set(bmi_cmd_buff, 0, size); + qdf_mem_set(bmi_rsp_buff, 0, size); BMI_DBG("BMI Execute: device: 0x%p, address: 0x%x, param: %d", @@ -217,11 +217,11 @@ bmi_execute(uint32_t address, A_UINT32 *param, struct ol_context *ol_ctx) cid = BMI_EXECUTE; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), param, sizeof(*param)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), param, sizeof(*param)); offset += sizeof(*param); param_len = sizeof(*param); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, @@ -231,7 +231,7 @@ bmi_execute(uint32_t address, A_UINT32 *param, struct ol_context *ol_ctx) return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(param, bmi_rsp_buff, sizeof(*param)); + qdf_mem_copy(param, bmi_rsp_buff, sizeof(*param)); BMI_DBG("BMI Execute: Exit (param: %d)", *param); return QDF_STATUS_SUCCESS; @@ -251,7 +251,7 @@ bmi_firmware_download(struct ol_context *ol_ctx) struct bmi_target_info targ_info; struct hif_target_info *tgt_info = hif_get_target_info_handle(scn); - cdf_mem_zero(&targ_info, sizeof(targ_info)); + qdf_mem_zero(&targ_info, sizeof(targ_info)); /* Initialize BMI */ status = bmi_init(ol_ctx); if (status != QDF_STATUS_SUCCESS) { @@ -323,7 +323,7 @@ QDF_STATUS bmi_done_local(struct ol_context *ol_ctx) return QDF_STATUS_NOT_INITIALIZED; } - cdf_mem_copy(info->bmi_cmd_buff, &cid, sizeof(cid)); + qdf_mem_copy(info->bmi_cmd_buff, &cid, sizeof(cid)); status = hif_exchange_bmi_msg(scn, cmd, rsp, info->bmi_cmd_buff, sizeof(cid), NULL, NULL, 0); @@ -333,14 +333,14 @@ QDF_STATUS bmi_done_local(struct ol_context *ol_ctx) } if (info->bmi_cmd_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_cmd_buff, info->bmi_cmd_da, 0); info->bmi_cmd_buff = NULL; info->bmi_cmd_da = 0; } if (info->bmi_rsp_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_rsp_buff, info->bmi_rsp_da, 0); info->bmi_rsp_buff = NULL; info->bmi_rsp_da = 0; diff --git a/core/bmi/src/bmi_2.c b/core/bmi/src/bmi_2.c index e2a3c291d2d5..9c1929b476fb 100644 --- a/core/bmi/src/bmi_2.c +++ b/core/bmi/src/bmi_2.c @@ -58,7 +58,7 @@ bmi_no_command(struct ol_context *ol_ctx) } cid = BMI_NO_COMMAND; - cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); + qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); length = sizeof(ret); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid), @@ -69,7 +69,7 @@ bmi_no_command(struct ol_context *ol_ctx) return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, length); + qdf_mem_copy(&ret, bmi_rsp_buff, length); if (ret != 0) { BMI_ERR("bmi no command response error ret 0x%x", ret); return QDF_STATUS_E_FAILURE; @@ -109,7 +109,7 @@ bmi_done_local(struct ol_context *ol_ctx) cid = BMI_DONE; - cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); + qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); length = sizeof(ret); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid), @@ -119,7 +119,7 @@ bmi_done_local(struct ol_context *ol_ctx) BMI_ERR("Failed to close BMI on target status:%d", status); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, length); + qdf_mem_copy(&ret, bmi_rsp_buff, length); if (ret != 0) { BMI_ERR("BMI DONE response failed:%d", ret); @@ -127,14 +127,14 @@ bmi_done_local(struct ol_context *ol_ctx) } if (info->bmi_cmd_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_cmd_buff, info->bmi_cmd_da, 0); info->bmi_cmd_buff = NULL; info->bmi_cmd_da = 0; } if (info->bmi_rsp_buff) { - cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, + qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ, info->bmi_rsp_buff, info->bmi_rsp_da, 0); info->bmi_rsp_buff = NULL; info->bmi_rsp_da = 0; @@ -173,7 +173,7 @@ QDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length, } bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header)); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header); cid = BMI_WRITE_MEMORY; rsp_len = sizeof(ret); @@ -193,14 +193,14 @@ QDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length, txlen = (BMI_DATASZ_MAX - header); } offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); + qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen); offset += txlen; status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset, bmi_rsp_buff, &rsp_len, @@ -209,7 +209,7 @@ QDF_STATUS bmi_write_memory(uint32_t address, uint8_t *buffer, uint32_t length, BMI_ERR("BMI Write Memory Failed status:%d", status); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, rsp_len); + qdf_mem_copy(&ret, bmi_rsp_buff, rsp_len); if (ret != 0) { BMI_ERR("BMI Write memory response fail: %x", ret); return QDF_STATUS_E_FAILURE; @@ -248,8 +248,8 @@ bmi_read_memory(uint32_t address, uint8_t *buffer, } bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + size)); - cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + size); - cdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + size); + qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + size); + qdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + size); cid = BMI_READ_MEMORY; rsp_len = sizeof(ret); @@ -259,12 +259,12 @@ bmi_read_memory(uint32_t address, uint8_t *buffer, rxlen = (remaining < BMI_DATASZ_MAX - rsp_len) ? remaining : (BMI_DATASZ_MAX - rsp_len); offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, + qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address)); offset += sizeof(address); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen)); offset += sizeof(length); total_len = rxlen + rsp_len; @@ -281,14 +281,14 @@ bmi_read_memory(uint32_t address, uint8_t *buffer, return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, rsp_len); + qdf_mem_copy(&ret, bmi_rsp_buff, rsp_len); if (ret != 0) { BMI_ERR("bmi read memory response fail %x", ret); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&buffer[length - remaining], + qdf_mem_copy(&buffer[length - remaining], (uint8_t *)bmi_rsp_buff + rsp_len, rxlen); remaining -= rxlen; address += rxlen; } @@ -322,7 +322,7 @@ bmi_execute(uint32_t address, uint32_t *param, struct ol_context *ol_ctx) cid = BMI_EXECUTE; - cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); + qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid)); length = sizeof(ret); status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid), @@ -333,7 +333,7 @@ bmi_execute(uint32_t address, uint32_t *param, struct ol_context *ol_ctx) return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, length); + qdf_mem_copy(&ret, bmi_rsp_buff, length); if (ret != 0) { BMI_ERR("%s: ret 0x%x", __func__, ret); @@ -371,7 +371,7 @@ bmi_load_image(dma_addr_t address, } bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); - cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); + qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address)); BMI_DBG("%s: Enter device: 0x%p, size %d", __func__, scn, size); @@ -379,15 +379,15 @@ bmi_load_image(dma_addr_t address, cid = BMI_LOAD_IMAGE; offset = 0; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid)); offset += sizeof(cid); addr_l = address & 0xffffffff; addr_h = 0x00; - cdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_l, sizeof(addr_l)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_l, sizeof(addr_l)); offset += sizeof(addr_l); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_h, sizeof(addr_h)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_h, sizeof(addr_h)); offset += sizeof(addr_h); - cdf_mem_copy(&(bmi_cmd_buff[offset]), &size, sizeof(size)); + qdf_mem_copy(&(bmi_cmd_buff[offset]), &size, sizeof(size)); offset += sizeof(size); length = sizeof(ret); @@ -399,7 +399,7 @@ bmi_load_image(dma_addr_t address, return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&ret, bmi_rsp_buff, length); + qdf_mem_copy(&ret, bmi_rsp_buff, length); if (ret != 0) { BMI_ERR("%s: ret 0x%x", __func__, ret); return QDF_STATUS_E_FAILURE; diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c index ccae3469e492..42438da81f51 100644 --- a/core/bmi/src/ol_fw.c +++ b/core/bmi/src/ol_fw.c @@ -97,7 +97,7 @@ static int ol_check_fw_hash(const u8 *data, u32 fw_size, ATH_BIN_FILE file) goto end; } - if (!cdf_mem_compare(hash, temp, SHA256_DIGEST_SIZE)) { + if (qdf_mem_cmp(hash, temp, SHA256_DIGEST_SIZE)) { BMI_INFO("Download FW in non-secure mode:%d", file); goto end; } @@ -109,7 +109,7 @@ static int ol_check_fw_hash(const u8 *data, u32 fw_size, ATH_BIN_FILE file) ret = -1; goto end; } - cdf_mem_copy(fw_mem, data, fw_size); + qdf_mem_copy(fw_mem, data, fw_size); ret = cnss_get_sha_hash(fw_mem, fw_size, "sha256", digest); @@ -118,7 +118,7 @@ static int ol_check_fw_hash(const u8 *data, u32 fw_size, ATH_BIN_FILE file) goto end; } - if (cdf_mem_compare(hash, digest, SHA256_DIGEST_SIZE) != 0) { + if (qdf_mem_cmp(hash, digest, SHA256_DIGEST_SIZE) == 0) { BMI_ERR("Hash Mismatch"); qdf_trace_hex_dump(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, digest, SHA256_DIGEST_SIZE); @@ -299,14 +299,14 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file, uint32_t board_ext_address; int32_t board_ext_data_size; - temp_eeprom = cdf_mem_malloc(fw_entry_size); + temp_eeprom = qdf_mem_malloc(fw_entry_size); if (!temp_eeprom) { BMI_ERR("%s: Memory allocation failed", __func__); release_firmware(fw_entry); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(temp_eeprom, (uint8_t *) fw_entry->data, + qdf_mem_copy(temp_eeprom, (uint8_t *) fw_entry->data, fw_entry_size); switch (target_type) { @@ -444,7 +444,7 @@ __ol_transfer_bin_file(struct ol_context *ol_ctx, ATH_BIN_FILE file, end: if (temp_eeprom) - cdf_mem_free(temp_eeprom); + qdf_mem_free(temp_eeprom); if (status != EOK) { BMI_ERR("%s, BMI operation failed: %d", __func__, __LINE__); @@ -507,7 +507,7 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn) { int ret = -1; - struct ramdump_info *info = cdf_mem_malloc(sizeof(struct ramdump_info)); + struct ramdump_info *info = qdf_mem_malloc(sizeof(struct ramdump_info)); if (!info) { BMI_ERR("%s Memory for Ramdump Allocation failed", __func__); @@ -523,7 +523,7 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn) ret = ol_target_coredump(scn, info->base, info->size); - cdf_mem_free(info); + qdf_mem_free(info); return ret; } @@ -1655,5 +1655,5 @@ struct ol_config_info *ol_get_ini_handle(struct ol_context *ol_ctx) void ol_init_ini_config(struct ol_context *ol_ctx, struct ol_config_info *cfg) { - cdf_mem_copy(&ol_ctx->cfg_info, cfg, sizeof(struct ol_config_info)); + qdf_mem_copy(&ol_ctx->cfg_info, cfg, sizeof(struct ol_config_info)); } diff --git a/core/cdf/inc/cdf_memory.h b/core/cdf/inc/cdf_memory.h deleted file mode 100644 index 8170a0f87dc9..000000000000 --- a/core/cdf/inc/cdf_memory.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. - * - * Previously licensed under the ISC license by Qualcomm Atheros, Inc. - * - * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This file was originally distributed by Qualcomm Atheros, Inc. - * under proprietary terms before Copyright ownership was assigned - * to the Linux Foundation. - */ - -#if !defined(__CDF_MEMORY_H) -#define __CDF_MEMORY_H - -/** - * DOC: cdf_memory - * - * Connectivity driver framework (CDF) memory management APIs - */ - -/* Include Files */ -#include <qdf_types.h> - -/** - * struct cdf_mem_dma_page_t - Allocated dmaable page - * @page_v_addr_start: Page start virtual address - * @page_v_addr_end: Page end virtual address - * @page_p_addr: Page start physical address - */ -struct cdf_mem_dma_page_t { - char *page_v_addr_start; - char *page_v_addr_end; - qdf_dma_addr_t page_p_addr; -}; - -/** - * struct cdf_mem_multi_page_t - multiple page allocation information storage - * @num_element_per_page: Number of element in single page - * @num_pages: Number of allocation needed pages - * @dma_pages: page information storage in case of coherent memory - * @cacheable_pages: page information storage in case of cacheable memory - */ -struct cdf_mem_multi_page_t { - uint16_t num_element_per_page; - uint16_t num_pages; - struct cdf_mem_dma_page_t *dma_pages; - void **cacheable_pages; -}; - -/* Preprocessor definitions and constants */ - -#ifdef MEMORY_DEBUG -void cdf_mem_clean(void); -void cdf_mem_init(void); -void cdf_mem_exit(void); -#else -/** - * cdf_mem_init() - initialize cdf memory debug functionality - * - * Return: none - */ -static inline void cdf_mem_init(void) -{ -} - -/** - * cdf_mem_exit() - exit cdf memory debug functionality - * - * Return: none - */ -static inline void cdf_mem_exit(void) -{ -} -#endif -/* Type declarations */ - -/* Function declarations and documenation */ - -/** - * cdf_mem_malloc() - allocation CDF memory - * @size: Number of bytes of memory to allocate. - * - * This function will dynamicallly allocate the specified number of bytes of - * memory. - * - * - * Return: - * Upon successful allocate, returns a non-NULL pointer to the allocated - * memory. If this function is unable to allocate the amount of memory - * specified (for any reason) it returns %NULL. - * - */ -#ifdef MEMORY_DEBUG -#define cdf_mem_malloc(size) cdf_mem_malloc_debug(size, __FILE__, __LINE__) -void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum); -#else -void *cdf_mem_malloc(size_t size); -#endif - -/** - * cdf_mem_free() - free CDF memory - * @ptr: Pointer to the starting address of the memory to be free'd. - * - * This function will free the memory pointed to by 'ptr'. - * - * Return: - * Nothing - * - */ -void cdf_mem_free(void *ptr); - -/** - * cdf_mem_set() - set (fill) memory with a specified byte value. - * @pMemory: Pointer to memory that will be set - * @numBytes: Number of bytes to be set - * @value: Byte set in memory - * - * Return: - * Nothing - * - */ -void cdf_mem_set(void *ptr, uint32_t numBytes, uint32_t value); - -/** - * cdf_mem_zero() - zero out memory - * @pMemory: pointer to memory that will be set to zero - * @numBytes: number of bytes zero - * @value: byte set in memory - * - * This function sets the memory location to all zeros, essentially clearing - * the memory. - * - * Return: - * Nothing - * - */ -void cdf_mem_zero(void *ptr, uint32_t numBytes); - -/** - * cdf_mem_copy() - copy memory - * @pDst: Pointer to destination memory location (to copy to) - * @pSrc: Pointer to source memory location (to copy from) - * @numBytes: Number of bytes to copy. - * - * Copy host memory from one location to another, similar to memcpy in - * standard C. Note this function does not specifically handle overlapping - * source and destination memory locations. Calling this function with - * overlapping source and destination memory locations will result in - * unpredictable results. Use cdf_mem_move() if the memory locations - * for the source and destination are overlapping (or could be overlapping!) - * - * Return: - * Nothing - * - */ -void cdf_mem_copy(void *pDst, const void *pSrc, uint32_t numBytes); - -/** - * cdf_mem_move() - move memory - * @pDst: pointer to destination memory location (to move to) - * @pSrc: pointer to source memory location (to move from) - * @numBytes: number of bytes to move. - * - * Move host memory from one location to another, similar to memmove in - * standard C. Note this function *does* handle overlapping - * source and destination memory locations. - - * Return: - * Nothing - */ -void cdf_mem_move(void *pDst, const void *pSrc, uint32_t numBytes); - -/** - * cdf_mem_compare() - memory compare - * @pMemory1: pointer to one location in memory to compare. - * @pMemory2: pointer to second location in memory to compare. - * @numBytes: the number of bytes to compare. - * - * Function to compare two pieces of memory, similar to memcmp function - * in standard C. - * - * Return: - * bool - returns a bool value that tells if the memory locations - * are equal or not equal. - * - */ -bool cdf_mem_compare(const void *pMemory1, const void *pMemory2, - uint32_t numBytes); - -/** - * cdf_mem_compare2() - memory compare - * @pMemory1: pointer to one location in memory to compare. - * @pMemory2: pointer to second location in memory to compare. - * @numBytes: the number of bytes to compare. - * - * Function to compare two pieces of memory, similar to memcmp function - * in standard C. - * Return: - * int32_t - returns a bool value that tells if the memory - * locations are equal or not equal. - * 0 -- equal - * < 0 -- *pMemory1 is less than *pMemory2 - * > 0 -- *pMemory1 is bigger than *pMemory2 - */ -int32_t cdf_mem_compare2(const void *pMemory1, const void *pMemory2, - uint32_t numBytes); - -void *cdf_os_mem_alloc_consistent(qdf_device_t osdev, qdf_size_t size, - qdf_dma_addr_t *paddr, - qdf_dma_context_t mctx); -void -cdf_os_mem_free_consistent(qdf_device_t osdev, - qdf_size_t size, - void *vaddr, - qdf_dma_addr_t paddr, qdf_dma_context_t memctx); - -void -cdf_os_mem_dma_sync_single_for_device(qdf_device_t osdev, - qdf_dma_addr_t bus_addr, - qdf_size_t size, - enum dma_data_direction direction); - -/** - * cdf_str_len() - returns the length of a string - * @str: input string - * - * Return: - * length of string - */ -static inline int32_t cdf_str_len(const char *str) -{ - return strlen(str); -} - -void cdf_mem_multi_pages_alloc(qdf_device_t osdev, - struct cdf_mem_multi_page_t *pages, - size_t element_size, - uint16_t element_num, - qdf_dma_context_t memctxt, - bool cacheable); - -void cdf_mem_multi_pages_free(qdf_device_t osdev, - struct cdf_mem_multi_page_t *pages, - qdf_dma_context_t memctxt, - bool cacheable); -#endif /* __CDF_MEMORY_H */ diff --git a/core/cdf/src/cdf_memory.c b/core/cdf/src/cdf_memory.c deleted file mode 100644 index eee883efc5a0..000000000000 --- a/core/cdf/src/cdf_memory.c +++ /dev/null @@ -1,863 +0,0 @@ -/* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. - * - * Previously licensed under the ISC license by Qualcomm Atheros, Inc. - * - * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This file was originally distributed by Qualcomm Atheros, Inc. - * under proprietary terms before Copyright ownership was assigned - * to the Linux Foundation. - */ - -/** - * DOC: cdf_memory - * - * Connectivity driver framework (CDF) memory management APIs - */ - -/* Include Files */ -#include "cdf_memory.h" -#include "cdf_nbuf.h" -#include "qdf_trace.h" -#include "qdf_lock.h" -#include "qdf_mc_timer.h" - -#if defined(CONFIG_CNSS) -#include <net/cnss.h> -#endif - -#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC -#include <net/cnss_prealloc.h> -#endif - -#ifdef MEMORY_DEBUG -#include <qdf_list.h> -#include <linux/stacktrace.h> - -qdf_list_t cdf_mem_list; -qdf_spinlock_t cdf_mem_list_lock; - -static uint8_t WLAN_MEM_HEADER[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68 }; -static uint8_t WLAN_MEM_TAIL[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, - 0x86, 0x87 }; - -#define CDF_MEM_MAX_STACK_TRACE 16 - -struct s_cdf_mem_struct { - qdf_list_node_t pNode; - char *fileName; - unsigned int lineNum; - unsigned int size; -#ifdef WLAN_OPEN_SOURCE - unsigned long stack_trace[CDF_MEM_MAX_STACK_TRACE]; - struct stack_trace trace; -#endif - uint8_t header[8]; -}; -#endif - -/* Preprocessor Definitions and Constants */ -#define CDF_GET_MEMORY_TIME_THRESHOLD 3000 - -/* Type Declarations */ - -/* Data definitions */ - -/* External Function implementation */ -#ifdef MEMORY_DEBUG -#ifdef WLAN_OPEN_SOURCE -/** - * cdf_mem_save_stack_trace() - Save stack trace of the caller - * @mem_struct: Pointer to the memory structure where to save the stack trace - * - * Return: None - */ -static inline void cdf_mem_save_stack_trace(struct s_cdf_mem_struct *mem_struct) -{ - struct stack_trace *trace = &mem_struct->trace; - - trace->nr_entries = 0; - trace->max_entries = CDF_MEM_MAX_STACK_TRACE; - trace->entries = mem_struct->stack_trace; - trace->skip = 2; - - save_stack_trace(trace); -} - -/** - * cdf_mem_print_stack_trace() - Print saved stack trace - * @mem_struct: Pointer to the memory structure which has the saved stack trace - * to be printed - * - * Return: None - */ -static inline void cdf_mem_print_stack_trace(struct s_cdf_mem_struct - *mem_struct) -{ - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "Call stack for the source of leaked memory:"); - - print_stack_trace(&mem_struct->trace, 1); -} -#else -static inline void cdf_mem_save_stack_trace(struct s_cdf_mem_struct *mem_struct) -{ - -} -static inline void cdf_mem_print_stack_trace(struct s_cdf_mem_struct - *mem_struct) -{ - -} -#endif - -/** - * cdf_mem_init() - initialize cdf memory debug functionality - * - * Return: none - */ -void cdf_mem_init(void) -{ - /* Initalizing the list with maximum size of 60000 */ - qdf_list_create(&cdf_mem_list, 60000); - qdf_spinlock_create(&cdf_mem_list_lock); - cdf_net_buf_debug_init(); - return; -} - -/** - * cdf_mem_clean() - display memory leak debug info and free leaked pointers - * - * Return: none - */ -void cdf_mem_clean(void) -{ - uint32_t listSize; - listSize = qdf_list_size(&cdf_mem_list); - - cdf_net_buf_debug_clean(); - - if (listSize) { - qdf_list_node_t *pNode; - QDF_STATUS qdf_status; - - struct s_cdf_mem_struct *memStruct; - char *prev_mleak_file = ""; - unsigned int prev_mleak_lineNum = 0; - unsigned int prev_mleak_sz = 0; - unsigned int mleak_cnt = 0; - - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: List is not Empty. listSize %d ", - __func__, (int)listSize); - - do { - qdf_spin_lock(&cdf_mem_list_lock); - qdf_status = - qdf_list_remove_front(&cdf_mem_list, &pNode); - qdf_spin_unlock(&cdf_mem_list_lock); - if (QDF_STATUS_SUCCESS == qdf_status) { - memStruct = (struct s_cdf_mem_struct *)pNode; - /* Take care to log only once multiple memory - leaks from the same place */ - if (strcmp(prev_mleak_file, memStruct->fileName) - || (prev_mleak_lineNum != - memStruct->lineNum) - || (prev_mleak_sz != memStruct->size)) { - if (mleak_cnt != 0) { - QDF_TRACE(QDF_MODULE_ID_QDF, - QDF_TRACE_LEVEL_FATAL, - "%d Time Memory Leak@ File %s, @Line %d, size %d", - mleak_cnt, - prev_mleak_file, - prev_mleak_lineNum, - prev_mleak_sz); - } - prev_mleak_file = memStruct->fileName; - prev_mleak_lineNum = memStruct->lineNum; - prev_mleak_sz = memStruct->size; - mleak_cnt = 0; - } - mleak_cnt++; - cdf_mem_print_stack_trace(memStruct); - kfree((void *)memStruct); - } - } while (qdf_status == QDF_STATUS_SUCCESS); - - /* Print last memory leak from the module */ - if (mleak_cnt) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%d Time memory Leak@ File %s, @Line %d, size %d", - mleak_cnt, prev_mleak_file, - prev_mleak_lineNum, prev_mleak_sz); - } -#ifdef CONFIG_HALT_KMEMLEAK - BUG_ON(0); -#endif - } -} - -/** - * cdf_mem_exit() - exit cdf memory debug functionality - * - * Return: none - */ -void cdf_mem_exit(void) -{ - cdf_net_buf_debug_exit(); - cdf_mem_clean(); - qdf_list_destroy(&cdf_mem_list); -} - -/** - * cdf_mem_malloc_debug() - debug version of CDF memory allocation API - * @size: Number of bytes of memory to allocate. - * @fileName: File name from which memory allocation is called - * @lineNum: Line number from which memory allocation is called - * - * This function will dynamicallly allocate the specified number of bytes of - * memory and ad it in cdf tracking list to check against memory leaks and - * corruptions - * - * - * Return: - * Upon successful allocate, returns a non-NULL pointer to the allocated - * memory. If this function is unable to allocate the amount of memory - * specified (for any reason) it returns %NULL. - * - */ -void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum) -{ - struct s_cdf_mem_struct *memStruct; - void *memPtr = NULL; - uint32_t new_size; - int flags = GFP_KERNEL; - unsigned long time_before_kzalloc; - - if (size > (1024 * 1024) || size == 0) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: called with invalid arg; passed in %zu !!!", - __func__, size); - return NULL; - } - -#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC) - if (size > WCNSS_PRE_ALLOC_GET_THRESHOLD) { - void *pmem; - pmem = wcnss_prealloc_get(size); - if (NULL != pmem) { - memset(pmem, 0, size); - return pmem; - } - } -#endif - - if (in_interrupt() || irqs_disabled() || in_atomic()) - flags = GFP_ATOMIC; - - new_size = size + sizeof(struct s_cdf_mem_struct) + 8; - time_before_kzalloc = qdf_mc_timer_get_system_time(); - memStruct = (struct s_cdf_mem_struct *)kzalloc(new_size, flags); - /** - * If time taken by kmalloc is greater than - * CDF_GET_MEMORY_TIME_THRESHOLD msec - */ - if (qdf_mc_timer_get_system_time() - time_before_kzalloc >= - CDF_GET_MEMORY_TIME_THRESHOLD) - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: kzalloc took %lu msec for size %zu called from %pS at line %d", - __func__, - qdf_mc_timer_get_system_time() - time_before_kzalloc, - size, (void *)_RET_IP_, lineNum); - - if (memStruct != NULL) { - QDF_STATUS qdf_status; - - memStruct->fileName = fileName; - memStruct->lineNum = lineNum; - memStruct->size = size; - cdf_mem_save_stack_trace(memStruct); - - cdf_mem_copy(&memStruct->header[0], - &WLAN_MEM_HEADER[0], sizeof(WLAN_MEM_HEADER)); - - cdf_mem_copy((uint8_t *) (memStruct + 1) + size, - &WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL)); - - qdf_spin_lock_irqsave(&cdf_mem_list_lock); - qdf_status = qdf_list_insert_front(&cdf_mem_list, - &memStruct->pNode); - qdf_spin_unlock_irqrestore(&cdf_mem_list_lock); - if (QDF_STATUS_SUCCESS != qdf_status) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: Unable to insert node into List qdf_status %d", - __func__, qdf_status); - } - - memPtr = (void *)(memStruct + 1); - } - return memPtr; -} - -/** - * cdf_mem_free() - debug version of CDF memory free API - * @ptr: Pointer to the starting address of the memory to be free'd. - * - * This function will free the memory pointed to by 'ptr'. It also checks - * is memory is corrupted or getting double freed and panic. - * - * Return: - * Nothing - */ -void cdf_mem_free(void *ptr) -{ - if (ptr != NULL) { - QDF_STATUS qdf_status; - struct s_cdf_mem_struct *memStruct = - ((struct s_cdf_mem_struct *)ptr) - 1; - -#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC) - if (wcnss_prealloc_put(ptr)) - return; -#endif - - qdf_spin_lock_irqsave(&cdf_mem_list_lock); - qdf_status = - qdf_list_remove_node(&cdf_mem_list, &memStruct->pNode); - qdf_spin_unlock_irqrestore(&cdf_mem_list_lock); - - if (QDF_STATUS_SUCCESS == qdf_status) { - if (0 == cdf_mem_compare(memStruct->header, - &WLAN_MEM_HEADER[0], - sizeof(WLAN_MEM_HEADER))) { - QDF_TRACE(QDF_MODULE_ID_QDF, - QDF_TRACE_LEVEL_FATAL, - "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d", - memStruct->fileName, - (int)memStruct->lineNum); - QDF_BUG(0); - } - if (0 == - cdf_mem_compare((uint8_t *) ptr + memStruct->size, - &WLAN_MEM_TAIL[0], - sizeof(WLAN_MEM_TAIL))) { - QDF_TRACE(QDF_MODULE_ID_QDF, - QDF_TRACE_LEVEL_FATAL, - "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d", - memStruct->fileName, - (int)memStruct->lineNum); - QDF_BUG(0); - } - kfree((void *)memStruct); - } else { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, - "%s: Unallocated memory (double free?)", - __func__); - QDF_BUG(0); - } - } -} -#else -/** - * cdf_mem_malloc() - allocation CDF memory - * @size: Number of bytes of memory to allocate. - * - * This function will dynamicallly allocate the specified number of bytes of - * memory. - * - * - * Return: - * Upon successful allocate, returns a non-NULL pointer to the allocated - * memory. If this function is unable to allocate the amount of memory - * specified (for any reason) it returns %NULL. - * - */ -void *cdf_mem_malloc(size_t size) -{ - int flags = GFP_KERNEL; - void *memPtr = NULL; - unsigned long time_before_kzalloc; - - if (size > (1024 * 1024) || size == 0) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: called with invalid arg; passed in %zu !!", - __func__, size); - return NULL; - } - -#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC) - if (size > WCNSS_PRE_ALLOC_GET_THRESHOLD) { - void *pmem; - pmem = wcnss_prealloc_get(size); - if (NULL != pmem) { - memset(pmem, 0, size); - return pmem; - } - } -#endif - - if (in_interrupt() || irqs_disabled() || in_atomic()) - flags = GFP_ATOMIC; - time_before_kzalloc = qdf_mc_timer_get_system_time(); - memPtr = kzalloc(size, flags); - /** - * If time taken by kmalloc is greater than - * CDF_GET_MEMORY_TIME_THRESHOLD msec - */ - if (qdf_mc_timer_get_system_time() - time_before_kzalloc >= - CDF_GET_MEMORY_TIME_THRESHOLD) - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s: kzalloc took %lu msec for size %zu called from %pS", - __func__, - qdf_mc_timer_get_system_time() - time_before_kzalloc, - size, (void *)_RET_IP_); - return memPtr; -} - -/** - * cdf_mem_free() - free CDF memory - * @ptr: Pointer to the starting address of the memory to be free'd. - * - * This function will free the memory pointed to by 'ptr'. - * - * Return: - * Nothing - * - */ -void cdf_mem_free(void *ptr) -{ - if (ptr == NULL) - return; - -#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC) - if (wcnss_prealloc_put(ptr)) - return; -#endif - - kfree(ptr); -} -#endif - -/** - * cdf_mem_multi_pages_alloc() - allocate large size of kernel memory - * @osdev: OS device handle pointer - * @pages: Multi page information storage - * @element_size: Each element size - * @element_num: Total number of elements should be allocated - * @memctxt: Memory context - * @cacheable: Coherent memory or cacheable memory - * - * This function will allocate large size of memory over multiple pages. - * Large size of contiguous memory allocation will fail frequentely, then - * instead of allocate large memory by one shot, allocate through multiple, non - * contiguous memory and combine pages when actual usage - * - * Return: None - */ -void cdf_mem_multi_pages_alloc(qdf_device_t osdev, - struct cdf_mem_multi_page_t *pages, - size_t element_size, - uint16_t element_num, - qdf_dma_context_t memctxt, - bool cacheable) -{ - uint16_t page_idx; - struct cdf_mem_dma_page_t *dma_pages; - void **cacheable_pages = NULL; - uint16_t i; - - QDF_BUG(PAGE_SIZE >= element_size); - - pages->num_element_per_page = PAGE_SIZE / element_size; - if (!pages->num_element_per_page) { - qdf_print("Invalid page %d or element size %d", - (int)PAGE_SIZE, (int)element_size); - goto out_fail; - } - - pages->num_pages = element_num / pages->num_element_per_page; - if (element_num % pages->num_element_per_page) - pages->num_pages++; - - if (cacheable) { - /* Pages information storage */ - pages->cacheable_pages = cdf_mem_malloc( - pages->num_pages * sizeof(pages->cacheable_pages)); - if (!pages->cacheable_pages) { - qdf_print("Cacheable page storage alloc fail"); - goto out_fail; - } - - cacheable_pages = pages->cacheable_pages; - for (page_idx = 0; page_idx < pages->num_pages; page_idx++) { - cacheable_pages[page_idx] = cdf_mem_malloc(PAGE_SIZE); - if (!cacheable_pages[page_idx]) { - qdf_print("cacheable page alloc fail, pi %d", - page_idx); - goto page_alloc_fail; - } - } - pages->dma_pages = NULL; - } else { - pages->dma_pages = cdf_mem_malloc( - pages->num_pages * sizeof(struct cdf_mem_dma_page_t)); - if (!pages->dma_pages) { - qdf_print("dmaable page storage alloc fail"); - goto out_fail; - } - - dma_pages = pages->dma_pages; - for (page_idx = 0; page_idx < pages->num_pages; page_idx++) { - dma_pages->page_v_addr_start = - cdf_os_mem_alloc_consistent(osdev, PAGE_SIZE, - &dma_pages->page_p_addr, memctxt); - if (!dma_pages->page_v_addr_start) { - qdf_print("dmaable page alloc fail pi %d", - page_idx); - goto page_alloc_fail; - } - dma_pages->page_v_addr_end = - dma_pages->page_v_addr_start + PAGE_SIZE; - dma_pages++; - } - pages->cacheable_pages = NULL; - } - return; - -page_alloc_fail: - if (cacheable) { - for (i = 0; i < page_idx; i++) - cdf_mem_free(pages->cacheable_pages[i]); - cdf_mem_free(pages->cacheable_pages); - } else { - dma_pages = pages->dma_pages; - for (i = 0; i < page_idx; i++) { - cdf_os_mem_free_consistent(osdev, PAGE_SIZE, - dma_pages->page_v_addr_start, - dma_pages->page_p_addr, memctxt); - dma_pages++; - } - cdf_mem_free(pages->dma_pages); - } - -out_fail: - pages->cacheable_pages = NULL; - pages->dma_pages = NULL; - pages->num_pages = 0; - return; -} - -/** - * cdf_mem_multi_pages_free() - free large size of kernel memory - * @osdev: OS device handle pointer - * @pages: Multi page information storage - * @memctxt: Memory context - * @cacheable: Coherent memory or cacheable memory - * - * This function will free large size of memory over multiple pages. - * - * Return: None - */ -void cdf_mem_multi_pages_free(qdf_device_t osdev, - struct cdf_mem_multi_page_t *pages, - qdf_dma_context_t memctxt, - bool cacheable) -{ - unsigned int page_idx; - struct cdf_mem_dma_page_t *dma_pages; - - if (cacheable) { - for (page_idx = 0; page_idx < pages->num_pages; page_idx++) - cdf_mem_free(pages->cacheable_pages[page_idx]); - cdf_mem_free(pages->cacheable_pages); - } else { - dma_pages = pages->dma_pages; - for (page_idx = 0; page_idx < pages->num_pages; page_idx++) { - cdf_os_mem_free_consistent(osdev, PAGE_SIZE, - dma_pages->page_v_addr_start, - dma_pages->page_p_addr, memctxt); - dma_pages++; - } - cdf_mem_free(pages->dma_pages); - } - - pages->cacheable_pages = NULL; - pages->dma_pages = NULL; - pages->num_pages = 0; - return; -} - - -/** - * cdf_mem_set() - set (fill) memory with a specified byte value. - * @pMemory: Pointer to memory that will be set - * @numBytes: Number of bytes to be set - * @value: Byte set in memory - * - * Return: - * Nothing - * - */ -void cdf_mem_set(void *ptr, uint32_t numBytes, uint32_t value) -{ - if (ptr == NULL) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s called with NULL parameter ptr", __func__); - return; - } - memset(ptr, value, numBytes); -} - -/** - * cdf_mem_zero() - zero out memory - * @pMemory: pointer to memory that will be set to zero - * @numBytes: number of bytes zero - * @value: byte set in memory - * - * This function sets the memory location to all zeros, essentially clearing - * the memory. - * - * Return: - * Nothing - * - */ -void cdf_mem_zero(void *ptr, uint32_t numBytes) -{ - if (0 == numBytes) { - /* special case where ptr can be NULL */ - return; - } - - if (ptr == NULL) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s called with NULL parameter ptr", __func__); - return; - } - memset(ptr, 0, numBytes); -} - -/** - * cdf_mem_copy() - copy memory - * @pDst: Pointer to destination memory location (to copy to) - * @pSrc: Pointer to source memory location (to copy from) - * @numBytes: Number of bytes to copy. - * - * Copy host memory from one location to another, similar to memcpy in - * standard C. Note this function does not specifically handle overlapping - * source and destination memory locations. Calling this function with - * overlapping source and destination memory locations will result in - * unpredictable results. Use cdf_mem_move() if the memory locations - * for the source and destination are overlapping (or could be overlapping!) - * - * Return: - * Nothing - * - */ -void cdf_mem_copy(void *pDst, const void *pSrc, uint32_t numBytes) -{ - if (0 == numBytes) { - /* special case where pDst or pSrc can be NULL */ - return; - } - - if ((pDst == NULL) || (pSrc == NULL)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, source:%p destination:%p", - __func__, pSrc, pDst); - QDF_ASSERT(0); - return; - } - memcpy(pDst, pSrc, numBytes); -} - -/** - * cdf_mem_move() - move memory - * @pDst: pointer to destination memory location (to move to) - * @pSrc: pointer to source memory location (to move from) - * @numBytes: number of bytes to move. - * - * Move host memory from one location to another, similar to memmove in - * standard C. Note this function *does* handle overlapping - * source and destination memory locations. - - * Return: - * Nothing - */ -void cdf_mem_move(void *pDst, const void *pSrc, uint32_t numBytes) -{ - if (0 == numBytes) { - /* special case where pDst or pSrc can be NULL */ - return; - } - - if ((pDst == NULL) || (pSrc == NULL)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, source:%p destination:%p", - __func__, pSrc, pDst); - QDF_ASSERT(0); - return; - } - memmove(pDst, pSrc, numBytes); -} - -/** - * cdf_mem_compare() - memory compare - * @pMemory1: pointer to one location in memory to compare. - * @pMemory2: pointer to second location in memory to compare. - * @numBytes: the number of bytes to compare. - * - * Function to compare two pieces of memory, similar to memcmp function - * in standard C. - * - * Return: - * bool - returns a bool value that tells if the memory locations - * are equal or not equal. - * - */ -bool cdf_mem_compare(const void *pMemory1, const void *pMemory2, - uint32_t numBytes) -{ - if (0 == numBytes) { - /* special case where pMemory1 or pMemory2 can be NULL */ - return true; - } - - if ((pMemory1 == NULL) || (pMemory2 == NULL)) { - QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, p1:%p p2:%p", - __func__, pMemory1, pMemory2); - QDF_ASSERT(0); - return false; - } - return memcmp(pMemory1, pMemory2, numBytes) ? false : true; -} - -/** - * cdf_mem_compare2() - memory compare - * @pMemory1: pointer to one location in memory to compare. - * @pMemory2: pointer to second location in memory to compare. - * @numBytes: the number of bytes to compare. - * - * Function to compare two pieces of memory, similar to memcmp function - * in standard C. - * Return: - * int32_t - returns a bool value that tells if the memory - * locations are equal or not equal. - * 0 -- equal - * < 0 -- *pMemory1 is less than *pMemory2 - * > 0 -- *pMemory1 is bigger than *pMemory2 - */ -int32_t cdf_mem_compare2(const void *pMemory1, const void *pMemory2, - uint32_t numBytes) -{ - return (int32_t) memcmp(pMemory1, pMemory2, numBytes); -} - -/** - * cdf_os_mem_alloc_consistent() - allocates consistent cdf memory - * @osdev: OS device handle - * @size: Size to be allocated - * @paddr: Physical address - * @mctx: Pointer to DMA context - * - * Return: pointer of allocated memory or null if memory alloc fails - */ -inline void *cdf_os_mem_alloc_consistent(qdf_device_t osdev, qdf_size_t size, - qdf_dma_addr_t *paddr, - qdf_dma_context_t memctx) -{ -#if defined(A_SIMOS_DEVHOST) - static int first = 1; - void *vaddr; - - if (first) { - first = 0; - pr_err("Warning: bypassing %s\n", __func__); - } - vaddr = cdf_mem_malloc(size); - *paddr = ((qdf_dma_addr_t) vaddr); - return vaddr; -#else - int flags = GFP_KERNEL; - void *alloc_mem = NULL; - - if (in_interrupt() || irqs_disabled() || in_atomic()) - flags = GFP_ATOMIC; - - alloc_mem = dma_alloc_coherent(osdev->dev, size, paddr, flags); - if (alloc_mem == NULL) - pr_err("%s Warning: unable to alloc consistent memory of size %zu!\n", - __func__, size); - return alloc_mem; -#endif -} - -/** - * cdf_os_mem_free_consistent() - free consistent cdf memory - * @osdev: OS device handle - * @size: Size to be allocated - * @paddr: Physical address - * @mctx: Pointer to DMA context - * - * Return: none - */ -inline void -cdf_os_mem_free_consistent(qdf_device_t osdev, - qdf_size_t size, - void *vaddr, - qdf_dma_addr_t paddr, qdf_dma_context_t memctx) -{ -#if defined(A_SIMOS_DEVHOST) - static int first = 1; - - if (first) { - first = 0; - pr_err("Warning: bypassing %s\n", __func__); - } - cdf_mem_free(vaddr); - return; -#else - dma_free_coherent(osdev->dev, size, vaddr, paddr); -#endif -} - - -/** - * cdf_os_mem_dma_sync_single_for_device() - assign memory to device - * @osdev: OS device handle - * @bus_addr: dma address to give to the device - * @size: Size of the memory block - * @direction: direction data will be dma'ed - * - * Assgin memory to the remote device. - * The cache lines are flushed to ram or invalidated as needed. - * - * Return: none - */ - -inline void -cdf_os_mem_dma_sync_single_for_device(qdf_device_t osdev, - qdf_dma_addr_t bus_addr, - qdf_size_t size, - enum dma_data_direction direction) -{ - dma_sync_single_for_device(osdev->dev, bus_addr, size, direction); -} - diff --git a/core/cdf/src/cdf_nbuf.c b/core/cdf/src/cdf_nbuf.c index 10e55dce8ea1..2968d9dadee8 100644 --- a/core/cdf/src/cdf_nbuf.c +++ b/core/cdf/src/cdf_nbuf.c @@ -42,7 +42,7 @@ #endif /* FEATURE_TSO */ #include <qdf_types.h> #include <cdf_nbuf.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <qdf_trace.h> #include <qdf_status.h> #include <qdf_lock.h> @@ -443,17 +443,17 @@ void __cdf_nbuf_trace_update(struct sk_buff *buf, char *event_string) return; } - cdf_mem_zero(string_buf, NBUF_PKT_TRAC_MAX_STRING); - cdf_mem_copy(string_buf, event_string, cdf_str_len(event_string)); + qdf_mem_zero(string_buf, NBUF_PKT_TRAC_MAX_STRING); + qdf_mem_copy(string_buf, event_string, cdf_str_len(event_string)); if (NBUF_PKT_TRAC_TYPE_EAPOL & cdf_nbuf_trace_get_proto_type(buf)) { - cdf_mem_copy(string_buf + cdf_str_len(event_string), + qdf_mem_copy(string_buf + cdf_str_len(event_string), "EPL", NBUF_PKT_TRAC_PROTO_STRING); } else if (NBUF_PKT_TRAC_TYPE_DHCP & cdf_nbuf_trace_get_proto_type(buf)) { - cdf_mem_copy(string_buf + cdf_str_len(event_string), + qdf_mem_copy(string_buf + cdf_str_len(event_string), "DHC", NBUF_PKT_TRAC_PROTO_STRING); } else if (NBUF_PKT_TRAC_TYPE_MGMT_ACTION & cdf_nbuf_trace_get_proto_type(buf)) { - cdf_mem_copy(string_buf + cdf_str_len(event_string), + qdf_mem_copy(string_buf + cdf_str_len(event_string), "MACT", NBUF_PKT_TRAC_PROTO_STRING); } @@ -567,7 +567,7 @@ void cdf_net_buf_debug_clean(void) while (p_node) { p_prev = p_node; p_node = p_node->p_next; - cdf_mem_free(p_prev); + qdf_mem_free(p_prev); } } @@ -638,7 +638,7 @@ void cdf_net_buf_debug_add_node(cdf_nbuf_t net_buf, size_t size, QDF_ASSERT(0); goto done; } else { - p_node = (CDF_NBUF_TRACK *) cdf_mem_malloc(sizeof(*p_node)); + p_node = (CDF_NBUF_TRACK *) qdf_mem_malloc(sizeof(*p_node)); if (p_node) { p_node->net_buf = net_buf; p_node->file_name = file_name; @@ -687,7 +687,7 @@ void cdf_net_buf_debug_delete_node(cdf_nbuf_t net_buf) /* Found at head of the table */ if (p_head->net_buf == net_buf) { gp_cdf_net_buf_track_tbl[i] = p_node->p_next; - cdf_mem_free((void *)p_node); + qdf_mem_free((void *)p_node); found = true; goto done; } @@ -698,7 +698,7 @@ void cdf_net_buf_debug_delete_node(cdf_nbuf_t net_buf) p_node = p_node->p_next; if ((NULL != p_node) && (p_node->net_buf == net_buf)) { p_prev->p_next = p_node->p_next; - cdf_mem_free((void *)p_node); + qdf_mem_free((void *)p_node); found = true; break; } diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 5349e9f5cc34..ee114622978a 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -36,7 +36,7 @@ #include <qdf_types.h> #include <qdf_status.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <qdf_list.h> #include <qdf_trace.h> #include <qdf_event.h> diff --git a/core/cds/inc/cds_crypto.h b/core/cds/inc/cds_crypto.h index b0a4087a8090..4355ce2b0afa 100644 --- a/core/cds/inc/cds_crypto.h +++ b/core/cds/inc/cds_crypto.h @@ -36,7 +36,7 @@ #include <qdf_types.h> #include <qdf_status.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <qdf_list.h> #include <qdf_trace.h> #include <qdf_event.h> diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index f7e442471c85..b63acbec1460 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -90,12 +90,12 @@ void cds_sys_probe_thread_cback(void *pUserData); v_CONTEXT_t cds_init(void) { qdf_mc_timer_manager_init(); - cdf_mem_init(); + qdf_mem_init(); gp_cds_context = &g_cds_context; gp_cds_context->qdf_ctx = &g_qdf_ctx; - cdf_mem_zero(&g_qdf_ctx, sizeof(g_qdf_ctx)); + qdf_mem_zero(&g_qdf_ctx, sizeof(g_qdf_ctx)); qdf_trace_spin_lock_init(); @@ -122,10 +122,10 @@ void cds_deinit(void) gp_cds_context->qdf_ctx = NULL; gp_cds_context = NULL; - cdf_mem_zero(&g_cds_context, sizeof(g_cds_context)); + qdf_mem_zero(&g_cds_context, sizeof(g_cds_context)); qdf_mc_timer_manager_exit(); - cdf_mem_exit(); + qdf_mem_exit(); return; } @@ -292,7 +292,7 @@ QDF_STATUS cds_open(void) */ /*Open the WMA module */ - cdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0); + qdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0); /* UMA is supported in hardware for performing the ** frame translation 802.11 <-> 802.3 */ @@ -630,7 +630,7 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context) "%s: wma correctly started", __func__); /* Start the MAC */ - cdf_mem_zero(&halStartParams, + qdf_mem_zero(&halStartParams, sizeof(tHalMacStartParameters)); /* Start the MAC */ @@ -1103,7 +1103,7 @@ QDF_STATUS cds_alloc_context(void *p_cds_context, QDF_MODULE_ID moduleID, /* Dynamically allocate the context for module */ - *ppModuleContext = cdf_mem_malloc(size); + *ppModuleContext = qdf_mem_malloc(size); if (*ppModuleContext == NULL) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, @@ -1114,7 +1114,7 @@ QDF_STATUS cds_alloc_context(void *p_cds_context, QDF_MODULE_ID moduleID, } if (moduleID == QDF_MODULE_ID_TLSHIM) - cdf_mem_zero(*ppModuleContext, size); + qdf_mem_zero(*ppModuleContext, size); *pGpModContext = *ppModuleContext; @@ -1236,7 +1236,7 @@ QDF_STATUS cds_free_context(void *p_cds_context, QDF_MODULE_ID moduleID, } if (pModuleContext != NULL) - cdf_mem_free(pModuleContext); + qdf_mem_free(pModuleContext); *pGpModContext = NULL; @@ -1332,7 +1332,7 @@ QDF_STATUS cds_mq_post_message(CDS_MQ_ID msgQueueId, cds_msg_t *pMsg) atomic_set(&cds_wrapper_empty_count, 0); /* Copy the message now */ - cdf_mem_copy((void *)pMsgWrapper->pVosMsg, + qdf_mem_copy((void *)pMsgWrapper->pVosMsg, (void *)pMsg, sizeof(cds_msg_t)); cds_mq_put(pTargetMq, pMsgWrapper); diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 65d96ef2a918..5423e0efb947 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -3877,7 +3877,7 @@ QDF_STATUS cds_init_policy_mgr(void) cds_debug("Initializing the policy manager"); /* init conc_connection_list */ - cdf_mem_zero(conc_connection_list, sizeof(conc_connection_list)); + qdf_mem_zero(conc_connection_list, sizeof(conc_connection_list)); if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create( &cds_ctx->cdf_conc_list_lock))) { @@ -4189,7 +4189,7 @@ QDF_STATUS cds_decr_connection_count(uint32_t vdev_id) } /* clean up the entry */ - cdf_mem_zero(&conc_connection_list[next_conn_index - 1], + qdf_mem_zero(&conc_connection_list[next_conn_index - 1], sizeof(*conc_connection_list)); return QDF_STATUS_SUCCESS; } @@ -4305,9 +4305,9 @@ void cds_update_with_safe_channel_list(uint8_t *pcl_channels, uint32_t *len) sizeof(unsafe_channel_list)); if (unsafe_channel_count) { - cdf_mem_copy(current_channel_list, pcl_channels, + qdf_mem_copy(current_channel_list, pcl_channels, current_channel_count); - cdf_mem_zero(pcl_channels, + qdf_mem_zero(pcl_channels, sizeof(*pcl_channels)*current_channel_count); for (i = 0; i < current_channel_count; i++) { @@ -4414,13 +4414,13 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, num_channels = 0; switch (pcl) { case CDS_24G: - cdf_mem_copy(pcl_channels, channel_list_24, + qdf_mem_copy(pcl_channels, channel_list_24, chan_index_24); *len = chan_index_24; status = QDF_STATUS_SUCCESS; break; case CDS_5G: - cdf_mem_copy(pcl_channels, channel_list_5, + qdf_mem_copy(pcl_channels, channel_list_5, chan_index_5); *len = chan_index_5; status = QDF_STATUS_SUCCESS; @@ -4429,7 +4429,7 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_MCC_CH: cds_get_connection_channels( channel_list, &num_channels, 0); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; status = QDF_STATUS_SUCCESS; break; @@ -4437,9 +4437,9 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_MCC_CH_24G: cds_get_connection_channels( channel_list, &num_channels, 0); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_24, chan_index_24); *len += chan_index_24; status = QDF_STATUS_SUCCESS; @@ -4448,34 +4448,34 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_MCC_CH_5G: cds_get_connection_channels( channel_list, &num_channels, 0); - cdf_mem_copy(pcl_channels, channel_list, + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_5, chan_index_5); *len += chan_index_5; status = QDF_STATUS_SUCCESS; break; case CDS_24G_SCC_CH: case CDS_24G_MCC_CH: - cdf_mem_copy(pcl_channels, channel_list_24, + qdf_mem_copy(pcl_channels, channel_list_24, chan_index_24); *len = chan_index_24; cds_get_connection_channels( channel_list, &num_channels, 0); - cdf_mem_copy(&pcl_channels[chan_index_24], + qdf_mem_copy(&pcl_channels[chan_index_24], channel_list, num_channels); *len += num_channels; status = QDF_STATUS_SUCCESS; break; case CDS_5G_SCC_CH: case CDS_5G_MCC_CH: - cdf_mem_copy(pcl_channels, channel_list_5, + qdf_mem_copy(pcl_channels, channel_list_5, chan_index_5); *len = chan_index_5; cds_get_connection_channels( channel_list, &num_channels, 0); - cdf_mem_copy(&pcl_channels[chan_index_5], + qdf_mem_copy(&pcl_channels[chan_index_5], channel_list, num_channels); *len += num_channels; status = QDF_STATUS_SUCCESS; @@ -4483,7 +4483,7 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_SCC_ON_24_SCC_ON_5: cds_get_connection_channels( channel_list, &num_channels, 1); - cdf_mem_copy(pcl_channels, channel_list, + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; status = QDF_STATUS_SUCCESS; @@ -4491,16 +4491,16 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_SCC_ON_5_SCC_ON_24: cds_get_connection_channels( channel_list, &num_channels, 2); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; status = QDF_STATUS_SUCCESS; break; case CDS_SCC_ON_24_SCC_ON_5_24G: cds_get_connection_channels( channel_list, &num_channels, 1); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_24, chan_index_24); *len += chan_index_24; status = QDF_STATUS_SUCCESS; @@ -4508,9 +4508,9 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_SCC_ON_24_SCC_ON_5_5G: cds_get_connection_channels( channel_list, &num_channels, 1); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_5, chan_index_5); *len += chan_index_5; status = QDF_STATUS_SUCCESS; @@ -4518,9 +4518,9 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_SCC_ON_5_SCC_ON_24_24G: cds_get_connection_channels( channel_list, &num_channels, 2); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_24, chan_index_24); *len += chan_index_24; status = QDF_STATUS_SUCCESS; @@ -4528,9 +4528,9 @@ QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, case CDS_SCC_ON_5_SCC_ON_24_5G: cds_get_connection_channels( channel_list, &num_channels, 2); - cdf_mem_copy(pcl_channels, channel_list, num_channels); + qdf_mem_copy(pcl_channels, channel_list, num_channels); *len = num_channels; - cdf_mem_copy(&pcl_channels[num_channels], + qdf_mem_copy(&pcl_channels[num_channels], channel_list_5, chan_index_5); *len += chan_index_5; status = QDF_STATUS_SUCCESS; @@ -6336,7 +6336,7 @@ static bool cds_sta_p2pgo_concur_handle(hdd_adapter_t *sta_adapter, p2pgo_channel_num, IEEE80211_BAND_5GHZ); } - cdf_mem_zero(&hdd_avoid_freq_list, + qdf_mem_zero(&hdd_avoid_freq_list, sizeof(hdd_avoid_freq_list)); hdd_avoid_freq_list.avoidFreqRangeCount = 1; hdd_avoid_freq_list.avoidFreqRange[0].startFreq = freq; @@ -6620,7 +6620,7 @@ void cds_restart_softap(hdd_adapter_t *pHostapdAdapter) } /* generate vendor specific event */ - cdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList)); + qdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList)); hdd_avoid_freq_list.avoidFreqRange[0].startFreq = cds_chan_to_freq(pHostapdAdapter->sessionCtx.ap. operatingChannel); diff --git a/core/cds/src/cds_mq.c b/core/cds/src/cds_mq.c index f622f395baf1..95b30cf6911b 100644 --- a/core/cds/src/cds_mq.c +++ b/core/cds/src/cds_mq.c @@ -209,7 +209,7 @@ QDF_STATUS cds_send_mb_message_to_mac(void *pBuf) } } - cdf_mem_free(pBuf); + qdf_mem_free(pBuf); return cdf_ret_status; } diff --git a/core/cds/src/cds_packet.c b/core/cds/src/cds_packet.c index bd4764542870..b0f6fdc12a08 100644 --- a/core/cds/src/cds_packet.c +++ b/core/cds/src/cds_packet.c @@ -44,7 +44,7 @@ #include <qdf_trace.h> #include <wlan_hdd_main.h> #include "cdf_nbuf.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #define TX_PKT_MIN_HEADROOM (64) @@ -89,7 +89,7 @@ QDF_STATUS cds_pkt_return_packet(cds_pkt_t *packet) packet->pkt_buf = NULL; /* Free up the Rx packet */ - cdf_mem_free(packet); + qdf_mem_free(packet); return QDF_STATUS_SUCCESS; } @@ -197,9 +197,9 @@ void cds_pkt_trace_buf_update(char *event_string) slot = trace_buffer_order % CDS_PKT_TRAC_MAX_TRACE_BUF; trace_buffer[slot].order = trace_buffer_order; trace_buffer[slot].event_time = qdf_mc_timer_get_system_time(); - cdf_mem_zero(trace_buffer[slot].event_string, + qdf_mem_zero(trace_buffer[slot].event_string, sizeof(trace_buffer[slot].event_string)); - cdf_mem_copy(trace_buffer[slot].event_string, + qdf_mem_copy(trace_buffer[slot].event_string, event_string, (CDS_PKT_TRAC_MAX_STRING_LEN < strlen(event_string)) ? CDS_PKT_TRAC_MAX_STRING_LEN : strlen(event_string)); @@ -260,7 +260,7 @@ void cds_pkt_proto_trace_init(void) qdf_spinlock_create(&trace_buffer_lock); trace_buffer_order = 0; - trace_buffer = cdf_mem_malloc(CDS_PKT_TRAC_MAX_TRACE_BUF * + trace_buffer = qdf_mem_malloc(CDS_PKT_TRAC_MAX_TRACE_BUF * sizeof(cds_pkt_proto_trace_t)); /* Register callback function to NBUF @@ -277,7 +277,7 @@ void cds_pkt_proto_trace_close(void) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "%s %d", __func__, __LINE__); - cdf_mem_free(trace_buffer); + qdf_mem_free(trace_buffer); qdf_spinlock_destroy(&trace_buffer_lock); return; diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c index 78dd45612119..c75d61f0516e 100644 --- a/core/cds/src/cds_regdomain.c +++ b/core/cds/src/cds_regdomain.c @@ -641,11 +641,11 @@ uint16_t cds_regdm_get_chanwidth_from_opclass(uint8_t *country, regdm_op_class_map_t *class; uint16_t i; - if (true == cdf_mem_compare(country, "US", 2)) + if (true != qdf_mem_cmp(country, "US", 2)) class = us_op_class; - else if (true == cdf_mem_compare(country, "EU", 2)) + else if (true != qdf_mem_cmp(country, "EU", 2)) class = euro_op_class; - else if (true == cdf_mem_compare(country, "JP", 2)) + else if (true != qdf_mem_cmp(country, "JP", 2)) class = japan_op_class; else class = global_op_class; @@ -675,11 +675,11 @@ uint16_t cds_regdm_get_opclass_from_channel(uint8_t *country, uint8_t channel, regdm_op_class_map_t *class = NULL; uint16_t i = 0; - if (true == cdf_mem_compare(country, "US", 2)) { + if (true != qdf_mem_cmp(country, "US", 2)) { class = us_op_class; - } else if (true == cdf_mem_compare(country, "EU", 2)) { + } else if (true != qdf_mem_cmp(country, "EU", 2)) { class = euro_op_class; - } else if (true == cdf_mem_compare(country, "JP", 2)) { + } else if (true != qdf_mem_cmp(country, "JP", 2)) { class = japan_op_class; } else { class = global_op_class; diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index bf65868a0d26..0d236484c35c 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -205,7 +205,7 @@ QDF_STATUS cds_sched_open(void *p_cds_context, __func__); return QDF_STATUS_E_INVAL; } - cdf_mem_zero(pSchedContext, sizeof(cds_sched_context)); + qdf_mem_zero(pSchedContext, sizeof(cds_sched_context)); pSchedContext->pVContext = p_cds_context; vStatus = cds_sched_init_mqs(pSchedContext); if (!QDF_IS_STATUS_SUCCESS(vStatus)) { @@ -604,7 +604,7 @@ void cds_free_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext) typeof(*pkt), list); list_del(&pkt->list); spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); - cdf_mem_free(pkt); + qdf_mem_free(pkt); spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); } spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); @@ -625,7 +625,7 @@ static QDF_STATUS cds_alloc_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext) int i; for (i = 0; i < CDS_MAX_OL_RX_PKT; i++) { - pkt = cdf_mem_malloc(sizeof(*pkt)); + pkt = qdf_mem_malloc(sizeof(*pkt)); if (!pkt) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "%s Vos packet allocation for ol rx thread failed", @@ -646,7 +646,7 @@ free: list) { list_del(&pkt->list); spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); - cdf_mem_free(pkt); + qdf_mem_free(pkt); spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); } spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); @@ -1060,7 +1060,7 @@ void cds_sched_flush_mc_mqs(p_cds_sched_context pSchedContext) "%s: Freeing MC WMA MSG message type %d", __func__, pMsgWrapper->pVosMsg->type); if (pMsgWrapper->pVosMsg->bodyptr) { - cdf_mem_free((void *)pMsgWrapper-> + qdf_mem_free((void *)pMsgWrapper-> pVosMsg->bodyptr); } diff --git a/core/cds/src/cds_utils.c b/core/cds/src/cds_utils.c index a68c0d276371..49b7962b0f15 100644 --- a/core/cds/src/cds_utils.c +++ b/core/cds/src/cds_utils.c @@ -51,7 +51,7 @@ #include "qdf_trace.h" #include "cds_utils.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "cds_crypto.h" #include <linux/err.h> @@ -298,7 +298,7 @@ static void cds_increase_seq(uint8_t *ipn) if (ipn) { value = (0xffffffffffff) & (*((uint64_t *) ipn)); value = value + 1; - cdf_mem_copy(ipn, &value, IEEE80211_MMIE_IPNLEN); + qdf_mem_copy(ipn, &value, IEEE80211_MMIE_IPNLEN); } } @@ -377,9 +377,9 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id, * In case of error, revert back to original IPN * to do that copy the original IPN into previous_ipn */ - cdf_mem_copy(&previous_ipn[0], ipn, IEEE80211_MMIE_IPNLEN); + qdf_mem_copy(&previous_ipn[0], ipn, IEEE80211_MMIE_IPNLEN); cds_increase_seq(ipn); - cdf_mem_copy(mmie->sequence_number, ipn, IEEE80211_MMIE_IPNLEN); + qdf_mem_copy(mmie->sequence_number, ipn, IEEE80211_MMIE_IPNLEN); /* * Calculate MIC and then copy @@ -412,11 +412,11 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id, aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT | IEEE80211_FC1_MORE_DATA); /* A1 || A2 || A3 */ - cdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN); + qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN); /* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */ nBytes = AAD_LEN + (frmLen - sizeof(struct ieee80211_frame)); - input = (uint8_t *) cdf_mem_malloc(nBytes); + input = (uint8_t *) qdf_mem_malloc(nBytes); if (NULL == input) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "%s: Memory allocation failed", __func__); @@ -428,26 +428,26 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id, * Copy the AAD, Management frame body, and * MMIE with 8 bit MIC zeroed out */ - cdf_mem_zero(input, nBytes); - cdf_mem_copy(input, aad, AAD_LEN); + qdf_mem_zero(input, nBytes); + qdf_mem_copy(input, aad, AAD_LEN); /* Copy Management Frame Body and MMIE without MIC */ - cdf_mem_copy(input + AAD_LEN, + qdf_mem_copy(input + AAD_LEN, (uint8_t *) (efrm - (frmLen - sizeof(struct ieee80211_frame))), nBytes - AAD_LEN - CMAC_TLEN); cds_cmac_calc_mic(tfm, input, nBytes, mic); - cdf_mem_free(input); + qdf_mem_free(input); QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH, "CMAC(T)= %02X %02X %02X %02X %02X %02X %02X %02X", mic[0], mic[1], mic[2], mic[3], mic[4], mic[5], mic[6], mic[7]); - cdf_mem_copy(mmie->mic, mic, IEEE80211_MMIE_MICLEN); + qdf_mem_copy(mmie->mic, mic, IEEE80211_MMIE_MICLEN); err_tfm: if (ret) { - cdf_mem_copy(ipn, previous_ipn, IEEE80211_MMIE_IPNLEN); + qdf_mem_copy(ipn, previous_ipn, IEEE80211_MMIE_IPNLEN); } if (tfm) @@ -485,7 +485,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm) /* Validate IPN */ rx_ipn = mmie->sequence_number; - if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) <= 0) { + if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) != 0) { /* Replay error */ QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "Replay error mmie ipn %02X %02X %02X %02X %02X %02X" @@ -522,11 +522,11 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm) aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT | IEEE80211_FC1_MORE_DATA); /* A1 || A2 || A3 */ - cdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN); + qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN); /* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */ nBytes = AAD_LEN + (efrm - (uint8_t *) (wh + 1)); - input = (uint8_t *) cdf_mem_malloc(nBytes); + input = (uint8_t *) qdf_mem_malloc(nBytes); if (NULL == input) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "Memory allocation failed"); @@ -535,20 +535,20 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm) } /* Copy the AAD, MMIE with 8 bit MIC zeroed out */ - cdf_mem_zero(input, nBytes); - cdf_mem_copy(input, aad, AAD_LEN); - cdf_mem_copy(input + AAD_LEN, (uint8_t *) (wh + 1), + qdf_mem_zero(input, nBytes); + qdf_mem_copy(input, aad, AAD_LEN); + qdf_mem_copy(input + AAD_LEN, (uint8_t *) (wh + 1), nBytes - AAD_LEN - CMAC_TLEN); cds_cmac_calc_mic(tfm, input, nBytes, mic); - cdf_mem_free(input); + qdf_mem_free(input); QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "CMAC(T)= %02X %02X %02X %02X %02X %02X %02X %02X", mic[0], mic[1], mic[2], mic[3], mic[4], mic[5], mic[6], mic[7]); - if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) != 0) { + if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) == 0) { /* MMIE MIC mismatch */ QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "BC/MC MGMT frame MMIE MIC check Failed" @@ -562,7 +562,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm) } /* Update IPN */ - cdf_mem_copy(ipn, rx_ipn, CMAC_IPN_LEN); + qdf_mem_copy(ipn, rx_ipn, CMAC_IPN_LEN); err_tfm: if (tfm) diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index c4d4195e8de9..ea8a933ba89f 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -34,7 +34,7 @@ * connecting the HTT service with HTC; and deleting a HTT instance. */ -#include <cdf_memory.h> /* cdf_mem_malloc */ +#include <qdf_mem.h> /* qdf_mem_malloc */ #include <qdf_types.h> /* qdf_device_t, qdf_print */ #include <htt.h> /* htt_tx_msdu_desc_t */ @@ -76,7 +76,7 @@ struct htt_htc_pkt *htt_htc_pkt_alloc(struct htt_pdev_t *pdev) HTT_TX_MUTEX_RELEASE(&pdev->htt_tx_mutex); if (pkt == NULL) - pkt = cdf_mem_malloc(sizeof(*pkt)); + pkt = qdf_mem_malloc(sizeof(*pkt)); return &pkt->u.pkt; /* not actually a dereference */ } @@ -97,7 +97,7 @@ void htt_htc_pkt_pool_free(struct htt_pdev_t *pdev) pkt = pdev->htt_htc_pkt_freelist; while (pkt) { next = pkt->u.next; - cdf_mem_free(pkt); + qdf_mem_free(pkt); pkt = next; } pdev->htt_htc_pkt_freelist = NULL; @@ -129,7 +129,7 @@ void htt_htc_misc_pkt_pool_free(struct htt_pdev_t *pdev) netbuf = (cdf_nbuf_t) (pkt->u.pkt.htc_pkt.pNetBufContext); cdf_nbuf_unmap(pdev->osdev, netbuf, QDF_DMA_TO_DEVICE); cdf_nbuf_free(netbuf); - cdf_mem_free(pkt); + qdf_mem_free(pkt); pkt = next; } pdev->htt_htc_pkt_misclist = NULL; @@ -152,7 +152,7 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev, { struct htt_pdev_t *pdev; - pdev = cdf_mem_malloc(sizeof(*pdev)); + pdev = qdf_mem_malloc(sizeof(*pdev)); if (!pdev) goto fail1; @@ -161,7 +161,7 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev, pdev->txrx_pdev = txrx_pdev; pdev->htc_pdev = htc_pdev; - cdf_mem_set(&pdev->stats, sizeof(pdev->stats), 0); + qdf_mem_set(&pdev->stats, sizeof(pdev->stats), 0); pdev->htt_htc_pkt_freelist = NULL; #ifdef ATH_11AC_TXCOMPACT pdev->htt_htc_pkt_misclist = NULL; @@ -200,7 +200,7 @@ htt_pdev_alloc(ol_txrx_pdev_handle txrx_pdev, return pdev; fail2: - cdf_mem_free(pdev); + qdf_mem_free(pdev); fail1: return NULL; @@ -235,7 +235,7 @@ htt_attach(struct htt_pdev_t *pdev, int desc_pool_size) /* pre-allocate some HTC_PACKET objects */ for (i = 0; i < HTT_HTC_PKT_POOL_INIT_SIZE; i++) { struct htt_htc_pkt_union *pkt; - pkt = cdf_mem_malloc(sizeof(*pkt)); + pkt = qdf_mem_malloc(sizeof(*pkt)); if (!pkt) break; htt_htc_pkt_free(pdev, &pkt->u.pkt); @@ -362,7 +362,7 @@ void htt_detach(htt_pdev_handle pdev) */ void htt_pdev_free(htt_pdev_handle pdev) { - cdf_mem_free(pdev); + qdf_mem_free(pdev); } void htt_detach_target(htt_pdev_handle pdev) @@ -397,8 +397,8 @@ int htt_htc_attach(struct htt_pdev_t *pdev) HTC_SERVICE_CONNECT_RESP response; A_STATUS status; - cdf_mem_set(&connect, sizeof(connect), 0); - cdf_mem_set(&response, sizeof(response), 0); + qdf_mem_set(&connect, sizeof(connect), 0); + qdf_mem_set(&response, sizeof(response), 0); connect.pMetaData = NULL; connect.MetaDataLength = 0; diff --git a/core/dp/htt/htt_fw_stats.c b/core/dp/htt/htt_fw_stats.c index da6324a8dae0..eb863208795c 100644 --- a/core/dp/htt/htt_fw_stats.c +++ b/core/dp/htt/htt_fw_stats.c @@ -33,7 +33,7 @@ #include <htc_api.h> /* HTC_PACKET */ #include <htt.h> /* HTT_T2H_MSG_TYPE, etc. */ #include <cdf_nbuf.h> /* cdf_nbuf_t */ -#include <cdf_memory.h> /* cdf_mem_set */ +#include <qdf_mem.h> /* qdf_mem_set */ #include <ol_fw_tx_dbg.h> /* ol_fw_tx_dbg_ppdu_base */ #include <ol_htt_rx_api.h> @@ -724,8 +724,8 @@ htt_t2h_tx_ppdu_bitmaps_pr(uint32_t *queued_ptr, uint32_t *acked_ptr) char acked_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW + 1]; int i, j, word; - cdf_mem_set(queued_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '0'); - cdf_mem_set(acked_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '-'); + qdf_mem_set(queued_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '0'); + qdf_mem_set(acked_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '-'); i = 0; for (word = 0; word < 2; word++) { uint32_t queued = *(queued_ptr + word); diff --git a/core/dp/htt/htt_h2t.c b/core/dp/htt/htt_h2t.c index 568dc2e2383e..bb8e7141ebaf 100644 --- a/core/dp/htt/htt_h2t.c +++ b/core/dp/htt/htt_h2t.c @@ -42,7 +42,7 @@ * from the host to the target. */ -#include <cdf_memory.h> /* cdf_mem_copy */ +#include <qdf_mem.h> /* qdf_mem_copy */ #include <cdf_nbuf.h> /* cdf_nbuf_map_single */ #include <htc_api.h> /* HTC_PACKET */ #include <htc.h> /* HTC_HDR_ALIGNMENT_PADDING */ diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index 5055a6c8212f..8b1cb4c91687 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -532,7 +532,7 @@ static inline int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev) static inline void htt_rx_dbg_rxbuf_init(struct htt_pdev_t *pdev) { - pdev->rx_buff_list = cdf_mem_malloc( + pdev->rx_buff_list = qdf_mem_malloc( HTT_RX_RING_BUFF_DBG_LIST * sizeof(struct rx_buf_debug)); if (!pdev->rx_buff_list) { @@ -598,7 +598,7 @@ static inline void htt_rx_dbg_rxbuf_deinit(struct htt_pdev_t *pdev) { if (pdev->rx_buff_list) - cdf_mem_free(pdev->rx_buff_list); + qdf_mem_free(pdev->rx_buff_list); } #else static inline diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 1ccc9aa5609b..eb532ce6fa55 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -39,7 +39,7 @@ * rx ring (applies to LL only). */ -#include <cdf_memory.h> /* cdf_mem_malloc,free, etc. */ +#include <qdf_mem.h> /* qdf_mem_malloc,free, etc. */ #include <qdf_types.h> /* qdf_print, bool */ #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */ #include <qdf_timer.h> /* qdf_timer_free */ @@ -140,13 +140,13 @@ void htt_rx_hash_deinit(struct htt_pdev_t *pdev) list_iter = list_iter->next; if (!hash_entry->fromlist) - cdf_mem_free(hash_entry); + qdf_mem_free(hash_entry); } - cdf_mem_free(pdev->rx_ring.hash_table[i].entries); + qdf_mem_free(pdev->rx_ring.hash_table[i].entries); } - cdf_mem_free(pdev->rx_ring.hash_table); + qdf_mem_free(pdev->rx_ring.hash_table); pdev->rx_ring.hash_table = NULL; } @@ -346,7 +346,7 @@ void htt_rx_detach(struct htt_pdev_t *pdev) qdf_timer_free(&pdev->rx_ring.refill_retry_timer); if (pdev->cfg.is_full_reorder_offload) { - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, sizeof(uint32_t), pdev->rx_ring.target_idx.vaddr, pdev->rx_ring.target_idx.paddr, @@ -375,10 +375,10 @@ void htt_rx_detach(struct htt_pdev_t *pdev) sw_rd_idx++; sw_rd_idx &= pdev->rx_ring.size_mask; } - cdf_mem_free(pdev->rx_ring.buf.netbufs_ring); + qdf_mem_free(pdev->rx_ring.buf.netbufs_ring); } - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, sizeof(uint32_t), pdev->rx_ring.alloc_idx.vaddr, pdev->rx_ring.alloc_idx.paddr, @@ -386,7 +386,7 @@ void htt_rx_detach(struct htt_pdev_t *pdev) alloc_idx), memctx)); - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, pdev->rx_ring.size * sizeof(qdf_dma_addr_t), pdev->rx_ring.buf.paddrs_ring, pdev->rx_ring.base_paddr, @@ -1559,7 +1559,7 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev, dest = cdf_nbuf_put_tail(prev_buf, wifi_hdr_len); if (!dest) goto mpdu_stitch_fail; - cdf_mem_copy(dest, hdr_desc, wifi_hdr_len); + qdf_mem_copy(dest, hdr_desc, wifi_hdr_len); hdr_desc += wifi_hdr_len; /* NOTE - This padding is present only in the RAW header status - not @@ -1602,7 +1602,7 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev, /* Copy this buffers MSDU related status into the prev buffer */ dest = cdf_nbuf_put_tail(prev_buf, msdu_llc_len + amsdu_pad); dest += amsdu_pad; - cdf_mem_copy(dest, hdr_desc, msdu_llc_len); + qdf_mem_copy(dest, hdr_desc, msdu_llc_len); /* Push the MSDU buffer beyond the decap header */ cdf_nbuf_pull_head(msdu, decap_hdr_pull_bytes); @@ -1967,7 +1967,7 @@ htt_rx_hash_list_insert(struct htt_pdev_t *pdev, uint32_t paddr, htt_list_remove(pdev->rx_ring.hash_table[i].freepool.next); } else { - hash_element = cdf_mem_malloc(sizeof(struct htt_rx_hash_entry)); + hash_element = qdf_mem_malloc(sizeof(struct htt_rx_hash_entry)); if (qdf_unlikely(NULL == hash_element)) { HTT_ASSERT_ALWAYS(0); return 1; @@ -2022,7 +2022,7 @@ cdf_nbuf_t htt_rx_hash_list_lookup(struct htt_pdev_t *pdev, uint32_t paddr) freepool, &hash_entry->listnode); else - cdf_mem_free(hash_entry); + qdf_mem_free(hash_entry); htt_rx_dbg_rxbuf_reset(pdev, netbuf); break; @@ -2052,7 +2052,7 @@ int htt_rx_hash_init(struct htt_pdev_t *pdev) HTT_ASSERT2(CDF_IS_PWR2(RX_NUM_HASH_BUCKETS)); pdev->rx_ring.hash_table = - cdf_mem_malloc(RX_NUM_HASH_BUCKETS * + qdf_mem_malloc(RX_NUM_HASH_BUCKETS * sizeof(struct htt_rx_hash_bucket)); if (NULL == pdev->rx_ring.hash_table) { @@ -2071,7 +2071,7 @@ int htt_rx_hash_init(struct htt_pdev_t *pdev) /* pre-allocate a pool of entries for this bucket */ pdev->rx_ring.hash_table[i].entries = - cdf_mem_malloc(RX_ENTRIES_SIZE * + qdf_mem_malloc(RX_ENTRIES_SIZE * sizeof(struct htt_rx_hash_entry)); if (NULL == pdev->rx_ring.hash_table[i].entries) { @@ -2079,10 +2079,10 @@ int htt_rx_hash_init(struct htt_pdev_t *pdev) (int)i); while (i) { i--; - cdf_mem_free(pdev->rx_ring.hash_table[i]. + qdf_mem_free(pdev->rx_ring.hash_table[i]. entries); } - cdf_mem_free(pdev->rx_ring.hash_table); + qdf_mem_free(pdev->rx_ring.hash_table); pdev->rx_ring.hash_table = NULL; return 1; } @@ -2151,12 +2151,9 @@ int htt_rx_attach(struct htt_pdev_t *pdev) /* allocate the target index */ pdev->rx_ring.target_idx.vaddr = - cdf_os_mem_alloc_consistent(pdev->osdev, + qdf_mem_alloc_consistent(pdev->osdev, pdev->osdev->dev, sizeof(uint32_t), - &paddr, - qdf_get_dma_mem_context( - (&pdev->rx_ring.target_idx), - memctx)); + &paddr); if (!pdev->rx_ring.target_idx.vaddr) goto fail1; @@ -2165,7 +2162,7 @@ int htt_rx_attach(struct htt_pdev_t *pdev) *pdev->rx_ring.target_idx.vaddr = 0; } else { pdev->rx_ring.buf.netbufs_ring = - cdf_mem_malloc(pdev->rx_ring.size * sizeof(cdf_nbuf_t)); + qdf_mem_malloc(pdev->rx_ring.size * sizeof(cdf_nbuf_t)); if (!pdev->rx_ring.buf.netbufs_ring) goto fail1; @@ -2174,25 +2171,18 @@ int htt_rx_attach(struct htt_pdev_t *pdev) } pdev->rx_ring.buf.paddrs_ring = - cdf_os_mem_alloc_consistent( - pdev->osdev, + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, pdev->rx_ring.size * ring_elem_size, - &paddr, - qdf_get_dma_mem_context( - (&pdev->rx_ring.buf), - memctx)); + &paddr); if (!pdev->rx_ring.buf.paddrs_ring) goto fail2; pdev->rx_ring.base_paddr = paddr; pdev->rx_ring.alloc_idx.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, - sizeof(uint32_t), - &paddr, - qdf_get_dma_mem_context( - (&pdev->rx_ring.alloc_idx), - memctx)); + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, + sizeof(uint32_t), &paddr); if (!pdev->rx_ring.alloc_idx.vaddr) goto fail3; @@ -2257,7 +2247,7 @@ int htt_rx_attach(struct htt_pdev_t *pdev) return 0; /* success */ fail3: - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, pdev->rx_ring.size * sizeof(qdf_dma_addr_t), pdev->rx_ring.buf.paddrs_ring, pdev->rx_ring.base_paddr, @@ -2266,7 +2256,7 @@ fail3: fail2: if (pdev->cfg.is_full_reorder_offload) { - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, sizeof(uint32_t), pdev->rx_ring.target_idx.vaddr, pdev->rx_ring.target_idx.paddr, @@ -2276,7 +2266,7 @@ fail2: memctx)); htt_rx_hash_deinit(pdev); } else { - cdf_mem_free(pdev->rx_ring.buf.netbufs_ring); + qdf_mem_free(pdev->rx_ring.buf.netbufs_ring); } fail1: @@ -2301,14 +2291,11 @@ int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev, * 2bytes: VDEV ID * 2bytes: length */ pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t), - &pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr, - qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc. - rx2_ind_ring_base), - memctx)); + &pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr); if (!pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr) { qdf_print("%s: RX IND RING alloc fail", __func__); return -ENOBUFS; @@ -2317,21 +2304,17 @@ int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev, /* RX indication ring size, by bytes */ pdev->ipa_uc_rx_rsc.rx2_ind_ring_size = rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t); - cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr, + qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr, pdev->ipa_uc_rx_rsc.rx2_ind_ring_size); /* Allocate RX process done index */ pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, - 4, - &pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr, - qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc. - rx_ipa_prc_done_idx), - memctx)); + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, 4, + &pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr); if (!pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr) { qdf_print("%s: RX PROC DONE IND alloc fail", __func__); - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, pdev->ipa_uc_rx_rsc.rx2_ind_ring_size, pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr, @@ -2341,7 +2324,7 @@ int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev, memctx)); return -ENOBUFS; } - cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr, 4); + qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr, 4); return 0; } #else @@ -2369,14 +2352,12 @@ int htt_rx_ipa_uc_attach(struct htt_pdev_t *pdev, * 2bytes: VDEV ID * 2bytes: length */ pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr = - cdf_os_mem_alloc_consistent( + qdf_mem_alloc_consistent( pdev->osdev, + pdev->osdev->dev, rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t), - &pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr, - qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc. - rx_ind_ring_base), - memctx)); + &pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr); if (!pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr) { qdf_print("%s: RX IND RING alloc fail", __func__); return -ENOBUFS; @@ -2385,21 +2366,17 @@ int htt_rx_ipa_uc_attach(struct htt_pdev_t *pdev, /* RX indication ring size, by bytes */ pdev->ipa_uc_rx_rsc.rx_ind_ring_size = rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t); - cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr, + qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr, pdev->ipa_uc_rx_rsc.rx_ind_ring_size); /* Allocate RX process done index */ pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, - 4, - &pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr, - qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc. - rx_ipa_prc_done_idx), - memctx)); + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, 4, + &pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr); if (!pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr) { qdf_print("%s: RX PROC DONE IND alloc fail", __func__); - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, pdev->ipa_uc_rx_rsc.rx_ind_ring_size, pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr, @@ -2409,7 +2386,7 @@ int htt_rx_ipa_uc_attach(struct htt_pdev_t *pdev, memctx)); return -ENOBUFS; } - cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr, 4); + qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr, 4); ret = htt_rx_ipa_uc_alloc_wdi2_rsc(pdev, rx_ind_ring_elements); return ret; @@ -2425,7 +2402,7 @@ int htt_rx_ipa_uc_attach(struct htt_pdev_t *pdev, void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev) { if (pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, pdev->ipa_uc_rx_rsc.rx2_ind_ring_size, pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr, @@ -2436,7 +2413,7 @@ void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev) } if (pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, 4, pdev->ipa_uc_rx_rsc. @@ -2457,7 +2434,7 @@ void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev) int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev) { if (pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, pdev->ipa_uc_rx_rsc.rx_ind_ring_size, pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr, @@ -2468,7 +2445,7 @@ int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev) } if (pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, 4, pdev->ipa_uc_rx_rsc. diff --git a/core/dp/htt/htt_t2h.c b/core/dp/htt/htt_t2h.c index 18855b9d8907..6cf12e972b31 100644 --- a/core/dp/htt/htt_t2h.c +++ b/core/dp/htt/htt_t2h.c @@ -370,14 +370,14 @@ void htt_t2h_lp_msg_handler(void *context, cdf_nbuf_t htt_t2h_msg) len = HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_GET(*msg_word); op_msg_buffer = - cdf_mem_malloc(sizeof + qdf_mem_malloc(sizeof (struct htt_wdi_ipa_op_response_t) + len); if (!op_msg_buffer) { qdf_print("OPCODE messsage buffer alloc fail"); break; } - cdf_mem_copy(op_msg_buffer, + qdf_mem_copy(op_msg_buffer, msg_start_ptr, sizeof(struct htt_wdi_ipa_op_response_t) + len); @@ -445,15 +445,15 @@ void htt_t2h_lp_msg_handler(void *context, cdf_nbuf_t htt_t2h_msg) err_info.u.mic_err.key_id = HTT_RX_OFLD_PKT_ERR_MIC_ERR_KEYID_GET (*(msg_word + 1)); - cdf_mem_copy(err_info.u.mic_err.da, + qdf_mem_copy(err_info.u.mic_err.da, (uint8_t *)(msg_word + 2), OL_TXRX_MAC_ADDR_LEN); - cdf_mem_copy(err_info.u.mic_err.sa, + qdf_mem_copy(err_info.u.mic_err.sa, (uint8_t *)(msg_word + 4), OL_TXRX_MAC_ADDR_LEN); - cdf_mem_copy(&err_info.u.mic_err.pn, + qdf_mem_copy(&err_info.u.mic_err.pn, (uint8_t *)(msg_word + 6), 6); - cdf_mem_copy(err_info.u.mic_err.ta, + qdf_mem_copy(err_info.u.mic_err.ta, peer->mac_addr.raw, OL_TXRX_MAC_ADDR_LEN); wma_indicate_err(OL_RX_ERR_TKIP_MIC, &err_info); diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 640d0288b118..d53caf95ba26 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -38,7 +38,7 @@ */ #include <osdep.h> /* uint32_t, offsetof, etc. */ #include <qdf_types.h> /* qdf_dma_addr_t */ -#include <cdf_memory.h> /* cdf_os_mem_alloc_consistent et al */ +#include <qdf_mem.h> /* qdf_mem_alloc_consistent et al */ #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */ #include <qdf_time.h> /* qdf_mdelay */ @@ -134,7 +134,7 @@ static void htt_tx_frag_desc_field_update(struct htt_pdev_t *pdev, { unsigned int target_page; unsigned int offset; - struct cdf_mem_dma_page_t *dma_page; + struct qdf_mem_dma_page_t *dma_page; target_page = index / pdev->frag_descs.desc_pages.num_element_per_page; offset = index % pdev->frag_descs.desc_pages.num_element_per_page; @@ -158,7 +158,7 @@ static int htt_tx_frag_desc_attach(struct htt_pdev_t *pdev, uint16_t desc_pool_elems) { pdev->frag_descs.pool_elems = desc_pool_elems; - cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->frag_descs.desc_pages, + qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->frag_descs.desc_pages, pdev->frag_descs.size, desc_pool_elems, qdf_get_dma_mem_context((&pdev->frag_descs), memctx), false); if ((0 == pdev->frag_descs.desc_pages.num_pages) || @@ -180,7 +180,7 @@ static int htt_tx_frag_desc_attach(struct htt_pdev_t *pdev, */ static void htt_tx_frag_desc_detach(struct htt_pdev_t *pdev) { - cdf_mem_multi_pages_free(pdev->osdev, &pdev->frag_descs.desc_pages, + qdf_mem_multi_pages_free(pdev->osdev, &pdev->frag_descs.desc_pages, qdf_get_dma_mem_context((&pdev->frag_descs), memctx), false); } @@ -200,7 +200,7 @@ int htt_tx_frag_alloc(htt_pdev_handle pdev, { uint16_t frag_page_index; uint16_t frag_elem_index; - struct cdf_mem_dma_page_t *dma_page; + struct qdf_mem_dma_page_t *dma_page; /** Index should never be 0, since its used by the hardware to terminate the link. */ @@ -313,7 +313,7 @@ int htt_tx_attach(struct htt_pdev_t *pdev, int desc_pool_elems) { int i, i_int, pool_size; uint32_t **p; - struct cdf_mem_dma_page_t *page_info; + struct qdf_mem_dma_page_t *page_info; uint32_t num_link = 0; uint16_t num_page, num_desc_per_page; @@ -328,7 +328,7 @@ int htt_tx_attach(struct htt_pdev_t *pdev, int desc_pool_elems) pdev->tx_descs.pool_elems = desc_pool_elems; pdev->tx_descs.alloc_cnt = 0; pool_size = pdev->tx_descs.pool_elems * pdev->tx_descs.size; - cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_descs.desc_pages, + qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_descs.desc_pages, pdev->tx_descs.size, pdev->tx_descs.pool_elems, qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false); if ((0 == pdev->tx_descs.desc_pages.num_pages) || @@ -381,7 +381,7 @@ int htt_tx_attach(struct htt_pdev_t *pdev, int desc_pool_elems) return 0; free_htt_desc: - cdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages, + qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages, qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false); out_fail: return -ENOBUFS; @@ -395,7 +395,7 @@ void htt_tx_detach(struct htt_pdev_t *pdev) } htt_tx_frag_desc_detach(pdev); - cdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages, + qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages, qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false); } @@ -411,7 +411,7 @@ static qdf_dma_addr_t htt_tx_get_paddr(htt_pdev_handle pdev, char *target_vaddr) { uint16_t i; - struct cdf_mem_dma_page_t *page_info = NULL; + struct qdf_mem_dma_page_t *page_info = NULL; uint64_t offset; for (i = 0; i < pdev->tx_descs.desc_pages.num_pages; i++) { @@ -885,7 +885,7 @@ int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev, } /* Init buffer */ - cdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz); + qdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz); header_ptr = (uint32_t *) cdf_nbuf_data(buffer_vaddr); /* HTT control header */ @@ -945,7 +945,7 @@ int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev, } /* Init buffer */ - cdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz); + qdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz); header_ptr = (uint32_t *) cdf_nbuf_data(buffer_vaddr); /* HTT control header */ @@ -1010,13 +1010,9 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev, /* Allocate CE Write Index WORD */ pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, - 4, - &pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr, - qdf_get_dma_mem_context( - (&pdev->ipa_uc_tx_rsc.tx_ce_idx), - memctx)); + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, + 4, &pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr); if (!pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr) { qdf_print("%s: CE Write Index WORD alloc fail", __func__); return -ENOBUFS; @@ -1025,31 +1021,28 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev, /* Allocate TX COMP Ring */ tx_comp_ring_size = uc_tx_buf_cnt * sizeof(cdf_nbuf_t); pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr = - cdf_os_mem_alloc_consistent( - pdev->osdev, + qdf_mem_alloc_consistent( + pdev->osdev, pdev->osdev->dev, tx_comp_ring_size, - &pdev->ipa_uc_tx_rsc.tx_comp_base.paddr, - qdf_get_dma_mem_context((&pdev->ipa_uc_tx_rsc. - tx_comp_base), - memctx)); + &pdev->ipa_uc_tx_rsc.tx_comp_base.paddr); if (!pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr) { qdf_print("%s: TX COMP ring alloc fail", __func__); return_code = -ENOBUFS; goto free_tx_ce_idx; } - cdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, tx_comp_ring_size); + qdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, tx_comp_ring_size); /* Allocate TX BUF vAddress Storage */ pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg = - (cdf_nbuf_t *) cdf_mem_malloc(uc_tx_buf_cnt * + (cdf_nbuf_t *) qdf_mem_malloc(uc_tx_buf_cnt * sizeof(cdf_nbuf_t)); if (!pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg) { qdf_print("%s: TX BUF POOL vaddr storage alloc fail", __func__); return_code = -ENOBUFS; goto free_tx_comp_base; } - cdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg, + qdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg, uc_tx_buf_cnt * sizeof(cdf_nbuf_t)); pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt = htt_tx_ipa_uc_wdi_tx_buf_alloc( @@ -1059,7 +1052,7 @@ int htt_tx_ipa_uc_attach(struct htt_pdev_t *pdev, return 0; free_tx_comp_base: - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, tx_comp_ring_size, pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, pdev->ipa_uc_tx_rsc.tx_comp_base.paddr, @@ -1068,7 +1061,7 @@ free_tx_comp_base: tx_comp_base), memctx)); free_tx_ce_idx: - cdf_os_mem_free_consistent(pdev->osdev, + qdf_mem_free_consistent(pdev->osdev, 4, pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr, pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr, @@ -1084,7 +1077,7 @@ int htt_tx_ipa_uc_detach(struct htt_pdev_t *pdev) uint16_t idx; if (pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, 4, pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr, @@ -1095,7 +1088,7 @@ int htt_tx_ipa_uc_detach(struct htt_pdev_t *pdev) } if (pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr) { - cdf_os_mem_free_consistent( + qdf_mem_free_consistent( pdev->osdev, ol_cfg_ipa_uc_tx_max_buf_cnt(pdev->ctrl_pdev) * sizeof(cdf_nbuf_t), pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, @@ -1118,7 +1111,7 @@ int htt_tx_ipa_uc_detach(struct htt_pdev_t *pdev) } /* Free storage */ - cdf_mem_free(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg); + qdf_mem_free(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg); return 0; } diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h index cb337dae37fb..671200c36291 100644 --- a/core/dp/htt/htt_types.h +++ b/core/dp/htt/htt_types.h @@ -355,7 +355,7 @@ struct htt_pdev_t { int size; /* of each HTT tx desc */ uint16_t pool_elems; uint16_t alloc_cnt; - struct cdf_mem_multi_page_t desc_pages; + struct qdf_mem_multi_page_t desc_pages; uint32_t *freelist; qdf_dma_mem_context(memctx); } tx_descs; @@ -363,7 +363,7 @@ struct htt_pdev_t { struct { int size; /* of each Fragment/MSDU-Ext descriptor */ int pool_elems; - struct cdf_mem_multi_page_t desc_pages; + struct qdf_mem_multi_page_t desc_pages; qdf_dma_mem_context(memctx); } frag_descs; #endif /* defined(HELIUMPLUS_PADDR64) */ diff --git a/core/dp/ol/inc/ol_htt_tx_api.h b/core/dp/ol/inc/ol_htt_tx_api.h index e0f63e5d5c6e..e2497f3b3a45 100644 --- a/core/dp/ol/inc/ol_htt_tx_api.h +++ b/core/dp/ol/inc/ol_htt_tx_api.h @@ -660,7 +660,7 @@ htt_tx_desc_init(htt_pdev_handle pdev, local_desc_ext.is_dsrc = (is_dsrc != 0); cdf_nbuf_push_head(msdu, sizeof(local_desc_ext)); - cdf_mem_copy(cdf_nbuf_data(msdu), &local_desc_ext, + qdf_mem_copy(cdf_nbuf_data(msdu), &local_desc_ext, sizeof(local_desc_ext)); } diff --git a/core/dp/ol/inc/ol_txrx_ctrl_api.h b/core/dp/ol/inc/ol_txrx_ctrl_api.h index 60c9f91c714e..b08c5dd7411e 100644 --- a/core/dp/ol/inc/ol_txrx_ctrl_api.h +++ b/core/dp/ol/inc/ol_txrx_ctrl_api.h @@ -1045,7 +1045,7 @@ ol_tx_delay_hist(ol_txrx_pdev_handle pdev, uint16_t *bin_values, int category) { /* no-op version if QCA_COMPUTE_TX_DELAY is not set */ qdf_assert(bin_values); - cdf_mem_zero(bin_values, + qdf_mem_zero(bin_values, QCA_TX_DELAY_HIST_REPORT_BINS * sizeof(*bin_values)); } #endif diff --git a/core/dp/txrx/ol_cfg.c b/core/dp/txrx/ol_cfg.c index 29e4c1b345ce..44e5f240cb83 100644 --- a/core/dp/txrx/ol_cfg.c +++ b/core/dp/txrx/ol_cfg.c @@ -80,7 +80,7 @@ ol_pdev_handle ol_pdev_cfg_attach(qdf_device_t osdev, { struct txrx_pdev_cfg_t *cfg_ctx; - cfg_ctx = cdf_mem_malloc(sizeof(*cfg_ctx)); + cfg_ctx = qdf_mem_malloc(sizeof(*cfg_ctx)); if (!cfg_ctx) { printk(KERN_ERR "cfg ctx allocation failed\n"); return NULL; diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index 5b86ca97c49b..263341c7b8db 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -130,10 +130,10 @@ static void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev, return; /* ignore frames for non-existent bssids */ - cdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN); + qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN); TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) { - if (cdf_mem_compare(a1, vdev->mac_addr.raw, IEEE80211_ADDR_LEN) - == 0) { + if (qdf_mem_cmp(a1, vdev->mac_addr.raw, IEEE80211_ADDR_LEN) + != 0) { break; } } @@ -618,12 +618,12 @@ ol_rx_sec_ind_handler(ol_txrx_pdev_handle pdev, peer->security[sec_index].sec_type = sec_type; /* michael key only valid for TKIP but for simplicity, copy it anyway */ - cdf_mem_copy(&peer->security[sec_index].michael_key[0], + qdf_mem_copy(&peer->security[sec_index].michael_key[0], michael_key, sizeof(peer->security[sec_index].michael_key)); if (sec_type != htt_sec_type_wapi) { - cdf_mem_set(peer->tids_last_pn_valid, + qdf_mem_set(peer->tids_last_pn_valid, OL_TXRX_NUM_EXT_TIDS, 0x00); } else if (sec_index == txrx_sec_mcast || peer->tids_last_pn_valid[0]) { for (i = 0; i < OL_TXRX_NUM_EXT_TIDS; i++) { @@ -632,7 +632,7 @@ ol_rx_sec_ind_handler(ol_txrx_pdev_handle pdev, * since WAPI PN has to be started with predefined value */ peer->tids_last_pn_valid[i] = 1; - cdf_mem_copy((uint8_t *) &peer->tids_last_pn[i], + qdf_mem_copy((uint8_t *) &peer->tids_last_pn[i], (uint8_t *) rx_pn, sizeof(union htt_rx_pn_t)); peer->tids_last_pn[i].pn128[1] = @@ -662,9 +662,9 @@ static void transcap_nwifi_to_8023(cdf_nbuf_t msdu) uint8_t fc1; wh = (struct ieee80211_frame *)cdf_nbuf_data(msdu); - cdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN); - cdf_mem_copy(a2, wh->i_addr2, IEEE80211_ADDR_LEN); - cdf_mem_copy(a3, wh->i_addr3, IEEE80211_ADDR_LEN); + qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN); + qdf_mem_copy(a2, wh->i_addr2, IEEE80211_ADDR_LEN); + qdf_mem_copy(a3, wh->i_addr3, IEEE80211_ADDR_LEN); fc1 = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; /* Native Wifi header is 80211 non-QoS header */ hdrsize = sizeof(struct ieee80211_frame); @@ -682,16 +682,16 @@ static void transcap_nwifi_to_8023(cdf_nbuf_t msdu) eth_hdr = (struct ether_header *)(cdf_nbuf_data(msdu)); switch (fc1) { case IEEE80211_FC1_DIR_NODS: - cdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_TODS: - cdf_mem_copy(eth_hdr->ether_dhost, a3, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_dhost, a3, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_FROMDS: - cdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->ether_shost, a3, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->ether_shost, a3, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_DSTODS: break; @@ -973,7 +973,7 @@ ol_rx_deliver(struct ol_txrx_vdev_t *vdev, bool filter = false; #ifdef QCA_SUPPORT_SW_TXRX_ENCAP struct ol_rx_decap_info_t info; - cdf_mem_set(&info, sizeof(info), 0); + qdf_mem_set(&info, sizeof(info), 0); #endif msdu = msdu_list; @@ -1070,7 +1070,7 @@ DONE: peer->last_pkt_center_freq; rx_header.rssi_cmb = peer->last_pkt_rssi_cmb; - cdf_mem_copy(rx_header.rssi, + qdf_mem_copy(rx_header.rssi, peer->last_pkt_rssi, sizeof(rx_header.rssi)); if (peer->last_pkt_legacy_rate_sel == @@ -1119,7 +1119,7 @@ DONE: cdf_nbuf_push_head(msdu, sizeof(rx_header)); - cdf_mem_copy(cdf_nbuf_data(msdu), + qdf_mem_copy(cdf_nbuf_data(msdu), &rx_header, sizeof(rx_header)); /* Construct the ethernet header with @@ -1130,7 +1130,7 @@ DONE: ETHERTYPE_OCB_RX); cdf_nbuf_push_head(msdu, sizeof(eth_header)); - cdf_mem_copy(cdf_nbuf_data(msdu), + qdf_mem_copy(cdf_nbuf_data(msdu), ð_header, sizeof(eth_header)); } diff --git a/core/dp/txrx/ol_rx_defrag.c b/core/dp/txrx/ol_rx_defrag.c index 8c05c6098a0e..58f5b90bf6e3 100644 --- a/core/dp/txrx/ol_rx_defrag.c +++ b/core/dp/txrx/ol_rx_defrag.c @@ -65,16 +65,16 @@ #include <ieee80211.h> #include <qdf_util.h> #include <athdefs.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <ol_rx_defrag.h> #include <enet.h> #include <qdf_time.h> /* qdf_system_time */ #define DEFRAG_IEEE80211_ADDR_EQ(a1, a2) \ - (cdf_mem_compare(a1, a2, IEEE80211_ADDR_LEN) == 0) + (qdf_mem_cmp(a1, a2, IEEE80211_ADDR_LEN) != 0) #define DEFRAG_IEEE80211_ADDR_COPY(dst, src) \ - cdf_mem_copy(dst, src, IEEE80211_ADDR_LEN) + qdf_mem_copy(dst, src, IEEE80211_ADDR_LEN) #define DEFRAG_IEEE80211_QOS_HAS_SEQ(wh) \ (((wh)->i_fc[0] & \ @@ -562,7 +562,7 @@ ol_rx_defrag(ol_txrx_pdev_handle pdev, return; if (tkip_demic) { - cdf_mem_copy(key, + qdf_mem_copy(key, peer->security[index].michael_key, sizeof(peer->security[index].michael_key)); if (!ol_rx_frag_tkip_demic(pdev, key, msdu, hdr_space)) { @@ -608,7 +608,7 @@ ol_rx_frag_tkip_decap(ol_txrx_pdev_handle pdev, if (!(ivp[IEEE80211_WEP_IVLEN] & IEEE80211_WEP_EXTIV)) return OL_RX_DEFRAG_ERR; - cdf_mem_move(origHdr + f_tkip.ic_header, origHdr, hdrlen); + qdf_mem_move(origHdr + f_tkip.ic_header, origHdr, hdrlen); cdf_nbuf_pull_head(msdu, f_tkip.ic_header); cdf_nbuf_trim_tail(msdu, f_tkip.ic_trailer); return OL_RX_DEFRAG_OK; @@ -630,7 +630,7 @@ ol_rx_frag_wep_decap(ol_txrx_pdev_handle pdev, cdf_nbuf_t msdu, uint16_t hdrlen) &rx_desc_old_position, &ind_old_position, &rx_desc_len); origHdr = (uint8_t *) (cdf_nbuf_data(msdu) + rx_desc_len); - cdf_mem_move(origHdr + f_wep.ic_header, origHdr, hdrlen); + qdf_mem_move(origHdr + f_wep.ic_header, origHdr, hdrlen); cdf_nbuf_pull_head(msdu, f_wep.ic_header); cdf_nbuf_trim_tail(msdu, f_wep.ic_trailer); return OL_RX_DEFRAG_OK; @@ -665,7 +665,7 @@ ol_rx_frag_tkip_demic(ol_txrx_pdev_handle pdev, const uint8_t *key, ol_rx_defrag_copydata(msdu, pktlen - f_tkip.ic_miclen + rx_desc_len, f_tkip.ic_miclen, (caddr_t) mic0); - if (cdf_mem_compare(mic, mic0, f_tkip.ic_miclen)) + if (!qdf_mem_cmp(mic, mic0, f_tkip.ic_miclen)) return OL_RX_DEFRAG_ERR; cdf_nbuf_trim_tail(msdu, f_tkip.ic_miclen); @@ -694,7 +694,7 @@ ol_rx_frag_ccmp_decap(ol_txrx_pdev_handle pdev, if (!(ivp[IEEE80211_WEP_IVLEN] & IEEE80211_WEP_EXTIV)) return OL_RX_DEFRAG_ERR; - cdf_mem_move(origHdr + f_ccmp.ic_header, origHdr, hdrlen); + qdf_mem_move(origHdr + f_ccmp.ic_header, origHdr, hdrlen); cdf_nbuf_pull_head(nbuf, f_ccmp.ic_header); return OL_RX_DEFRAG_OK; @@ -973,9 +973,9 @@ void ol_rx_defrag_nwifi_to_8023(ol_txrx_pdev_handle pdev, cdf_nbuf_t msdu) &ind_old_position, &rx_desc_len); wh_ptr = (struct ieee80211_frame *)(cdf_nbuf_data(msdu) + rx_desc_len); - cdf_mem_copy(&wh, wh_ptr, sizeof(wh)); + qdf_mem_copy(&wh, wh_ptr, sizeof(wh)); hdrsize = sizeof(struct ieee80211_frame); - cdf_mem_copy(&llchdr, ((uint8_t *) (cdf_nbuf_data(msdu) + + qdf_mem_copy(&llchdr, ((uint8_t *) (cdf_nbuf_data(msdu) + rx_desc_len)) + hdrsize, sizeof(struct llc_snap_hdr_t)); @@ -989,25 +989,25 @@ void ol_rx_defrag_nwifi_to_8023(ol_txrx_pdev_handle pdev, cdf_nbuf_t msdu) eth_hdr = (struct ethernet_hdr_t *)(cdf_nbuf_data(msdu)); switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1, + qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_TODS: - cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr3, + qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr3, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_FROMDS: - cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1, + qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1, IEEE80211_ADDR_LEN); - cdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, IEEE80211_ADDR_LEN); + qdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, IEEE80211_ADDR_LEN); break; case IEEE80211_FC1_DIR_DSTODS: break; } - cdf_mem_copy(eth_hdr->ethertype, llchdr.ethertype, + qdf_mem_copy(eth_hdr->ethertype, llchdr.ethertype, sizeof(llchdr.ethertype)); } @@ -1038,7 +1038,7 @@ ol_rx_defrag_qos_decap(ol_txrx_pdev_handle pdev, /* remove QoS filed from header */ hdrlen -= qoslen; - cdf_mem_move((uint8_t *) wh + qoslen, wh, hdrlen); + qdf_mem_move((uint8_t *) wh + qoslen, wh, hdrlen); wh = (struct ieee80211_frame *)cdf_nbuf_pull_head(nbuf, rx_desc_len + qoslen); diff --git a/core/dp/txrx/ol_rx_defrag.h b/core/dp/txrx/ol_rx_defrag.h index d0467625dd4d..6ed90da22243 100644 --- a/core/dp/txrx/ol_rx_defrag.h +++ b/core/dp/txrx/ol_rx_defrag.h @@ -32,7 +32,7 @@ #include <cds_ieee80211_common.h> #include <qdf_util.h> #include <qdf_types.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <ol_txrx_internal.h> #include <ol_txrx_dbg.h> diff --git a/core/dp/txrx/ol_rx_fwd.c b/core/dp/txrx/ol_rx_fwd.c index 9e52c074ec4c..f85df9d2964a 100644 --- a/core/dp/txrx/ol_rx_fwd.c +++ b/core/dp/txrx/ol_rx_fwd.c @@ -27,7 +27,7 @@ /* standard header files */ #include <cdf_nbuf.h> /* cdf_nbuf_map */ -#include <cdf_memory.h> /* cdf_mem_compare */ +#include <qdf_mem.h> /* qdf_mem_cmp */ /* external header files */ #include <ol_cfg.h> /* wlan_op_mode_ap, etc. */ @@ -75,9 +75,9 @@ static inline void ol_ap_fwd_check(struct ol_txrx_vdev_t *vdev, cdf_nbuf_t msdu) if (type != IEEE80211_FC0_TYPE_DATA || subtype != 0x0 || ((tods != 1) || (fromds != 0)) || - (cdf_mem_compare + (qdf_mem_cmp (mac_header->i_addr3, vdev->mac_addr.raw, - IEEE80211_ADDR_LEN) == 0)) { + IEEE80211_ADDR_LEN) != 0)) { #ifdef DEBUG_HOST_RC TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1, "Exit: %s | Unnecessary to adjust mac header\n", diff --git a/core/dp/txrx/ol_rx_pn.c b/core/dp/txrx/ol_rx_pn.c index 1d5a4acbc88e..4da66ef68b64 100644 --- a/core/dp/txrx/ol_rx_pn.c +++ b/core/dp/txrx/ol_rx_pn.c @@ -261,7 +261,7 @@ A_STATUS ol_rx_pn_trace_attach(ol_txrx_pdev_handle pdev) pdev->rx_pn_trace.cnt = 0; pdev->rx_pn_trace.mask = num_elems - 1; pdev->rx_pn_trace.data = - cdf_mem_malloc(sizeof(*pdev->rx_pn_trace.data) * num_elems); + qdf_mem_malloc(sizeof(*pdev->rx_pn_trace.data) * num_elems); if (!pdev->rx_pn_trace.data) return A_NO_MEMORY; return A_OK; @@ -269,7 +269,7 @@ A_STATUS ol_rx_pn_trace_attach(ol_txrx_pdev_handle pdev) void ol_rx_pn_trace_detach(ol_txrx_pdev_handle pdev) { - cdf_mem_free(pdev->rx_pn_trace.data); + qdf_mem_free(pdev->rx_pn_trace.data); } void diff --git a/core/dp/txrx/ol_rx_reorder.c b/core/dp/txrx/ol_rx_reorder.c index 7c3a8171d0b3..42fd4fb6af7d 100644 --- a/core/dp/txrx/ol_rx_reorder.c +++ b/core/dp/txrx/ol_rx_reorder.c @@ -28,7 +28,7 @@ /*=== header file includes ===*/ /* generic utilities */ #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */ -#include <cdf_memory.h> /* cdf_mem_malloc */ +#include <qdf_mem.h> /* qdf_mem_malloc */ #include <ieee80211.h> /* IEEE80211_SEQ_MAX */ @@ -492,9 +492,9 @@ ol_rx_addba_handler(ol_txrx_pdev_handle pdev, round_pwr2_win_sz = OL_RX_REORDER_ROUND_PWR2(win_sz); array_size = round_pwr2_win_sz * sizeof(struct ol_rx_reorder_array_elem_t); - rx_reorder->array = cdf_mem_malloc(array_size); + rx_reorder->array = qdf_mem_malloc(array_size); TXRX_ASSERT1(rx_reorder->array); - cdf_mem_set(rx_reorder->array, array_size, 0x0); + qdf_mem_set(rx_reorder->array, array_size, 0x0); rx_reorder->win_sz_mask = round_pwr2_win_sz - 1; rx_reorder->num_mpdus = 0; @@ -529,7 +529,7 @@ ol_rx_delba_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id, uint8_t tid) if (rx_reorder->array != &rx_reorder->base) { TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1, "%s, delete reorder array, tid:%d\n", __func__, tid); - cdf_mem_free(rx_reorder->array); + qdf_mem_free(rx_reorder->array); } /* set up the TID with default parameters (ARQ window size = 1) */ @@ -733,7 +733,7 @@ A_STATUS ol_rx_reorder_trace_attach(ol_txrx_pdev_handle pdev) pdev->rx_reorder_trace.idx = 0; pdev->rx_reorder_trace.cnt = 0; pdev->rx_reorder_trace.mask = num_elems - 1; - pdev->rx_reorder_trace.data = cdf_mem_malloc( + pdev->rx_reorder_trace.data = qdf_mem_malloc( sizeof(*pdev->rx_reorder_trace.data) * num_elems); if (!pdev->rx_reorder_trace.data) return A_NO_MEMORY; @@ -746,7 +746,7 @@ A_STATUS ol_rx_reorder_trace_attach(ol_txrx_pdev_handle pdev) void ol_rx_reorder_trace_detach(ol_txrx_pdev_handle pdev) { - cdf_mem_free(pdev->rx_reorder_trace.data); + qdf_mem_free(pdev->rx_reorder_trace.data); } void diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c index d50bc45390d8..6ac608a969da 100644 --- a/core/dp/txrx/ol_tx.c +++ b/core/dp/txrx/ol_tx.c @@ -1149,7 +1149,7 @@ bool parse_ocb_tx_header(cdf_nbuf_t msdu, if (tx_ctrl_hdr->version == OCB_HEADER_VERSION) { if (tx_ctrl) - cdf_mem_copy(tx_ctrl, tx_ctrl_hdr, + qdf_mem_copy(tx_ctrl, tx_ctrl_hdr, sizeof(*tx_ctrl_hdr)); } else { /* The TX control header is invalid. */ @@ -1367,11 +1367,11 @@ void ol_tso_seg_list_init(struct ol_txrx_pdev_t *pdev, uint32_t num_seg) int i; struct cdf_tso_seg_elem_t *c_element; - c_element = cdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t)); + c_element = qdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t)); pdev->tso_seg_pool.freelist = c_element; for (i = 0; i < (num_seg - 1); i++) { c_element->next = - cdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t)); + qdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t)); c_element = c_element->next; c_element->next = NULL; } @@ -1389,7 +1389,7 @@ void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev) c_element = pdev->tso_seg_pool.freelist; for (i = 0; i < pdev->tso_seg_pool.pool_size; i++) { temp = c_element->next; - cdf_mem_free(c_element); + qdf_mem_free(c_element); c_element = temp; if (!c_element) break; diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c index 918917a5ae22..ae2d77aad510 100644 --- a/core/dp/txrx/ol_tx_send.c +++ b/core/dp/txrx/ol_tx_send.c @@ -958,7 +958,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev, pdev->tx_delay.cats[cat].avg_start_time_ticks = now_ticks; index = 1 - index; pdev->tx_delay.cats[cat].in_progress_idx = index; - cdf_mem_zero(&pdev->tx_delay.cats[cat].copies[index], + qdf_mem_zero(&pdev->tx_delay.cats[cat].copies[index], sizeof(pdev->tx_delay.cats[cat].copies[index])); } diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 1472cbc12c0f..208548f95355 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -28,7 +28,7 @@ /*=== includes ===*/ /* header files for OS primitives */ #include <osdep.h> /* uint32_t, etc. */ -#include <cdf_memory.h> /* cdf_mem_malloc,free */ +#include <qdf_mem.h> /* qdf_mem_malloc,free */ #include <qdf_types.h> /* qdf_device_t, qdf_print */ #include <qdf_lock.h> /* cdf_spinlock */ #include <qdf_atomic.h> /* qdf_atomic_read */ @@ -404,10 +404,10 @@ ol_txrx_pdev_alloc(ol_pdev_handle ctrl_pdev, struct ol_txrx_pdev_t *pdev; int i; - pdev = cdf_mem_malloc(sizeof(*pdev)); + pdev = qdf_mem_malloc(sizeof(*pdev)); if (!pdev) goto fail0; - cdf_mem_zero(pdev, sizeof(*pdev)); + qdf_mem_zero(pdev, sizeof(*pdev)); pdev->cfg.default_tx_comp_req = !ol_cfg_tx_free_at_download(ctrl_pdev); @@ -437,7 +437,7 @@ fail2: ol_txrx_peer_find_detach(pdev); fail1: - cdf_mem_free(pdev); + qdf_mem_free(pdev); fail0: return NULL; @@ -551,7 +551,7 @@ ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev) /* Calculate single element reserved size power of 2 */ pdev->tx_desc.desc_reserved_size = qdf_get_pwr2(desc_element_size); - cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_desc.desc_pages, + qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_desc.desc_pages, pdev->tx_desc.desc_reserved_size, desc_pool_size, 0, true); if ((0 == pdev->tx_desc.desc_pages.num_pages) || (NULL == pdev->tx_desc.desc_pages.cacheable_pages)) { @@ -826,7 +826,7 @@ ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev) /* * Initialize rx PN check characteristics for different security types. */ - cdf_mem_set(&pdev->rx_pn[0], sizeof(pdev->rx_pn), 0); + qdf_mem_set(&pdev->rx_pn[0], sizeof(pdev->rx_pn), 0); /* TKIP: 48-bit TSC, CCMP: 48-bit PN */ pdev->rx_pn[htt_sec_type_tkip].len = @@ -870,7 +870,7 @@ ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev) ol_tx_cfg_max_tx_queue_depth_ll(pdev->ctrl_pdev); #ifdef QCA_COMPUTE_TX_DELAY - cdf_mem_zero(&pdev->tx_delay, sizeof(pdev->tx_delay)); + qdf_mem_zero(&pdev->tx_delay, sizeof(pdev->tx_delay)); qdf_spinlock_create(&pdev->tx_delay.mutex); /* initialize compute interval with 5 seconds (ESE default) */ @@ -940,7 +940,7 @@ desc_alloc_fail: htt_tx_desc_free(pdev->htt_pdev, (ol_tx_desc_find(pdev, i))->htt_tx_desc); - cdf_mem_multi_pages_free(pdev->osdev, + qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_desc.desc_pages, 0, true); page_alloc_fail: @@ -1032,7 +1032,7 @@ void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force) htt_tx_desc_free(pdev->htt_pdev, htt_tx_desc); } - cdf_mem_multi_pages_free(pdev->osdev, + qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_desc.desc_pages, 0, true); pdev->tx_desc.freelist = NULL; @@ -1079,7 +1079,7 @@ ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev, TXRX_ASSERT2(pdev); TXRX_ASSERT2(vdev_mac_addr); - vdev = cdf_mem_malloc(sizeof(*vdev)); + vdev = qdf_mem_malloc(sizeof(*vdev)); if (!vdev) return NULL; /* failure */ @@ -1093,7 +1093,7 @@ ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev, vdev->drop_unenc = 1; vdev->num_filters = 0; - cdf_mem_copy(&vdev->mac_addr.raw[0], vdev_mac_addr, + qdf_mem_copy(&vdev->mac_addr.raw[0], vdev_mac_addr, OL_TXRX_MAC_ADDR_LEN); TAILQ_INIT(&vdev->peer_list); @@ -1166,7 +1166,7 @@ void ol_txrx_set_privacy_filters(ol_txrx_vdev_handle vdev, void *filters, uint32_t num) { - cdf_mem_copy(vdev->privacy_filters, filters, + qdf_mem_copy(vdev->privacy_filters, filters, num * sizeof(struct privacy_exemption)); vdev->num_filters = num; } @@ -1247,7 +1247,7 @@ ol_txrx_vdev_detach(ol_txrx_vdev_handle vdev, * they will be freed once the target sends a tx completion * message for them. */ - cdf_mem_free(vdev); + qdf_mem_free(vdev); if (callback) callback(context); } @@ -1294,7 +1294,7 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer, if (ret != QDF_STATUS_SUCCESS) cdf_nbuf_free(cache_buf->buf); } - cdf_mem_free(cache_buf); + qdf_mem_free(cache_buf); qdf_spin_lock_bh(&peer->bufq_lock); cache_buf = list_entry((&peer->cached_bufq)->next, typeof(*cache_buf), list); @@ -1355,14 +1355,14 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev, } } - peer = cdf_mem_malloc(sizeof(*peer)); + peer = qdf_mem_malloc(sizeof(*peer)); if (!peer) return NULL; /* failure */ - cdf_mem_zero(peer, sizeof(*peer)); + qdf_mem_zero(peer, sizeof(*peer)); /* store provided params */ peer->vdev = vdev; - cdf_mem_copy(&peer->mac_addr.raw[0], peer_mac_addr, + qdf_mem_copy(&peer->mac_addr.raw[0], peer_mac_addr, OL_TXRX_MAC_ADDR_LEN); INIT_LIST_HEAD(&peer->cached_bufq); @@ -1411,10 +1411,9 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev, /* * For every peer MAp message search and set if bss_peer */ - differs = - cdf_mem_compare(peer->mac_addr.raw, vdev->mac_addr.raw, + differs = qdf_mem_cmp(peer->mac_addr.raw, vdev->mac_addr.raw, OL_TXRX_MAC_ADDR_LEN); - if (!differs) + if (differs) peer->bss_peer = 1; /* @@ -1763,7 +1762,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer) vdev->mac_addr.raw[4], vdev->mac_addr.raw[5]); /* all peers are gone, go ahead and delete it */ - cdf_mem_free(vdev); + qdf_mem_free(vdev); if (vdev_delete_cb) vdev_delete_cb(vdev_delete_context); } else { @@ -1787,13 +1786,13 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer) TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1, "%s, delete reorder arr, tid:%d\n", __func__, i); - cdf_mem_free(peer->tids_rx_reorder[i].array); + qdf_mem_free(peer->tids_rx_reorder[i].array); ol_rx_reorder_init(&peer->tids_rx_reorder[i], (uint8_t) i); } } - cdf_mem_free(peer); + qdf_mem_free(peer); } else { qdf_spin_unlock_bh(&pdev->peer_ref_mutex); } @@ -2034,7 +2033,7 @@ ol_txrx_fw_stats_get(ol_txrx_vdev_handle vdev, struct ol_txrx_stats_req *req, * Allocate a non-transient stats request object. * (The one provided as an argument is likely allocated on the stack.) */ - non_volatile_req = cdf_mem_malloc(sizeof(*non_volatile_req)); + non_volatile_req = qdf_mem_malloc(sizeof(*non_volatile_req)); if (!non_volatile_req) return A_NO_MEMORY; @@ -2051,7 +2050,7 @@ ol_txrx_fw_stats_get(ol_txrx_vdev_handle vdev, struct ol_txrx_stats_req *req, req->stats_type_reset_mask, HTT_H2T_STATS_REQ_CFG_STAT_TYPE_INVALID, 0, cookie)) { - cdf_mem_free(non_volatile_req); + qdf_mem_free(non_volatile_req); return A_ERROR; } @@ -2060,7 +2059,7 @@ ol_txrx_fw_stats_get(ol_txrx_vdev_handle vdev, struct ol_txrx_stats_req *req, ; if (response_expected == false) - cdf_mem_free(non_volatile_req); + qdf_mem_free(non_volatile_req); return A_OK; } @@ -2105,7 +2104,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < lmt) lmt = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, lmt); + qdf_mem_copy(buf, stats_data, lmt); } break; case HTT_DBG_STATS_RX_REORDER: @@ -2117,7 +2116,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < lmt) lmt = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, lmt); + qdf_mem_copy(buf, stats_data, lmt); } break; case HTT_DBG_STATS_RX_RATE_INFO: @@ -2129,7 +2128,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < lmt) lmt = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, lmt); + qdf_mem_copy(buf, stats_data, lmt); } break; @@ -2142,7 +2141,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < lmt) lmt = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, lmt); + qdf_mem_copy(buf, stats_data, lmt); } break; @@ -2161,7 +2160,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, limit = req->base.copy.byte_limit; } buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2174,7 +2173,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < limit) limit = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2187,7 +2186,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < limit) limit = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2200,7 +2199,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < limit) limit = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2215,7 +2214,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (req->base.copy.byte_limit < limit) limit = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2231,7 +2230,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, limit = req->base.copy.byte_limit; buf = req->base.copy.buf + req->offset; - cdf_mem_copy(buf, stats_data, limit); + qdf_mem_copy(buf, stats_data, limit); } break; @@ -2251,7 +2250,7 @@ ol_txrx_fw_stats_handler(ol_txrx_pdev_handle pdev, if (!more) { if (req->base.wait.blocking) qdf_semaphore_release(req->base.wait.sem_ptr); - cdf_mem_free(req); + qdf_mem_free(req); } } @@ -2511,7 +2510,7 @@ void ol_txrx_stats_display(ol_txrx_pdev_handle pdev) void ol_txrx_stats_clear(ol_txrx_pdev_handle pdev) { - cdf_mem_zero(&pdev->stats, sizeof(pdev->stats)); + qdf_mem_zero(&pdev->stats, sizeof(pdev->stats)); } #if defined(ENABLE_TXRX_PROT_ANALYZE) @@ -2539,7 +2538,7 @@ ol_txrx_peer_stats_copy(ol_txrx_pdev_handle pdev, { qdf_assert(pdev && peer && stats); qdf_spin_lock_bh(&pdev->peer_stat_mutex); - cdf_mem_copy(stats, &peer->stats, sizeof(*stats)); + qdf_mem_copy(stats, &peer->stats, sizeof(*stats)); qdf_spin_unlock_bh(&pdev->peer_stat_mutex); return A_OK; } @@ -2834,7 +2833,7 @@ void ol_txrx_ipa_uc_fw_op_event_handler(void *context, if (qdf_unlikely(!pdev)) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s: Invalid context", __func__); - cdf_mem_free(rxpkt); + qdf_mem_free(rxpkt); return; } @@ -2843,7 +2842,7 @@ void ol_txrx_ipa_uc_fw_op_event_handler(void *context, } else { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s: ipa_uc_op_cb NULL", __func__); - cdf_mem_free(rxpkt); + qdf_mem_free(rxpkt); } } @@ -2885,7 +2884,7 @@ void ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, } else { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s: IPA callback function is not registered", __func__); - cdf_mem_free(op_msg); + qdf_mem_free(op_msg); return; } } @@ -3071,7 +3070,7 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer, buf = rx_buf_list; while (buf) { next_buf = cdf_nbuf_queue_next(buf); - cache_buf = cdf_mem_malloc(sizeof(*cache_buf)); + cache_buf = qdf_mem_malloc(sizeof(*cache_buf)); if (!cache_buf) { TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "Failed to allocate buf to cache the rx frames"); diff --git a/core/dp/txrx/ol_txrx_encap.c b/core/dp/txrx/ol_txrx_encap.c index a7471da73748..8deddebada03 100644 --- a/core/dp/txrx/ol_txrx_encap.c +++ b/core/dp/txrx/ol_txrx_encap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -54,7 +54,7 @@ if (cdf_nbuf_len(msdu) < hdsize) { \ return A_ERROR; \ } \ - cdf_mem_copy(localbuf, wh, hdsize); \ + qdf_mem_copy(localbuf, wh, hdsize); \ wh = (struct ieee80211_frame *)localbuf; \ } while (0) @@ -73,7 +73,7 @@ ol_tx_copy_native_wifi_header(cdf_nbuf_t msdu, if (cdf_nbuf_len(msdu) < *hdsize) return A_ERROR; - cdf_mem_copy(localbuf, wh, *hdsize); + qdf_mem_copy(localbuf, wh, *hdsize); return A_OK; } @@ -123,7 +123,7 @@ ol_tx_encap_from_native_wifi(struct ol_txrx_vdev_t *vdev, /*add ht control field if needed */ /* copy new hd to bd */ - cdf_mem_copy((void *) + qdf_mem_copy((void *) htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc, new_hdsize), localbuf, new_hdsize); @@ -147,7 +147,7 @@ ol_tx_encap_from_native_wifi(struct ol_txrx_vdev_t *vdev, wh = (struct ieee80211_frame *) htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc, hdsize); - cdf_mem_copy((void *)wh, localbuf, hdsize); + qdf_mem_copy((void *)wh, localbuf, hdsize); cdf_nbuf_pull_head(msdu, hdsize); tx_msdu_info->htt.info.l3_hdr_offset = hdsize; tx_desc->orig_l2_hdr_bytes = hdsize; @@ -193,34 +193,34 @@ ol_tx_encap_from_8023(struct ol_txrx_vdev_t *vdev, switch (vdev->opmode) { case wlan_op_mode_ap: /* DA , BSSID , SA */ - cdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr, + qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr, IEEE80211_ADDR_LEN); - cdf_mem_copy(wh->i_addr2, &vdev->mac_addr.raw, + qdf_mem_copy(wh->i_addr2, &vdev->mac_addr.raw, IEEE80211_ADDR_LEN); - cdf_mem_copy(wh->i_addr3, eth_hdr->src_addr, + qdf_mem_copy(wh->i_addr3, eth_hdr->src_addr, IEEE80211_ADDR_LEN); wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS; new_hdsize = sizeof(struct ieee80211_frame); break; case wlan_op_mode_ibss: /* DA, SA, BSSID */ - cdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr, + qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr, IEEE80211_ADDR_LEN); - cdf_mem_copy(wh->i_addr2, eth_hdr->src_addr, + qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr, IEEE80211_ADDR_LEN); /* need to check the bssid behaviour for IBSS vdev */ - cdf_mem_copy(wh->i_addr3, &vdev->mac_addr.raw, + qdf_mem_copy(wh->i_addr3, &vdev->mac_addr.raw, IEEE80211_ADDR_LEN); wh->i_fc[1] = IEEE80211_FC1_DIR_NODS; new_hdsize = sizeof(struct ieee80211_frame); break; case wlan_op_mode_sta: /* BSSID, SA , DA */ - cdf_mem_copy(wh->i_addr1, &peer->mac_addr.raw, + qdf_mem_copy(wh->i_addr1, &peer->mac_addr.raw, IEEE80211_ADDR_LEN); - cdf_mem_copy(wh->i_addr2, eth_hdr->src_addr, + qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr, IEEE80211_ADDR_LEN); - cdf_mem_copy(wh->i_addr3, eth_hdr->dest_addr, + qdf_mem_copy(wh->i_addr3, eth_hdr->dest_addr, IEEE80211_ADDR_LEN); wh->i_fc[1] = IEEE80211_FC1_DIR_TODS; new_hdsize = sizeof(struct ieee80211_frame); @@ -256,7 +256,7 @@ ol_tx_encap_from_8023(struct ol_txrx_vdev_t *vdev, ether_type = (eth_hdr->ethertype[0] << 8) | (eth_hdr->ethertype[1]); if (ether_type >= IEEE8023_MAX_LEN) { - cdf_mem_copy(llc_hdr, + qdf_mem_copy(llc_hdr, ethernet_II_llc_snap_header_prefix, sizeof (ethernet_II_llc_snap_header_prefix)); @@ -273,7 +273,7 @@ ol_tx_encap_from_8023(struct ol_txrx_vdev_t *vdev, do we need to move to BD pdu? */ } } - cdf_mem_copy((void *) + qdf_mem_copy((void *) htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc, new_l2_hdsize), localbuf, new_hdsize); @@ -325,33 +325,33 @@ ol_rx_decap_to_native_wifi(struct ol_txrx_vdev_t *vdev, wh = (struct ieee80211_frame_addr4 *)cdf_nbuf_push_head(msdu, hdsize); TXRX_ASSERT2(wh != NULL); TXRX_ASSERT2(hdsize <= info->hdr_len); - cdf_mem_copy((uint8_t *) wh, info->hdr, hdsize); + qdf_mem_copy((uint8_t *) wh, info->hdr, hdsize); /* amsdu subfrm handling if ethr_hdr is not NULL */ if (ethr_hdr != NULL) { switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - cdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr, + qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr, ETHERNET_ADDR_LEN); - cdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr, + qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_TODS: - cdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr, + qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr, ETHERNET_ADDR_LEN); - cdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr, + qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_FROMDS: - cdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr, + qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr, ETHERNET_ADDR_LEN); - cdf_mem_copy(wh->i_addr3, ethr_hdr->src_addr, + qdf_mem_copy(wh->i_addr3, ethr_hdr->src_addr, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_DSTODS: - cdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr, + qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr, ETHERNET_ADDR_LEN); - cdf_mem_copy(wh->i_addr4, ethr_hdr->src_addr, + qdf_mem_copy(wh->i_addr4, ethr_hdr->src_addr, ETHERNET_ADDR_LEN); break; } @@ -414,27 +414,27 @@ ol_rx_decap_to_8023(struct ol_txrx_vdev_t *vdev, ethr_hdr = (struct ethernet_hdr_t *)local_buf; switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_TODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_FROMDS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_DSTODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4, ETHERNET_ADDR_LEN); break; } @@ -451,7 +451,7 @@ ol_rx_decap_to_8023(struct ol_txrx_vdev_t *vdev, ethr_hdr->ethertype[0] = (ether_type >> 8) & 0xff; ethr_hdr->ethertype[1] = (ether_type) & 0xff; } - cdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN); + qdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN); } static inline A_STATUS @@ -466,7 +466,7 @@ ol_rx_decap_subfrm_amsdu(struct ol_txrx_vdev_t *vdev, subfrm_hdr = (uint8_t *) cdf_nbuf_data(msdu); if (pdev->frame_format == wlan_frm_fmt_native_wifi) { /* decap to native wifi */ - cdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN); + qdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN); cdf_nbuf_pull_head(msdu, ETHERNET_HDR_LEN); ol_rx_decap_to_native_wifi(vdev, msdu, info, ether_hdr); } else if (pdev->frame_format == wlan_frm_fmt_802_3) { @@ -474,7 +474,7 @@ ol_rx_decap_subfrm_amsdu(struct ol_txrx_vdev_t *vdev, /* remove llc snap hdr if it's necessary according to * 802.11 table P-3 */ - cdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN); + qdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN); cdf_nbuf_pull_head(msdu, ETHERNET_HDR_LEN); ol_rx_decap_to_8023(vdev, msdu, info, ether_hdr); } else { @@ -507,7 +507,7 @@ ol_rx_decap_msdu(struct ol_txrx_vdev_t *vdev, if (IEEE80211_QOS_HAS_SEQ(wh)) { info->hdr_len = ol_txrx_ieee80211_hdrsize(wh); TXRX_ASSERT2(info->hdr_len <= sizeof(info->hdr)); - cdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */ + qdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */ wh, info->hdr_len); cdf_nbuf_pull_head(msdu, info->hdr_len); ol_rx_decap_to_native_wifi(vdev, msdu, info, NULL); @@ -517,7 +517,7 @@ ol_rx_decap_msdu(struct ol_txrx_vdev_t *vdev, if (pdev->sw_rx_llc_proc_enable) { info->hdr_len = ol_txrx_ieee80211_hdrsize(wh); TXRX_ASSERT2(info->hdr_len <= sizeof(info->hdr)); - cdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */ + qdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */ wh, info->hdr_len); cdf_nbuf_pull_head(msdu, info->hdr_len); /* remove llc snap hdr if it's necessary according to @@ -564,7 +564,7 @@ ol_rx_decap(struct ol_txrx_vdev_t *vdev, ol_txrx_ieee80211_hdrsize(mpdu_hdr); TXRX_ASSERT2(info->hdr_len <= sizeof(info->hdr)); - cdf_mem_copy(info->hdr, mpdu_hdr, + qdf_mem_copy(info->hdr, mpdu_hdr, info->hdr_len); cdf_nbuf_pull_head(msdu, info->hdr_len); } diff --git a/core/dp/txrx/ol_txrx_event.c b/core/dp/txrx/ol_txrx_event.c index 0743a00ed4b4..ab85532715fe 100644 --- a/core/dp/txrx/ol_txrx_event.c +++ b/core/dp/txrx/ol_txrx_event.c @@ -57,7 +57,7 @@ wdi_event_del_subs(wdi_event_subscribe *wdi_sub, int event_index) } wdi_sub = next; } - /* cdf_mem_free(wdi_sub); */ + /* qdf_mem_free(wdi_sub); */ } static inline void @@ -170,7 +170,7 @@ wdi_event_unsub(struct ol_txrx_pdev_t *txrx_pdev, if (event_cb_sub->priv.next) event_cb_sub->priv.next->priv.prev = event_cb_sub->priv.prev; - /* cdf_mem_free(event_cb_sub); */ + /* qdf_mem_free(event_cb_sub); */ return A_OK; } @@ -186,7 +186,7 @@ A_STATUS wdi_event_attach(struct ol_txrx_pdev_t *txrx_pdev) } /* Separate subscriber list for each event */ txrx_pdev->wdi_event_list = (wdi_event_subscribe **) - cdf_mem_malloc( + qdf_mem_malloc( sizeof(wdi_event_subscribe *) * WDI_NUM_EVENTS); if (!txrx_pdev->wdi_event_list) { @@ -221,7 +221,7 @@ A_STATUS wdi_event_detach(struct ol_txrx_pdev_t *txrx_pdev) } } /* txrx_pdev->wdi_event_list would be non-null */ - cdf_mem_free(txrx_pdev->wdi_event_list); + qdf_mem_free(txrx_pdev->wdi_event_list); return A_OK; } diff --git a/core/dp/txrx/ol_txrx_flow_control.c b/core/dp/txrx/ol_txrx_flow_control.c index 66f42d293624..157c0d4630c4 100644 --- a/core/dp/txrx/ol_txrx_flow_control.c +++ b/core/dp/txrx/ol_txrx_flow_control.c @@ -172,7 +172,7 @@ void ol_tx_dump_flow_pool_info(void) TAILQ_FOREACH(pool, &pdev->tx_desc.flow_pool_list, flow_pool_list_elem) { qdf_spin_lock_bh(&pool->flow_pool_lock); - cdf_mem_copy(&tmp_pool, pool, sizeof(tmp_pool)); + qdf_mem_copy(&tmp_pool, pool, sizeof(tmp_pool)); qdf_spin_unlock_bh(&pool->flow_pool_lock); qdf_spin_unlock_bh(&pdev->tx_desc.flow_pool_list_lock); TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, @@ -209,7 +209,7 @@ void ol_tx_clear_flow_pool_stats(void) __func__); return; } - cdf_mem_zero(&pdev->pool_stats, sizeof(pdev->pool_stats)); + qdf_mem_zero(&pdev->pool_stats, sizeof(pdev->pool_stats)); } /** @@ -337,7 +337,7 @@ struct ol_tx_flow_pool_t *ol_tx_create_flow_pool(uint8_t flow_pool_id, return NULL; } - pool = cdf_mem_malloc(sizeof(*pool)); + pool = qdf_mem_malloc(sizeof(*pool)); if (!pool) { TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s: malloc failed\n", __func__); @@ -423,7 +423,7 @@ int ol_tx_delete_flow_pool(struct ol_tx_flow_pool_t *pool) qdf_spin_unlock_bh(&pool->flow_pool_lock); /* Free flow_pool */ qdf_spinlock_destroy(&pool->flow_pool_lock); - cdf_mem_free(pool); + qdf_mem_free(pool); } else { /* FLOW_POOL_INVALID case*/ pool->flow_pool_size -= size; pool->flow_pool_id = INVALID_FLOW_ID; diff --git a/core/dp/txrx/ol_txrx_internal.h b/core/dp/txrx/ol_txrx_internal.h index 243e1212b159..51d6a9490d43 100644 --- a/core/dp/txrx/ol_txrx_internal.h +++ b/core/dp/txrx/ol_txrx_internal.h @@ -30,7 +30,7 @@ #include <qdf_util.h> /* qdf_assert */ #include <cdf_nbuf.h> /* cdf_nbuf_t */ -#include <cdf_memory.h> /* cdf_mem_set */ +#include <qdf_mem.h> /* qdf_mem_set */ #include <cds_ieee80211_common.h> /* ieee80211_frame */ #include <ol_htt_rx_api.h> /* htt_rx_msdu_desc_completes_mpdu, etc. */ @@ -197,7 +197,7 @@ ol_rx_mpdu_list_next(struct ol_txrx_pdev_t *pdev, /* default conditional defs (may be undefed below) */ #define TXRX_STATS_INIT(_pdev) \ - cdf_mem_set(&((_pdev)->stats), sizeof((_pdev)->stats), 0x0) + qdf_mem_set(&((_pdev)->stats), sizeof((_pdev)->stats), 0x0) #define TXRX_STATS_ADD(_pdev, _field, _delta) { \ _pdev->stats._field += _delta; } #define TXRX_STATS_MSDU_INCR(pdev, field, netbuf) \ @@ -495,7 +495,7 @@ NOT_IP_TCP: if (frag_bytes > 0) { p = cdf_nbuf_get_frag_vaddr(frm, frag_num); - cdf_mem_copy(&local_buf[i], p, + qdf_mem_copy(&local_buf[i], p, frag_bytes); } frag_num++; diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c index ea6dee8b22f0..9646801fa982 100644 --- a/core/dp/txrx/ol_txrx_peer_find.c +++ b/core/dp/txrx/ol_txrx_peer_find.c @@ -28,7 +28,7 @@ /*=== includes ===*/ /* header files for OS primitives */ #include <osdep.h> /* uint32_t, etc. */ -#include <cdf_memory.h> /* cdf_mem_malloc, etc. */ +#include <qdf_mem.h> /* qdf_mem_malloc, etc. */ #include <qdf_types.h> /* qdf_device_t, qdf_print */ /* header files for utilities */ #include <cds_queue.h> /* TAILQ */ @@ -119,7 +119,7 @@ static int ol_txrx_peer_find_hash_attach(struct ol_txrx_pdev_t *pdev) pdev->peer_hash.idx_bits = log2; /* allocate an array of TAILQ peer object lists */ pdev->peer_hash.bins = - cdf_mem_malloc(hash_elems * + qdf_mem_malloc(hash_elems * sizeof(TAILQ_HEAD(anonymous_tail_q, ol_txrx_peer_t))); if (!pdev->peer_hash.bins) @@ -133,7 +133,7 @@ static int ol_txrx_peer_find_hash_attach(struct ol_txrx_pdev_t *pdev) static void ol_txrx_peer_find_hash_detach(struct ol_txrx_pdev_t *pdev) { - cdf_mem_free(pdev->peer_hash.bins); + qdf_mem_free(pdev->peer_hash.bins); } static inline unsigned @@ -182,7 +182,7 @@ struct ol_txrx_peer_t *ol_txrx_peer_vdev_find_hash(struct ol_txrx_pdev_t *pdev, if (mac_addr_is_aligned) { mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr; } else { - cdf_mem_copy(&local_mac_addr_aligned.raw[0], + qdf_mem_copy(&local_mac_addr_aligned.raw[0], peer_mac_addr, OL_TXRX_MAC_ADDR_LEN); mac_addr = &local_mac_addr_aligned; } @@ -215,7 +215,7 @@ struct ol_txrx_peer_t *ol_txrx_peer_find_hash_find(struct ol_txrx_pdev_t *pdev, if (mac_addr_is_aligned) { mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr; } else { - cdf_mem_copy(&local_mac_addr_aligned.raw[0], + qdf_mem_copy(&local_mac_addr_aligned.raw[0], peer_mac_addr, OL_TXRX_MAC_ADDR_LEN); mac_addr = &local_mac_addr_aligned; } @@ -310,7 +310,7 @@ static int ol_txrx_peer_find_map_attach(struct ol_txrx_pdev_t *pdev) /* allocate the peer ID -> peer object map */ max_peers = ol_cfg_max_peer_id(pdev->ctrl_pdev) + 1; peer_map_size = max_peers * sizeof(pdev->peer_id_to_obj_map[0]); - pdev->peer_id_to_obj_map = cdf_mem_malloc(peer_map_size); + pdev->peer_id_to_obj_map = qdf_mem_malloc(peer_map_size); if (!pdev->peer_id_to_obj_map) return 1; /* failure */ @@ -321,14 +321,14 @@ static int ol_txrx_peer_find_map_attach(struct ol_txrx_pdev_t *pdev) * However, it is convenient for debugging to have all elements * that are not in use set to 0. */ - cdf_mem_set(pdev->peer_id_to_obj_map, peer_map_size, 0); + qdf_mem_set(pdev->peer_id_to_obj_map, peer_map_size, 0); return 0; /* success */ } static void ol_txrx_peer_find_map_detach(struct ol_txrx_pdev_t *pdev) { - cdf_mem_free(pdev->peer_id_to_obj_map); + qdf_mem_free(pdev->peer_id_to_obj_map); } static inline void diff --git a/core/dp/txrx/ol_txrx_types.h b/core/dp/txrx/ol_txrx_types.h index f54d7784029f..90ad86b84a3f 100644 --- a/core/dp/txrx/ol_txrx_types.h +++ b/core/dp/txrx/ol_txrx_types.h @@ -33,7 +33,7 @@ #define _OL_TXRX_TYPES__H_ #include <cdf_nbuf.h> /* cdf_nbuf_t */ -#include <cdf_memory.h> +#include <qdf_mem.h> #include <cds_queue.h> /* TAILQ */ #include <a_types.h> /* A_UINT8 */ #include <htt.h> /* htt_sec_type, htt_pkt_type, etc. */ @@ -566,7 +566,7 @@ struct ol_txrx_pdev_t { uint16_t desc_reserved_size; uint8_t page_divider; uint32_t offset_filter; - struct cdf_mem_multi_page_t desc_pages; + struct qdf_mem_multi_page_t desc_pages; } tx_desc; uint8_t is_mgmt_over_wmi_enabled; diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 45f89606363c..72106ede5752 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -377,7 +377,7 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, pRoamInfo->u.pConnectedProfile->operationChannel; /* Save the ssid for the connection */ - cdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID, + qdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID, &pRoamInfo->u.pConnectedProfile->SSID, sizeof(tSirMacSSid)); @@ -489,8 +489,8 @@ static void hdd_send_ft_event(hdd_adapter_t *pAdapter) #endif #if defined(KERNEL_SUPPORT_11R_CFG80211) - cdf_mem_zero(ftIe, DOT11F_IE_FTINFO_MAX_LEN); - cdf_mem_zero(ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN); + qdf_mem_zero(ftIe, DOT11F_IE_FTINFO_MAX_LEN); + qdf_mem_zero(ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN); sme_get_rici_es(pHddCtx->hHal, pAdapter->sessionId, (u8 *) ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN, &ric_ies_length); @@ -535,7 +535,7 @@ static void hdd_send_ft_event(hdd_adapter_t *pAdapter) hddLog(LOGE, FL("kmalloc unable to allocate memory")); return; } - cdf_mem_zero(buff, IW_CUSTOM_MAX); + qdf_mem_zero(buff, IW_CUSTOM_MAX); /* Sme needs to send the RIC IEs first */ str_len = strlcpy(buff, "RIC=", IW_CUSTOM_MAX); @@ -551,7 +551,7 @@ static void hdd_send_ft_event(hdd_adapter_t *pAdapter) } /* Sme needs to provide the Auth Resp */ - cdf_mem_zero(buff, IW_CUSTOM_MAX); + qdf_mem_zero(buff, IW_CUSTOM_MAX); str_len = strlcpy(buff, "AUTH=", IW_CUSTOM_MAX); sme_get_ft_pre_auth_response(pHddCtx->hHal, pAdapter->sessionId, (u8 *) &buff[str_len], @@ -650,7 +650,7 @@ hdd_send_update_beacon_ies_event(hdd_adapter_t *pAdapter, hddLog(LOGE, FL("kmalloc unable to allocate memory")); return; } - cdf_mem_zero(buff, IW_CUSTOM_MAX); + qdf_mem_zero(buff, IW_CUSTOM_MAX); strLen = strlcpy(buff, "BEACONIEs=", IW_CUSTOM_MAX); currentLen = strLen + 1; @@ -662,10 +662,10 @@ hdd_send_update_beacon_ies_event(hdd_adapter_t *pAdapter, * into chunks of CUSTOM event max size and send it to * supplicant. Changes are done in supplicant to handle this. */ - cdf_mem_zero(&buff[strLen + 1], IW_CUSTOM_MAX - (strLen + 1)); + qdf_mem_zero(&buff[strLen + 1], IW_CUSTOM_MAX - (strLen + 1)); currentLen = QDF_MIN(totalIeLen, IW_CUSTOM_MAX - (strLen + 1) - 1); - cdf_mem_copy(&buff[strLen + 1], pBeaconIes + currentOffset, + qdf_mem_copy(&buff[strLen + 1], pBeaconIes + currentOffset, currentLen); currentOffset += currentLen; totalIeLen -= currentLen; @@ -893,8 +893,8 @@ static void hdd_conn_remove_connect_info(hdd_station_ctx_t *pHddStaCtx) { /* Remove staId, bssId and peerMacAddress */ pHddStaCtx->conn_info.staId[0] = 0; - cdf_mem_zero(&pHddStaCtx->conn_info.bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[0], + qdf_mem_zero(&pHddStaCtx->conn_info.bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[0], QDF_MAC_ADDR_SIZE); /* Clear all security settings */ @@ -902,14 +902,14 @@ static void hdd_conn_remove_connect_info(hdd_station_ctx_t *pHddStaCtx) pHddStaCtx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE; pHddStaCtx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE; - cdf_mem_zero(&pHddStaCtx->conn_info.Keys, sizeof(tCsrKeys)); - cdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&pHddStaCtx->conn_info.Keys, sizeof(tCsrKeys)); + qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); /* Set not-connected state */ pHddStaCtx->conn_info.connDot11DesiredBssType = eCSR_BSS_TYPE_ANY; pHddStaCtx->conn_info.proxyARPService = 0; - cdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo)); + qdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo)); } /** @@ -1106,7 +1106,7 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, * reset are done in hdd_connRemoveConnectInfo. */ pHddStaCtx->conn_info.staId[i] = 0; - cdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[i], + qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[i], sizeof(struct qdf_mac_addr)); if (sta_id < (WLAN_MAX_STA_COUNT + 3)) pHddCtx->sta_to_adapter[sta_id] = NULL; @@ -1409,12 +1409,12 @@ static void hdd_send_re_assoc_event(struct net_device *dev, /* Send the Assoc Resp, the supplicant needs this for initial Auth */ len = pCsrRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET; rspRsnLength = len; - cdf_mem_copy(rspRsnIe, pFTAssocRsp, len); - cdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len); + qdf_mem_copy(rspRsnIe, pFTAssocRsp, len); + qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len); chan = ieee80211_get_channel(pAdapter->wdev.wiphy, (int)pCsrRoamInfo->pBssDesc->channelId); - cdf_mem_zero(&roam_profile, sizeof(tCsrRoamConnectedProfile)); + qdf_mem_zero(&roam_profile, sizeof(tCsrRoamConnectedProfile)); sme_roam_get_connect_profile(hal_handle, pAdapter->sessionId, &roam_profile); bss = cfg80211_get_bss(pAdapter->wdev.wiphy, chan, @@ -1433,7 +1433,7 @@ static void hdd_send_re_assoc_event(struct net_device *dev, buf_ptr++; *buf_ptr = roam_profile.SSID.length; /*len of ssid*/ buf_ptr++; - cdf_mem_copy(buf_ptr, &roam_profile.SSID.ssId[0], + qdf_mem_copy(buf_ptr, &roam_profile.SSID.ssId[0], roam_profile.SSID.length); ssid_ie_len = 2 + roam_profile.SSID.length; hdd_notice("SSIDIE:"); @@ -1443,11 +1443,11 @@ static void hdd_send_re_assoc_event(struct net_device *dev, if (final_req_ie == NULL) goto done; buf_ptr = final_req_ie; - cdf_mem_copy(buf_ptr, buf_ssid_ie, ssid_ie_len); + qdf_mem_copy(buf_ptr, buf_ssid_ie, ssid_ie_len); buf_ptr += ssid_ie_len; - cdf_mem_copy(buf_ptr, reqRsnIe, reqRsnLength); - cdf_mem_copy(rspRsnIe, pFTAssocRsp, len); - cdf_mem_zero(final_req_ie + (ssid_ie_len + reqRsnLength), + qdf_mem_copy(buf_ptr, reqRsnIe, reqRsnLength); + qdf_mem_copy(rspRsnIe, pFTAssocRsp, len); + qdf_mem_zero(final_req_ie + (ssid_ie_len + reqRsnLength), IW_GENERIC_IE_MAX - (ssid_ie_len + reqRsnLength)); hdd_notice("Req RSN IE:"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG, @@ -1456,7 +1456,7 @@ static void hdd_send_re_assoc_event(struct net_device *dev, final_req_ie, (ssid_ie_len + reqRsnLength), rspRsnIe, rspRsnLength, GFP_KERNEL); - cdf_mem_copy(assoc_req_ies, + qdf_mem_copy(assoc_req_ies, (u8 *)pCsrRoamInfo->pbFrames + pCsrRoamInfo->nBeaconLength, pCsrRoamInfo->nAssocReqLength); @@ -1665,9 +1665,9 @@ void hdd_perform_roam_set_key_complete(hdd_adapter_t *pAdapter) hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); tCsrRoamInfo roamInfo; roamInfo.fAuthRequired = false; - cdf_mem_copy(roamInfo.bssid.bytes, + qdf_mem_copy(roamInfo.bssid.bytes, pHddStaCtx->roam_info.bssid, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(roamInfo.peerMac.bytes, + qdf_mem_copy(roamInfo.peerMac.bytes, pHddStaCtx->roam_info.peerMac, QDF_MAC_ADDR_SIZE); cdf_ret_status = @@ -1983,11 +1983,11 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, pRoamInfo->fAuthRequired = false; - cdf_mem_copy(pHddStaCtx-> + qdf_mem_copy(pHddStaCtx-> roam_info.bssid, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pHddStaCtx-> + qdf_mem_copy(pHddStaCtx-> roam_info.peerMac, pRoamInfo->peerMac.bytes, QDF_MAC_ADDR_SIZE); @@ -2161,7 +2161,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, qdf_status, qdf_status); } #ifdef WLAN_FEATURE_11W - cdf_mem_zero(&pAdapter->hdd_stats.hddPmfStats, + qdf_mem_zero(&pAdapter->hdd_stats.hddPmfStats, sizeof(pAdapter->hdd_stats.hddPmfStats)); #endif } else { @@ -3074,7 +3074,7 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter, pHddCtx->tdlsConnInfo[staIdx].staId = 0; pHddCtx->tdlsConnInfo[staIdx]. sessionId = 255; - cdf_mem_zero(&pHddCtx-> + qdf_mem_zero(&pHddCtx-> tdlsConnInfo[staIdx]. peerMac, QDF_MAC_ADDR_SIZE); @@ -3127,13 +3127,13 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter, tdlsConnInfo [staIdx]. staId); - cdf_mem_zero(&smeTdlsPeerStateParams, + qdf_mem_zero(&smeTdlsPeerStateParams, sizeof (smeTdlsPeerStateParams)); smeTdlsPeerStateParams.vdevId = pHddCtx->tdlsConnInfo[staIdx]. sessionId; - cdf_mem_copy(&smeTdlsPeerStateParams. + qdf_mem_copy(&smeTdlsPeerStateParams. peerMacAddr, &pHddCtx-> tdlsConnInfo[staIdx]. @@ -3168,7 +3168,7 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter, wlan_hdd_tdls_decrement_peer_count (pAdapter); - cdf_mem_zero(&pHddCtx-> + qdf_mem_zero(&pHddCtx-> tdlsConnInfo[staIdx]. peerMac, QDF_MAC_ADDR_SIZE); @@ -3498,7 +3498,7 @@ hdd_indicate_cckm_pre_auth(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo) pos += nBytes; freeBytes -= nBytes; - cdf_mem_copy(pos, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(pos, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); pos += QDF_MAC_ADDR_SIZE; freeBytes -= QDF_MAC_ADDR_SIZE; @@ -3685,7 +3685,7 @@ hdd_indicate_ese_bcn_report_ind(const hdd_adapter_t *pAdapter, freeBytes -= nBytes; /* Copy total Beacon report data length */ - cdf_mem_copy(pos, (char *)&tot_bcn_ieLen, + qdf_mem_copy(pos, (char *)&tot_bcn_ieLen, sizeof(tot_bcn_ieLen)); pos += sizeof(tot_bcn_ieLen); freeBytes -= sizeof(tot_bcn_ieLen); @@ -3767,7 +3767,7 @@ hdd_indicate_ese_bcn_report_ind(const hdd_adapter_t *pAdapter, bcnRepBssInfo[i + lastSent]. bcnReportFields); - cdf_mem_copy(pos, + qdf_mem_copy(pos, (char *)&pRoamInfo-> pEseBcnReportRsp->bcnRepBssInfo[i + lastSent]. @@ -3779,12 +3779,12 @@ hdd_indicate_ese_bcn_report_ind(const hdd_adapter_t *pAdapter, len = pRoamInfo->pEseBcnReportRsp-> bcnRepBssInfo[i + lastSent].ieLen; - cdf_mem_copy(pos, (char *)&len, sizeof(len)); + qdf_mem_copy(pos, (char *)&len, sizeof(len)); pos += sizeof(len); freeBytes -= sizeof(len); /* copy IE from scan results */ - cdf_mem_copy(pos, + qdf_mem_copy(pos, (char *)pRoamInfo-> pEseBcnReportRsp->bcnRepBssInfo[i + lastSent]. @@ -4387,9 +4387,9 @@ static int32_t hdd_process_genie(hdd_adapter_t *pAdapter, * For right now, I assume setASSOCIATE() has passed * in the bssid. */ - cdf_mem_copy(PMKIDCache[i].BSSID.bytes, + qdf_mem_copy(PMKIDCache[i].BSSID.bytes, bssid, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(PMKIDCache[i].PMKID, + qdf_mem_copy(PMKIDCache[i].PMKID, dot11RSNIE.pmkid[i], CSR_RSN_PMKID_SIZE); } @@ -4468,7 +4468,7 @@ int hdd_set_genie_to_csr(hdd_adapter_t *pAdapter, eCsrAuthType *RSNAuthType) u8 bssid[ETH_ALEN]; /* MAC address of assoc peer */ /* MAC address of assoc peer */ /* But, this routine is only called when we are NOT associated. */ - cdf_mem_copy(bssid, + qdf_mem_copy(bssid, pWextState->roamProfile.BSSIDs.bssid, sizeof(bssid)); if (pWextState->WPARSNIE[0] == DOT11F_EID_RSN @@ -4759,9 +4759,9 @@ static int __iw_set_essid(struct net_device *dev, pWextState->roamProfile.SSIDs.SSIDList->SSID.length = wrqu->essid.length; - cdf_mem_zero(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId, + qdf_mem_zero(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId, sizeof(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId)); - cdf_mem_copy((void *)(pWextState->roamProfile.SSIDs.SSIDList->SSID. + qdf_mem_copy((void *)(pWextState->roamProfile.SSIDs.SSIDList->SSID. ssId), extra, wrqu->essid.length); if (IW_AUTH_WPA_VERSION_WPA == pWextState->wpaVersion || IW_AUTH_WPA_VERSION_WPA2 == pWextState->wpaVersion) { @@ -5380,7 +5380,7 @@ static int __iw_set_ap_address(struct net_device *dev, pMacAddress = (uint8_t *) wrqu->ap_addr.sa_data; hddLog(LOG1, FL(" " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMacAddress)); - cdf_mem_copy(pHddStaCtx->conn_info.bssId.bytes, pMacAddress, + qdf_mem_copy(pHddStaCtx->conn_info.bssId.bytes, pMacAddress, sizeof(struct qdf_mac_addr)); EXIT(); @@ -5438,7 +5438,7 @@ static int __iw_get_ap_address(struct net_device *dev, if (pHddStaCtx->conn_info.connState == eConnectionState_Associated || eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState) { - cdf_mem_copy(wrqu->ap_addr.sa_data, + qdf_mem_copy(wrqu->ap_addr.sa_data, pHddStaCtx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE); } else { diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index b85921b889be..daa65a04475e 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3944,7 +3944,7 @@ static void update_mac_from_string(hdd_context_t *pHddCtx, break; } if (res == 0 && !qdf_is_macaddr_zero(&macaddr[i])) { - cdf_mem_copy((uint8_t *) &pHddCtx->config-> + qdf_mem_copy((uint8_t *) &pHddCtx->config-> intfMacAddr[i].bytes[0], (uint8_t *) &macaddr[i].bytes[0], QDF_MAC_ADDR_SIZE); @@ -5319,7 +5319,7 @@ QDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx) update_mac_from_string(pHddCtx, &macTable[0], i); - cdf_mem_copy(&customMacAddr, + qdf_mem_copy(&customMacAddr, &pHddCtx->config->intfMacAddr[0].bytes[0], sizeof(tSirMacAddr)); sme_set_custom_mac_addr(customMacAddr); @@ -5370,16 +5370,16 @@ QDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx) hddLog(LOG1, "%s: qcom_cfg.ini Size %zu", __func__, fw->size); - buffer = (char *)cdf_mem_malloc(fw->size); + buffer = (char *)qdf_mem_malloc(fw->size); if (NULL == buffer) { - hddLog(QDF_TRACE_LEVEL_FATAL, FL("cdf_mem_malloc failure")); + hddLog(QDF_TRACE_LEVEL_FATAL, FL("qdf_mem_malloc failure")); release_firmware(fw); return QDF_STATUS_E_NOMEM; } pTemp = buffer; - cdf_mem_copy((void *)buffer, (void *)fw->data, fw->size); + qdf_mem_copy((void *)buffer, (void *)fw->data, fw->size); size = fw->size; while (buffer != NULL) { @@ -5435,7 +5435,7 @@ QDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx) config_exit: release_firmware(fw); - cdf_mem_free(pTemp); + qdf_mem_free(pTemp); return qdf_status; } @@ -6379,13 +6379,13 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) struct hdd_config *pConfig = pHddCtx->config; - smeConfig = cdf_mem_malloc(sizeof(*smeConfig)); + smeConfig = qdf_mem_malloc(sizeof(*smeConfig)); if (NULL == smeConfig) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s: unable to allocate smeConfig", __func__); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(smeConfig, sizeof(*smeConfig)); + qdf_mem_zero(smeConfig, sizeof(*smeConfig)); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_HIGH, "%s bWmmIsEnabled=%d 802_11e_enabled=%d dot11Mode=%d", @@ -6677,7 +6677,7 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) status); } - cdf_mem_free(smeConfig); + qdf_mem_free(smeConfig); return status; } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index bfa18537c8d1..67e1a376e35d 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1216,12 +1216,12 @@ int wlan_hdd_sap_cfg_dfs_override(hdd_adapter_t *adapter) * func for Sec AP and realloc for Pri AP ch list size */ if (sap_config->acs_cfg.ch_list) - cdf_mem_free(sap_config->acs_cfg.ch_list); + qdf_mem_free(sap_config->acs_cfg.ch_list); - cdf_mem_copy(&sap_config->acs_cfg, + qdf_mem_copy(&sap_config->acs_cfg, &con_sap_config->acs_cfg, sizeof(struct sap_acs_cfg)); - sap_config->acs_cfg.ch_list = cdf_mem_malloc( + sap_config->acs_cfg.ch_list = qdf_mem_malloc( sizeof(uint8_t) * con_sap_config->acs_cfg.ch_list_count); if (!sap_config->acs_cfg.ch_list) { @@ -1229,7 +1229,7 @@ int wlan_hdd_sap_cfg_dfs_override(hdd_adapter_t *adapter) return -ENOMEM; } - cdf_mem_copy(sap_config->acs_cfg.ch_list, + qdf_mem_copy(sap_config->acs_cfg.ch_list, con_sap_config->acs_cfg.ch_list, con_sap_config->acs_cfg.ch_list_count); @@ -1345,7 +1345,7 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter) acs_event_callback = hdd_hostapd_sap_event_cb; - cdf_mem_copy(sap_config->self_macaddr.bytes, + qdf_mem_copy(sap_config->self_macaddr.bytes, adapter->macAddressCurrent.bytes, sizeof(struct qdf_mac_addr)); hddLog(LOG1, FL("ACS Started for wlan%d"), adapter->dev->ifindex); status = wlansap_acs_chselect( @@ -1429,7 +1429,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, goto out; } sap_config = &adapter->sessionCtx.ap.sapConfig; - cdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg)); + qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg)); status = nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data, data_len, NULL); @@ -1492,13 +1492,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, sap_config->acs_cfg.ch_list_count = nla_len( tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]); if (sap_config->acs_cfg.ch_list_count) { - sap_config->acs_cfg.ch_list = cdf_mem_malloc( + sap_config->acs_cfg.ch_list = qdf_mem_malloc( sizeof(uint8_t) * sap_config->acs_cfg.ch_list_count); if (sap_config->acs_cfg.ch_list == NULL) goto out; - cdf_mem_copy(sap_config->acs_cfg.ch_list, tmp, + qdf_mem_copy(sap_config->acs_cfg.ch_list, tmp, sap_config->acs_cfg.ch_list_count); } } else if (tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) { @@ -1508,7 +1508,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) / sizeof(uint32_t); if (sap_config->acs_cfg.ch_list_count) { - sap_config->acs_cfg.ch_list = cdf_mem_malloc( + sap_config->acs_cfg.ch_list = qdf_mem_malloc( sap_config->acs_cfg.ch_list_count); if (sap_config->acs_cfg.ch_list == NULL) { hddLog(LOGE, FL("ACS config alloc fail")); @@ -1962,9 +1962,9 @@ __wlan_hdd_cfg80211_set_scanning_mac_oui(struct wiphy *wiphy, hddLog(LOGE, FL("Invalid ATTR")); return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } if (!tb[QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI]) { @@ -1984,7 +1984,7 @@ __wlan_hdd_cfg80211_set_scanning_mac_oui(struct wiphy *wiphy, } return 0; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -2210,7 +2210,7 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, goto fail; } session_id = pAdapter->sessionId; - cdf_mem_set(&roam_params, sizeof(roam_params), 0); + qdf_mem_set(&roam_params, sizeof(roam_params), 0); cmd_type = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD]); if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID]) { hddLog(LOGE, FL("attr request id failed")); @@ -2742,8 +2742,8 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy, sme_update_roam_key_mgmt_offload_enabled(hdd_ctx_ptr->hHal, hdd_adapter_ptr->sessionId, true); - cdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE); - cdf_mem_copy(local_pmk, data, data_len); + qdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE); + qdf_mem_copy(local_pmk, data, data_len); sme_roam_set_psk_pmk(WLAN_HDD_GET_HAL_CTX(hdd_adapter_ptr), hdd_adapter_ptr->sessionId, local_pmk, data_len); return 0; @@ -3564,7 +3564,7 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, return -ENOTSUPP; } - add_req = cdf_mem_malloc(sizeof(*add_req)); + add_req = qdf_mem_malloc(sizeof(*add_req)); if (!add_req) { hddLog(LOGE, FL("memory allocation failed")); return -ENOMEM; @@ -3633,12 +3633,12 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, } len = 0; - cdf_mem_copy(&add_req->ucPattern[0], dst_addr.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&add_req->ucPattern[0], dst_addr.bytes, QDF_MAC_ADDR_SIZE); len += QDF_MAC_ADDR_SIZE; - cdf_mem_copy(&add_req->ucPattern[len], add_req->mac_address.bytes, + qdf_mem_copy(&add_req->ucPattern[len], add_req->mac_address.bytes, QDF_MAC_ADDR_SIZE); len += QDF_MAC_ADDR_SIZE; - cdf_mem_copy(&add_req->ucPattern[len], ð_type, 2); + qdf_mem_copy(&add_req->ucPattern[len], ð_type, 2); len += 2; /* @@ -3647,7 +3647,7 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, * | 14 bytes Ethernet (802.3) header | IP header and payload | * ------------------------------------------------------------ */ - cdf_mem_copy(&add_req->ucPattern[len], + qdf_mem_copy(&add_req->ucPattern[len], nla_data(tb[PARAM_IP_PACKET]), add_req->ucPtrnSize); add_req->ucPtrnSize += len; @@ -3668,11 +3668,11 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, } EXIT(); - cdf_mem_free(add_req); + qdf_mem_free(add_req); return 0; fail: - cdf_mem_free(add_req); + qdf_mem_free(add_req); return -EINVAL; } @@ -3712,7 +3712,7 @@ wlan_hdd_del_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, return -EINVAL; } - del_req = cdf_mem_malloc(sizeof(*del_req)); + del_req = qdf_mem_malloc(sizeof(*del_req)); if (!del_req) { hddLog(LOGE, FL("memory allocation failed")); return -ENOMEM; @@ -3732,11 +3732,11 @@ wlan_hdd_del_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx, } EXIT(); - cdf_mem_free(del_req); + qdf_mem_free(del_req); return 0; fail: - cdf_mem_free(del_req); + qdf_mem_free(del_req); return -EINVAL; } @@ -4348,7 +4348,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy, return -EINVAL; } - cdf_mem_copy(peer_mac, nla_data(tb[QCA_WLAN_VENDOR_ATTR_MAC_ADDR]), + qdf_mem_copy(peer_mac, nla_data(tb[QCA_WLAN_VENDOR_ATTR_MAC_ADDR]), QDF_MAC_ADDR_SIZE); hddLog(QDF_TRACE_LEVEL_INFO, FL("peerMac="MAC_ADDRESS_STR" for device_mode:%d"), @@ -4359,7 +4359,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy, hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); if ((hdd_sta_ctx->conn_info.connState != eConnectionState_Associated) || - !cdf_mem_compare(hdd_sta_ctx->conn_info.bssId.bytes, + qdf_mem_cmp(hdd_sta_ctx->conn_info.bssId.bytes, peer_mac, QDF_MAC_ADDR_SIZE)) { hddLog(QDF_TRACE_LEVEL_ERROR, FL("Not Associated to mac "MAC_ADDRESS_STR), @@ -4378,7 +4378,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy, if (adapter->aStaInfo[sta_id].isUsed && !qdf_is_macaddr_broadcast( &adapter->aStaInfo[sta_id].macAddrSTA) && - cdf_mem_compare( + !qdf_mem_cmp( &adapter->aStaInfo[sta_id].macAddrSTA.bytes, peer_mac, QDF_MAC_ADDR_SIZE)) break; @@ -5675,7 +5675,7 @@ void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t *pAdapter, uint8_t key_index, hdd_device_mode_to_string(pAdapter->device_mode), pAdapter->device_mode); - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; /* Store Key ID */ setKey.encType = eCSR_ENCRYPT_TYPE_WPI; /* SET WAPI Encryption */ setKey.keyDirection = eSIR_TX_RX; /* Key Directionn both TX and RX */ @@ -5683,7 +5683,7 @@ void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t *pAdapter, uint8_t key_index, if (!mac_addr || is_broadcast_ether_addr(mac_addr)) { qdf_set_macaddr_broadcast(&setKey.peerMac); } else { - cdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); } setKey.keyLength = key_Len; pKeyPtr = setKey.Key; @@ -5802,13 +5802,13 @@ static void wlan_hdd_set_dhcp_server_offload(hdd_adapter_t *pHostapdAdapter) uint8_t srv_ip[IPADDR_NUM_ENTRIES]; uint8_t num; uint32_t temp; - pDhcpSrvInfo = cdf_mem_malloc(sizeof(*pDhcpSrvInfo)); + pDhcpSrvInfo = qdf_mem_malloc(sizeof(*pDhcpSrvInfo)); if (NULL == pDhcpSrvInfo) { hddLog(QDF_TRACE_LEVEL_ERROR, "%s: could not allocate tDhcpSrvOffloadInfo!", __func__); return; } - cdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo)); + qdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo)); pDhcpSrvInfo->vdev_id = pHostapdAdapter->sessionId; pDhcpSrvInfo->dhcpSrvOffloadEnabled = true; pDhcpSrvInfo->dhcpClientNum = pHddCtx->config->dhcpMaxNumClients; @@ -5845,7 +5845,7 @@ static void wlan_hdd_set_dhcp_server_offload(hdd_adapter_t *pHostapdAdapter) hddLog(QDF_TRACE_LEVEL_INFO_HIGH, "%s: enable DHCP Server offload successfully!", __func__); end: - cdf_mem_free(pDhcpSrvInfo); + qdf_mem_free(pDhcpSrvInfo); return; } #endif /* DHCP_SERVER_OFFLOAD */ @@ -6327,7 +6327,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); - cdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE); if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) || (pAdapter->device_mode == WLAN_HDD_P2P_GO)) { @@ -6442,20 +6442,20 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, __func__, StaParams.supported_channels_len); } - cdf_mem_copy(StaParams.supported_oper_classes, + qdf_mem_copy(StaParams.supported_oper_classes, params->supported_oper_classes, params->supported_oper_classes_len); StaParams.supported_oper_classes_len = params->supported_oper_classes_len; if (0 != params->ext_capab_len) - cdf_mem_copy(StaParams.extn_capability, + qdf_mem_copy(StaParams.extn_capability, params->ext_capab, sizeof(StaParams.extn_capability)); if (NULL != params->ht_capa) { StaParams.htcap_present = 1; - cdf_mem_copy(&StaParams.HTCap, params->ht_capa, + qdf_mem_copy(&StaParams.HTCap, params->ht_capa, sizeof(tSirHTCap)); } @@ -6477,7 +6477,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, if (0 != StaParams.supported_rates_len) { int i = 0; - cdf_mem_copy(StaParams.supported_rates, + qdf_mem_copy(StaParams.supported_rates, params->supported_rates, StaParams.supported_rates_len); QDF_TRACE(QDF_MODULE_ID_HDD, @@ -6494,7 +6494,7 @@ static int __wlan_hdd_change_station(struct wiphy *wiphy, if (NULL != params->vht_capa) { StaParams.vhtcap_present = 1; - cdf_mem_copy(&StaParams.VHTCap, + qdf_mem_copy(&StaParams.VHTCap, params->vht_capa, sizeof(tSirVHTCap)); } @@ -6631,10 +6631,10 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, __func__, key_index, params->key_len); /*extract key idx, key len and key */ - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; setKey.keyLength = params->key_len; - cdf_mem_copy(&setKey.Key[0], params->key, params->key_len); + qdf_mem_copy(&setKey.Key[0], params->key, params->key_len); switch (params->cipher) { case WLAN_CIPHER_SUITE_WEP40: @@ -6650,7 +6650,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, u8 *pKey = &setKey.Key[0]; setKey.encType = eCSR_ENCRYPT_TYPE_TKIP; - cdf_mem_zero(pKey, CSR_MAX_KEY_LEN); + qdf_mem_zero(pKey, CSR_MAX_KEY_LEN); /*Supplicant sends the 32bytes key in this order @@ -6668,13 +6668,13 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, <---16bytes---><--8bytes--><--8bytes--> */ /* Copy the Temporal Key 1 (TK1) */ - cdf_mem_copy(pKey, params->key, 16); + qdf_mem_copy(pKey, params->key, 16); /*Copy the rx mic first */ - cdf_mem_copy(&pKey[16], ¶ms->key[24], 8); + qdf_mem_copy(&pKey[16], ¶ms->key[24], 8); /*Copy the tx mic */ - cdf_mem_copy(&pKey[24], ¶ms->key[16], 8); + qdf_mem_copy(&pKey[24], ¶ms->key[16], 8); break; } @@ -6686,7 +6686,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, #ifdef FEATURE_WLAN_WAPI case WLAN_CIPHER_SUITE_SMS4: { - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); wlan_hdd_cfg80211_set_key_wapi(pAdapter, key_index, mac_addr, params->key, params->key_len); @@ -6731,7 +6731,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, "%s- %d: setting pairwise key", __func__, __LINE__); setKey.keyDirection = eSIR_TX_RX; - cdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); } if ((WLAN_HDD_IBSS == pAdapter->device_mode) && !pairwise) { /* if a key is already installed, block all subsequent ones */ @@ -6754,7 +6754,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, } /*Save the keys here and call sme_roam_set_key for setting the PTK after peer joins the IBSS network */ - cdf_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key, + qdf_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key, &setKey, sizeof(tCsrRoamSetKey)); pAdapter->sessionCtx.station.ibss_enc_key_installed = 1; @@ -6783,10 +6783,10 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, if (pairwise || eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == setKey.encType || eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == setKey.encType) - cdf_mem_copy(&ap_ctx->wepKey[key_index], &setKey, + qdf_mem_copy(&ap_ctx->wepKey[key_index], &setKey, sizeof(tCsrRoamSetKey)); else - cdf_mem_copy(&ap_ctx->groupKey, &setKey, + qdf_mem_copy(&ap_ctx->groupKey, &setKey, sizeof(tCsrRoamSetKey)); } else if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) || @@ -6812,7 +6812,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, pWextState->roamProfile.Keys.defaultIndex = key_index; - cdf_mem_copy(&pWextState->roamProfile.Keys. + qdf_mem_copy(&pWextState->roamProfile.Keys. KeyMaterial[key_index][0], params->key, params->key_len); @@ -7118,11 +7118,11 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, hddLog(LOG2, FL("Default tx key index %d"), key_index); Keys->defaultIndex = (u8) key_index; - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; setKey.keyLength = Keys->KeyLength[key_index]; - cdf_mem_copy(&setKey.Key[0], + qdf_mem_copy(&setKey.Key[0], &Keys->KeyMaterial[key_index][0], Keys->KeyLength[key_index]); @@ -7842,36 +7842,36 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, pRoamProfile->SSIDs.numOfSSIDs = 1; pRoamProfile->SSIDs.SSIDList->SSID.length = ssid_len; - cdf_mem_zero(pRoamProfile->SSIDs.SSIDList->SSID.ssId, + qdf_mem_zero(pRoamProfile->SSIDs.SSIDList->SSID.ssId, sizeof(pRoamProfile->SSIDs.SSIDList->SSID.ssId)); - cdf_mem_copy((void *)(pRoamProfile->SSIDs.SSIDList->SSID.ssId), + qdf_mem_copy((void *)(pRoamProfile->SSIDs.SSIDList->SSID.ssId), ssid, ssid_len); if (bssid) { pRoamProfile->BSSIDs.numOfBSSIDs = 1; - cdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid), + qdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid), bssid, QDF_MAC_ADDR_SIZE); /* Save BSSID in seperate variable as well, as RoamProfile BSSID is getting zeroed out in the association process. And in case of join failure we should send valid BSSID to supplicant */ - cdf_mem_copy((void *)(pWextState->req_bssId.bytes), + qdf_mem_copy((void *)(pWextState->req_bssId.bytes), bssid, QDF_MAC_ADDR_SIZE); } else if (bssid_hint) { pRoamProfile->BSSIDs.numOfBSSIDs = 1; - cdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid), + qdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid), bssid_hint, QDF_MAC_ADDR_SIZE); /* Save BSSID in separate variable as well, as RoamProfile BSSID is getting zeroed out in the association process. And in case of join failure we should send valid BSSID to supplicant */ - cdf_mem_copy((void *)(pWextState->req_bssId.bytes), + qdf_mem_copy((void *)(pWextState->req_bssId.bytes), bssid_hint, QDF_MAC_ADDR_SIZE); hddLog(LOGW, FL(" bssid_hint "MAC_ADDRESS_STR), MAC_ADDR_ARRAY(bssid_hint)); } else { - cdf_mem_zero((void *)(pRoamProfile->BSSIDs.bssid), + qdf_mem_zero((void *)(pRoamProfile->BSSIDs.bssid), QDF_MAC_ADDR_SIZE); } @@ -8011,12 +8011,12 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, return 0; } - sme_config = cdf_mem_malloc(sizeof(*sme_config)); + sme_config = qdf_mem_malloc(sizeof(*sme_config)); if (!sme_config) { hdd_err("unable to allocate sme_config"); return -ENOMEM; } - cdf_mem_zero(sme_config, sizeof(*sme_config)); + qdf_mem_zero(sme_config, sizeof(*sme_config)); sme_get_config_param(pHddCtx->hHal, sme_config); /* These values are not sessionized. So, any change in these SME * configs on an older or parallel interface will affect the @@ -8028,7 +8028,7 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, sme_config->csrConfig.channelBondingMode24GHz = pHddCtx->config->nChannelBondingMode24GHz; sme_update_config(pHddCtx->hHal, sme_config); - cdf_mem_free(sme_config); + qdf_mem_free(sme_config); status = sme_roam_connect(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, pRoamProfile, @@ -8704,7 +8704,7 @@ int wlan_hdd_cfg80211_set_privacy(hdd_adapter_t *pAdapter, hddLog(LOG1, FL("setting default wep key, key_idx = %hu key_len %hu"), key_idx, key_len); - cdf_mem_copy(&pWextState->roamProfile. + qdf_mem_copy(&pWextState->roamProfile. Keys. KeyMaterial[key_idx][0], req->key, key_len); @@ -9224,7 +9224,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(hdd_adapter_t *pAdapter, ENTER(); pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED; - cdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey)); pHddStaCtx->ibss_enc_key_installed = 0; if (params->ie_len && (NULL != params->ie)) { @@ -9425,7 +9425,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy, FL("ccmCfgStInt failed for WNI_CFG_IBSS_AUTO_BSSID")); return -EIO; } - cdf_mem_copy(bssid.bytes, params->bssid, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(bssid.bytes, params->bssid, QDF_MAC_ADDR_SIZE); } else if (pHddCtx->config->isCoalesingInIBSSAllowed == 0) { if (sme_cfg_set_int(pHddCtx->hHal, WNI_CFG_IBSS_AUTO_BSSID, 0) == QDF_STATUS_E_FAILURE) { @@ -9869,7 +9869,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, if ((pAdapter->aStaInfo[i].isUsed) && (!pAdapter->aStaInfo[i]. isDeauthInProgress)) { - cdf_mem_copy( + qdf_mem_copy( mac, pAdapter->aStaInfo[i]. macAddrSTA.bytes, @@ -10162,8 +10162,8 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter); - cdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); + qdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); /* Add to the PMKSA ID Cache in CSR */ result = sme_roam_set_pmkid_cache(halHandle, pAdapter->sessionId, @@ -10675,7 +10675,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy, MAC_ADDR_ARRAY( params->mac_addrs[i].addr)); - cdf_mem_copy(&pConfig->accept_mac[i], + qdf_mem_copy(&pConfig->accept_mac[i], params->mac_addrs[i].addr, sizeof(qcmacaddr)); } @@ -10688,7 +10688,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy, MAC_ADDR_ARRAY( params->mac_addrs[i].addr)); - cdf_mem_copy(&pConfig->deny_mac[i], + qdf_mem_copy(&pConfig->deny_mac[i], params->mac_addrs[i].addr, sizeof(qcmacaddr)); } @@ -10853,20 +10853,20 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, return -EINVAL; hb_params = - (tSirLPHBReq *) cdf_mem_malloc(sizeof(tSirLPHBReq)); + (tSirLPHBReq *) qdf_mem_malloc(sizeof(tSirLPHBReq)); if (NULL == hb_params) { hddLog(LOGE, FL("Request Buffer Alloc Fail")); return -ENOMEM; } - cdf_mem_copy(hb_params, buf, buf_len); + qdf_mem_copy(hb_params, buf, buf_len); smeStatus = sme_lphb_config_req((tHalHandle) (pHddCtx->hHal), hb_params, wlan_hdd_cfg80211_lphb_ind_handler); if (QDF_STATUS_SUCCESS != smeStatus) { hddLog(LOGE, "LPHB Config Fail, disable"); - cdf_mem_free(hb_params); + qdf_mem_free(hb_params); } return 0; } @@ -11016,7 +11016,7 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy, return status; } - cdf_mem_zero(&sme_config, sizeof(tSmeConfigParams)); + qdf_mem_zero(&sme_config, sizeof(tSmeConfigParams)); sme_get_config_param(pHddCtx->hHal, &sme_config); switch (chandef->width) { case NL80211_CHAN_WIDTH_20: diff --git a/core/hdd/src/wlan_hdd_conc_ut.c b/core/hdd/src/wlan_hdd_conc_ut.c index 1a9354eab607..8b7882e3990d 100644 --- a/core/hdd/src/wlan_hdd_conc_ut.c +++ b/core/hdd/src/wlan_hdd_conc_ut.c @@ -151,7 +151,7 @@ void clean_report(hdd_context_t *hdd_ctx) { uint32_t idx = 0; while (idx < NUMBER_OF_SCENARIO) { - cdf_mem_zero(&report[idx], sizeof(struct report_t)); + qdf_mem_zero(&report[idx], sizeof(struct report_t)); idx++; } report_idx = 0; @@ -229,12 +229,12 @@ void fill_report(hdd_context_t *hdd_ctx, char *title, MAX_ALLOWED_CHAR_IN_REPORT, reason); if (pcl) { - cdf_mem_zero(report[report_idx].pcl, + qdf_mem_zero(report[report_idx].pcl, sizeof(report[report_idx].pcl)); for (i = 0; i < MAX_NUM_CHAN; i++) { if (pcl[i] == 0) break; - cdf_mem_zero(buf, sizeof(buf)); + qdf_mem_zero(buf, sizeof(buf)); snprintf(buf, sizeof(buf), "%d ", pcl[i]); strlcat(report[report_idx].pcl, buf, sizeof(report[report_idx].pcl)); @@ -646,7 +646,7 @@ void wlan_hdd_one_connection_scenario(hdd_context_t *hdd_ctx) FL("Test failed - No. of connection is not 0")); return; } - cdf_mem_zero(pcl, sizeof(pcl)); + qdf_mem_zero(pcl, sizeof(pcl)); pcl_len = 0; pcl_type = get_pcl_from_first_conn_table(sub_type, system_pref); @@ -717,7 +717,7 @@ void wlan_hdd_two_connections_scenario(hdd_context_t *hdd_ctx, next_sub_type++; continue; } - cdf_mem_zero(pcl, sizeof(pcl)); + qdf_mem_zero(pcl, sizeof(pcl)); pcl_len = 0; pcl_type = get_pcl_from_second_conn_table(second_index, next_sub_type, system_pref, @@ -830,7 +830,7 @@ void wlan_hdd_three_connections_scenario(hdd_context_t *hdd_ctx, next_sub_type++; continue; } - cdf_mem_zero(pcl, sizeof(pcl)); + qdf_mem_zero(pcl, sizeof(pcl)); pcl_len = 0; pcl_type = get_pcl_from_third_conn_table( diff --git a/core/hdd/src/wlan_hdd_debugfs.c b/core/hdd/src/wlan_hdd_debugfs.c index 80a18ddf7f6a..bf2239d8234d 100644 --- a/core/hdd/src/wlan_hdd_debugfs.c +++ b/core/hdd/src/wlan_hdd_debugfs.c @@ -349,7 +349,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file, /* Get command from user */ if (count <= MAX_USER_COMMAND_SIZE_FRAME) - cmd = cdf_mem_malloc(count + 1); + cmd = qdf_mem_malloc(count + 1); else { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s: Command length is larger than %d bytes.", @@ -365,7 +365,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file, } if (copy_from_user(cmd, buf, count)) { - cdf_mem_free(cmd); + qdf_mem_free(cmd); return -EFAULT; } cmd[count] = '\0'; @@ -396,11 +396,11 @@ static ssize_t __wcnss_patterngen_write(struct file *file, /* Delete pattern using index if duration is 0 */ if (!pattern_duration) { delPeriodicTxPtrnParams = - cdf_mem_malloc(sizeof(tSirDelPeriodicTxPtrn)); + qdf_mem_malloc(sizeof(tSirDelPeriodicTxPtrn)); if (!delPeriodicTxPtrnParams) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, FL("Memory allocation failed!")); - cdf_mem_free(cmd); + qdf_mem_free(cmd); return -ENOMEM; } delPeriodicTxPtrnParams->ucPtrnId = pattern_idx; @@ -416,11 +416,11 @@ static ssize_t __wcnss_patterngen_write(struct file *file, "%s: sme_del_periodic_tx_ptrn() failed!", __func__); - cdf_mem_free(delPeriodicTxPtrnParams); + qdf_mem_free(delPeriodicTxPtrnParams); goto failure; } - cdf_mem_free(cmd); - cdf_mem_free(delPeriodicTxPtrnParams); + qdf_mem_free(cmd); + qdf_mem_free(delPeriodicTxPtrnParams); return count; } @@ -462,11 +462,11 @@ static ssize_t __wcnss_patterngen_write(struct file *file, goto failure; } - addPeriodicTxPtrnParams = cdf_mem_malloc(sizeof(tSirAddPeriodicTxPtrn)); + addPeriodicTxPtrnParams = qdf_mem_malloc(sizeof(tSirAddPeriodicTxPtrn)); if (!addPeriodicTxPtrnParams) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, FL("Memory allocation failed!")); - cdf_mem_free(cmd); + qdf_mem_free(cmd); return -ENOMEM; } @@ -493,16 +493,16 @@ static ssize_t __wcnss_patterngen_write(struct file *file, QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s: sme_add_periodic_tx_ptrn() failed!", __func__); - cdf_mem_free(addPeriodicTxPtrnParams); + qdf_mem_free(addPeriodicTxPtrnParams); goto failure; } - cdf_mem_free(cmd); - cdf_mem_free(addPeriodicTxPtrnParams); + qdf_mem_free(cmd); + qdf_mem_free(addPeriodicTxPtrnParams); EXIT(); return count; failure: - cdf_mem_free(cmd); + qdf_mem_free(cmd); return -EINVAL; } diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index f95bebbff0c8..8cd8b414f8c0 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -1733,9 +1733,9 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -1778,7 +1778,7 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy, EXIT(); return ret; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -1867,9 +1867,9 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -1923,7 +1923,7 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } /* @@ -2015,9 +2015,9 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -2136,7 +2136,7 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -2212,9 +2212,9 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -2333,7 +2333,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy, if (!QDF_IS_STATUS_SUCCESS(status)) { hddLog(LOGE, FL("sme_set_significant_change failed(err=%d)"), status); - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -2356,7 +2356,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -3159,7 +3159,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { hddLog(LOGE, FL("memory allocation failed")); return -ENOMEM; @@ -3279,7 +3279,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } /* @@ -3369,9 +3369,9 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -3418,7 +3418,7 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } /* @@ -3496,9 +3496,9 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy, return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -3547,7 +3547,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -3621,9 +3621,9 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy return -EINVAL; } - pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg)); + pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg)); if (!pReqMsg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -3650,7 +3650,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy if (!QDF_IS_STATUS_SUCCESS(status)) { hddLog(LOGE, FL("sme_reset_significant_change failed(err=%d)"), status); - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -3673,7 +3673,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy return retval; fail: - cdf_mem_free(pReqMsg); + qdf_mem_free(pReqMsg); return -EINVAL; } @@ -3749,7 +3749,7 @@ static int hdd_extscan_epno_fill_network_list( req_msg->networks[index].ssid.length = ssid_len; hddLog(LOG1, FL("network ssid length %d"), ssid_len); ssid = nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]); - cdf_mem_copy(req_msg->networks[index].ssid.ssId, + qdf_mem_copy(req_msg->networks[index].ssid.ssId, ssid, ssid_len); hddLog(LOG1, FL("Ssid (%.*s)"), req_msg->networks[index].ssid.length, @@ -3845,12 +3845,12 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy, len = sizeof(*req_msg) + (num_networks * sizeof(struct wifi_epno_network)); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); req_msg->num_networks = num_networks; /* Parse and fetch request Id */ @@ -3875,11 +3875,11 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy, } EXIT(); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return 0; fail: - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return -EINVAL; } @@ -3962,7 +3962,7 @@ static int hdd_extscan_passpoint_fill_network_list( hddLog(LOGE, FL("Invalid realm size %d"), len); return -EINVAL; } - cdf_mem_copy(req_msg->networks[index].realm, + qdf_mem_copy(req_msg->networks[index].realm, nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]), len); hddLog(LOG1, FL("realm len %d"), len); @@ -4048,10 +4048,10 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy, tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM]); hddLog(LOG1, FL("num networks %u"), num_networks); - req_msg = cdf_mem_malloc(sizeof(*req_msg) + + req_msg = qdf_mem_malloc(sizeof(*req_msg) + (num_networks * sizeof(req_msg->networks[0]))); if (!req_msg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } req_msg->num_networks = num_networks; @@ -4079,11 +4079,11 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy, } EXIT(); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return 0; fail: - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return -EINVAL; } @@ -4155,9 +4155,9 @@ static int __wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy, return -EINVAL; } - req_msg = cdf_mem_malloc(sizeof(*req_msg)); + req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -4181,11 +4181,11 @@ static int __wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy, } EXIT(); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return 0; fail: - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return -EINVAL; } @@ -4286,9 +4286,9 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy, return -EINVAL; } - request = cdf_mem_malloc(sizeof(*request)); + request = qdf_mem_malloc(sizeof(*request)); if (!request) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -4390,7 +4390,7 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy, goto fail; } - cdf_mem_free(request); + qdf_mem_free(request); /* request was sent -- wait for the response */ rc = wait_for_completion_timeout(&context->response_event, @@ -4411,7 +4411,7 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(request); + qdf_mem_free(request); return -EINVAL; } @@ -4506,9 +4506,9 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy, return -EINVAL; } - request = cdf_mem_malloc(sizeof(*request)); + request = qdf_mem_malloc(sizeof(*request)); if (!request) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -4540,7 +4540,7 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy, goto fail; } - cdf_mem_free(request); + qdf_mem_free(request); /* request was sent -- wait for the response */ rc = wait_for_completion_timeout(&context->response_event, @@ -4561,7 +4561,7 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy, return retval; fail: - cdf_mem_free(request); + qdf_mem_free(request); return -EINVAL; } diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c index 8b33ca827389..5a3029318fda 100644 --- a/core/hdd/src/wlan_hdd_ftm.c +++ b/core/hdd/src/wlan_hdd_ftm.c @@ -281,7 +281,7 @@ static QDF_STATUS wlan_ftm_cds_open(v_CONTEXT_t p_cds_context, #endif /* QCA_WIFI_FTM */ /*Open the WMA module */ - cdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0); + qdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0); mac_openParms.driverType = eDRIVER_TYPE_MFG; hdd_ctx = (hdd_context_t *) (gp_cds_context->pHDDContext); @@ -1019,7 +1019,7 @@ QDF_STATUS wlan_hdd_ftm_testmode_cmd(void *data, int len) struct ar6k_testmode_cmd_data *cmd_data; cmd_data = (struct ar6k_testmode_cmd_data *) - cdf_mem_malloc(sizeof(*cmd_data)); + qdf_mem_malloc(sizeof(*cmd_data)); if (!cmd_data) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, @@ -1027,21 +1027,21 @@ QDF_STATUS wlan_hdd_ftm_testmode_cmd(void *data, int len) return QDF_STATUS_E_NOMEM; } - cmd_data->data = cdf_mem_malloc(len); + cmd_data->data = qdf_mem_malloc(len); if (!cmd_data->data) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, ("Failed to allocate FTM command data buffer")); - cdf_mem_free(cmd_data); + qdf_mem_free(cmd_data); return QDF_STATUS_E_NOMEM; } cmd_data->len = len; - cdf_mem_copy(cmd_data->data, data, len); + qdf_mem_copy(cmd_data->data, data, len); if (wlan_ftm_postmsg((uint8_t *) cmd_data, sizeof(*cmd_data))) { - cdf_mem_free(cmd_data->data); - cdf_mem_free(cmd_data); + qdf_mem_free(cmd_data->data); + qdf_mem_free(cmd_data); return QDF_STATUS_E_FAILURE; } diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c index 7149bb468de1..5fbb8e4082b4 100644 --- a/core/hdd/src/wlan_hdd_green_ap.c +++ b/core/hdd/src/wlan_hdd_green_ap.c @@ -311,14 +311,14 @@ static QDF_STATUS hdd_wlan_green_ap_attach(struct hdd_context_s *hdd_ctx) ENTER(); - green_ap = cdf_mem_malloc(sizeof(*green_ap)); + green_ap = qdf_mem_malloc(sizeof(*green_ap)); if (!green_ap) { hdd_alert("Memory allocation for Green-AP failed!"); status = QDF_STATUS_E_NOMEM; goto error; } - cdf_mem_zero(green_ap, sizeof(*green_ap)); + qdf_mem_zero(green_ap, sizeof(*green_ap)); green_ap->ps_state = GREEN_AP_PS_OFF_STATE; green_ap->ps_event = 0; green_ap->num_nodes = 0; @@ -365,8 +365,8 @@ static QDF_STATUS hdd_wlan_green_ap_deattach(struct hdd_context_s *hdd_ctx) hdd_notice("Cannot deallocate Green-AP's timer"); /* release memory */ - cdf_mem_zero(green_ap, sizeof(*green_ap)); - cdf_mem_free(green_ap); + qdf_mem_zero(green_ap, sizeof(*green_ap)); + qdf_mem_free(green_ap); hdd_ctx->green_ap_ctx = NULL; done: diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index bab97b7775ab..b181351c7078 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1572,7 +1572,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pSapEvent->sapevt.sapPBCProbeReqEvent. WPSPBCProbeReq.probeReqIELen; - cdf_mem_copy(pHddApCtx->WPSPBCProbeReq.probeReqIE, + qdf_mem_copy(pHddApCtx->WPSPBCProbeReq.probeReqIE, pSapEvent->sapevt.sapPBCProbeReqEvent. WPSPBCProbeReq.probeReqIE, pHddApCtx->WPSPBCProbeReq.probeReqIELen); @@ -1608,7 +1608,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pAssocStasArray++; } } - cdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas); /* Release caller allocated memory here */ + qdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas); /* Release caller allocated memory here */ pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas = NULL; return QDF_STATUS_SUCCESS; case eSAP_REMAIN_CHAN_READY: @@ -2269,7 +2269,7 @@ static QDF_STATUS hdd_print_acl(hdd_adapter_t *pHostapdAdapter) #else p_cds_gctx = (WLAN_HDD_GET_CTX(pHostapdAdapter))->pcds_context; #endif - cdf_mem_zero(&MacList[0], sizeof(MacList)); + qdf_mem_zero(&MacList[0], sizeof(MacList)); if (QDF_STATUS_SUCCESS == wlansap_get_acl_mode(p_cds_gctx, &acl_mode)) { pr_info("******** ACL MODE *********\n"); switch (acl_mode) { @@ -3854,7 +3854,7 @@ int __iw_get_wpspbc_probe_req_ies(struct net_device *dev, WPSPBCProbeReqIEs.probeReqIELen = pHddApCtx->WPSPBCProbeReq.probeReqIELen; - cdf_mem_copy(&WPSPBCProbeReqIEs.probeReqIE, + qdf_mem_copy(&WPSPBCProbeReqIEs.probeReqIE, pHddApCtx->WPSPBCProbeReq.probeReqIE, WPSPBCProbeReqIEs.probeReqIELen); qdf_copy_macaddr(&WPSPBCProbeReqIEs.macaddr, @@ -4024,13 +4024,13 @@ static int __iw_set_ap_encodeext(struct net_device *dev, if (!ext->key_len) return ret; - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; setKey.keyLength = ext->key_len; if (ext->key_len <= CSR_MAX_KEY_LEN) { - cdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len); + qdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len); } if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) { @@ -4040,12 +4040,12 @@ static int __iw_set_ap_encodeext(struct net_device *dev, } else { setKey.keyDirection = eSIR_TX_RX; - cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, + qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, QDF_MAC_ADDR_SIZE); } if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { setKey.keyDirection = eSIR_TX_DEFAULT; - cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, + qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, QDF_MAC_ADDR_SIZE); } @@ -4071,7 +4071,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, setKey.encType = eCSR_ENCRYPT_TYPE_TKIP; - cdf_mem_zero(pKey, CSR_MAX_KEY_LEN); + qdf_mem_zero(pKey, CSR_MAX_KEY_LEN); /*Supplicant sends the 32bytes key in this order @@ -4089,13 +4089,13 @@ static int __iw_set_ap_encodeext(struct net_device *dev, <---16bytes---><--8bytes--><--8bytes--> */ /* Copy the Temporal Key 1 (TK1) */ - cdf_mem_copy(pKey, ext->key, 16); + qdf_mem_copy(pKey, ext->key, 16); /*Copy the rx mic first */ - cdf_mem_copy(&pKey[16], &ext->key[24], 8); + qdf_mem_copy(&pKey[16], &ext->key[24], 8); /*Copy the tx mic */ - cdf_mem_copy(&pKey[24], &ext->key[16], 8); + qdf_mem_copy(&pKey[24], &ext->key[16], 8); } break; @@ -4494,13 +4494,13 @@ __iw_softap_setwpsie(struct net_device *dev, fwps_genie = wps_genie; - pSap_WPSIe = cdf_mem_malloc(sizeof(tSap_WPSIE)); + pSap_WPSIe = qdf_mem_malloc(sizeof(tSap_WPSIE)); if (NULL == pSap_WPSIe) { hddLog(LOGE, "CDF unable to allocate memory"); kfree(fwps_genie); return -ENOMEM; } - cdf_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE)); + qdf_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE)); hddLog(LOG1, FL("WPS IE type[0x%X] IE[0x%X], LEN[%d]"), wps_genie[0], wps_genie[1], wps_genie[2]); @@ -4511,7 +4511,7 @@ __iw_softap_setwpsie(struct net_device *dev, switch (wps_genie[0]) { case DOT11F_EID_WPA: if (wps_genie[1] < 2 + 4) { - cdf_mem_free(pSap_WPSIe); + qdf_mem_free(pSap_WPSIe); kfree(fwps_genie); return -EINVAL; } else if (memcmp(&wps_genie[2], @@ -4623,7 +4623,7 @@ __iw_softap_setwpsie(struct net_device *dev, pos += 2; length = *pos << 8 | *(pos + 1); pos += 2; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSBeaconIE. UUID_E, pos, @@ -4654,7 +4654,7 @@ __iw_softap_setwpsie(struct net_device *dev, "UNKNOWN TLV in WPS IE(%x)", (*pos << 8 | *(pos + 1))); - cdf_mem_free(pSap_WPSIe); + qdf_mem_free(pSap_WPSIe); kfree(fwps_genie); return -EINVAL; } @@ -4667,7 +4667,7 @@ __iw_softap_setwpsie(struct net_device *dev, default: hddLog(LOGE, FL("Set UNKNOWN IE %X"), wps_genie[0]); - cdf_mem_free(pSap_WPSIe); + qdf_mem_free(pSap_WPSIe); kfree(fwps_genie); return 0; } @@ -4677,7 +4677,7 @@ __iw_softap_setwpsie(struct net_device *dev, switch (wps_genie[0]) { case DOT11F_EID_WPA: if (wps_genie[1] < 2 + 4) { - cdf_mem_free(pSap_WPSIe); + qdf_mem_free(pSap_WPSIe); kfree(fwps_genie); return -EINVAL; } else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4) @@ -4806,7 +4806,7 @@ __iw_softap_setwpsie(struct net_device *dev, pos += 2; length = *pos << 8 | *(pos + 1); pos += 2; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. UUID_E, pos, @@ -4826,7 +4826,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. Manufacture.num_name = length; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. Manufacture.name, @@ -4845,7 +4845,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.ModelName. num_text = length; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. ModelName.text, @@ -4864,7 +4864,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. ModelNumber.num_text = length; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. ModelNumber.text, @@ -4883,7 +4883,7 @@ __iw_softap_setwpsie(struct net_device *dev, sapWPSProbeRspIE. SerialNumber.num_text = length; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. SerialNumber.text, @@ -4907,7 +4907,7 @@ __iw_softap_setwpsie(struct net_device *dev, PrimaryDeviceCategory); pos += 2; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. PrimaryDeviceOUI, @@ -4940,7 +4940,7 @@ __iw_softap_setwpsie(struct net_device *dev, pSap_WPSIe->sapwpsie. sapWPSProbeRspIE.DeviceName. num_text = length; - cdf_mem_copy(pSap_WPSIe-> + qdf_mem_copy(pSap_WPSIe-> sapwpsie. sapWPSProbeRspIE. DeviceName.text, @@ -5008,7 +5008,7 @@ __iw_softap_setwpsie(struct net_device *dev, #endif } - cdf_mem_free(pSap_WPSIe); + qdf_mem_free(pSap_WPSIe); kfree(fwps_genie); EXIT(); return cdf_ret_status; @@ -6088,8 +6088,8 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter) FL("WMI_PDEV_PARAM_BURST_ENABLE set failed %d"), ret); } pAdapter->sessionCtx.ap.sapConfig.acs_cfg.acs_mode = false; - cdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list); - cdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg, + qdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list); + qdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg, sizeof(struct sap_acs_cfg)); return status; @@ -6138,7 +6138,7 @@ hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx, ether_setup(pWlanHostapdDev); /* Initialize the adapter context to zeros. */ - cdf_mem_zero(pHostapdAdapter, sizeof(hdd_adapter_t)); + qdf_mem_zero(pHostapdAdapter, sizeof(hdd_adapter_t)); pHostapdAdapter->dev = pWlanHostapdDev; pHostapdAdapter->pHddCtx = pHddCtx; pHostapdAdapter->magic = WLAN_HDD_ADAPTER_MAGIC; @@ -6159,9 +6159,9 @@ hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx, pWlanHostapdDev->mtu = HDD_DEFAULT_MTU; pWlanHostapdDev->tx_queue_len = HDD_NETDEV_TX_QUEUE_LEN; - cdf_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr, + qdf_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(pHostapdAdapter->macAddressCurrent.bytes, + qdf_mem_copy(pHostapdAdapter->macAddressCurrent.bytes, (void *)macAddr, sizeof(tSirMacAddr)); pHostapdAdapter->offloads_configured = false; @@ -6305,7 +6305,7 @@ static bool wlan_hdd_get_sap_obss(hdd_adapter_t *pHostapdAdapter) ie = wlan_hdd_cfg80211_get_ie_ptr(beacon->tail, beacon->tail_len, WLAN_EID_HT_CAPABILITY); if (ie && ie[1]) { - cdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN); + qdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN); dot11f_unpack_ie_ht_caps((tpAniSirGlobal)hdd_ctx->hHal, ht_cap_ie, ie[1], &dot11_ht_cap_ie); return dot11_ht_cap_ie.supportedChannelWidthSet; @@ -6464,7 +6464,7 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy, sap_config->channel = channel; sap_config->ch_params.center_freq_seg1 = channel_seg2; - cdf_mem_zero(&smeConfig, sizeof(smeConfig)); + qdf_mem_zero(&smeConfig, sizeof(smeConfig)); sme_get_config_param(pHddCtx->hHal, &smeConfig); switch (channel_type) { case NL80211_CHAN_HT20: @@ -6590,7 +6590,7 @@ static int wlan_hdd_add_ie(hdd_adapter_t *pHostapdAdapter, uint8_t *genie, if (pIe) { ielen = pIe[1] + 2; if ((*total_ielen + ielen) <= MAX_GENIE_LEN) { - cdf_mem_copy(&genie[*total_ielen], pIe, ielen); + qdf_mem_copy(&genie[*total_ielen], pIe, ielen); } else { hddLog(LOGE, "**Ie Length is too big***"); @@ -6659,7 +6659,7 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter, != 0)) { ielen = ptr[1] + 2; if ((*total_ielen + ielen) <= MAX_GENIE_LEN) { - cdf_mem_copy(&genie[*total_ielen], ptr, + qdf_mem_copy(&genie[*total_ielen], ptr, ielen); *total_ielen += ielen; } else { @@ -6712,7 +6712,7 @@ static void wlan_hdd_add_extra_ie(hdd_adapter_t *pHostapdAdapter, if (temp_ie_id == elem_id) { ielen = ptr[1] + 2; if ((*total_ielen + ielen) <= MAX_GENIE_LEN) { - cdf_mem_copy(&genie[*total_ielen], ptr, ielen); + qdf_mem_copy(&genie[*total_ielen], ptr, ielen); *total_ielen += ielen; } else { hddLog(LOGE, @@ -6856,7 +6856,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) pConfig = &adapter->sessionCtx.ap.sapConfig; beacon = adapter->sessionCtx.ap.beacon; - genie = cdf_mem_malloc(MAX_GENIE_LEN); + genie = qdf_mem_malloc(MAX_GENIE_LEN); if (genie == NULL) return -ENOMEM; @@ -6898,7 +6898,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) #ifdef QCA_HT_2040_COEX if (WLAN_HDD_SOFTAP == adapter->device_mode) { tSmeConfigParams smeConfig; - cdf_mem_zero(&smeConfig, sizeof(smeConfig)); + qdf_mem_zero(&smeConfig, sizeof(smeConfig)); sme_get_config_param(WLAN_HDD_GET_HAL_CTX(adapter), &smeConfig); if (smeConfig.csrConfig.obssEnabled) @@ -6979,7 +6979,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter) } done: - cdf_mem_free(genie); + qdf_mem_free(genie); return ret; } @@ -7373,7 +7373,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, WLAN_EID_COUNTRY); if (pIe) { pConfig->ieee80211d = 1; - cdf_mem_copy(pConfig->countryCode, &pIe[2], 3); + qdf_mem_copy(pConfig->countryCode, &pIe[2], 3); sme_set_reg_info(hHal, pConfig->countryCode); sme_apply_channel_power_info_to_fw(hHal); } else { @@ -7566,7 +7566,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->SSIDinfo.ssidHidden = false; if (ssid != NULL) { - cdf_mem_copy(pConfig->SSIDinfo.ssid.ssId, ssid, ssid_len); + qdf_mem_copy(pConfig->SSIDinfo.ssid.ssId, ssid, ssid_len); pConfig->SSIDinfo.ssid.length = ssid_len; switch (hidden_ssid) { @@ -7589,7 +7589,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, } } - cdf_mem_copy(pConfig->self_macaddr.bytes, + qdf_mem_copy(pConfig->self_macaddr.bytes, pHostapdAdapter->macAddressCurrent.bytes, QDF_MAC_ADDR_SIZE); @@ -7633,7 +7633,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->num_deny_mac = MAX_ACL_MAC_ADDRESS; acl_entry = (struct qc_mac_acl_entry *)(pIe + 8); for (i = 0; i < pConfig->num_deny_mac; i++) { - cdf_mem_copy(&pConfig->deny_mac[i], acl_entry->addr, + qdf_mem_copy(&pConfig->deny_mac[i], acl_entry->addr, sizeof(qcmacaddr)); acl_entry++; } @@ -7660,14 +7660,14 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->num_accept_mac = MAX_ACL_MAC_ADDRESS; acl_entry = (struct qc_mac_acl_entry *)(pIe + 8); for (i = 0; i < pConfig->num_accept_mac; i++) { - cdf_mem_copy(&pConfig->accept_mac[i], acl_entry->addr, + qdf_mem_copy(&pConfig->accept_mac[i], acl_entry->addr, sizeof(qcmacaddr)); acl_entry++; } } wlan_hdd_set_sap_hwmode(pHostapdAdapter); - cdf_mem_zero(&sme_config, sizeof(tSmeConfigParams)); + qdf_mem_zero(&sme_config, sizeof(tSmeConfigParams)); sme_get_config_param(pHddCtx->hHal, &sme_config); /* Override hostapd.conf wmm_enabled only for 11n and 11AC configs (IOT) * As per spec 11N/AC STA are QOS STA and may not connect or throughput @@ -7941,8 +7941,8 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, } pAdapter->sessionCtx.ap.sapConfig.acs_cfg.acs_mode = false; if (pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list) - cdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list); - cdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg, + qdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list); + qdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg, sizeof(struct sap_acs_cfg)); hdd_hostapd_stop(dev); diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 27f74c7f3d70..215f8048afa2 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -162,7 +162,7 @@ static void hdd_get_tsm_stats_cb(tAniTrafStrmMetrics tsm_metrics, /* copy over the tsm stats */ adapter->tsmStats.UplinkPktQueueDly = tsm_metrics.UplinkPktQueueDly; - cdf_mem_copy(adapter->tsmStats.UplinkPktQueueDlyHist, + qdf_mem_copy(adapter->tsmStats.UplinkPktQueueDlyHist, tsm_metrics.UplinkPktQueueDlyHist, sizeof(adapter->tsmStats.UplinkPktQueueDlyHist) / sizeof(adapter->tsmStats.UplinkPktQueueDlyHist[0])); @@ -246,7 +246,7 @@ QDF_STATUS hdd_get_tsm_stats(hdd_adapter_t *adapter, if (QDF_STATUS_SUCCESS == vstatus) { tsm_metrics->UplinkPktQueueDly = adapter->tsmStats.UplinkPktQueueDly; - cdf_mem_copy(tsm_metrics->UplinkPktQueueDlyHist, + qdf_mem_copy(tsm_metrics->UplinkPktQueueDlyHist, adapter->tsmStats.UplinkPktQueueDlyHist, sizeof(adapter->tsmStats.UplinkPktQueueDlyHist) / sizeof(adapter->tsmStats. @@ -472,7 +472,7 @@ hdd_parse_send_action_frame_v1_data(const uint8_t *pValue, * For example, if N = 18, then (18 + 1)/2 = 9 bytes are enough. * If N = 19, then we need 10 bytes, hence (19 + 1)/2 = 10 bytes */ - *pBuf = cdf_mem_malloc((*pBufLen + 1) / 2); + *pBuf = qdf_mem_malloc((*pBufLen + 1) / 2); if (NULL == *pBuf) { hddLog(LOGE, FL("cdf_mem_alloc failed")); return -ENOMEM; @@ -581,7 +581,7 @@ hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid, handoffInfo.channel = channel; handoffInfo.src = REASSOC; - cdf_mem_copy(handoffInfo.bssid.bytes, bssid, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(handoffInfo.bssid.bytes, bssid, QDF_MAC_ADDR_SIZE); sme_handoff_request(hdd_ctx->hHal, adapter->sessionId, &handoffInfo); } @@ -757,7 +757,7 @@ hdd_sendactionframe(hdd_adapter_t *adapter, const uint8_t *bssid, if (pVendorSpecific->category == SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY) { static const uint8_t Oui[] = { 0x00, 0x00, 0xf0 }; - if (cdf_mem_compare(pVendorSpecific->Oui, (void *)Oui, 3)) { + if (!qdf_mem_cmp(pVendorSpecific->Oui, (void *)Oui, 3)) { /* * if the channel number is different from operating * channel then no need to send action frame @@ -802,22 +802,22 @@ hdd_sendactionframe(hdd_adapter_t *adapter, const uint8_t *bssid, } frame_len = payload_len + 24; - frame = cdf_mem_malloc(frame_len); + frame = qdf_mem_malloc(frame_len); if (!frame) { hddLog(LOGE, FL("memory allocation failed")); ret = -ENOMEM; goto exit; } - cdf_mem_zero(frame, frame_len); + qdf_mem_zero(frame, frame_len); hdr = (struct ieee80211_hdr_3addr *)frame; hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION); - cdf_mem_copy(hdr->addr1, bssid, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(hdr->addr2, adapter->macAddressCurrent.bytes, + qdf_mem_copy(hdr->addr1, bssid, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(hdr->addr2, adapter->macAddressCurrent.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(hdr->addr3, bssid, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(hdr + 1, payload, payload_len); + qdf_mem_copy(hdr->addr3, bssid, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(hdr + 1, payload, payload_len); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) params.chan = &chan; @@ -836,7 +836,7 @@ hdd_sendactionframe(hdd_adapter_t *adapter, const uint8_t *bssid, dwell_time, frame, frame_len, 1, 1, &cookie); #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) */ - cdf_mem_free(frame); + qdf_mem_free(frame); exit: return ret; } @@ -879,7 +879,7 @@ hdd_parse_sendactionframe_v1(hdd_adapter_t *adapter, const char *command) } else { ret = hdd_sendactionframe(adapter, bssid, channel, dwell_time, payload_len, payload); - cdf_mem_free(payload); + qdf_mem_free(payload); } return ret; @@ -1582,7 +1582,7 @@ static int hdd_enable_ext_wow(hdd_adapter_t *adapter, tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter); int rc; - cdf_mem_copy(¶ms, arg_params, sizeof(params)); + qdf_mem_copy(¶ms, arg_params, sizeof(params)); INIT_COMPLETION(hdd_ctx->ready_to_extwow); @@ -1687,7 +1687,7 @@ static int hdd_set_app_type1_params(tHalHandle hHal, tSirAppType1Params params; QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE; - cdf_mem_copy(¶ms, arg_params, sizeof(params)); + qdf_mem_copy(¶ms, arg_params, sizeof(params)); cdf_ret_status = sme_configure_app_type1_params(hHal, ¶ms); if (QDF_STATUS_SUCCESS != cdf_ret_status) { @@ -1726,9 +1726,9 @@ static int hdd_set_app_type1_parser(hdd_adapter_t *adapter, qdf_copy_macaddr(¶ms.wakee_mac_addr, &adapter->macAddressCurrent); params.id_length = strlen(id); - cdf_mem_copy(params.identification_id, id, params.id_length); + qdf_mem_copy(params.identification_id, id, params.id_length); params.pass_length = strlen(password); - cdf_mem_copy(params.password, password, params.pass_length); + qdf_mem_copy(params.password, password, params.pass_length); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, "%s: %d %pM %.8s %u %.16s %u", @@ -1745,7 +1745,7 @@ static int hdd_set_app_type2_params(tHalHandle hHal, tSirAppType2Params params; QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE; - cdf_mem_copy(¶ms, arg_params, sizeof(params)); + qdf_mem_copy(¶ms, arg_params, sizeof(params)); cdf_ret_status = sme_configure_app_type2_params(hHal, ¶ms); if (QDF_STATUS_SUCCESS != cdf_ret_status) { @@ -1813,11 +1813,11 @@ static int hdd_set_app_type2_parser(hdd_adapter_t *adapter, return -EINVAL; } - cdf_mem_copy(¶ms.gateway_mac.bytes, (uint8_t *) &gateway_mac, + qdf_mem_copy(¶ms.gateway_mac.bytes, (uint8_t *) &gateway_mac, QDF_MAC_ADDR_SIZE); params.rc4_key_len = strlen(rc4_key); - cdf_mem_copy(params.rc4_key, rc4_key, params.rc4_key_len); + qdf_mem_copy(params.rc4_key, rc4_key, params.rc4_key_len); params.vdev_id = adapter->sessionId; params.tcp_src_port = (params.tcp_src_port != 0) ? @@ -1973,7 +1973,7 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) return -EINVAL; } - cdf_mem_zero(&smeConfig, sizeof(smeConfig)); + qdf_mem_zero(&smeConfig, sizeof(smeConfig)); sme_get_config_param(hHal, &smeConfig); if (strncmp(command, "SETDWELLTIME ACTIVE MAX", 23) == 0) { @@ -2374,12 +2374,12 @@ static int hdd_parse_get_cckm_ie(uint8_t *pValue, uint8_t **pCckmIe, * For example, if N = 18, then (18 + 1) / 2 = 9 bytes are enough. * If N = 19, then we need 10 bytes, hence (19 + 1) / 2 = 10 bytes */ - *pCckmIe = cdf_mem_malloc((*pCckmIeLen + 1) / 2); + *pCckmIe = qdf_mem_malloc((*pCckmIeLen + 1) / 2); if (NULL == *pCckmIe) { hddLog(LOGE, FL("cdf_mem_alloc failed")); return -ENOMEM; } - cdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2); + qdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2); /* * the buffer received from the upper layer is character buffer, * we need to prepare the buffer taking 2 characters in to a U8 hex @@ -4143,7 +4143,7 @@ static void hdd_wma_send_fastreassoc_cmd(int sessionId, tSirMacAddr bssid, struct wma_roam_invoke_cmd *fastreassoc; cds_msg_t msg = {0}; - fastreassoc = cdf_mem_malloc(sizeof(*fastreassoc)); + fastreassoc = qdf_mem_malloc(sizeof(*fastreassoc)); if (NULL == fastreassoc) { hddLog(LOGE, FL("cdf_mem_alloc failed for fastreassoc")); return; @@ -4162,7 +4162,7 @@ static void hdd_wma_send_fastreassoc_cmd(int sessionId, tSirMacAddr bssid, msg.bodyptr = fastreassoc; if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { - cdf_mem_free(fastreassoc); + qdf_mem_free(fastreassoc); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, FL("Not able to post ROAM_INVOKE_CMD message to WMA")); } @@ -4217,7 +4217,7 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter, * if the target bssid is same as currently associated AP, * issue reassoc to same AP */ - if (true == cdf_mem_compare(targetApBssid, + if (true != qdf_mem_cmp(targetApBssid, pHddStaCtx->conn_info.bssId.bytes, QDF_MAC_ADDR_SIZE)) { /* Reassoc to same AP, only supported for Open Security*/ @@ -4253,7 +4253,7 @@ static int drv_cmd_fast_reassoc(hdd_adapter_t *adapter, #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD handoffInfo.channel = channel; handoffInfo.src = FASTREASSOC; - cdf_mem_copy(handoffInfo.bssid, targetApBssid, + qdf_mem_copy(handoffInfo.bssid, targetApBssid, sizeof(tSirMacAddr)); sme_handoff_request(hdd_ctx->hHal, adapter->sessionId, &handoffInfo); @@ -4275,7 +4275,7 @@ static int drv_cmd_ccx_plm_req(hdd_adapter_t *adapter, QDF_STATUS status = QDF_STATUS_SUCCESS; tpSirPlmReq pPlmRequest = NULL; - pPlmRequest = cdf_mem_malloc(sizeof(tSirPlmReq)); + pPlmRequest = qdf_mem_malloc(sizeof(tSirPlmReq)); if (NULL == pPlmRequest) { ret = -ENOMEM; goto exit; @@ -4283,7 +4283,7 @@ static int drv_cmd_ccx_plm_req(hdd_adapter_t *adapter, status = hdd_parse_plm_cmd(value, pPlmRequest); if (QDF_STATUS_SUCCESS != status) { - cdf_mem_free(pPlmRequest); + qdf_mem_free(pPlmRequest); pPlmRequest = NULL; ret = -EINVAL; goto exit; @@ -4292,7 +4292,7 @@ static int drv_cmd_ccx_plm_req(hdd_adapter_t *adapter, status = sme_set_plm_request(hdd_ctx->hHal, pPlmRequest); if (QDF_STATUS_SUCCESS != status) { - cdf_mem_free(pPlmRequest); + qdf_mem_free(pPlmRequest); pPlmRequest = NULL; ret = -EINVAL; goto exit; @@ -4851,7 +4851,7 @@ static int drv_cmd_set_cckm_ie(hdd_adapter_t *adapter, "%s: CCKM Ie input length is more than max[%d]", __func__, DOT11F_IE_RSN_MAX_LEN); if (NULL != cckmIe) { - cdf_mem_free(cckmIe); + qdf_mem_free(cckmIe); cckmIe = NULL; } ret = -EINVAL; @@ -4861,7 +4861,7 @@ static int drv_cmd_set_cckm_ie(hdd_adapter_t *adapter, sme_set_cckm_ie(hdd_ctx->hHal, adapter->sessionId, cckmIe, cckmIeLen); if (NULL != cckmIe) { - cdf_mem_free(cckmIe); + qdf_mem_free(cckmIe); cckmIe = NULL; } @@ -5736,7 +5736,7 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action, hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) { - filter = cdf_mem_malloc(sizeof(*filter)); + filter = qdf_mem_malloc(sizeof(*filter)); if (NULL == filter) { hdd_err("Could not allocate Memory"); return -ENOMEM; @@ -5757,7 +5757,7 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action, } /* Set rx filter */ sme_8023_multicast_list(handle, adapter->sessionId, filter); - cdf_mem_free(filter); + qdf_mem_free(filter); } else { hdd_info("mode %d mc_cnt %d", adapter->device_mode, adapter->mc_addr_list.mc_cnt); diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 8ff2d3c5e4ee..4458819f3554 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -905,7 +905,7 @@ static void hdd_ipa_uc_rt_debug_init(hdd_context_t *hdd_ctx) qdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW, hdd_ipa_uc_rt_debug_host_fill, (void *)hdd_ctx); hdd_ipa->rt_buf_fill_index = 0; - cdf_mem_zero(hdd_ipa->rt_bug_buffer, + qdf_mem_zero(hdd_ipa->rt_bug_buffer, sizeof(struct uc_rt_debug_info) * HDD_IPA_UC_RT_DEBUG_BUF_COUNT); hdd_ipa->ipa_tx_forward = 0; @@ -1332,7 +1332,7 @@ static void hdd_ipa_uc_proc_pending_event(struct hdd_ipa_priv *hdd_ipa) pending_event->type, pending_event->sta_id, pending_event->mac_addr); - cdf_mem_free(pending_event); + qdf_mem_free(pending_event); pending_event = NULL; qdf_list_remove_front(&hdd_ipa->pending_event, (qdf_list_node_t **)&pending_event); @@ -1375,7 +1375,7 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt) status = wlan_hdd_validate_context(hdd_ctx); if (0 != status) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid"); - cdf_mem_free(op_msg); + qdf_mem_free(op_msg); return; } @@ -1619,7 +1619,7 @@ static void hdd_ipa_uc_op_cb(struct op_msg_type *op_msg, void *usr_ctxt) HDD_IPA_LOG(LOGE, "INVALID REASON %d", hdd_ipa->stat_req_reason); } - cdf_mem_free(op_msg); + qdf_mem_free(op_msg); } @@ -1652,7 +1652,7 @@ static void hdd_ipa_uc_offload_enable_disable(hdd_adapter_t *adapter, if (adapter->ipa_context) return; - cdf_mem_zero(&ipa_offload_enable_disable, + qdf_mem_zero(&ipa_offload_enable_disable, sizeof(ipa_offload_enable_disable)); ipa_offload_enable_disable.offload_type = offload_type; ipa_offload_enable_disable.vdev_id = adapter->sessionId; @@ -1746,7 +1746,7 @@ static void hdd_ipa_uc_op_event_handler(uint8_t *op_msg, void *hdd_ctx) return; end: - cdf_mem_free(op_msg); + qdf_mem_free(op_msg); } /** @@ -1785,8 +1785,8 @@ static QDF_STATUS hdd_ipa_uc_ol_init(hdd_context_t *hdd_ctx) p_cds_contextType cds_ctx = hdd_ctx->pcds_context; uint8_t i; - cdf_mem_zero(&pipe_in, sizeof(struct ipa_wdi_in_params)); - cdf_mem_zero(&pipe_out, sizeof(struct ipa_wdi_out_params)); + qdf_mem_zero(&pipe_in, sizeof(struct ipa_wdi_in_params)); + qdf_mem_zero(&pipe_out, sizeof(struct ipa_wdi_out_params)); qdf_list_create(&ipa_ctxt->pending_event, 1000); qdf_mutex_create(&ipa_ctxt->event_lock); @@ -2735,7 +2735,7 @@ static void hdd_ipa_send_pkt_to_tl( skb = ipa_tx_desc->skb; - cdf_mem_set(skb->cb, sizeof(skb->cb), 0); + qdf_mem_set(skb->cb, sizeof(skb->cb), 0); cdf_nbuf_ipa_owned_set(skb); /* FIXME: This is broken. No such field in cb any more: NBUF_CALLBACK_FN(skb) = hdd_ipa_nbuf_cb; */ @@ -2875,7 +2875,7 @@ static void hdd_ipa_i2w_cb(void *priv, enum ipa_dp_evt_type evt, * progress. */ if (hdd_ipa->suspended) { - cdf_mem_set(skb->cb, sizeof(skb->cb), 0); + qdf_mem_set(skb->cb, sizeof(skb->cb), 0); pm_tx_cb = (struct hdd_ipa_pm_tx_cb *)skb->cb; pm_tx_cb->iface_context = iface_context; pm_tx_cb->ipa_tx_desc = ipa_tx_desc; @@ -3056,7 +3056,7 @@ setup_sys_pipe_fail: while (--i >= 0) { ipa_teardown_sys_pipe(hdd_ipa->sys_pipe[i].conn_hdl); - cdf_mem_zero(&hdd_ipa->sys_pipe[i], + qdf_mem_zero(&hdd_ipa->sys_pipe[i], sizeof(struct hdd_ipa_sys_pipe)); } @@ -3114,7 +3114,7 @@ static int hdd_ipa_register_interface(struct hdd_ipa_priv *hdd_ipa, /* Allocate TX properties for TOS categories, 1 each for IPv4 & IPv6 */ tx_prop = - cdf_mem_malloc(sizeof(struct ipa_ioc_tx_intf_prop) * num_prop); + qdf_mem_malloc(sizeof(struct ipa_ioc_tx_intf_prop) * num_prop); if (!tx_prop) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "tx_prop allocation failed"); goto register_interface_fail; @@ -3122,14 +3122,14 @@ static int hdd_ipa_register_interface(struct hdd_ipa_priv *hdd_ipa, /* Allocate RX properties, 1 each for IPv4 & IPv6 */ rx_prop = - cdf_mem_malloc(sizeof(struct ipa_ioc_rx_intf_prop) * num_prop); + qdf_mem_malloc(sizeof(struct ipa_ioc_rx_intf_prop) * num_prop); if (!rx_prop) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "rx_prop allocation failed"); goto register_interface_fail; } - cdf_mem_zero(&tx_intf, sizeof(tx_intf)); - cdf_mem_zero(&rx_intf, sizeof(rx_intf)); + qdf_mem_zero(&tx_intf, sizeof(tx_intf)); + qdf_mem_zero(&rx_intf, sizeof(rx_intf)); snprintf(ipv4_hdr_name, IPA_RESOURCE_NAME_MAX, "%s%s", ifname, HDD_IPA_IPV4_NAME_EXT); @@ -3187,8 +3187,8 @@ static int hdd_ipa_register_interface(struct hdd_ipa_priv *hdd_ipa, ret = ipa_register_intf(ifname, &tx_intf, &rx_intf); register_interface_fail: - cdf_mem_free(tx_prop); - cdf_mem_free(rx_prop); + qdf_mem_free(tx_prop); + qdf_mem_free(rx_prop); return ret; } @@ -3204,7 +3204,7 @@ static void hdd_ipa_remove_header(char *name) int ret = 0, len; struct ipa_ioc_del_hdr *ipa_hdr; - cdf_mem_zero(&hdrlookup, sizeof(hdrlookup)); + qdf_mem_zero(&hdrlookup, sizeof(hdrlookup)); strlcpy(hdrlookup.name, name, sizeof(hdrlookup.name)); ret = ipa_get_hdr(&hdrlookup); if (ret) { @@ -3215,7 +3215,7 @@ static void hdd_ipa_remove_header(char *name) HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "hdl: 0x%x", hdrlookup.hdl); len = sizeof(struct ipa_ioc_del_hdr) + sizeof(struct ipa_hdr_del) * 1; - ipa_hdr = (struct ipa_ioc_del_hdr *)cdf_mem_malloc(len); + ipa_hdr = (struct ipa_ioc_del_hdr *)qdf_mem_malloc(len); if (ipa_hdr == NULL) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "ipa_hdr allocation failed"); return; @@ -3229,7 +3229,7 @@ static void hdd_ipa_remove_header(char *name) HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "Delete header failed: %d", ret); - cdf_mem_free(ipa_hdr); + qdf_mem_free(ipa_hdr); } /** @@ -3257,7 +3257,7 @@ static int hdd_ipa_add_header_info(struct hdd_ipa_priv *hdd_ipa, ifname, mac_addr); /* dynamically allocate the memory to add the hdrs */ - ipa_hdr = cdf_mem_malloc(sizeof(struct ipa_ioc_add_hdr) + ipa_hdr = qdf_mem_malloc(sizeof(struct ipa_ioc_add_hdr) + sizeof(struct ipa_hdr_add)); if (!ipa_hdr) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, @@ -3341,7 +3341,7 @@ static int hdd_ipa_add_header_info(struct hdd_ipa_priv *hdd_ipa, ipa_hdr->hdr[0].name, ipa_hdr->hdr[0].hdr_hdl); } - cdf_mem_free(ipa_hdr); + qdf_mem_free(ipa_hdr); return ret; @@ -3351,7 +3351,7 @@ clean_ipv4_hdr: hdd_ipa_remove_header(ipa_hdr->hdr[0].name); end: if (ipa_hdr) - cdf_mem_free(ipa_hdr); + qdf_mem_free(ipa_hdr); return ret; } @@ -3499,7 +3499,7 @@ static void hdd_ipa_msg_free_fn(void *buff, uint32_t len, uint32_t type) { hddLog(LOG1, "msg type:%d, len:%d", type, len); ghdd_ipa->stats.num_free_msg++; - cdf_mem_free(buff); + qdf_mem_free(buff); } /** @@ -3540,7 +3540,7 @@ int hdd_ipa_send_mcc_scc_msg(hdd_context_t *pHddCtx, bool mcc_mode) /* Send SCC/MCC Switching event to IPA */ meta.msg_len = sizeof(*msg); - msg = cdf_mem_malloc(meta.msg_len); + msg = qdf_mem_malloc(meta.msg_len); if (msg == NULL) { hddLog(LOGE, "msg allocation failed"); return -ENOMEM; @@ -3555,7 +3555,7 @@ int hdd_ipa_send_mcc_scc_msg(hdd_context_t *pHddCtx, bool mcc_mode) if (ret) { hddLog(LOGE, "ipa_send_msg(Evt:%d) - fail=%d", meta.msg_type, ret); - cdf_mem_free(msg); + qdf_mem_free(msg); } return ret; @@ -3660,7 +3660,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, (qdf_list_node_t **)&pending_event); } else { pending_event = - (struct ipa_uc_pending_event *)cdf_mem_malloc( + (struct ipa_uc_pending_event *)qdf_mem_malloc( sizeof(struct ipa_uc_pending_event)); } @@ -3673,7 +3673,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, pending_event->adapter = adapter; pending_event->sta_id = sta_id; pending_event->type = type; - cdf_mem_copy(pending_event->mac_addr, + qdf_mem_copy(pending_event->mac_addr, mac_addr, QDF_MAC_ADDR_SIZE); qdf_list_insert_back(&hdd_ipa->pending_event, @@ -3882,7 +3882,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, meta.msg_type = type; meta.msg_len = (sizeof(struct ipa_wlan_msg_ex) + sizeof(struct ipa_wlan_hdr_attrib_val)); - msg_ex = cdf_mem_malloc(meta.msg_len); + msg_ex = qdf_mem_malloc(meta.msg_len); if (msg_ex == NULL) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, @@ -3908,7 +3908,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, if (ret) { HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "%s: Evt: %d : %d", msg_ex->name, meta.msg_type, ret); - cdf_mem_free(msg_ex); + qdf_mem_free(msg_ex); return ret; } hdd_ipa->stats.num_send_msg++; @@ -3947,7 +3947,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, } meta.msg_len = sizeof(struct ipa_wlan_msg); - msg = cdf_mem_malloc(meta.msg_len); + msg = qdf_mem_malloc(meta.msg_len); if (msg == NULL) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "msg allocation failed"); return -ENOMEM; @@ -3965,7 +3965,7 @@ int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id, if (ret) { HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "%s: Evt: %d fail:%d", msg->name, meta.msg_type, ret); - cdf_mem_free(msg); + qdf_mem_free(msg); return ret; } @@ -4013,7 +4013,7 @@ QDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx) if (!hdd_ipa_is_enabled(hdd_ctx)) return QDF_STATUS_SUCCESS; - hdd_ipa = cdf_mem_malloc(sizeof(*hdd_ipa)); + hdd_ipa = qdf_mem_malloc(sizeof(*hdd_ipa)); if (!hdd_ipa) { HDD_IPA_LOG(QDF_TRACE_LEVEL_FATAL, "hdd_ipa allocation failed"); goto fail_return; @@ -4074,7 +4074,7 @@ QDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx) if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx)) { hdd_ipa_uc_rt_debug_init(hdd_ctx); - cdf_mem_zero(&hdd_ipa->stats, sizeof(hdd_ipa->stats)); + qdf_mem_zero(&hdd_ipa->stats, sizeof(hdd_ipa->stats)); hdd_ipa->sap_num_connected_sta = 0; hdd_ipa->ipa_tx_packets_diff = 0; hdd_ipa->ipa_rx_packets_diff = 0; @@ -4104,7 +4104,7 @@ fail_create_sys_pipe: fail_setup_rm: qdf_spinlock_destroy(&hdd_ipa->pm_lock); fail_get_resource: - cdf_mem_free(hdd_ipa); + qdf_mem_free(hdd_ipa); hdd_ctx->hdd_ipa = NULL; ghdd_ipa = NULL; fail_return: @@ -4123,7 +4123,7 @@ void hdd_ipa_cleanup_pending_event(struct hdd_ipa_priv *hdd_ipa) while (qdf_list_remove_front(&hdd_ipa->pending_event, (qdf_list_node_t **)&pending_event) == QDF_STATUS_SUCCESS) { - cdf_mem_free(pending_event); + qdf_mem_free(pending_event); } qdf_list_destroy(&hdd_ipa->pending_event); @@ -4219,7 +4219,7 @@ QDF_STATUS hdd_ipa_cleanup(hdd_context_t *hdd_ctx) #endif } - cdf_mem_free(hdd_ipa); + qdf_mem_free(hdd_ipa); hdd_ctx->hdd_ipa = NULL; return QDF_STATUS_SUCCESS; diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index 7cba52d751ae..77522bd106a1 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -261,7 +261,7 @@ static int hdd_lro_desc_find(hdd_adapter_t *adapter, return -EINVAL; } - cdf_mem_zero((void *)entry->lro_desc, sizeof(struct net_lro_desc)); + qdf_mem_zero((void *)entry->lro_desc, sizeof(struct net_lro_desc)); /* * lro_desc->active should be 0 and lro_desc->tcp_rcv_tsval @@ -516,7 +516,7 @@ int hdd_lro_enable(hdd_context_t *hdd_ctx, hdd_info("LRO Enabled"); hdd_lro = &adapter->lro_info; - cdf_mem_zero((void *)hdd_lro, sizeof(struct hdd_lro_s)); + qdf_mem_zero((void *)hdd_lro, sizeof(struct hdd_lro_s)); /* * Allocate all the LRO data structures at once and then carve * them up as needed @@ -526,7 +526,7 @@ int hdd_lro_enable(hdd_context_t *hdd_ctx, desc_pool_sz = (LRO_DESC_POOL_SZ * sizeof(struct hdd_lro_desc_entry)); hash_table_sz = (sizeof(struct hdd_lro_desc_table) * LRO_DESC_TABLE_SZ); - lro_mem_ptr = cdf_mem_malloc(lro_mgr_sz + desc_arr_sz + desc_pool_sz + + lro_mem_ptr = qdf_mem_malloc(lro_mgr_sz + desc_arr_sz + desc_pool_sz + hash_table_sz); if (NULL == lro_mem_ptr) { @@ -597,7 +597,7 @@ void hdd_lro_disable(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) if (adapter->lro_info.lro_mgr) { hdd_lro_desc_info_deinit(&adapter->lro_info); - cdf_mem_free(adapter->lro_info.lro_mgr); + qdf_mem_free(adapter->lro_info.lro_mgr); adapter->lro_info.lro_mgr = NULL; adapter->lro_info.lro_desc_info. lro_desc_pool.lro_desc_array = NULL; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 5117ab63b0b9..d6557cc36b80 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -749,10 +749,10 @@ void hdd_update_macaddr(struct hdd_config *config, int8_t i; uint8_t macaddr_b3, tmp_br3; - cdf_mem_copy(config->intfMacAddr[0].bytes, hw_macaddr.bytes, + qdf_mem_copy(config->intfMacAddr[0].bytes, hw_macaddr.bytes, QDF_MAC_ADDR_SIZE); for (i = 1; i < QDF_MAX_CONCURRENCY_PERSONA; i++) { - cdf_mem_copy(config->intfMacAddr[i].bytes, hw_macaddr.bytes, + qdf_mem_copy(config->intfMacAddr[i].bytes, hw_macaddr.bytes, QDF_MAC_ADDR_SIZE); macaddr_b3 = config->intfMacAddr[i].bytes[3]; tmp_br3 = ((macaddr_b3 >> 4 & INTF_MACADDR_MASK) + i) & @@ -1870,7 +1870,7 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx, /* Save the pointer to the net_device in the HDD adapter */ adapter = (hdd_adapter_t *) netdev_priv(pWlanDev); - cdf_mem_zero(adapter, sizeof(hdd_adapter_t)); + qdf_mem_zero(adapter, sizeof(hdd_adapter_t)); adapter->dev = pWlanDev; adapter->pHddCtx = hdd_ctx; @@ -1902,9 +1902,9 @@ static hdd_adapter_t *hdd_alloc_station_adapter(hdd_context_t *hdd_ctx, /* Init the net_device structure */ strlcpy(pWlanDev->name, name, IFNAMSIZ); - cdf_mem_copy(pWlanDev->dev_addr, (void *)macAddr, + qdf_mem_copy(pWlanDev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(adapter->macAddressCurrent.bytes, macAddr, + qdf_mem_copy(adapter->macAddressCurrent.bytes, macAddr, sizeof(tSirMacAddr)); pWlanDev->watchdog_timeo = HDD_TX_TIMEOUT; @@ -2273,7 +2273,7 @@ QDF_STATUS hdd_check_for_existing_macaddr(hdd_context_t *hdd_ctx, while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) { adapter = adapterNode->pAdapter; if (adapter - && cdf_mem_compare(adapter->macAddressCurrent.bytes, + && !qdf_mem_cmp(adapter->macAddressCurrent.bytes, macAddr, sizeof(tSirMacAddr))) { return QDF_STATUS_E_FAILURE; } @@ -2483,7 +2483,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, if (QDF_STATUS_SUCCESS == status) { /* Add it to the hdd's session list. */ pHddAdapterNode = - cdf_mem_malloc(sizeof(hdd_adapter_list_node_t)); + qdf_mem_malloc(sizeof(hdd_adapter_list_node_t)); if (NULL == pHddAdapterNode) { status = QDF_STATUS_E_NOMEM; } else { @@ -2498,7 +2498,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, adapter = NULL; } if (NULL != pHddAdapterNode) { - cdf_mem_free(pHddAdapterNode); + qdf_mem_free(pHddAdapterNode); } return NULL; } @@ -2691,7 +2691,7 @@ QDF_STATUS hdd_close_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, hdd_cleanup_adapter(hdd_ctx, adapterNode->pAdapter, rtnl_held); hdd_remove_adapter(hdd_ctx, adapterNode); - cdf_mem_free(adapterNode); + qdf_mem_free(adapterNode); adapterNode = NULL; /* Adapter removed. Decrement vdev count */ @@ -2725,7 +2725,7 @@ QDF_STATUS hdd_close_all_adapters(hdd_context_t *hdd_ctx, bool rtnl_held) if (pHddAdapterNode && QDF_STATUS_SUCCESS == status) { hdd_cleanup_adapter(hdd_ctx, pHddAdapterNode->pAdapter, rtnl_held); - cdf_mem_free(pHddAdapterNode); + qdf_mem_free(pHddAdapterNode); } } while (NULL != pHddAdapterNode && QDF_STATUS_E_EMPTY != status); @@ -3227,7 +3227,7 @@ hdd_adapter_t *hdd_get_adapter_by_macaddr(hdd_context_t *hdd_ctx, adapter = adapterNode->pAdapter; if (adapter - && cdf_mem_compare(adapter->macAddressCurrent.bytes, + && !qdf_mem_cmp(adapter->macAddressCurrent.bytes, macAddr, sizeof(tSirMacAddr))) { return adapter; } @@ -3645,7 +3645,7 @@ static void hdd_free_context(hdd_context_t *hdd_ctx) if (QDF_GLOBAL_FTM_MODE != hdd_get_conparam()) hdd_logging_sock_deactivate_svc(hdd_ctx); - cdf_mem_free(hdd_ctx->config); + qdf_mem_free(hdd_ctx->config); hdd_ctx->config = NULL; wiphy_free(hdd_ctx->wiphy); @@ -4394,7 +4394,7 @@ void wlan_hdd_display_tx_rx_histogram(hdd_context_t *hdd_ctx) void wlan_hdd_clear_tx_rx_histogram(hdd_context_t *hdd_ctx) { hdd_ctx->hdd_txrx_hist_idx = 0; - cdf_mem_zero(hdd_ctx->hdd_txrx_hist, sizeof(hdd_ctx->hdd_txrx_hist)); + qdf_mem_zero(hdd_ctx->hdd_txrx_hist, sizeof(hdd_ctx->hdd_txrx_hist)); } /** @@ -4475,9 +4475,9 @@ void wlan_hdd_clear_netif_queue_history(hdd_context_t *hdd_ctx) while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) { adapter = adapter_node->pAdapter; - cdf_mem_zero(adapter->queue_oper_stats, + qdf_mem_zero(adapter->queue_oper_stats, sizeof(adapter->queue_oper_stats)); - cdf_mem_zero(adapter->queue_oper_history, + qdf_mem_zero(adapter->queue_oper_history, sizeof(adapter->queue_oper_history)); status = hdd_get_next_adapter(hdd_ctx, adapter_node, &next); @@ -4749,7 +4749,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) ch_avoid_indi->avoid_range_count); /* generate vendor specific event */ - cdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList)); + qdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList)); for (i = 0; i < ch_avoid_indi->avoid_range_count; i++) { hdd_avoid_freq_list.avoidFreqRange[i].startFreq = ch_avoid_indi->avoid_freq_range[i].start_freq; @@ -4763,7 +4763,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) /* clear existing unsafe channel cache */ hdd_ctxt->unsafe_channel_count = 0; - cdf_mem_zero(hdd_ctxt->unsafe_channel_list, + qdf_mem_zero(hdd_ctxt->unsafe_channel_list, sizeof(hdd_ctxt->unsafe_channel_list)); for (range_loop = 0; range_loop < ch_avoid_indi->avoid_range_count; @@ -4839,7 +4839,7 @@ static void hdd_ch_avoid_cb(void *hdd_context, void *indi_param) /* clear existing unsafe channel cache */ hdd_ctxt->unsafe_channel_count = 0; - cdf_mem_zero(hdd_ctxt->unsafe_channel_list, + qdf_mem_zero(hdd_ctxt->unsafe_channel_list, sizeof(hdd_ctxt->unsafe_channel_list)); return; @@ -5092,7 +5092,7 @@ hdd_context_t *hdd_init_context(struct device *dev, void *hif_sc) hdd_ctx->pcds_context = p_cds_context; - hdd_ctx->config = cdf_mem_malloc(sizeof(struct hdd_config)); + hdd_ctx->config = qdf_mem_malloc(sizeof(struct hdd_config)); if (hdd_ctx->config == NULL) { hdd_alert("Failed to alloc memory for HDD config!"); ret = -ENOMEM; @@ -5181,7 +5181,7 @@ skip_multicast_logging: return hdd_ctx; err_free_config: - cdf_mem_free(hdd_ctx->config); + qdf_mem_free(hdd_ctx->config); err_free_hdd_context: wiphy_free(hdd_ctx->wiphy); @@ -5208,7 +5208,7 @@ static int hdd_open_p2p_interface(hdd_context_t *hdd_ctx, bool rtnl_held) if (hdd_ctx->config->isP2pDeviceAddrAdministrated && !(hdd_ctx->config->intfMacAddr[0].bytes[0] & 0x02)) { - cdf_mem_copy(hdd_ctx->p2pDeviceAddress.bytes, + qdf_mem_copy(hdd_ctx->p2pDeviceAddress.bytes, hdd_ctx->config->intfMacAddr[0].bytes, sizeof(tSirMacAddr)); @@ -5225,7 +5225,7 @@ static int hdd_open_p2p_interface(hdd_context_t *hdd_ctx, bool rtnl_held) return -ENOSPC; } - cdf_mem_copy(&hdd_ctx->p2pDeviceAddress.bytes[0], p2p_dev_addr, + qdf_mem_copy(&hdd_ctx->p2pDeviceAddress.bytes[0], p2p_dev_addr, QDF_MAC_ADDR_SIZE); } @@ -6819,7 +6819,7 @@ static int __hdd_module_init(void) goto out; } - pr_info("%s: qdf driver loaded\n", WLAN_MODULE_NAME); + pr_info("%s: qdf converged driver loaded\n", WLAN_MODULE_NAME); return 0; out: diff --git a/core/hdd/src/wlan_hdd_memdump.c b/core/hdd/src/wlan_hdd_memdump.c index 623c0f4ee07e..49a9a4a5a2f8 100644 --- a/core/hdd/src/wlan_hdd_memdump.c +++ b/core/hdd/src/wlan_hdd_memdump.c @@ -90,7 +90,7 @@ static void memdump_cleanup_timer_cb(void *data) paddr = hdd_ctx->dump_loc_paddr; mutex_lock(&hdd_ctx->memdump_lock); - cdf_os_mem_free_consistent(qdf_ctx, + qdf_mem_free_consistent(qdf_ctx, FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx); hdd_ctx->fw_dump_loc = NULL; hdd_ctx->memdump_in_progress = false; @@ -234,11 +234,11 @@ static int __wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy, */ mutex_lock(&hdd_ctx->memdump_lock); if (!hdd_ctx->fw_dump_loc) { - hdd_ctx->fw_dump_loc = cdf_os_mem_alloc_consistent( - qdf_ctx, FW_MEM_DUMP_SIZE, &paddr, dma_ctx); + hdd_ctx->fw_dump_loc = qdf_mem_alloc_consistent( + qdf_ctx, qdf_ctx->dev, FW_MEM_DUMP_SIZE, &paddr); if (!hdd_ctx->fw_dump_loc) { mutex_unlock(&hdd_ctx->memdump_lock); - hddLog(LOGE, FL("cdf_os_mem_alloc_consistent failed")); + hddLog(LOGE, FL("qdf_mem_alloc_consistent failed")); return -ENOMEM; } hdd_ctx->dump_loc_paddr = paddr; @@ -299,7 +299,7 @@ static int __wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS != sme_status) { hddLog(LOGE, FL("sme_fw_mem_dump Failed")); mutex_lock(&hdd_ctx->memdump_lock); - cdf_os_mem_free_consistent(qdf_ctx, + qdf_mem_free_consistent(qdf_ctx, FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx); hdd_ctx->fw_dump_loc = NULL; mutex_unlock(&hdd_ctx->memdump_lock); @@ -443,7 +443,7 @@ static ssize_t memdump_read(struct file *file, char __user *buf, if (*pos >= FW_MEM_DUMP_SIZE) { paddr = hdd_ctx->dump_loc_paddr; mutex_lock(&hdd_ctx->memdump_lock); - cdf_os_mem_free_consistent(qdf_ctx, + qdf_mem_free_consistent(qdf_ctx, FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx); hdd_ctx->fw_dump_loc = NULL; hdd_ctx->memdump_in_progress = false; @@ -619,7 +619,7 @@ void memdump_deinit(void) mutex_lock(&hdd_ctx->memdump_lock); if (hdd_ctx->fw_dump_loc) { paddr = hdd_ctx->dump_loc_paddr; - cdf_os_mem_free_consistent(qdf_ctx, + qdf_mem_free_consistent(qdf_ctx, FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx); hdd_ctx->fw_dump_loc = NULL; hdd_ctx->memdump_in_progress = false; diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 428ced7da3ce..62ff20ae9e02 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -308,11 +308,11 @@ static struct sir_ocb_config *hdd_ocb_config_new(int num_channels, ndl_chan_list_len + ndl_active_state_list_len; - cursor = cdf_mem_malloc(len); + cursor = qdf_mem_malloc(len); if (!cursor) goto fail; - cdf_mem_zero(cursor, len); + qdf_mem_zero(cursor, len); ret = cursor; cursor += sizeof(*ret); @@ -333,7 +333,7 @@ static struct sir_ocb_config *hdd_ocb_config_new(int num_channels, return ret; fail: - cdf_mem_free(ret); + qdf_mem_free(ret); return NULL; } @@ -540,11 +540,11 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, rc = -EINVAL; goto fail; } - cdf_mem_copy(config->channels[ + qdf_mem_copy(config->channels[ config->channel_count].mac_address.bytes, mac_addr, sizeof(tSirMacAddr)); /* Save the mac address to release later */ - cdf_mem_copy(adapter->ocb_mac_address[ + qdf_mem_copy(adapter->ocb_mac_address[ adapter->ocb_mac_addr_count].bytes, mac_addr, QDF_MAC_ADDR_SIZE); adapter->ocb_mac_addr_count++; @@ -583,7 +583,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev, rc = 0; fail: - cdf_mem_free(config); + qdf_mem_free(config); return rc; } @@ -733,12 +733,12 @@ static void wlan_hdd_ocb_config_channel_to_sir_ocb_config_channel( { uint32_t i; - cdf_mem_zero(dest, channel_count * sizeof(*dest)); + qdf_mem_zero(dest, channel_count * sizeof(*dest)); for (i = 0; i < channel_count; i++) { dest[i].chan_freq = src[i].chan_freq; dest[i].bandwidth = src[i].bandwidth; - cdf_mem_copy(dest[i].qos_params, src[i].qos_params, + qdf_mem_copy(dest[i].qos_params, src[i].qos_params, sizeof(dest[i].qos_params)); /* * max_pwr and min_pwr are divided by 2 because @@ -885,7 +885,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, hddLog(LOGE, FL("Cannot obtain mac address")); goto fail; } - cdf_mem_copy(config->channels[i].mac_address.bytes, + qdf_mem_copy(config->channels[i].mac_address.bytes, mac_addr, QDF_MAC_ADDR_SIZE); /* Save the mac address to release later */ qdf_copy_macaddr(&adapter->ocb_mac_address[ @@ -905,13 +905,13 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, hddLog(LOGE, FL("SCHEDULE_ARRAY is not the correct size")); goto fail; } - cdf_mem_copy(config->schedule, nla_data(sched_array), + qdf_mem_copy(config->schedule, nla_data(sched_array), nla_len(sched_array)); /* Copy the NDL chan array */ if (ndl_chan_list_len) { config->dcc_ndl_chan_list_len = ndl_chan_list_len; - cdf_mem_copy(config->dcc_ndl_chan_list, nla_data(ndl_chan_list), + qdf_mem_copy(config->dcc_ndl_chan_list, nla_data(ndl_chan_list), nla_len(ndl_chan_list)); } @@ -919,7 +919,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, if (ndl_active_state_list_len) { config->dcc_ndl_active_state_list_len = ndl_active_state_list_len; - cdf_mem_copy(config->dcc_ndl_active_state_list, + qdf_mem_copy(config->dcc_ndl_active_state_list, nla_data(ndl_active_state_list), nla_len(ndl_active_state_list)); } @@ -929,7 +929,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy, hddLog(LOGE, FL("Error while setting OCB config: %d"), rc); fail: - cdf_mem_free(config); + qdf_mem_free(config); return rc; } @@ -1026,14 +1026,14 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy, return -EINVAL; } - utc = cdf_mem_malloc(sizeof(*utc)); + utc = qdf_mem_malloc(sizeof(*utc)); if (!utc) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } utc->vdev_id = adapter->sessionId; - cdf_mem_copy(utc->utc_time, nla_data(utc_attr), SIZE_UTC_TIME); - cdf_mem_copy(utc->time_error, nla_data(time_error_attr), + qdf_mem_copy(utc->utc_time, nla_data(utc_attr), SIZE_UTC_TIME); + qdf_mem_copy(utc->time_error, nla_data(time_error_attr), SIZE_UTC_TIME_ERROR); if (sme_ocb_set_utc_time(hdd_ctx->hHal, utc) != QDF_STATUS_SUCCESS) { @@ -1043,7 +1043,7 @@ static int __wlan_hdd_cfg80211_ocb_set_utc_time(struct wiphy *wiphy, rc = 0; } - cdf_mem_free(utc); + qdf_mem_free(utc); return rc; } @@ -1109,12 +1109,12 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, return -EINVAL; } - timing_advert = cdf_mem_malloc(sizeof(*timing_advert)); + timing_advert = qdf_mem_malloc(sizeof(*timing_advert)); if (!timing_advert) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } - cdf_mem_zero(timing_advert, sizeof(*timing_advert)); + qdf_mem_zero(timing_advert, sizeof(*timing_advert)); timing_advert->vdev_id = adapter->sessionId; /* Parse the netlink message */ @@ -1161,8 +1161,8 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, fail: if (timing_advert->template_value) - cdf_mem_free(timing_advert->template_value); - cdf_mem_free(timing_advert); + qdf_mem_free(timing_advert->template_value); + qdf_mem_free(timing_advert); return rc; } @@ -1229,12 +1229,12 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, return -EINVAL; } - timing_advert = cdf_mem_malloc(sizeof(*timing_advert)); + timing_advert = qdf_mem_malloc(sizeof(*timing_advert)); if (!timing_advert) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } - cdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert))); + qdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert))); timing_advert->vdev_id = adapter->sessionId; /* Parse the netlink message */ @@ -1262,7 +1262,7 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, } fail: - cdf_mem_free(timing_advert); + qdf_mem_free(timing_advert); return rc; } @@ -1477,11 +1477,11 @@ static void hdd_dcc_get_stats_callback(void *context_ptr, void *response_ptr) * request, delete it */ if (context->adapter->dcc_get_stats_resp) { - cdf_mem_free( + qdf_mem_free( context->adapter->dcc_get_stats_resp); } context->adapter->dcc_get_stats_resp = - cdf_mem_malloc(sizeof( + qdf_mem_malloc(sizeof( *context->adapter->dcc_get_stats_resp) + response->channel_stats_array_len); if (context->adapter->dcc_get_stats_resp) { @@ -1489,7 +1489,7 @@ static void hdd_dcc_get_stats_callback(void *context_ptr, void *response_ptr) *hdd_resp = *response; hdd_resp->channel_stats_array = (void *)hdd_resp + sizeof(*hdd_resp); - cdf_mem_copy(hdd_resp->channel_stats_array, + qdf_mem_copy(hdd_resp->channel_stats_array, response->channel_stats_array, response->channel_stats_array_len); context->status = 0; @@ -1646,7 +1646,7 @@ static int __wlan_hdd_cfg80211_dcc_get_stats(struct wiphy *wiphy, end: spin_lock(&hdd_context_lock); context.magic = 0; - cdf_mem_free(adapter->dcc_get_stats_resp); + qdf_mem_free(adapter->dcc_get_stats_resp); adapter->dcc_get_stats_resp = NULL; spin_unlock(&hdd_context_lock); if (nl_resp) diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c index d310bb391cea..924ac2eb2fa7 100644 --- a/core/hdd/src/wlan_hdd_oemdata.c +++ b/core/hdd/src/wlan_hdd_oemdata.c @@ -69,7 +69,7 @@ static int populate_oem_data_cap(hdd_adapter_t *adapter, hdd_err("HDD configuration is null"); return -EINVAL; } - chan_list = cdf_mem_malloc(sizeof(uint8_t) * OEM_CAP_MAX_NUM_CHANNELS); + chan_list = qdf_mem_malloc(sizeof(uint8_t) * OEM_CAP_MAX_NUM_CHANNELS); if (NULL == chan_list) { hdd_err("Memory allocation failed"); return -ENOMEM; @@ -99,7 +99,7 @@ static int populate_oem_data_cap(hdd_adapter_t *adapter, &chan_list[0], &num_chan); if (QDF_STATUS_SUCCESS != status) { hdd_err("failed to get valid channel list, status: %d", status); - cdf_mem_free(chan_list); + qdf_mem_free(chan_list); return -EINVAL; } @@ -107,15 +107,15 @@ static int populate_oem_data_cap(hdd_adapter_t *adapter, if (num_chan > OEM_CAP_MAX_NUM_CHANNELS) { hdd_err("Num of channels-%d > length-%d of chan_list", num_chan, OEM_CAP_MAX_NUM_CHANNELS); - cdf_mem_free(chan_list); + qdf_mem_free(chan_list); return -ENOMEM; } data_cap->num_channels = num_chan; - cdf_mem_copy(data_cap->channel_list, chan_list, + qdf_mem_copy(data_cap->channel_list, chan_list, sizeof(uint8_t) * num_chan); - cdf_mem_free(chan_list); + qdf_mem_free(chan_list); return 0; } @@ -344,7 +344,7 @@ void hdd_send_oem_data_rsp_msg(int length, uint8_t *oemDataRsp) aniHdr->length = length; nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length)); oemData = (uint8_t *) ((char *)aniHdr + sizeof(tAniMsgHdr)); - cdf_mem_copy(oemData, oemDataRsp, length); + qdf_mem_copy(oemData, oemDataRsp, length); skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length))); @@ -387,16 +387,16 @@ static QDF_STATUS oem_process_data_req_msg(int oemDataLen, char *oemData) return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig)); + qdf_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig)); - oemDataReqConfig.data = cdf_mem_malloc(oemDataLen); + oemDataReqConfig.data = qdf_mem_malloc(oemDataLen); if (!oemDataReqConfig.data) { hddLog(LOGE, FL("malloc failed for data req buffer")); return QDF_STATUS_E_NOMEM; } oemDataReqConfig.data_len = oemDataLen; - cdf_mem_copy(oemDataReqConfig.data, oemData, oemDataLen); + qdf_mem_copy(oemDataReqConfig.data, oemData, oemDataLen); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, "%s: calling sme_oem_data_req", __func__); @@ -406,7 +406,7 @@ static QDF_STATUS oem_process_data_req_msg(int oemDataLen, char *oemData) &oemDataReqConfig, &oemDataReqID); - cdf_mem_free(oemDataReqConfig.data); + qdf_mem_free(oemDataReqConfig.data); oemDataReqConfig.data = NULL; return status; @@ -510,7 +510,7 @@ static int oem_process_channel_info_req_msg(int numOfChannels, char *chanList) hddChanInfo.reg_info_1 = 0; hddChanInfo.reg_info_2 = 0; } - cdf_mem_copy(pHddChanInfo, &hddChanInfo, + qdf_mem_copy(pHddChanInfo, &hddChanInfo, sizeof(tHddChannelInfo)); } @@ -575,7 +575,7 @@ static int oem_process_set_cap_req_msg(int oem_cap_len, /* message body will contain only status code */ buf = (char *)((char *)ani_hdr + sizeof(tAniMsgHdr)); - cdf_mem_copy(buf, &error_code, ani_hdr->length); + qdf_mem_copy(buf, &error_code, ani_hdr->length); skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr) + ani_hdr->length)); @@ -636,12 +636,12 @@ static int oem_process_get_cap_req_msg(void) nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + ani_hdr->length)); buf = (char *)((char *)ani_hdr + sizeof(tAniMsgHdr)); - cdf_mem_copy(buf, &data_cap, sizeof(data_cap)); + qdf_mem_copy(buf, &data_cap, sizeof(data_cap)); buf = (char *) buf + sizeof(data_cap); - cdf_mem_zero(&oem_cap, sizeof(oem_cap)); + qdf_mem_zero(&oem_cap, sizeof(oem_cap)); sme_oem_get_capability(p_hdd_ctx->hHal, &oem_cap); - cdf_mem_copy(buf, &oem_cap, sizeof(oem_cap)); + qdf_mem_copy(buf, &oem_cap, sizeof(oem_cap)); skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + ani_hdr->length))); hdd_info("send rsp to oem-pid:%d for get_capability", @@ -711,7 +711,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac, pPeerInfo = (tPeerStatusInfo *) ((char *)aniHdr + sizeof(tAniMsgHdr)); - cdf_mem_copy(pPeerInfo->peer_mac_addr, peerMac->bytes, + qdf_mem_copy(pPeerInfo->peer_mac_addr, peerMac->bytes, sizeof(peerMac->bytes)); pPeerInfo->peer_status = peerStatus; pPeerInfo->vdev_id = sessionId; diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 391bcde2a2b0..b82eaf02d974 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -260,11 +260,11 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx, if (pRemainChanCtx->action_pkt_buff.frame_ptr != NULL && pRemainChanCtx->action_pkt_buff.frame_length != 0) { - cdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr); + qdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr); pRemainChanCtx->action_pkt_buff.frame_ptr = NULL; pRemainChanCtx->action_pkt_buff.frame_length = 0; } - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); complete(&pAdapter->cancel_rem_on_chan_var); if (QDF_STATUS_SUCCESS != status) complete(&pAdapter->rem_on_chan_ready_event); @@ -451,12 +451,12 @@ wait: &roc_ctx->hdd_remain_on_chan_timer); if (roc_ctx->action_pkt_buff.frame_ptr != NULL && roc_ctx->action_pkt_buff.frame_length != 0) { - cdf_mem_free( + qdf_mem_free( roc_ctx->action_pkt_buff.frame_ptr); roc_ctx->action_pkt_buff.frame_ptr = NULL; roc_ctx->action_pkt_buff.frame_length = 0; } - cdf_mem_free(roc_ctx); + qdf_mem_free(roc_ctx); adapter->is_roc_inprogress = false; } mutex_unlock(&cfg_state->remain_on_chan_ctx_lock); @@ -576,7 +576,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, cfgState->remain_on_chan_ctx = NULL; pAdapter->is_roc_inprogress = false; mutex_unlock(&cfgState->remain_on_chan_ctx_lock); - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); return -EINVAL; } @@ -624,7 +624,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, mutex_unlock(&cfgState->remain_on_chan_ctx_lock); qdf_mc_timer_destroy( &pRemainChanCtx->hdd_remain_on_chan_timer); - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC); return -EINVAL; } @@ -660,7 +660,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, mutex_unlock(&cfgState->remain_on_chan_ctx_lock); qdf_mc_timer_destroy( &pRemainChanCtx->hdd_remain_on_chan_timer); - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC); return -EINVAL; } @@ -709,7 +709,7 @@ static int wlan_hdd_roc_request_enqueue(hdd_adapter_t *adapter, * so enqueue this RoC Request and execute sequentially later. */ - hdd_roc_req = cdf_mem_malloc(sizeof(*hdd_roc_req)); + hdd_roc_req = qdf_mem_malloc(sizeof(*hdd_roc_req)); if (NULL == hdd_roc_req) { hddLog(LOGP, FL("malloc failed for roc req context")); @@ -727,7 +727,7 @@ static int wlan_hdd_roc_request_enqueue(hdd_adapter_t *adapter, if (QDF_STATUS_SUCCESS != status) { hddLog(LOGP, FL("Not able to enqueue RoC Req context")); - cdf_mem_free(hdd_roc_req); + qdf_mem_free(hdd_roc_req); return -EINVAL; } @@ -811,9 +811,9 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work) FL("dropping RoC request")); wlan_hdd_indicate_roc_drop(hdd_roc_req->pAdapter, hdd_roc_req->pRemainChanCtx); - cdf_mem_free(hdd_roc_req->pRemainChanCtx); + qdf_mem_free(hdd_roc_req->pRemainChanCtx); } - cdf_mem_free(hdd_roc_req); + qdf_mem_free(hdd_roc_req); } static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, @@ -849,7 +849,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, hddLog(LOGE, FL("Connection is in progress")); isBusy = true; } - pRemainChanCtx = cdf_mem_malloc(sizeof(hdd_remain_on_chan_ctx_t)); + pRemainChanCtx = qdf_mem_malloc(sizeof(hdd_remain_on_chan_ctx_t)); if (NULL == pRemainChanCtx) { hddLog(QDF_TRACE_LEVEL_FATAL, "%s: Not able to allocate memory for Channel context", @@ -857,8 +857,8 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, return -ENOMEM; } - cdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx)); - cdf_mem_copy(&pRemainChanCtx->chan, chan, + qdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx)); + qdf_mem_copy(&pRemainChanCtx->chan, chan, sizeof(struct ieee80211_channel)); pRemainChanCtx->duration = duration; pRemainChanCtx->dev = dev; @@ -903,14 +903,14 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, if (status == -EBUSY) { if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx)) { - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); return -EAGAIN; } } return 0; } else { if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx)) { - cdf_mem_free(pRemainChanCtx); + qdf_mem_free(pRemainChanCtx); return -EAGAIN; } } @@ -1063,7 +1063,7 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter, frame_length, GFP_ATOMIC); #endif /* LINUX_VERSION_CODE */ - cdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr); + qdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr); pRemainChanCtx->action_pkt_buff.frame_length = 0; pRemainChanCtx->action_pkt_buff.freq = 0; pRemainChanCtx->action_pkt_buff.frame_ptr = NULL; @@ -1112,8 +1112,8 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, curr_roc_req); qdf_spin_unlock(&pHddCtx->hdd_roc_req_q_lock); if (qdf_status == QDF_STATUS_SUCCESS) { - cdf_mem_free(curr_roc_req->pRemainChanCtx); - cdf_mem_free(curr_roc_req); + qdf_mem_free(curr_roc_req->pRemainChanCtx); + qdf_mem_free(curr_roc_req); } return 0; } @@ -1507,13 +1507,13 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, send_frame: if (!noack) { - cfgState->buf = cdf_mem_malloc(len); /* buf; */ + cfgState->buf = qdf_mem_malloc(len); /* buf; */ if (cfgState->buf == NULL) return -ENOMEM; cfgState->len = len; - cdf_mem_copy(cfgState->buf, buf, len); + qdf_mem_copy(cfgState->buf, buf, len); mutex_lock(&cfgState->remain_on_chan_ctx_lock); @@ -1685,7 +1685,7 @@ void hdd_send_action_cnf(hdd_adapter_t *pAdapter, bool actionSendSuccess) cfgState->buf, cfgState->len, actionSendSuccess, GFP_KERNEL); - cdf_mem_free(cfgState->buf); + qdf_mem_free(cfgState->buf); cfgState->buf = NULL; complete(&pAdapter->tx_action_cnf_event); @@ -2173,7 +2173,7 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, /* Public action frame */ if ((pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET + 1] == SIR_MAC_ACTION_VENDOR_SPECIFIC) && - cdf_mem_compare(&pbFrames + !qdf_mem_cmp(&pbFrames [WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET + 2], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE)) { @@ -2297,9 +2297,9 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, pRemainChanCtx-> action_pkt_buff. frame_ptr = - cdf_mem_malloc + qdf_mem_malloc (nFrameLength); - cdf_mem_copy + qdf_mem_copy (pRemainChanCtx-> action_pkt_buff. frame_ptr, diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index b26c9e8e36c7..61802fa7216a 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -112,7 +112,7 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable) pHddStaCtx->conn_info.connState) && (GTK_OFFLOAD_ENABLE == pHddStaCtx->gtkOffloadReqParams.ulFlags)) { - cdf_mem_copy(&hddGtkOffloadReqParams, + qdf_mem_copy(&hddGtkOffloadReqParams, &pHddStaCtx->gtkOffloadReqParams, sizeof(tSirGtkOffloadParams)); @@ -317,7 +317,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) switch (scope) { case IPV6_ADDR_SCOPE_GLOBAL: case IPV6_ADDR_SCOPE_LINKLOCAL: - cdf_mem_copy(&selfIPv6Addr[count], + qdf_mem_copy(&selfIPv6Addr[count], &ifp->addr.s6_addr, sizeof(ifp->addr.s6_addr)); selfIPv6AddrValid[count] = @@ -335,7 +335,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) } } /* read_unlock_bh(&in6_dev->lock); */ - cdf_mem_zero(&offLoadRequest, sizeof(offLoadRequest)); + qdf_mem_zero(&offLoadRequest, sizeof(offLoadRequest)); for (i = 0; i < count; i++) { /* Filling up the request structure * Filling the selfIPv6Addr with solicited address @@ -358,7 +358,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][15] = selfIPv6Addr[i][15]; offLoadRequest.nsOffloadInfo.slotIdx = i; - cdf_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i], + qdf_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i], &selfIPv6Addr[i][0], SIR_MAC_IPV6_ADDR_LEN); offLoadRequest.nsOffloadInfo.targetIPv6AddrValid[i] = @@ -377,7 +377,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE; } - cdf_mem_copy(&offLoadRequest.params.hostIpv6Addr, + qdf_mem_copy(&offLoadRequest.params.hostIpv6Addr, &offLoadRequest.nsOffloadInfo.targetIPv6Addr[i], SIR_MAC_IPV6_ADDR_LEN); @@ -404,7 +404,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable) } } else { /* Disable NSOffload */ - cdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq)); + qdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq)); offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE; offLoadRequest.offloadType = SIR_IPV6_NS_OFFLOAD; @@ -765,7 +765,7 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable) return QDF_STATUS_SUCCESS; } else { - cdf_mem_zero((void *)&offLoadRequest, + qdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq)); offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE; offLoadRequest.offloadType = SIR_IPV4_ARP_REPLY_OFFLOAD; @@ -834,7 +834,7 @@ void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter) { QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE; tpSirWlanSetRxpFilters wlanRxpFilterParam = - cdf_mem_malloc(sizeof(tSirWlanSetRxpFilters)); + qdf_mem_malloc(sizeof(tSirWlanSetRxpFilters)); if (NULL == wlanRxpFilterParam) { hddLog(QDF_TRACE_LEVEL_FATAL, "%s: cdf_mem_alloc failed ", __func__); @@ -868,7 +868,7 @@ void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter) wlanRxpFilterParam->setMcstBcstFilter); if (QDF_STATUS_SUCCESS != cdf_ret_status) - cdf_mem_free(wlanRxpFilterParam); + qdf_mem_free(wlanRxpFilterParam); } #ifdef WLAN_FEATURE_PACKET_FILTERING @@ -903,13 +903,13 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set) FL("gMCAddrListEnable is not enabled in INI")); return; } - pMulticastAddrs = cdf_mem_malloc(sizeof(tSirRcvFltMcAddrList)); + pMulticastAddrs = qdf_mem_malloc(sizeof(tSirRcvFltMcAddrList)); if (NULL == pMulticastAddrs) { hddLog(QDF_TRACE_LEVEL_ERROR, FL("Could not allocate Memory")); return; } - cdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList)); + qdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList)); pMulticastAddrs->action = set; if (set) { @@ -964,7 +964,7 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set) pMulticastAddrs->ulMulticastAddrCnt); pAdapter->mc_addr_list.isFilterApplied = set ? true : false; - cdf_mem_free(pMulticastAddrs); + qdf_mem_free(pMulticastAddrs); return; } #endif diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index b965b7a7a5ec..be7d6df53f9a 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -112,7 +112,7 @@ static int hdd_add_iw_stream_event(int cmd, int length, char *data, struct iw_event event; *last_event = *current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); event.cmd = cmd; event.u.data.flags = 1; event.u.data.length = length; @@ -219,12 +219,12 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, error = 0; last_event = current_event; - cdf_mem_zero(&event, sizeof(event)); + qdf_mem_zero(&event, sizeof(event)); /* BSSID */ event.cmd = SIOCGIWAP; event.u.ap_addr.sa_family = ARPHRD_ETHER; - cdf_mem_copy(event.u.ap_addr.sa_data, descriptor->bssId, + qdf_mem_copy(event.u.ap_addr.sa_data, descriptor->bssId, sizeof(descriptor->bssId)); current_event = iwe_stream_add_event(scanInfo->info, current_event, end, &event, IW_EV_ADDR_LEN); @@ -237,7 +237,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, } last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); /* Protocol Name */ event.cmd = SIOCGIWNAME; @@ -273,7 +273,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, } last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); /*Freq */ event.cmd = SIOCGIWFREQ; @@ -291,7 +291,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, } last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); /* BSS Mode */ event.cmd = SIOCGIWMODE; @@ -341,7 +341,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, if (pDot11SSID->present) { last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); event.cmd = SIOCGIWESSID; event.u.data.flags = 1; @@ -369,7 +369,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, last_event = current_event; current_pad = current_event + IW_EV_LCP_LEN; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); /*Rates */ event.cmd = SIOCGIWRATE; @@ -444,7 +444,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, } last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); event.cmd = SIOCGIWENCODE; @@ -467,7 +467,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, } last_event = current_event; - cdf_mem_zero(&event, sizeof(struct iw_event)); + qdf_mem_zero(&event, sizeof(struct iw_event)); /* RSSI */ event.cmd = IWEVQUAL; @@ -526,7 +526,7 @@ static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter, QDF_STATUS status; ENTER(); - hdd_scan_req = cdf_mem_malloc(sizeof(*hdd_scan_req)); + hdd_scan_req = qdf_mem_malloc(sizeof(*hdd_scan_req)); if (NULL == hdd_scan_req) { hddLog(LOGP, FL("malloc failed for Scan req")); return -ENOMEM; @@ -545,7 +545,7 @@ static int wlan_hdd_scan_request_enqueue(hdd_adapter_t *adapter, if (QDF_STATUS_SUCCESS != status) { hdd_err("Failed to enqueue Scan Req"); - cdf_mem_free(hdd_scan_req); + qdf_mem_free(hdd_scan_req); return -EINVAL; } EXIT(); @@ -599,7 +599,7 @@ QDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx, *req = hdd_scan_req->scan_request; *source = hdd_scan_req->source; *timestamp = hdd_scan_req->timestamp; - cdf_mem_free(hdd_scan_req); + qdf_mem_free(hdd_scan_req); qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock); hdd_info("removed Scan id: %d, req = %p", scan_id, req); @@ -734,7 +734,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info, } } - cdf_mem_zero(&scanRequest, sizeof(scanRequest)); + qdf_mem_zero(&scanRequest, sizeof(scanRequest)); if (NULL != wrqu->data.pointer) { /* set scanType, active or passive */ @@ -746,7 +746,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info, } /* set bssid using sockaddr from iw_scan_req */ - cdf_mem_copy(scanRequest.bssid.bytes, + qdf_mem_copy(scanRequest.bssid.bytes, &scanReq->bssid.sa_data, QDF_MAC_ADDR_SIZE); @@ -756,11 +756,11 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info, scanRequest.SSIDs.numOfSSIDs = 1; scanRequest.SSIDs.SSIDList = (tCsrSSIDInfo *) - cdf_mem_malloc(sizeof(tCsrSSIDInfo)); + qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (scanRequest.SSIDs.SSIDList) { scanRequest.SSIDs.SSIDList->SSID. length = scanReq->essid_len; - cdf_mem_copy(scanRequest.SSIDs. + qdf_mem_copy(scanRequest.SSIDs. SSIDList->SSID.ssId, scanReq->essid, scanReq->essid_len); @@ -845,7 +845,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info, pAdapter->scan_info.mScanPending = true; error: if ((wrqu->data.flags & IW_SCAN_THIS_ESSID) && (scanReq->essid_len)) - cdf_mem_free(scanRequest.SSIDs.SSIDList); + qdf_mem_free(scanRequest.SSIDs.SSIDList); EXIT(); return status; } @@ -1014,7 +1014,7 @@ static void hdd_vendor_scan_callback(hdd_adapter_t *adapter, if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) { hdd_err("Invalid adapter magic"); - cdf_mem_free(req); + qdf_mem_free(req); return; } skb = cfg80211_vendor_event_alloc(hddctx->wiphy, NULL, @@ -1024,7 +1024,7 @@ static void hdd_vendor_scan_callback(hdd_adapter_t *adapter, if (!skb) { hdd_err("skb alloc failed"); - cdf_mem_free(req); + qdf_mem_free(req); return; } @@ -1069,12 +1069,12 @@ static void hdd_vendor_scan_callback(hdd_adapter_t *adapter, goto nla_put_failure; cfg80211_vendor_event(skb, GFP_KERNEL); - cdf_mem_free(req); + qdf_mem_free(req); return; nla_put_failure: kfree_skb(skb); - cdf_mem_free(req); + qdf_mem_free(req); return; } @@ -1346,7 +1346,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, return -EBUSY; } - cdf_mem_zero(&scan_req, sizeof(scan_req)); + qdf_mem_zero(&scan_req, sizeof(scan_req)); hddLog(LOG1, "scan request for ssid = %d", request->n_ssids); scan_req.timestamp = qdf_mc_timer_get_system_ticks(); @@ -1366,7 +1366,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, scan_req.SSIDs.numOfSSIDs = request->n_ssids; /* Allocate num_ssid tCsrSSIDInfo structure */ SsidInfo = scan_req.SSIDs.SSIDList = - cdf_mem_malloc(request->n_ssids * sizeof(tCsrSSIDInfo)); + qdf_mem_malloc(request->n_ssids * sizeof(tCsrSSIDInfo)); if (NULL == scan_req.SSIDs.SSIDList) { hddLog(LOGE, FL("memory alloc failed SSIDInfo buffer")); @@ -1377,7 +1377,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, for (j = 0; j < request->n_ssids; j++, SsidInfo++) { /* get the ssid length */ SsidInfo->SSID.length = request->ssids[j].ssid_len; - cdf_mem_copy(SsidInfo->SSID.ssId, + qdf_mem_copy(SsidInfo->SSID.ssId, &request->ssids[j].ssid[0], SsidInfo->SSID.length); SsidInfo->SSID.ssId[SsidInfo->SSID.length] = '\0'; @@ -1416,7 +1416,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, if (request->n_channels) { char chList[(request->n_channels * 5) + 1]; int len; - channelList = cdf_mem_malloc(request->n_channels); + channelList = qdf_mem_malloc(request->n_channels); if (NULL == channelList) { hddLog(LOGE, FL("channelList malloc failed channelList")); @@ -1573,10 +1573,10 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, free_mem: if (scan_req.SSIDs.SSIDList) - cdf_mem_free(scan_req.SSIDs.SSIDList); + qdf_mem_free(scan_req.SSIDs.SSIDList); if (channelList) - cdf_mem_free(channelList); + qdf_mem_free(channelList); EXIT(); return status; @@ -1759,7 +1759,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy, len = sizeof(*request) + (sizeof(*request->ssids) * n_ssid) + (sizeof(*request->channels) * n_channels) + ie_len; - request = cdf_mem_malloc(len); + request = qdf_mem_malloc(len); if (!request) goto error; if (n_ssid) @@ -1864,7 +1864,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy, return ret; error: hdd_err("Scan Request Failed"); - cdf_mem_free(request); + qdf_mem_free(request); return -EINVAL; } @@ -2084,9 +2084,9 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, return -ENOTSUPP; } - pPnoRequest = (tpSirPNOScanReq) cdf_mem_malloc(sizeof(tSirPNOScanReq)); + pPnoRequest = (tpSirPNOScanReq) qdf_mem_malloc(sizeof(tSirPNOScanReq)); if (NULL == pPnoRequest) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -2260,7 +2260,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, hddLog(LOG1, FL("PNO scanRequest offloaded")); error: - cdf_mem_free(pPnoRequest); + qdf_mem_free(pPnoRequest); EXIT(); return ret; } @@ -2345,9 +2345,9 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy, return -EINVAL; } - pPnoRequest = (tpSirPNOScanReq) cdf_mem_malloc(sizeof(tSirPNOScanReq)); + pPnoRequest = (tpSirPNOScanReq) qdf_mem_malloc(sizeof(tSirPNOScanReq)); if (NULL == pPnoRequest) { - hddLog(LOGE, FL("cdf_mem_malloc failed")); + hddLog(LOGE, FL("qdf_mem_malloc failed")); return -ENOMEM; } @@ -2368,7 +2368,7 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy, hddLog(LOG1, FL("PNO scan disabled")); - cdf_mem_free(pPnoRequest); + qdf_mem_free(pPnoRequest); EXIT(); return ret; diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 5404b3321eb0..a39a5dc33cd0 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -298,7 +298,7 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ++pAdapter->stats.tx_packets; /* Zero out skb's context buffer for the driver to use */ - cdf_mem_set(skb->cb, sizeof(skb->cb), 0); + qdf_mem_set(skb->cb, sizeof(skb->cb), 0); NBUF_CB_TX_PACKET_TRACK(skb) = NBUF_TX_PKT_DATA_TRACK; NBUF_UPDATE_TX_PKT_COUNT(skb, NBUF_TX_PKT_HDD); @@ -400,12 +400,12 @@ QDF_STATUS hdd_softap_init_tx_rx(hdd_adapter_t *pAdapter) uint8_t STAId = 0; - cdf_mem_zero(&pAdapter->stats, sizeof(struct net_device_stats)); + qdf_mem_zero(&pAdapter->stats, sizeof(struct net_device_stats)); spin_lock_init(&pAdapter->staInfo_lock); for (STAId = 0; STAId < WLAN_MAX_STA_COUNT; STAId++) { - cdf_mem_zero(&pAdapter->aStaInfo[STAId], + qdf_mem_zero(&pAdapter->aStaInfo[STAId], sizeof(hdd_station_info_t)); } @@ -446,7 +446,7 @@ QDF_STATUS hdd_softap_init_tx_rx_sta(hdd_adapter_t *pAdapter, uint8_t STAId, return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&pAdapter->aStaInfo[STAId], sizeof(hdd_station_info_t)); + qdf_mem_zero(&pAdapter->aStaInfo[STAId], sizeof(hdd_station_info_t)); pAdapter->aStaInfo[STAId].isUsed = true; pAdapter->aStaInfo[STAId].isDeauthInProgress = false; @@ -633,7 +633,7 @@ QDF_STATUS hdd_softap_deregister_sta(hdd_adapter_t *pAdapter, uint8_t staId) if (pAdapter->aStaInfo[staId].isUsed) { spin_lock_bh(&pAdapter->staInfo_lock); - cdf_mem_zero(&pAdapter->aStaInfo[staId], + qdf_mem_zero(&pAdapter->aStaInfo[staId], sizeof(hdd_station_info_t)); spin_unlock_bh(&pAdapter->staInfo_lock); } @@ -907,7 +907,7 @@ QDF_STATUS hdd_softap_get_sta_id(hdd_adapter_t *pAdapter, uint8_t i; for (i = 0; i < WLAN_MAX_STA_COUNT; i++) { - if (cdf_mem_compare + if (!qdf_mem_cmp (&pAdapter->aStaInfo[i].macAddrSTA, pMacAddress, QDF_MAC_ADDR_SIZE) && pAdapter->aStaInfo[i].isUsed) { *staId = i; diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 93333ba91d2b..0ae9540a7d59 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -587,7 +587,7 @@ static bool hdd_get_interface_info(hdd_adapter_t *pAdapter, pInfo->state = WIFI_ASSOCIATED; qdf_copy_macaddr(&pInfo->bssid, &pHddStaCtx->conn_info.bssId); - cdf_mem_copy(pInfo->ssid, + qdf_mem_copy(pInfo->ssid, pHddStaCtx->conn_info.SSID.SSID.ssId, pHddStaCtx->conn_info.SSID.SSID.length); /* @@ -597,10 +597,10 @@ static bool hdd_get_interface_info(hdd_adapter_t *pAdapter, } } - cdf_mem_copy(pInfo->countryStr, + qdf_mem_copy(pInfo->countryStr, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); - cdf_mem_copy(pInfo->apCountryStr, + qdf_mem_copy(pInfo->apCountryStr, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); return true; diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 67e0c26d70e9..326194305046 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -390,7 +390,7 @@ static void wlan_hdd_tdls_free_list(tdlsCtx_t *pHddTdlsCtx) list_for_each_safe(pos, q, head) { tmp = list_entry(pos, hddTdlsPeer_t, node); list_del(pos); - cdf_mem_free(tmp); + qdf_mem_free(tmp); tmp = NULL; } } @@ -496,7 +496,7 @@ static void wlan_hdd_tdls_del_non_forced_peers(tdlsCtx_t *hdd_tdls_ctx) peer = list_entry(pos, hddTdlsPeer_t, node); if (false == peer->isForcedPeer) { list_del(pos); - cdf_mem_free(peer); + qdf_mem_free(peer); } else { peer->link_status = eTDLS_LINK_IDLE; peer->reason = eTDLS_LINK_UNSPECIFIED; @@ -572,7 +572,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) * with the memory allocations. */ if (NULL == pAdapter->sessionCtx.station.pHddTdlsCtx) { - pHddTdlsCtx = cdf_mem_malloc(sizeof(tdlsCtx_t)); + pHddTdlsCtx = qdf_mem_malloc(sizeof(tdlsCtx_t)); if (NULL == pHddTdlsCtx) { pAdapter->sessionCtx.station.pHddTdlsCtx = NULL; @@ -581,7 +581,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) return -ENOMEM; } /* initialize TDLS pAdater context */ - cdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t)); + qdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t)); qdf_mc_timer_init(&pHddTdlsCtx->peerDiscoveryTimeoutTimer, QDF_TIMER_TYPE_SW, @@ -623,7 +623,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) for (staIdx = 0; staIdx < pHddCtx->max_num_tdls_sta; staIdx++) { pHddCtx->tdlsConnInfo[staIdx].staId = 0; pHddCtx->tdlsConnInfo[staIdx].sessionId = 255; - cdf_mem_zero(&pHddCtx->tdlsConnInfo[staIdx].peerMac, + qdf_mem_zero(&pHddCtx->tdlsConnInfo[staIdx].peerMac, QDF_MAC_ADDR_SIZE); } @@ -677,12 +677,12 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) * which would try to acquire sme lock. */ mutex_unlock(&pHddCtx->tdls_lock); - tInfo = cdf_mem_malloc(sizeof(tdlsInfo_t)); + tInfo = qdf_mem_malloc(sizeof(tdlsInfo_t)); if (NULL == tInfo) { hddLog(QDF_TRACE_LEVEL_ERROR, FL("cdf_mem_alloc failed for tInfo")); qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); - cdf_mem_free(pHddTdlsCtx); + qdf_mem_free(pHddTdlsCtx); return -ENOMEM; } @@ -724,9 +724,9 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, true); if (QDF_STATUS_SUCCESS != cdf_ret_status) { - cdf_mem_free(tInfo); + qdf_mem_free(tInfo); qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); - cdf_mem_free(pHddTdlsCtx); + qdf_mem_free(pHddTdlsCtx); return -EINVAL; } @@ -787,7 +787,7 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter) /* No need to post message during driver unlaod because MC thread is already shutdown */ if (!cds_is_driver_unloading()) { - tInfo = cdf_mem_malloc(sizeof(tdlsInfo_t)); + tInfo = qdf_mem_malloc(sizeof(tdlsInfo_t)); if (NULL != tInfo) { tInfo->vdev_id = pAdapter->sessionId; tInfo->tdls_state = eTDLS_SUPPORT_DISABLED; @@ -827,7 +827,7 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter) cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, false); if (QDF_STATUS_SUCCESS != cdf_ret_status) { - cdf_mem_free(tInfo); + qdf_mem_free(tInfo); } } else { hddLog(QDF_TRACE_LEVEL_ERROR, @@ -838,7 +838,7 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter) pHddTdlsCtx->magic = 0; pHddTdlsCtx->pAdapter = NULL; - cdf_mem_free(pHddTdlsCtx); + qdf_mem_free(pHddTdlsCtx); pAdapter->sessionCtx.station.pHddTdlsCtx = NULL; pHddTdlsCtx = NULL; @@ -897,7 +897,7 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac) } /* not found, allocate and add the list */ - peer = cdf_mem_malloc(sizeof(hddTdlsPeer_t)); + peer = qdf_mem_malloc(sizeof(hddTdlsPeer_t)); if (NULL == peer) { hddLog(QDF_TRACE_LEVEL_ERROR, "%s peer malloc failed!", __func__); @@ -909,7 +909,7 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac) pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter); if (NULL == pHddTdlsCtx) { - cdf_mem_free(peer); + qdf_mem_free(peer); mutex_unlock(&pHddCtx->tdls_lock); hddLog(LOG1, FL("pHddTdlsCtx is NULL")); return NULL; @@ -918,8 +918,8 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac) key = wlan_hdd_tdls_hash_key(mac); head = &pHddTdlsCtx->peer_list[key]; - cdf_mem_zero(peer, sizeof(hddTdlsPeer_t)); - cdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac)); + qdf_mem_zero(peer, sizeof(hddTdlsPeer_t)); + qdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac)); peer->pHddTdlsCtx = pHddTdlsCtx; peer->pref_off_chan_num = pHddCtx->config->fTDLSPrefOffChanNum; peer->op_class_for_pref_off_chan = @@ -1201,13 +1201,13 @@ int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter, curr_peer->isBufSta = isBufSta; curr_peer->isOffChannelSupported = isOffChannelSupported; - cdf_mem_copy(curr_peer->supported_channels, + qdf_mem_copy(curr_peer->supported_channels, StaParams->supported_channels, StaParams->supported_channels_len); curr_peer->supported_channels_len = StaParams->supported_channels_len; - cdf_mem_copy(curr_peer->supported_oper_classes, + qdf_mem_copy(curr_peer->supported_oper_classes, StaParams->supported_oper_classes, StaParams->supported_oper_classes_len); @@ -1245,14 +1245,14 @@ int wlan_hdd_tdls_get_link_establish_params(hdd_adapter_t *pAdapter, tdlsLinkEstablishParams->isOffChannelSupported = curr_peer->isOffChannelSupported; - cdf_mem_copy(tdlsLinkEstablishParams->supportedChannels, + qdf_mem_copy(tdlsLinkEstablishParams->supportedChannels, curr_peer->supported_channels, curr_peer->supported_channels_len); tdlsLinkEstablishParams->supportedChannelsLen = curr_peer->supported_channels_len; - cdf_mem_copy(tdlsLinkEstablishParams->supportedOperClasses, + qdf_mem_copy(tdlsLinkEstablishParams->supportedOperClasses, curr_peer->supported_oper_classes, curr_peer->supported_oper_classes_len); @@ -1628,7 +1628,7 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, wlan_hdd_tdls_set_mode(pHddCtx, req_tdls_mode, true); - tdlsParams = cdf_mem_malloc(sizeof(tdlsInfo_t)); + tdlsParams = qdf_mem_malloc(sizeof(tdlsInfo_t)); if (NULL == tdlsParams) { hddLog(QDF_TRACE_LEVEL_ERROR, "%s: cdf_mem_alloc failed for tdlsParams", __func__); @@ -1667,7 +1667,7 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tdlsParams, true); if (QDF_STATUS_SUCCESS != cdf_ret_status) { - cdf_mem_free(tdlsParams); + qdf_mem_free(tdlsParams); return -EINVAL; } @@ -1724,7 +1724,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, hdd_ctx->tdls_mode = eTDLS_SUPPORT_ENABLED; } mutex_unlock(&hdd_ctx->tdls_lock); - tdls_param = cdf_mem_malloc(sizeof(*tdls_param)); + tdls_param = qdf_mem_malloc(sizeof(*tdls_param)); if (!tdls_param) { hddLog(QDF_TRACE_LEVEL_ERROR, FL("memory allocation failed for tdlsParams")); @@ -1778,7 +1778,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, tdls_param, true); if (QDF_STATUS_SUCCESS != cdf_ret_status) { - cdf_mem_free(tdls_param); + qdf_mem_free(tdls_param); return; } return; @@ -1859,7 +1859,7 @@ int wlan_hdd_tdls_update_peer_mac(hdd_adapter_t *adapter, const uint8_t *mac, hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); sme_tdls_peer_state_params.vdevId = adapter->sessionId; - cdf_mem_copy(&sme_tdls_peer_state_params.peerMacAddr, mac, + qdf_mem_copy(&sme_tdls_peer_state_params.peerMacAddr, mac, sizeof(sme_tdls_peer_state_params.peerMacAddr)); sme_tdls_peer_state_params.peerState = peer_state; status = sme_update_tdls_peer_state(hdd_ctx->hHal, @@ -2436,7 +2436,7 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work) goto done; } - cdf_mem_copy(&peer_mac, curr_peer->peerMac, sizeof(peer_mac)); + qdf_mem_copy(&peer_mac, curr_peer->peerMac, sizeof(peer_mac)); mutex_unlock(&pHddCtx->tdls_lock); @@ -3801,7 +3801,7 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, } } } - cdf_mem_copy(peerMac, peer, 6); + qdf_mem_copy(peerMac, peer, 6); hddLog(LOG1, "%s: " MAC_ADDRESS_STR @@ -4272,13 +4272,13 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS == status) { uint8_t i; - cdf_mem_zero(&smeTdlsPeerStateParams, + qdf_mem_zero(&smeTdlsPeerStateParams, sizeof (tSmeTdlsPeerStateParams)); smeTdlsPeerStateParams.vdevId = pAdapter->sessionId; - cdf_mem_copy(&smeTdlsPeerStateParams. + qdf_mem_copy(&smeTdlsPeerStateParams. peerMacAddr, &pTdlsPeer->peerMac, sizeof(tSirMacAddr)); @@ -4818,7 +4818,7 @@ int hdd_set_tdls_offchannelmode(hdd_adapter_t *adapter, int offchanmode) chan_switch_params.tdls_off_ch_mode = offchanmode; chan_switch_params.is_responder = conn_peer->is_responder; - cdf_mem_copy(&chan_switch_params.peer_mac_addr, + qdf_mem_copy(&chan_switch_params.peer_mac_addr, &conn_peer->peerMac, sizeof(tSirMacAddr)); hdd_log(LOG1, diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 749ebddee640..d176b819d0b7 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -475,7 +475,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ++pAdapter->stats.tx_packets; /* Zero out skb's context buffer for the driver to use */ - cdf_mem_set(skb->cb, sizeof(skb->cb), 0); + qdf_mem_set(skb->cb, sizeof(skb->cb), 0); NBUF_CB_TX_PACKET_TRACK(skb) = NBUF_TX_PKT_DATA_TRACK; NBUF_UPDATE_TX_PKT_COUNT(skb, NBUF_TX_PKT_HDD); @@ -531,7 +531,7 @@ QDF_STATUS hdd_ibss_get_sta_id(hdd_station_ctx_t *pHddStaCtx, uint8_t idx; for (idx = 0; idx < MAX_IBSS_PEERS; idx++) { - if (cdf_mem_compare(&pHddStaCtx->conn_info.peerMacAddress[idx], + if (!qdf_mem_cmp(&pHddStaCtx->conn_info.peerMacAddress[idx], pMacAddress, QDF_MAC_ADDR_SIZE)) { *staId = pHddStaCtx->conn_info.staId[idx]; return QDF_STATUS_SUCCESS; @@ -802,10 +802,10 @@ static int wlan_hdd_get_eapol_params(struct sk_buff *skb, eapol_params->event_sub_type = event_type; eapol_params->eapol_rate = 0;/* As of now, zero */ - cdf_mem_copy(eapol_params->dest_addr, + qdf_mem_copy(eapol_params->dest_addr, (skb->data + HDD_EAPOL_DEST_MAC_OFFSET), sizeof(eapol_params->dest_addr)); - cdf_mem_copy(eapol_params->src_addr, + qdf_mem_copy(eapol_params->src_addr, (skb->data + HDD_EAPOL_SRC_MAC_OFFSET), sizeof(eapol_params->src_addr)); return 0; @@ -828,10 +828,10 @@ static void wlan_hdd_event_eapol_log(struct host_event_wlan_eapol eapol_params) wlan_diag_event.eapol_packet_type = eapol_params.eapol_packet_type; wlan_diag_event.eapol_key_info = eapol_params.eapol_key_info; wlan_diag_event.eapol_rate = eapol_params.eapol_rate; - cdf_mem_copy(wlan_diag_event.dest_addr, + qdf_mem_copy(wlan_diag_event.dest_addr, eapol_params.dest_addr, sizeof(wlan_diag_event.dest_addr)); - cdf_mem_copy(wlan_diag_event.src_addr, + qdf_mem_copy(wlan_diag_event.src_addr, eapol_params.src_addr, sizeof(wlan_diag_event.src_addr)); diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index b91a1f354bce..daa2cb4ecd50 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -1340,7 +1340,7 @@ QDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, hddLog(QDF_TRACE_LEVEL_ERROR, "%s: pAdapter is NULL", __func__); return QDF_STATUS_E_FAULT; } - linkspeed_req = cdf_mem_malloc(sizeof(*linkspeed_req)); + linkspeed_req = qdf_mem_malloc(sizeof(*linkspeed_req)); if (NULL == linkspeed_req) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s Request Buffer Alloc Fail", __func__); @@ -1358,7 +1358,7 @@ QDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, hddLog(QDF_TRACE_LEVEL_ERROR, "%s: Unable to retrieve statistics for link speed", __func__); - cdf_mem_free(linkspeed_req); + qdf_mem_free(linkspeed_req); } else { rc = wait_for_completion_timeout (&context.completion, @@ -1471,17 +1471,17 @@ void hdd_statistics_cb(void *pStats, void *pContext) /* copy the stats into the cache we keep in the * adapter instance structure */ - cdf_mem_copy(&pStatsCache->summary_stat, pSummaryStats, + qdf_mem_copy(&pStatsCache->summary_stat, pSummaryStats, sizeof(pStatsCache->summary_stat)); - cdf_mem_copy(&pStatsCache->ClassA_stat, pClassAStats, + qdf_mem_copy(&pStatsCache->ClassA_stat, pClassAStats, sizeof(pStatsCache->ClassA_stat)); - cdf_mem_copy(&pStatsCache->ClassB_stat, pClassBStats, + qdf_mem_copy(&pStatsCache->ClassB_stat, pClassBStats, sizeof(pStatsCache->ClassB_stat)); - cdf_mem_copy(&pStatsCache->ClassC_stat, pClassCStats, + qdf_mem_copy(&pStatsCache->ClassC_stat, pClassCStats, sizeof(pStatsCache->ClassC_stat)); - cdf_mem_copy(&pStatsCache->ClassD_stat, pClassDStats, + qdf_mem_copy(&pStatsCache->ClassD_stat, pClassDStats, sizeof(pStatsCache->ClassD_stat)); - cdf_mem_copy(&pStatsCache->perStaStats, pPerStaStats, + qdf_mem_copy(&pStatsCache->perStaStats, pPerStaStats, sizeof(pStatsCache->perStaStats)); } @@ -2645,7 +2645,7 @@ static int __iw_get_genie(struct net_device *dev, __func__); return -EFAULT; } - cdf_mem_copy(extra, (void *)genIeBytes, length); + qdf_mem_copy(extra, (void *)genIeBytes, length); wrqu->data.length = length; hddLog(LOG1, "%s: RSN IE of %d bytes returned", __func__, @@ -2717,7 +2717,7 @@ static int __iw_get_encode(struct net_device *dev, if (pRoamProfile->Keys.KeyLength[keyId] > 0) { dwrq->flags |= IW_ENCODE_ENABLED; dwrq->length = pRoamProfile->Keys.KeyLength[keyId]; - cdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]), + qdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]), pRoamProfile->Keys.KeyLength[keyId]); dwrq->flags |= (keyId + 1); @@ -3884,7 +3884,7 @@ static int __iw_set_encode(struct net_device *dev, struct iw_request_info *info, || (eCSR_AUTH_TYPE_SHARED_KEY == pHddStaCtx->conn_info.authType))) { - cdf_mem_copy(&pWextState->roamProfile.Keys. + qdf_mem_copy(&pWextState->roamProfile.Keys. KeyMaterial[keyId][0], extra, key_length); pWextState->roamProfile.Keys.KeyLength[keyId] = @@ -3959,7 +3959,7 @@ static int __iw_get_encodeext(struct net_device *dev, if (pRoamProfile->Keys.KeyLength[keyId] > 0) { dwrq->flags |= IW_ENCODE_ENABLED; dwrq->length = pRoamProfile->Keys.KeyLength[keyId]; - cdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]), + qdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]), pRoamProfile->Keys.KeyLength[keyId]); } else { dwrq->flags |= IW_ENCODE_DISABLED; @@ -4080,7 +4080,7 @@ static int __iw_set_encodeext(struct net_device *dev, && (ext->key_len <= eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES) && key_index < CSR_MAX_NUM_KEY) { - cdf_mem_copy(&pRoamProfile->Keys. + qdf_mem_copy(&pRoamProfile->Keys. KeyMaterial[key_index][0], ext->key, ext->key_len); pRoamProfile->Keys.KeyLength[key_index] = @@ -4095,13 +4095,13 @@ static int __iw_set_encodeext(struct net_device *dev, return ret; } - cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); + qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; setKey.keyLength = ext->key_len; if (ext->key_len <= CSR_MAX_KEY_LEN) { - cdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len); + qdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len); } if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) { @@ -4111,7 +4111,7 @@ static int __iw_set_encodeext(struct net_device *dev, } else { setKey.keyDirection = eSIR_TX_RX; - cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, + qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data, QDF_MAC_ADDR_SIZE); } @@ -4135,7 +4135,7 @@ static int __iw_set_encodeext(struct net_device *dev, setKey.encType = eCSR_ENCRYPT_TYPE_TKIP; - cdf_mem_zero(pKey, CSR_MAX_KEY_LEN); + qdf_mem_zero(pKey, CSR_MAX_KEY_LEN); /* Supplicant sends the 32bytes key in this order * |--------------|----------|----------| @@ -4152,13 +4152,13 @@ static int __iw_set_encodeext(struct net_device *dev, */ /* Copy the Temporal Key 1 (TK1) */ - cdf_mem_copy(pKey, ext->key, 16); + qdf_mem_copy(pKey, ext->key, 16); /* Copy the rx mic first */ - cdf_mem_copy(&pKey[16], &ext->key[24], 8); + qdf_mem_copy(&pKey[16], &ext->key[24], 8); /* Copy the tx mic */ - cdf_mem_copy(&pKey[24], &ext->key[16], 8); + qdf_mem_copy(&pKey[24], &ext->key[16], 8); } break; @@ -6247,7 +6247,7 @@ static int __iw_setchar_getnone(struct net_device *dev, neighborReq.ssid.length = (s_priv_data.length - 1) > 32 ? 32 : (s_priv_data.length - 1); - cdf_mem_copy(neighborReq.ssid.ssId, + qdf_mem_copy(neighborReq.ssid.ssId, pBuffer, neighborReq.ssid.length); } @@ -7903,7 +7903,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev, apps_args[1]); return -EINVAL; } - unitTestArgs = cdf_mem_malloc(sizeof(*unitTestArgs)); + unitTestArgs = qdf_mem_malloc(sizeof(*unitTestArgs)); if (NULL == unitTestArgs) { hddLog(LOGE, FL("cdf_mem_alloc failed for unitTestArgs")); @@ -7920,7 +7920,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev, msg.bodyptr = unitTestArgs; if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { - cdf_mem_free(unitTestArgs); + qdf_mem_free(unitTestArgs); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, FL diff --git a/core/hdd/src/wlan_hdd_wowl.c b/core/hdd/src/wlan_hdd_wowl.c index 9f516fd8aa71..209e7fcfa345 100644 --- a/core/hdd/src/wlan_hdd_wowl.c +++ b/core/hdd/src/wlan_hdd_wowl.c @@ -516,7 +516,7 @@ bool hdd_enter_wowl(hdd_adapter_t *pAdapter, bool enable_mp, bool enable_pbm) QDF_STATUS cdf_ret_status; tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter); - cdf_mem_zero(&wowParams, sizeof(tSirSmeWowlEnterParams)); + qdf_mem_zero(&wowParams, sizeof(tSirSmeWowlEnterParams)); wowParams.ucPatternFilteringEnable = enable_pbm; wowParams.ucMagicPktEnable = enable_mp; diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c index e5578431e907..1a62f21962ca 100644 --- a/core/mac/src/cfg/cfg_api.c +++ b/core/mac/src/cfg/cfg_api.c @@ -150,7 +150,7 @@ tSirRetStatus cfg_init(tpAniSirGlobal pMac) return eSIR_MEM_ALLOC_FAILED; } /* at this point pMac->cfg.gCfgSBuf starts */ - pMac->cfg.gCfgSBuf = cdf_mem_malloc(combined_buff_size); + pMac->cfg.gCfgSBuf = qdf_mem_malloc(combined_buff_size); if (NULL == pMac->cfg.gCfgSBuf) { cfg_log(pMac, LOGE, FL("Failed to allocate memory for cfg array")); @@ -163,13 +163,13 @@ tSirRetStatus cfg_init(tpAniSirGlobal pMac) /* after max_i_count integers, pMac->cfg.gCfgIBufMax starts */ pMac->cfg.gCfgIBufMax = &pMac->cfg.gCfgIBufMin[max_i_count]; - return (eSIR_SUCCESS); + return eSIR_SUCCESS; } /* ---------------------------------------------------------------------- */ void cfg_de_init(tpAniSirGlobal pMac) { - cdf_mem_free(pMac->cfg.gCfgSBuf); + qdf_mem_free(pMac->cfg.gCfgSBuf); pMac->cfg.gCfgIBufMin = NULL; pMac->cfg.gCfgIBufMax = NULL; pMac->cfg.gCfgIBuf = NULL; @@ -599,7 +599,7 @@ cfg_get_dot11d_transmit_power(tpAniSirGlobal pMac, uint16_t cfgId, goto error; } - pCountryInfo = cdf_mem_malloc(cfgLength); + pCountryInfo = qdf_mem_malloc(cfgLength); if (NULL == pCountryInfo) { cfg_log(pMac, LOGP, FL(" failed to allocate memory")); goto error; @@ -609,7 +609,7 @@ cfg_get_dot11d_transmit_power(tpAniSirGlobal pMac, uint16_t cfgId, */ if (wlan_cfg_get_str(pMac, cfgId, pCountryInfo, &cfgLength) != eSIR_SUCCESS) { - cdf_mem_free(pCountryInfo); + qdf_mem_free(pCountryInfo); pCountryInfo = NULL; cfg_log(pMac, LOGP, @@ -633,7 +633,7 @@ cfg_get_dot11d_transmit_power(tpAniSirGlobal pMac, uint16_t cfgId, error: if (NULL != pCountryInfo) - cdf_mem_free(pCountryInfo); + qdf_mem_free(pCountryInfo); return maxTxPwr; } @@ -694,7 +694,7 @@ int8_t cfg_get_regulatory_max_transmit_power(tpAniSirGlobal pMac, maxTxPwr = cfg_get_dot11d_transmit_power(pMac, cfgId, cfgLength, channel); - return (maxTxPwr); + return maxTxPwr; } /* --------------------------------------------------------------------- */ diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index ebc8506be4e4..4c9969b84ef3 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/core/mac/src/cfg/cfg_proc_msg.c @@ -1822,7 +1822,7 @@ void cfg_process_mb_msg(tpAniSirGlobal pMac, tSirMbMsg *pMsg) index = CFG_GET_FUNC_INDX(pMsg->type); if (index >= QDF_ARRAY_SIZE(g_cfg_func)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return; } len = pMsg->msgLen - WNI_CFG_MB_HDR_LEN; @@ -1832,7 +1832,7 @@ void cfg_process_mb_msg(tpAniSirGlobal pMac, tSirMbMsg *pMsg) g_cfg_func[index] (pMac, len, pParam); /* Free up buffer */ - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); } /*** end cfg_process_mb_msg() ***/ diff --git a/core/mac/src/cfg/cfg_send_msg.c b/core/mac/src/cfg/cfg_send_msg.c index ebad7c739f7b..a50652c063db 100644 --- a/core/mac/src/cfg/cfg_send_msg.c +++ b/core/mac/src/cfg/cfg_send_msg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012, 2014-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -92,7 +92,7 @@ cfg_send_host_msg(tpAniSirGlobal pMac, uint16_t msgType, uint32_t msgLen, return; } /* Allocate message buffer */ - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) { PELOGE(cfg_log(pMac, LOGE, FL("Memory allocation failure!"));) return; @@ -129,7 +129,7 @@ cfg_send_host_msg(tpAniSirGlobal pMac, uint16_t msgType, uint32_t msgLen, default: PELOGE(cfg_log(pMac, LOGE, FL("Unknown msg %d!"), (int)msgType);) - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return; } diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c index e1bbe39f63ce..0e592d18a774 100644 --- a/core/mac/src/dph/dph_hash_table.c +++ b/core/mac/src/dph/dph_hash_table.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -104,7 +104,7 @@ uint16_t hash_function(tpAniSirGlobal pMac, uint8_t staAddr[], uint16_t numSta) for (i = 0; i < 6; i++) sum += staAddr[i]; - return (sum % numSta); + return sum % numSta; } /* --------------------------------------------------------------------- */ @@ -250,7 +250,7 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal pMac, tSirMacAddr staAddr, (pMac, LOG1, FL("Assoc Id %d, Addr %08X"), assocId, pStaDs); ) /* Clear the STA node except for the next pointer (last 4 bytes) */ - cdf_mem_set((uint8_t *) pStaDs, + qdf_mem_set((uint8_t *) pStaDs, sizeof(tDphHashNode) - sizeof(tpDphHashNode), 0); /* Initialize the assocId */ @@ -261,7 +261,7 @@ tpDphHashNode dph_init_sta_state(tpAniSirGlobal pMac, tSirMacAddr staAddr, pStaDs->staIndex = STA_INVALID_IDX; /* Initialize STA mac address */ - cdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr)); /* Initialize fragmentation threshold */ if (wlan_cfg_get_int(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, &val) != diff --git a/core/mac/src/pe/lim/lim_admit_control.c b/core/mac/src/pe/lim/lim_admit_control.c index 7dd6fca75246..a0644c3938c0 100644 --- a/core/mac/src/pe/lim/lim_admit_control.c +++ b/core/mac/src/pe/lim/lim_admit_control.c @@ -433,10 +433,10 @@ lim_tspec_find_by_sta_addr(tpAniSirGlobal pMac, for (ctspec = 0; ctspec < LIM_NUM_TSPEC_MAX; ctspec++, pTspecList++) { if ((pTspecList->inuse) && - (cdf_mem_compare + (!qdf_mem_cmp (pAddr, pTspecList->staAddr, sizeof(pTspecList->staAddr))) && - (cdf_mem_compare + (!qdf_mem_cmp ((uint8_t *) pTspecIE, (uint8_t *) &pTspecList->tspec, sizeof(tSirMacTspecIE)))) { *ppInfo = pTspecList; @@ -479,7 +479,7 @@ lim_tspec_find_by_assoc_id(tpAniSirGlobal pMac, if ((pTspecList->inuse) && (assocId == pTspecList->assocId) && - (cdf_mem_compare + (!qdf_mem_cmp ((uint8_t *) pTspecIE, (uint8_t *) &pTspecList->tspec, sizeof(tSirMacTspecIE)))) { *ppInfo = pTspecList; @@ -597,7 +597,7 @@ tSirRetStatus lim_tspec_add(tpAniSirGlobal pMac, /* update the tspec info */ pTspecList->tspec = *pTspec; pTspecList->assocId = assocId; - cdf_mem_copy(pTspecList->staAddr, pAddr, sizeof(pTspecList->staAddr)); + qdf_mem_copy(pTspecList->staAddr, pAddr, sizeof(pTspecList->staAddr)); /* for edca tspec's, we are all done */ if (pTspec->tsinfo.traffic.accessPolicy == SIR_MAC_ACCESSPOLICY_EDCA) { @@ -747,7 +747,7 @@ tSirRetStatus lim_admit_control_add_ts(tpAniSirGlobal pMac, uint8_t *pAddr, } /* fill in a schedule if requested */ if (pSch != NULL) { - cdf_mem_set((uint8_t *) pSch, sizeof(*pSch), 0); + qdf_mem_set((uint8_t *) pSch, sizeof(*pSch), 0); pSch->svcStartTime = pAddts->tspec.svcStartTime; pSch->svcInterval = svcInterval; pSch->maxSvcDuration = (uint16_t) pSch->svcInterval; /* use SP = SI */ @@ -854,7 +854,7 @@ tSirRetStatus lim_admit_control_delete_sta(tpAniSirGlobal pMac, uint16_t assocId -------------------------------------------------------------*/ tSirRetStatus lim_admit_control_init(tpAniSirGlobal pMac) { - cdf_mem_set(pMac->lim.tspecInfo, + qdf_mem_set(pMac->lim.tspecInfo, LIM_NUM_TSPEC_MAX * sizeof(tLimTspecInfo), 0); return eSIR_SUCCESS; } @@ -925,16 +925,16 @@ lim_send_hal_msg_add_ts(tpAniSirGlobal pMac, return eSIR_FAILURE; } - pAddTsParam = cdf_mem_malloc(sizeof(tAddTsParams)); + pAddTsParam = qdf_mem_malloc(sizeof(tAddTsParams)); if (NULL == pAddTsParam) { PELOGW(lim_log(pMac, LOGW, FL("AllocateMemory() failed"));) return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0); + qdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0); pAddTsParam->staIdx = staIdx; pAddTsParam->tspecIdx = tspecIdx; - cdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE)); + qdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE)); pAddTsParam->sessionId = sessionId; pAddTsParam->sme_session_id = psessionEntry->smeSessionId; @@ -960,7 +960,7 @@ lim_send_hal_msg_add_ts(tpAniSirGlobal pMac, if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msg)) { lim_log(pMac, LOGW, FL("wma_post_ctrl_msg() failed")); SET_LIM_PROCESS_DEFD_MESGS(pMac, true); - cdf_mem_free(pAddTsParam); + qdf_mem_free(pAddTsParam); return eSIR_FAILURE; } return eSIR_SUCCESS; @@ -986,7 +986,7 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac, tpDelTsParams pDelTsParam; tpPESession psessionEntry = NULL; - pDelTsParam = cdf_mem_malloc(sizeof(tDelTsParams)); + pDelTsParam = qdf_mem_malloc(sizeof(tDelTsParams)); if (NULL == pDelTsParam) { lim_log(pMac, LOGP, FL("AllocateMemory() failed")); return eSIR_MEM_ALLOC_FAILED; @@ -995,12 +995,12 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac, msg.type = WMA_DEL_TS_REQ; msg.bodyptr = pDelTsParam; msg.bodyval = 0; - cdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0); + qdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0); /* filling message parameters. */ pDelTsParam->staIdx = staIdx; pDelTsParam->tspecIdx = tspecIdx; - cdf_mem_copy(&pDelTsParam->bssId, bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(&pDelTsParam->bssId, bssId, sizeof(tSirMacAddr)); psessionEntry = pe_find_session_by_session_id(pMac, sessionId); if (psessionEntry == NULL) { @@ -1019,7 +1019,7 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac, #ifdef WLAN_FEATURE_ROAM_OFFLOAD if (pMac->roam.configParam.isRoamOffloadEnabled && psessionEntry->is11Rconnection) { - cdf_mem_copy(&pDelTsParam->delTsInfo, &delts, + qdf_mem_copy(&pDelTsParam->delTsInfo, &delts, sizeof(tSirDeltsReqInfo)); pDelTsParam->setRICparams = 1; } @@ -1035,7 +1035,7 @@ lim_send_hal_msg_del_ts(tpAniSirGlobal pMac, return eSIR_SUCCESS; err: - cdf_mem_free(pDelTsParam); + qdf_mem_free(pDelTsParam); return eSIR_FAILURE; } @@ -1134,6 +1134,6 @@ void lim_process_hal_add_ts_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg) end: if (pAddTsRspMsg != NULL) - cdf_mem_free(pAddTsRspMsg); + qdf_mem_free(pAddTsRspMsg); return; } diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 4bdfe04f661f..4281255e75f1 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -94,15 +94,15 @@ static void __lim_init_scan_vars(tpAniSirGlobal pMac) pMac->lim.gLimRestoreCBNumScanInterval = LIM_RESTORE_CB_NUM_SCAN_INTERVAL_DEFAULT; pMac->lim.gLimRestoreCBCount = 0; - cdf_mem_set(pMac->lim.gLimLegacyBssidList, + qdf_mem_set(pMac->lim.gLimLegacyBssidList, sizeof(pMac->lim.gLimLegacyBssidList), 0); /* Fill in default values */ /* abort scan is used to abort an on-going scan */ pMac->lim.abortScan = 0; - cdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0); - cdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0); + qdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0); + qdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0); /* WLAN_SUSPEND_LINK Related */ pMac->lim.gpLimSuspendCallback = NULL; @@ -112,7 +112,7 @@ static void __lim_init_scan_vars(tpAniSirGlobal pMac) static void __lim_init_bss_vars(tpAniSirGlobal pMac) { - cdf_mem_set((void *)pMac->lim.gpSession, + qdf_mem_set((void *)pMac->lim.gpSession, sizeof(*pMac->lim.gpSession) * pMac->lim.maxBssId, 0); /* This is for testing purposes only, be default should always be off */ @@ -133,14 +133,14 @@ static void __lim_init_stats_vars(tpAniSirGlobal pMac) /* Heart-Beat interval value */ pMac->lim.gLimHeartBeatCount = 0; - cdf_mem_zero(pMac->lim.gLimHeartBeatApMac[0], + qdf_mem_zero(pMac->lim.gLimHeartBeatApMac[0], sizeof(tSirMacAddr)); - cdf_mem_zero(pMac->lim.gLimHeartBeatApMac[1], + qdf_mem_zero(pMac->lim.gLimHeartBeatApMac[1], sizeof(tSirMacAddr)); pMac->lim.gLimHeartBeatApMacIndex = 0; /* Statistics to keep track of no. beacons rcvd in heart beat interval */ - cdf_mem_set(pMac->lim.gLimHeartBeatBeaconStats, + qdf_mem_set(pMac->lim.gLimHeartBeatBeaconStats, sizeof(pMac->lim.gLimHeartBeatBeaconStats), 0); #ifdef WLAN_DEBUG @@ -151,7 +151,7 @@ static void __lim_init_stats_vars(tpAniSirGlobal pMac) pMac->lim.numLearn = 0; pMac->lim.numLearnIgnore = 0; pMac->lim.numSme = 0; - cdf_mem_set(pMac->lim.numMAC, sizeof(pMac->lim.numMAC), 0); + qdf_mem_set(pMac->lim.numMAC, sizeof(pMac->lim.numMAC), 0); pMac->lim.gLimNumAssocReqDropInvldState = 0; pMac->lim.gLimNumAssocReqDropACRejectTS = 0; pMac->lim.gLimNumAssocReqDropACRejectSta = 0; @@ -195,22 +195,22 @@ static void __lim_init_states(tpAniSirGlobal pMac) * when SME_START_BSS_REQ is received. */ - cdf_mem_set(&pMac->lim.gLimOverlap11gParams, sizeof(tLimProtStaParams), + qdf_mem_set(&pMac->lim.gLimOverlap11gParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set(&pMac->lim.gLimOverlap11aParams, sizeof(tLimProtStaParams), + qdf_mem_set(&pMac->lim.gLimOverlap11aParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set(&pMac->lim.gLimOverlapHt20Params, sizeof(tLimProtStaParams), + qdf_mem_set(&pMac->lim.gLimOverlapHt20Params, sizeof(tLimProtStaParams), 0); - cdf_mem_set(&pMac->lim.gLimOverlapNonGfParams, + qdf_mem_set(&pMac->lim.gLimOverlapNonGfParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set(&pMac->lim.gLimNoShortParams, sizeof(tLimNoShortParams), 0); - cdf_mem_set(&pMac->lim.gLimNoShortSlotParams, + qdf_mem_set(&pMac->lim.gLimNoShortParams, sizeof(tLimNoShortParams), 0); + qdf_mem_set(&pMac->lim.gLimNoShortSlotParams, sizeof(tLimNoShortSlotParams), 0); pMac->lim.gLimPhyMode = 0; pMac->lim.scanStartTime = 0; /* used to measure scan time */ - cdf_mem_set(pMac->lim.gLimMyMacAddr, sizeof(pMac->lim.gLimMyMacAddr), + qdf_mem_set(pMac->lim.gLimMyMacAddr, sizeof(pMac->lim.gLimMyMacAddr), 0); pMac->lim.ackPolicy = 0; @@ -223,15 +223,15 @@ static void __lim_init_vars(tpAniSirGlobal pMac) /* Deferred Queue Paramters */ - cdf_mem_set(&pMac->lim.gLimDeferredMsgQ, sizeof(tSirAddtsReq), 0); + qdf_mem_set(&pMac->lim.gLimDeferredMsgQ, sizeof(tSirAddtsReq), 0); /* addts request if any - only one can be outstanding at any time */ - cdf_mem_set(&pMac->lim.gLimAddtsReq, sizeof(tSirAddtsReq), 0); + qdf_mem_set(&pMac->lim.gLimAddtsReq, sizeof(tSirAddtsReq), 0); pMac->lim.gLimAddtsSent = 0; pMac->lim.gLimAddtsRspTimerCount = 0; /* protection related config cache */ - cdf_mem_set(&pMac->lim.cfgProtection, sizeof(tCfgProtection), 0); + qdf_mem_set(&pMac->lim.cfgProtection, sizeof(tCfgProtection), 0); pMac->lim.gLimProtectionControl = 0; SET_LIM_PROCESS_DEFD_MESGS(pMac, true); @@ -247,11 +247,11 @@ static void __lim_init_vars(tpAniSirGlobal pMac) pMac->lim.pDialogueTokenHead = NULL; pMac->lim.pDialogueTokenTail = NULL; - cdf_mem_set(&pMac->lim.tspecInfo, + qdf_mem_set(&pMac->lim.tspecInfo, sizeof(tLimTspecInfo) * LIM_NUM_TSPEC_MAX, 0); /* admission control policy information */ - cdf_mem_set(&pMac->lim.admitPolicyInfo, sizeof(tLimAdmitPolicyInfo), 0); + qdf_mem_set(&pMac->lim.admitPolicyInfo, sizeof(tLimAdmitPolicyInfo), 0); pMac->lim.gLastBeaconDtimCount = 0; pMac->lim.gLastBeaconDtimPeriod = 0; @@ -279,9 +279,9 @@ static void __lim_init_assoc_vars(tpAniSirGlobal pMac) /* / MAC level Pre-authentication related globals */ pMac->lim.gLimPreAuthChannelNumber = 0; pMac->lim.gLimPreAuthType = eSIR_OPEN_SYSTEM; - cdf_mem_set(&pMac->lim.gLimPreAuthPeerAddr, sizeof(tSirMacAddr), 0); + qdf_mem_set(&pMac->lim.gLimPreAuthPeerAddr, sizeof(tSirMacAddr), 0); pMac->lim.gLimNumPreAuthContexts = 0; - cdf_mem_set(&pMac->lim.gLimPreAuthTimerTable, sizeof(tLimPreAuthTable), + qdf_mem_set(&pMac->lim.gLimPreAuthTimerTable, sizeof(tLimPreAuthTable), 0); /* Placed holder to deauth reason */ @@ -296,9 +296,9 @@ static void __lim_init_assoc_vars(tpAniSirGlobal pMac) pMac->lim.gLimDisassocFrameCredit = 0; /* One cache for each overlap and associated case. */ - cdf_mem_set(pMac->lim.protStaOverlapCache, + qdf_mem_set(pMac->lim.protStaOverlapCache, sizeof(tCacheParams) * LIM_PROT_STA_OVERLAP_CACHE_SIZE, 0); - cdf_mem_set(pMac->lim.protStaCache, + qdf_mem_set(pMac->lim.protStaCache, sizeof(tCacheParams) * LIM_PROT_STA_CACHE_SIZE, 0); pMac->lim.pSessionEntry = NULL; @@ -663,7 +663,7 @@ void lim_cleanup(tpAniSirGlobal pMac) QDF_STATUS_SUCCESS) { QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_INFO, FL("Fixing leak! Deallocating pLimMgmtRegistration node")); - cdf_mem_free(pLimMgmtRegistration); + qdf_mem_free(pLimMgmtRegistration); } qdf_mutex_release(&pMac->lim.lim_frame_register_lock); qdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue); @@ -673,7 +673,7 @@ void lim_cleanup(tpAniSirGlobal pMac) /* free up preAuth table */ if (pMac->lim.gLimPreAuthTimerTable.pTable != NULL) { - cdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable); + qdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable); pMac->lim.gLimPreAuthTimerTable.pTable = NULL; pMac->lim.gLimPreAuthTimerTable.numEntry = 0; } @@ -683,27 +683,27 @@ void lim_cleanup(tpAniSirGlobal pMac) } if (NULL != pMac->lim.pDialogueTokenTail) { - cdf_mem_free(pMac->lim.pDialogueTokenTail); + qdf_mem_free(pMac->lim.pDialogueTokenTail); pMac->lim.pDialogueTokenTail = NULL; } if (pMac->lim.gpLimMlmSetKeysReq != NULL) { - cdf_mem_free(pMac->lim.gpLimMlmSetKeysReq); + qdf_mem_free(pMac->lim.gpLimMlmSetKeysReq); pMac->lim.gpLimMlmSetKeysReq = NULL; } if (pMac->lim.gpLimMlmAuthReq != NULL) { - cdf_mem_free(pMac->lim.gpLimMlmAuthReq); + qdf_mem_free(pMac->lim.gpLimMlmAuthReq); pMac->lim.gpLimMlmAuthReq = NULL; } if (pMac->lim.gpDefdSmeMsgForNOA != NULL) { - cdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA); + qdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA); pMac->lim.gpDefdSmeMsgForNOA = NULL; } if (pMac->lim.gpLimMlmScanReq != NULL) { - cdf_mem_free(pMac->lim.gpLimMlmScanReq); + qdf_mem_free(pMac->lim.gpLimMlmScanReq); pMac->lim.gpLimMlmScanReq = NULL; } /* Now, finally reset the deferred message queue pointers */ @@ -744,7 +744,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam) } pMac->lim.limTimers.gpLimCnfWaitTimer = - cdf_mem_malloc(sizeof(TX_TIMER) * (pMac->lim.maxStation + 1)); + qdf_mem_malloc(sizeof(TX_TIMER) * (pMac->lim.maxStation + 1)); if (NULL == pMac->lim.limTimers.gpLimCnfWaitTimer) { PELOGE(lim_log(pMac, LOGE, FL("gpLimCnfWaitTimer memory allocate failed!"));) @@ -752,7 +752,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam) } pMac->lim.gpSession = - cdf_mem_malloc(sizeof(tPESession) * pMac->lim.maxBssId); + qdf_mem_malloc(sizeof(tPESession) * pMac->lim.maxBssId); if (NULL == pMac->lim.gpSession) { lim_log(pMac, LOGE, FL("gpSession memory allocate failed!")); @@ -760,7 +760,7 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam) goto pe_open_psession_fail; } - cdf_mem_set(pMac->lim.gpSession, + qdf_mem_set(pMac->lim.gpSession, sizeof(tPESession) * pMac->lim.maxBssId, 0); pMac->lim.mgmtFrameSessionId = 0xff; @@ -786,10 +786,10 @@ tSirRetStatus pe_open(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam) return status; /* status here will be eSIR_SUCCESS */ pe_open_lock_fail: - cdf_mem_free(pMac->lim.gpSession); + qdf_mem_free(pMac->lim.gpSession); pMac->lim.gpSession = NULL; pe_open_psession_fail: - cdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer); + qdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer); pMac->lim.limTimers.gpLimCnfWaitTimer = NULL; return status; @@ -814,20 +814,20 @@ tSirRetStatus pe_close(tpAniSirGlobal pMac) pe_delete_session(pMac, &pMac->lim.gpSession[i]); } } - cdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer); + qdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer); pMac->lim.limTimers.gpLimCnfWaitTimer = NULL; if (pMac->lim.gpLimMlmOemDataReq) { if (pMac->lim.gpLimMlmOemDataReq->data) { - cdf_mem_free( + qdf_mem_free( pMac->lim.gpLimMlmOemDataReq->data); pMac->lim.gpLimMlmOemDataReq->data = NULL; } - cdf_mem_free(pMac->lim.gpLimMlmOemDataReq); + qdf_mem_free(pMac->lim.gpLimMlmOemDataReq); pMac->lim.gpLimMlmOemDataReq = NULL; } - cdf_mem_free(pMac->lim.gpSession); + qdf_mem_free(pMac->lim.gpSession); pMac->lim.gpSession = NULL; if (!QDF_IS_STATUS_SUCCESS (qdf_mutex_destroy(&pMac->lim.lkPeGlobalLock))) { @@ -883,7 +883,7 @@ void pe_free_msg(tpAniSirGlobal pMac, tSirMsgQ *pMsg) cds_pkt_return_packet((cds_pkt_t *) pMsg-> bodyptr); } else { - cdf_mem_free((void *)pMsg->bodyptr); + qdf_mem_free((void *)pMsg->bodyptr); } } pMsg->bodyptr = 0; @@ -1301,7 +1301,7 @@ lim_update_overlap_sta_param(tpAniSirGlobal pMac, tSirMacAddr bssId, { int i; if (!pStaParams->numSta) { - cdf_mem_copy(pMac->lim.protStaOverlapCache[0].addr, + qdf_mem_copy(pMac->lim.protStaOverlapCache[0].addr, bssId, sizeof(tSirMacAddr)); pMac->lim.protStaOverlapCache[0].active = true; @@ -1312,7 +1312,7 @@ lim_update_overlap_sta_param(tpAniSirGlobal pMac, tSirMacAddr bssId, for (i = 0; i < LIM_PROT_STA_OVERLAP_CACHE_SIZE; i++) { if (pMac->lim.protStaOverlapCache[i].active) { - if (cdf_mem_compare + if (!qdf_mem_cmp (pMac->lim.protStaOverlapCache[i].addr, bssId, sizeof(tSirMacAddr))) { return; @@ -1324,7 +1324,7 @@ lim_update_overlap_sta_param(tpAniSirGlobal pMac, tSirMacAddr bssId, if (i == LIM_PROT_STA_OVERLAP_CACHE_SIZE) { PELOG1(lim_log(pMac, LOGW, FL("Overlap cache is full"));) } else { - cdf_mem_copy(pMac->lim.protStaOverlapCache[i].addr, + qdf_mem_copy(pMac->lim.protStaOverlapCache[i].addr, bssId, sizeof(tSirMacAddr)); pMac->lim.protStaOverlapCache[i].active = true; @@ -1415,7 +1415,7 @@ lim_handle_ibss_coalescing(tpAniSirGlobal pMac, 4. Encyption type in the beacon does not match with self station */ if ((!pBeacon->capabilityInfo.ibss) || - (lim_cmp_ssid(&pBeacon->ssId, psessionEntry) != true) || + (lim_cmp_ssid(&pBeacon->ssId, psessionEntry) == true) || (psessionEntry->currentOperChannel != pBeacon->channelNumber)) retCode = eSIR_LIM_IGNORE_BEACON; else if (lim_ibss_enc_type_matched(pBeacon, psessionEntry) != eSIR_TRUE) { @@ -1551,7 +1551,7 @@ lim_detect_change_in_ap_capabilities(tpAniSirGlobal pMac, psessionEntry); if ((false == psessionEntry->limSentCapsChangeNtf) && (((!lim_is_null_ssid(&pBeacon->ssId)) && - (false == lim_cmp_ssid(&pBeacon->ssId, psessionEntry))) || + (false != lim_cmp_ssid(&pBeacon->ssId, psessionEntry))) || ((SIR_MAC_GET_ESS(apNewCaps.capabilityInfo) != SIR_MAC_GET_ESS(psessionEntry->limCurrentBssCaps)) || (SIR_MAC_GET_PRIVACY(apNewCaps.capabilityInfo) != @@ -1600,7 +1600,7 @@ lim_detect_change_in_ap_capabilities(tpAniSirGlobal pMac, len = sizeof(tSirMacCapabilityInfo) + sizeof(tSirMacAddr) + sizeof(uint8_t) + 3 * sizeof(uint8_t) + /* reserved fields */ pBeacon->ssId.length + 1; - cdf_mem_copy(apNewCaps.bssId.bytes, + qdf_mem_copy(apNewCaps.bssId.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); if (newChannel != psessionEntry->currentOperChannel) { PELOGE(lim_log @@ -1632,7 +1632,7 @@ lim_detect_change_in_ap_capabilities(tpAniSirGlobal pMac, return; } else apNewCaps.channelId = psessionEntry->currentOperChannel; - cdf_mem_copy((uint8_t *) &apNewCaps.ssId, + qdf_mem_copy((uint8_t *) &apNewCaps.ssId, (uint8_t *) &pBeacon->ssId, pBeacon->ssId.length + 1); @@ -1849,7 +1849,7 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, roam_offload_synch_ind_ptr->beaconProbeRespOffset; mac_hdr = (tpSirMacMgmtHdr)bcn_proberesp_ptr; parsed_frm_ptr = - (tpSirProbeRespBeacon) cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + (tpSirProbeRespBeacon) qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == parsed_frm_ptr) { lim_log(pMac, LOGE, "fail to allocate memory for frame"); return QDF_STATUS_E_NOMEM; @@ -1860,7 +1860,7 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, "%s: very" "few bytes in synchInd beacon / probe resp frame! length=%d", __func__, roam_offload_synch_ind_ptr->beaconProbeRespLength); - cdf_mem_free(parsed_frm_ptr); + qdf_mem_free(parsed_frm_ptr); return QDF_STATUS_E_FAILURE; } @@ -1878,7 +1878,7 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, "Parse error Beacon, length=%d", roam_offload_synch_ind_ptr->beaconProbeRespLength); - cdf_mem_free(parsed_frm_ptr); + qdf_mem_free(parsed_frm_ptr); return QDF_STATUS_E_FAILURE; } } else { @@ -1890,7 +1890,7 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, "Parse error ProbeResponse, length=%d", roam_offload_synch_ind_ptr->beaconProbeRespLength); - cdf_mem_free(parsed_frm_ptr); + qdf_mem_free(parsed_frm_ptr); return QDF_STATUS_E_FAILURE; } } @@ -1956,16 +1956,16 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, bss_desc_ptr->beaconInterval = parsed_frm_ptr->beaconInterval; bss_desc_ptr->timeStamp[0] = parsed_frm_ptr->timeStamp[0]; bss_desc_ptr->timeStamp[1] = parsed_frm_ptr->timeStamp[1]; - cdf_mem_copy(&bss_desc_ptr->capabilityInfo, + qdf_mem_copy(&bss_desc_ptr->capabilityInfo, &bcn_proberesp_ptr[SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_CAPAB_OFFSET], 2); - cdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId, + qdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId, (uint8_t *) mac_hdr->bssId, sizeof(tSirMacAddr)); bss_desc_ptr->nReceivedTime = (uint32_t)qdf_mc_timer_get_system_ticks(); if (parsed_frm_ptr->mdiePresent) { bss_desc_ptr->mdiePresent = parsed_frm_ptr->mdiePresent; - cdf_mem_copy((uint8_t *)bss_desc_ptr->mdie, + qdf_mem_copy((uint8_t *)bss_desc_ptr->mdie, (uint8_t *)parsed_frm_ptr->mdie, SIR_MDIE_SIZE); } @@ -1977,12 +1977,12 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, "chan=%d, rssi=%d", bss_desc_ptr->channelId, bss_desc_ptr->rssi); if (ie_len) { - cdf_mem_copy(&bss_desc_ptr->ieFields, + qdf_mem_copy(&bss_desc_ptr->ieFields, bcn_proberesp_ptr + (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET), ie_len); } - cdf_mem_free(parsed_frm_ptr); + qdf_mem_free(parsed_frm_ptr); return QDF_STATUS_SUCCESS; } /** @@ -2092,13 +2092,13 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, add_bss_params->txMgmtPower, ft_session_ptr); mac_ctx->roam.reassocRespLen = roam_sync_ind_ptr->reassocRespLength; mac_ctx->roam.pReassocResp = - cdf_mem_malloc(mac_ctx->roam.reassocRespLen); + qdf_mem_malloc(mac_ctx->roam.reassocRespLen); if (NULL == mac_ctx->roam.pReassocResp) { lim_log(mac_ctx, LOGE, FL("LFR3:assoc resp mem alloc failed")); ft_session_ptr->bRoamSynchInProgress = false; return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(mac_ctx->roam.pReassocResp, + qdf_mem_copy(mac_ctx->roam.pReassocResp, (uint8_t *)roam_sync_ind_ptr + roam_sync_ind_ptr->reassocRespOffset, mac_ctx->roam.reassocRespLen); @@ -2135,7 +2135,7 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, ft_session_ptr->limSmeState = eLIM_SME_LINK_EST_STATE; ft_session_ptr->bRoamSynchInProgress = false; if (mac_ctx->roam.pReassocResp) - cdf_mem_free(mac_ctx->roam.pReassocResp); + qdf_mem_free(mac_ctx->roam.pReassocResp); mac_ctx->roam.pReassocResp = NULL; return QDF_STATUS_SUCCESS; } diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 43917d0efcb2..8d720cb21894 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -94,9 +94,9 @@ lim_fill_supported_rates_info(tpAniSirGlobal pMac, * * Return: true if SSID matched, false otherwise. */ -bool lim_cmp_ssid(tSirMacSSid *rx_ssid, tpPESession session_entry) +uint32_t lim_cmp_ssid(tSirMacSSid *rx_ssid, tpPESession session_entry) { - return cdf_mem_compare(rx_ssid, &session_entry->ssId, + return qdf_mem_cmp(rx_ssid, &session_entry->ssId, session_entry->ssId.length); } @@ -230,7 +230,7 @@ lim_check_rx_basic_rates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet, tSirMacRateSet *pRateSet, basicRate; uint8_t i, j, k, match; - pRateSet = cdf_mem_malloc(sizeof(tSirMacRateSet)); + pRateSet = qdf_mem_malloc(sizeof(tSirMacRateSet)); if (NULL == pRateSet) { lim_log(pMac, LOGP, FL("call to AllocateMemory failed for RATESET")); @@ -239,7 +239,7 @@ lim_check_rx_basic_rates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet, } /* Copy operational rate set from session Entry */ - cdf_mem_copy(pRateSet->rate, (psessionEntry->rateSet.rate), + qdf_mem_copy(pRateSet->rate, (psessionEntry->rateSet.rate), psessionEntry->rateSet.numRates); pRateSet->numRates = psessionEntry->rateSet.numRates; @@ -268,14 +268,14 @@ lim_check_rx_basic_rates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet, if (!match) { /* Free up memory allocated for rateset */ - cdf_mem_free((uint8_t *) pRateSet); + qdf_mem_free((uint8_t *) pRateSet); return false; } } /* Free up memory allocated for rateset */ - cdf_mem_free((uint8_t *) pRateSet); + qdf_mem_free((uint8_t *) pRateSet); return true; } /****** end lim_check_rx_basic_rates() ******/ @@ -401,7 +401,7 @@ lim_check_rx_rsn_ie_match(tpAniSirGlobal mac_ctx, tDot11fIERSN rx_rsn_ie, match = 0; for (i = 0; i < rx_rsn_ie.pwise_cipher_suite_count; i++) { for (j = 0; j < rsn_ie->pwise_cipher_suite_count; j++) { - if (cdf_mem_compare(&rx_rsn_ie.pwise_cipher_suites[i], + if (!qdf_mem_cmp(&rx_rsn_ie.pwise_cipher_suites[i], &rsn_ie->pwise_cipher_suites[j], sizeof(rsn_ie->pwise_cipher_suites[j]))) { match = 1; @@ -516,7 +516,7 @@ lim_check_rx_wpa_ie_match(tpAniSirGlobal mac, tDot11fIEWPA rx_wpaie, match = 0; for (i = 0; i < rx_wpaie.unicast_cipher_count; i++) { for (j = 0; j < wpa_ie->unicast_cipher_count; j++) { - if (cdf_mem_compare(rx_wpaie.unicast_ciphers[i], + if (!qdf_mem_cmp(rx_wpaie.unicast_ciphers[i], wpa_ie->unicast_ciphers[j], 4)) { match = 1; break; @@ -705,7 +705,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct qdf_mac_addr sta_dsaddr, /* Free up buffer allocated for JoinReq held by */ /* MLM state machine */ if (psessionEntry->pLimMlmJoinReq) { - cdf_mem_free(psessionEntry->pLimMlmJoinReq); + qdf_mem_free(psessionEntry->pLimMlmJoinReq); psessionEntry->pLimMlmJoinReq = NULL; } @@ -734,7 +734,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct qdf_mac_addr sta_dsaddr, FL("Lim Posting DISASSOC_CNF to Sme. Trigger: %d"), mlmStaContext.cleanupTrigger); - cdf_mem_copy((uint8_t *) &mlmDisassocCnf.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmDisassocCnf.peerMacAddr, (uint8_t *) sta_dsaddr.bytes, QDF_MAC_ADDR_SIZE); mlmDisassocCnf.resultCode = statusCode; mlmDisassocCnf.disassocTrigger = mlmStaContext.cleanupTrigger; @@ -774,7 +774,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct qdf_mac_addr sta_dsaddr, lim_log(pMac, LOGW, FL("Lim Posting PURGE_STA_IND to Sme. Trigger: %d"), mlmStaContext.cleanupTrigger); - cdf_mem_copy((uint8_t *) &mlmPurgeStaInd.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmPurgeStaInd.peerMacAddr, (uint8_t *) sta_dsaddr.bytes, QDF_MAC_ADDR_SIZE); mlmPurgeStaInd.reasonCode = (uint8_t) mlmStaContext.disassocReason; @@ -824,7 +824,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct qdf_mac_addr sta_dsaddr, psessionEntry, smesessionId, smetransactionId); } else { - cdf_mem_free(psessionEntry->pLimJoinReq); + qdf_mem_free(psessionEntry->pLimJoinReq); psessionEntry->pLimJoinReq = NULL; lim_log(pMac, LOG1, @@ -906,7 +906,7 @@ lim_reject_association(tpAniSirGlobal mac_ctx, tSirMacAddr peer_addr, &mac_ctx->lim.gLimPreAuthTimerTable); if (auth_node) { - cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, + qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, peer_addr, sizeof(tSirMacAddr)); auth_node->fTimerStarted = 0; auth_node->mlmState = eLIM_MLM_AUTHENTICATED_STATE; @@ -964,11 +964,11 @@ lim_reject_association(tpAniSirGlobal mac_ctx, tSirMacAddr peer_addr, *free the copy of association request frame. */ if (assoc_req_frame) { - cdf_mem_free(assoc_req_frame); + qdf_mem_free(assoc_req_frame); assoc_req_frame = NULL; } - cdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]); + qdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]); session_entry->parsedAssocReq[sta_ds->assocId] = NULL; } } @@ -1002,7 +1002,7 @@ lim_decide_ap_protection_on_ht20_delete(tpAniSirGlobal mac_ctx, if (!session_entry->protStaCache[i].active) continue; - if (cdf_mem_compare(session_entry->protStaCache[i].addr, + if (!qdf_mem_cmp(session_entry->protStaCache[i].addr, sta_ds->staAddr, sizeof(tSirMacAddr))) { session_entry->gLimHt20Params.numSta--; session_entry->protStaCache[i].active = @@ -1067,10 +1067,10 @@ lim_decide_ap_protection_on_delete(tpAniSirGlobal mac_ctx, session_entry->gLim11aParams.numSta, sta_ds->staAddr); for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->protStaCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( session_entry->protStaCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->protStaCache[i].active = false; break; } @@ -1093,10 +1093,10 @@ lim_decide_ap_protection_on_delete(tpAniSirGlobal mac_ctx, session_entry->gLim11bParams.numSta, sta_ds->staAddr); for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->protStaCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( session_entry->protStaCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->gLim11bParams.numSta--; session_entry->protStaCache[i].active = false; @@ -1123,10 +1123,10 @@ lim_decide_ap_protection_on_delete(tpAniSirGlobal mac_ctx, session_entry->gLim11bParams.numSta, sta_ds->staAddr); for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->protStaCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( session_entry->protStaCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->gLim11gParams.numSta--; session_entry->protStaCache[i].active = false; break; @@ -1155,10 +1155,10 @@ lim_decide_ap_protection_on_delete(tpAniSirGlobal mac_ctx, session_entry->gLimNonGfParams.numSta, sta_ds->staAddr); for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->protStaCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( session_entry->protStaCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->protStaCache[i].active = false; break; } @@ -1195,10 +1195,10 @@ lim_decide_ap_protection_on_delete(tpAniSirGlobal mac_ctx, sta_ds->staAddr); for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->protStaCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( session_entry->protStaCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->protStaCache[i].active = false; break; } @@ -1239,11 +1239,11 @@ void lim_decide_short_preamble(tpAniSirGlobal mac_ctx, for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->gLimNoShortParams. staNoShortCache[i].active && - cdf_mem_compare(session_entry-> + (!qdf_mem_cmp(session_entry-> gLimNoShortParams. staNoShortCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { session_entry->gLimNoShortParams. numNonShortPreambleSta--; session_entry->gLimNoShortParams. @@ -1259,7 +1259,7 @@ void lim_decide_short_preamble(tpAniSirGlobal mac_ctx, * enable short preamble * reset the cache */ - cdf_mem_set((uint8_t *) &session_entry->gLimNoShortParams, + qdf_mem_set((uint8_t *) &session_entry->gLimNoShortParams, sizeof(tLimNoShortParams), 0); if (lim_enable_short_preamble(mac_ctx, true, beacon_params, session_entry) != eSIR_SUCCESS) { @@ -1304,11 +1304,11 @@ lim_decide_short_slot(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (session_entry->gLimNoShortSlotParams. staNoShortSlotCache[i].active && - cdf_mem_compare(session_entry-> + (!qdf_mem_cmp(session_entry-> gLimNoShortSlotParams. staNoShortSlotCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { non_short_slot_sta_count--; session_entry->gLimNoShortSlotParams. staNoShortSlotCache[i].active = false; @@ -1321,7 +1321,7 @@ lim_decide_short_slot(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, * enable short slot time * reset the cache */ - cdf_mem_set((uint8_t *) &session_entry-> + qdf_mem_set((uint8_t *) &session_entry-> gLimNoShortSlotParams, sizeof(tLimNoShortSlotParams), 0); beacon_params->fShortSlotTime = true; @@ -1337,11 +1337,11 @@ lim_decide_short_slot(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (mac_ctx->lim.gLimNoShortSlotParams. staNoShortSlotCache[i].active && - cdf_mem_compare( + (!qdf_mem_cmp( mac_ctx->lim.gLimNoShortSlotParams. staNoShortSlotCache[i].addr, sta_ds->staAddr, - sizeof(tSirMacAddr))) { + sizeof(tSirMacAddr)))) { non_short_slot_sta_count--; mac_ctx->lim.gLimNoShortSlotParams. staNoShortSlotCache[i].active = false; @@ -1354,7 +1354,7 @@ lim_decide_short_slot(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, * enable short slot time * reset the cache */ - cdf_mem_set( + qdf_mem_set( (uint8_t *) &mac_ctx->lim.gLimNoShortSlotParams, sizeof(tLimNoShortSlotParams), 0); /*in case of AP set SHORT_SLOT_TIME to enable*/ @@ -1716,7 +1716,7 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx, * put the result in pSupportedRates */ - cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); + qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); for (i = 0; i < temp_rate_set.numRates; i++) { min = 0; val = 0xff; @@ -1820,7 +1820,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac, /* copy operational rate set from psessionEntry */ if (psessionEntry->rateSet.numRates <= SIR_MAC_RATESET_EID_MAX) { - cdf_mem_copy((uint8_t *) tempRateSet.rate, + qdf_mem_copy((uint8_t *) tempRateSet.rate, (uint8_t *) (psessionEntry->rateSet.rate), psessionEntry->rateSet.numRates); tempRateSet.numRates = psessionEntry->rateSet.numRates; @@ -1835,7 +1835,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac, (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11N)) { if (psessionEntry->extRateSet.numRates <= SIR_MAC_RATESET_EID_MAX) { - cdf_mem_copy((uint8_t *) tempRateSet2.rate, + qdf_mem_copy((uint8_t *) tempRateSet2.rate, (uint8_t *) (psessionEntry->extRateSet. rate), psessionEntry->extRateSet.numRates); @@ -1868,7 +1868,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac, { uint8_t aRateIndex = 0; uint8_t bRateIndex = 0; - cdf_mem_set((uint8_t *) pRates, sizeof(tSirSupportedRates), 0); + qdf_mem_set((uint8_t *) pRates, sizeof(tSirSupportedRates), 0); for (i = 0; i < tempRateSet.numRates; i++) { min = 0; val = 0xff; @@ -2002,12 +2002,12 @@ lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, lim_get_phy_mode(mac_ctx, &phy_mode, session_entry); /* copy operational rate set from session_entry */ - cdf_mem_copy((temp_rate_set.rate), (session_entry->rateSet.rate), + qdf_mem_copy((temp_rate_set.rate), (session_entry->rateSet.rate), session_entry->rateSet.numRates); temp_rate_set.numRates = (uint8_t) session_entry->rateSet.numRates; if (phy_mode == WNI_CFG_PHY_MODE_11G) { - cdf_mem_copy((temp_rate_set2.rate), + qdf_mem_copy((temp_rate_set2.rate), (session_entry->extRateSet.rate), session_entry->extRateSet.numRates); temp_rate_set2.numRates = @@ -2108,7 +2108,7 @@ lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, rates = &sta_ds->supportedRates; - cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); + qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); for (i = 0; (i < temp_rate_set2.numRates && i < SIR_MAC_RATESET_EID_MAX); i++) { for (j = 0; (j < temp_rate_set.numRates && @@ -2269,13 +2269,13 @@ lim_add_sta(tpAniSirGlobal mac_ctx, session_entry->smeSessionId, update_entry, GET_LIM_SYSTEM_ROLE(session_entry)); - add_sta_params = cdf_mem_malloc(sizeof(tAddStaParams)); + add_sta_params = qdf_mem_malloc(sizeof(tAddStaParams)); if (NULL == add_sta_params) { lim_log(mac_ctx, LOGP, FL("Unable to allocate memory during ADD_STA")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) add_sta_params, sizeof(tAddStaParams), 0); + 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_BT_AMP_AP_ROLE(session_entry)) @@ -2292,11 +2292,11 @@ lim_add_sta(tpAniSirGlobal mac_ctx, FL(MAC_ADDRESS_STR ": Subtype(Assoc/Reassoc): %d"), MAC_ADDR_ARRAY(*sta_Addr), sta_ds->mlmStaContext.subType); - cdf_mem_copy((uint8_t *) add_sta_params->staMac, + qdf_mem_copy((uint8_t *) add_sta_params->staMac, (uint8_t *) *sta_Addr, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) add_sta_params->bssId, + qdf_mem_copy((uint8_t *) add_sta_params->bssId, session_entry->bssId, sizeof(tSirMacAddr)); - cdf_mem_copy(&add_sta_params->capab_info, + qdf_mem_copy(&add_sta_params->capab_info, &sta_ds->mlmStaContext.capabilityInfo, sizeof(add_sta_params->capab_info)); @@ -2304,7 +2304,7 @@ lim_add_sta(tpAniSirGlobal mac_ctx, session_entry); /* Copy legacy rates */ - cdf_mem_copy((uint8_t *) &add_sta_params->supportedRates, + qdf_mem_copy((uint8_t *) &add_sta_params->supportedRates, (uint8_t *) &sta_ds->supportedRates, sizeof(tSirSupportedRates)); @@ -2496,7 +2496,7 @@ lim_add_sta(tpAniSirGlobal mac_ctx, add_sta_params->p2pCapableSta = (p2p_ie != NULL); if (assoc_req && add_sta_params->htCapable) { - cdf_mem_copy(&add_sta_params->ht_caps, + qdf_mem_copy(&add_sta_params->ht_caps, ((uint8_t *) &assoc_req->HTCaps) + 1, sizeof(add_sta_params->ht_caps)); } @@ -2648,7 +2648,7 @@ lim_add_sta(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("ADD_STA_REQ for aId %d failed (reason %X)"), sta_ds->assocId, ret_code); - cdf_mem_free(add_sta_params); + qdf_mem_free(add_sta_params); } return ret_code; @@ -2685,14 +2685,14 @@ lim_del_sta(tpAniSirGlobal pMac, tSirMsgQ msgQ; tSirRetStatus retCode = eSIR_SUCCESS; - pDelStaParams = cdf_mem_malloc(sizeof(tDeleteStaParams)); + pDelStaParams = qdf_mem_malloc(sizeof(tDeleteStaParams)); if (NULL == pDelStaParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_STA")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0); + qdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0); /* */ /* DPH contains the STA index only for "peer" STA entries. */ @@ -2754,7 +2754,7 @@ lim_del_sta(tpAniSirGlobal pMac, pDelStaParams->smesessionId = psessionEntry->smeSessionId; pDelStaParams->staType = pStaDs->staType; - cdf_mem_copy((uint8_t *) pDelStaParams->staMac, + qdf_mem_copy((uint8_t *) pDelStaParams->staMac, (uint8_t *) pStaDs->staAddr, sizeof(tSirMacAddr)); pDelStaParams->status = QDF_STATUS_SUCCESS; @@ -2777,7 +2777,7 @@ lim_del_sta(tpAniSirGlobal pMac, lim_log(pMac, LOGE, FL("Posting DELETE_STA_REQ to HAL failed, reason=%X"), retCode); - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); } return retCode; @@ -2831,7 +2831,7 @@ tSirRetStatus lim_add_ft_sta_self(tpAniSirGlobal mac_ctx, uint16_t assoc_id, lim_log(mac_ctx, LOGE, FL("Posting WMA_ADD_STA_REQ to HAL failed, reason=%X"), ret_code); - cdf_mem_free(add_sta_params); + qdf_mem_free(add_sta_params); } session_entry->ftPEContext.pAddStaReq = NULL; @@ -2891,19 +2891,19 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta, sir_copy_mac_addr(staMac, psessionEntry->selfMacAddr); lim_log(pMac, LOG1, FL(MAC_ADDRESS_STR ": "), MAC_ADDR_ARRAY(staMac)); - pAddStaParams = cdf_mem_malloc(sizeof(tAddStaParams)); + pAddStaParams = qdf_mem_malloc(sizeof(tAddStaParams)); if (NULL == pAddStaParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_STA")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0); + qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0); /* / Add STA context at MAC HW (BMU, RHP & TFP) */ - cdf_mem_copy((uint8_t *) pAddStaParams->staMac, + qdf_mem_copy((uint8_t *) pAddStaParams->staMac, (uint8_t *) staMac, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) pAddStaParams->bssId, + qdf_mem_copy((uint8_t *) pAddStaParams->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); pAddStaParams->assocId = psessionEntry->limAID; @@ -3132,7 +3132,7 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta, lim_log(pMac, LOGE, FL("Posting WMA_ADD_STA_REQ to HAL failed, reason=%X"), retCode); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); } return retCode; } @@ -3257,7 +3257,7 @@ lim_delete_dph_hash_entry(tpAniSirGlobal mac_ctx, tSirMacAddr sta_addr, tpDphHashNode sta_ds; tUpdateBeaconParams beacon_params; - cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); beacon_params.paramChangeBitmap = 0; lim_deactivate_and_change_per_sta_id_timer(mac_ctx, eLIM_CNF_WAIT_TIMER, sta_id); @@ -3352,7 +3352,7 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx, uint32_t total_num_noa_desc = 0; uint32_t selfStaDot11Mode = 0; - cdf_mem_copy(current_ssid.ssId, + qdf_mem_copy(current_ssid.ssId, session_entry->ssId.ssId, session_entry->ssId.length); current_ssid.length = (uint8_t) session_entry->ssId.length; @@ -3364,7 +3364,7 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx, if (((SIR_MAC_MGMT_FRAME == header->fc.type) && (SIR_MAC_MGMT_PROBE_RSP == header->fc.subType)) && current_ssid.length && - (!cdf_mem_compare((uint8_t *) &beacon_probe_rsp->ssId, + (qdf_mem_cmp((uint8_t *) &beacon_probe_rsp->ssId, (uint8_t *) ¤t_ssid, (uint8_t) (1 + current_ssid.length)))) { /* @@ -3506,7 +3506,7 @@ tSirRetStatus lim_extract_ap_capabilities(tpAniSirGlobal pMac, uint16_t ieLen, tpSirProbeRespBeacon beaconStruct) { - cdf_mem_set((uint8_t *) beaconStruct, sizeof(tSirProbeRespBeacon), 0); + qdf_mem_set((uint8_t *) beaconStruct, sizeof(tSirProbeRespBeacon), 0); PELOG3(lim_log(pMac, LOG3, FL @@ -3556,13 +3556,13 @@ lim_del_bss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, uint16_t bssIdx, tSirMsgQ msgQ; tSirRetStatus retCode = eSIR_SUCCESS; - pDelBssParams = cdf_mem_malloc(sizeof(tDeleteBssParams)); + pDelBssParams = qdf_mem_malloc(sizeof(tDeleteBssParams)); if (NULL == pDelBssParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_BSS")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0); + qdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0); pDelBssParams->sessionId = psessionEntry->peSessionId; /* update PE session Id */ @@ -3588,7 +3588,7 @@ lim_del_bss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, uint16_t bssIdx, pDelBssParams->status = QDF_STATUS_SUCCESS; pDelBssParams->respReqd = 1; - cdf_mem_copy(pDelBssParams->bssid, psessionEntry->bssId, + qdf_mem_copy(pDelBssParams->bssid, psessionEntry->bssId, sizeof(tSirMacAddr)); pDelBssParams->smesessionId = psessionEntry->smeSessionId; PELOGW(lim_log @@ -3614,7 +3614,7 @@ lim_del_bss(tpAniSirGlobal pMac, tpDphHashNode pStaDs, uint16_t bssIdx, lim_log(pMac, LOGE, FL("Posting DELETE_BSS_REQ to HAL failed, reason=%X"), retCode); - cdf_mem_free(pDelBssParams); + qdf_mem_free(pDelBssParams); } return retCode; @@ -3756,20 +3756,20 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, tAddStaParams *sta_context; /* Package SIR_HAL_ADD_BSS_REQ message parameters */ - pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams)); + pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams)); if (NULL == pAddBssParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_BSS")); retCode = eSIR_MEM_ALLOC_FAILED; goto returnFailure; } else - cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), + qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0); - cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, + qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, sizeof(tSirMacAddr)); /* Fill in tAddBssParams selfMacAddr */ - cdf_mem_copy(pAddBssParams->selfMacAddr, + qdf_mem_copy(pAddBssParams->selfMacAddr, psessionEntry->selfMacAddr, sizeof(tSirMacAddr)); lim_log(pMac, LOG1, @@ -3805,7 +3805,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, pBeaconStruct->cfParamSet.cfpDurRemaining; pAddBssParams->rateSet.numRates = pAssocRsp->supportedRates.numRates; - cdf_mem_copy(pAddBssParams->rateSet.rate, + qdf_mem_copy(pAddBssParams->rateSet.rate, pAssocRsp->supportedRates.rate, pAssocRsp->supportedRates.numRates); @@ -3943,7 +3943,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, /* Identifying AP as an STA */ pAddBssParams->staContext.staType = STA_ENTRY_OTHER; - cdf_mem_copy(pAddBssParams->staContext.bssId, + qdf_mem_copy(pAddBssParams->staContext.bssId, bssDescription->bssId, sizeof(tSirMacAddr)); pAddBssParams->staContext.listenInterval = bssDescription->beaconInterval; @@ -4178,10 +4178,10 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, if ((!pAddBssParams->staContext.wpa_rsn) && (psessionEntry->isOSENConnection)) pAddBssParams->staContext.wpa_rsn = 1; - cdf_mem_copy(&pAddBssParams->staContext.capab_info, + qdf_mem_copy(&pAddBssParams->staContext.capab_info, &pAssocRsp->capabilityInfo, sizeof(pAddBssParams->staContext.capab_info)); - cdf_mem_copy(&pAddBssParams->staContext.ht_caps, + qdf_mem_copy(&pAddBssParams->staContext.ht_caps, (uint8_t *) &pAssocRsp->HTCaps + sizeof(uint8_t), sizeof(pAddBssParams->staContext.ht_caps)); @@ -4199,7 +4199,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, lim_fill_supported_rates_info(pMac, pStaDs, &pStaDs->supportedRates, psessionEntry); - cdf_mem_copy((uint8_t *) &pAddBssParams->staContext. + qdf_mem_copy((uint8_t *) &pAddBssParams->staContext. supportedRates, (uint8_t *) &pStaDs->supportedRates, sizeof(tSirSupportedRates)); @@ -4285,7 +4285,7 @@ tSirRetStatus lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { SET_LIM_PROCESS_DEFD_MESGS(pMac, true); - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); lim_log(pMac, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"), retCode); @@ -4315,7 +4315,7 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update tpSirBssDescription bssDescription = &psessionEntry->pLimJoinReq->bssDescription; - pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { lim_log(pMac, LOGE, FL("Unable to allocate memory during ADD_BSS")); @@ -4323,7 +4323,7 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update } /* Package SIR_HAL_ADD_BSS_REQ message parameters */ - pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams)); + pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams)); if (NULL == pAddBssParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_BSS")); @@ -4331,7 +4331,7 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update goto returnFailure; } - cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0); + 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), @@ -4341,11 +4341,11 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct, psessionEntry); - cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, + qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, sizeof(tSirMacAddr)); /* Fill in tAddBssParams selfMacAddr */ - cdf_mem_copy(pAddBssParams->selfMacAddr, + qdf_mem_copy(pAddBssParams->selfMacAddr, psessionEntry->selfMacAddr, sizeof(tSirMacAddr)); lim_log(pMac, LOG1, FL("sessionid: %d updateEntry = %d limsystemrole = %d "), @@ -4377,7 +4377,7 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update pAddBssParams->rateSet.numRates = pBeaconStruct->supportedRates.numRates; - cdf_mem_copy(pAddBssParams->rateSet.rate, + qdf_mem_copy(pAddBssParams->rateSet.rate, pBeaconStruct->supportedRates.rate, pBeaconStruct->supportedRates.numRates); @@ -4522,7 +4522,7 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update /* Identifying AP as an STA */ pAddBssParams->staContext.staType = STA_ENTRY_OTHER; - cdf_mem_copy(pAddBssParams->staContext.bssId, + qdf_mem_copy(pAddBssParams->staContext.bssId, bssDescription->bssId, sizeof(tSirMacAddr)); pAddBssParams->staContext.listenInterval = bssDescription->beaconInterval; @@ -4805,20 +4805,20 @@ tSirRetStatus lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t update retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { SET_LIM_PROCESS_DEFD_MESGS(pMac, true); - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); lim_log(pMac, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"), retCode); goto returnFailure; } else { - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); return retCode; } returnFailure: /* Clean-up will be done by the caller... */ - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); return retCode; } @@ -4849,7 +4849,7 @@ lim_prepare_and_send_del_sta_cnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, return; } staDsAssocId = pStaDs->assocId; - cdf_mem_copy((uint8_t *) sta_dsaddr.bytes, + qdf_mem_copy((uint8_t *) sta_dsaddr.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE); mlmStaContext = pStaDs->mlmStaContext; @@ -5088,19 +5088,19 @@ void lim_send_sme_unprotected_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameT length = sizeof(tSirSmeUnprotMgmtFrameInd) + frameLen; - pSirSmeMgmtFrame = cdf_mem_malloc(length); + pSirSmeMgmtFrame = qdf_mem_malloc(length); if (NULL == pSirSmeMgmtFrame) { lim_log(pMac, LOGP, FL ("AllocateMemory failed for tSirSmeUnprotectedMgmtFrameInd")); return; } - cdf_mem_set((void *)pSirSmeMgmtFrame, length, 0); + qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0); pSirSmeMgmtFrame->sessionId = sessionId; pSirSmeMgmtFrame->frameType = frameType; - cdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen); + qdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen); pSirSmeMgmtFrame->frameLen = frameLen; mmhMsg.type = eWNI_SME_UNPROT_MGMT_FRM_IND; @@ -5132,13 +5132,13 @@ void lim_send_sme_tsm_ie_ind(tpAniSirGlobal pMac, tpPESession psessionEntry, if (!pMac || !psessionEntry) return; - pSirSmeTsmIeInd = cdf_mem_malloc(sizeof(tSirSmeTsmIEInd)); + pSirSmeTsmIeInd = qdf_mem_malloc(sizeof(tSirSmeTsmIEInd)); if (NULL == pSirSmeTsmIeInd) { lim_log(pMac, LOGP, FL("AllocateMemory failed for tSirSmeTsmIEInd")); return; } - cdf_mem_set((void *)pSirSmeTsmIeInd, sizeof(tSirSmeTsmIEInd), 0); + 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_assoc_utils.h b/core/mac/src/pe/lim/lim_assoc_utils.h index 8b6df1cf5d82..941513b241fd 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.h +++ b/core/mac/src/pe/lim/lim_assoc_utils.h @@ -45,7 +45,7 @@ #include "lim_types.h" -bool lim_cmp_ssid(tSirMacSSid *, tpPESession); +uint32_t lim_cmp_ssid(tSirMacSSid *, tpPESession); uint8_t lim_compare_capabilities(tpAniSirGlobal, tSirAssocReq *, tSirMacCapabilityInfo *, tpPESession); diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c index 2122371999eb..ee0116256fb1 100644 --- a/core/mac/src/pe/lim/lim_ft.c +++ b/core/mac/src/pe/lim/lim_ft.c @@ -61,7 +61,7 @@ extern void lim_send_set_sta_key_req(tpAniSirGlobal pMac, void lim_ft_open(tpAniSirGlobal pMac, tpPESession psessionEntry) { if (psessionEntry) - cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), + qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0); } @@ -95,27 +95,27 @@ void lim_ft_cleanup_pre_auth_info(tpAniSirGlobal pMac, tpPESession psessionEntry psessionEntry->ftPEContext.pFTPreAuthReq); if (psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription) { - cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq-> + qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription); psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription = NULL; } - cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq); + qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq); psessionEntry->ftPEContext.pFTPreAuthReq = NULL; } if (psessionEntry->ftPEContext.pAddBssReq) { - cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); + qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); psessionEntry->ftPEContext.pAddBssReq = NULL; } if (psessionEntry->ftPEContext.pAddStaReq) { - cdf_mem_free(psessionEntry->ftPEContext.pAddStaReq); + qdf_mem_free(psessionEntry->ftPEContext.pAddStaReq); psessionEntry->ftPEContext.pAddStaReq = NULL; } /* The session is being deleted, cleanup the contents */ - cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0); + qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0); /* Delete the session created while handling pre-auth response */ if (pReAssocSessionEntry) { @@ -166,27 +166,27 @@ void lim_ft_cleanup(tpAniSirGlobal pMac, tpPESession psessionEntry) if (NULL != psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription) { - cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq-> + qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription); psessionEntry->ftPEContext.pFTPreAuthReq-> pbssDescription = NULL; } - cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq); + qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq); psessionEntry->ftPEContext.pFTPreAuthReq = NULL; } if (psessionEntry->ftPEContext.pAddBssReq) { - cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); + qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); psessionEntry->ftPEContext.pAddBssReq = NULL; } if (psessionEntry->ftPEContext.pAddStaReq) { - cdf_mem_free(psessionEntry->ftPEContext.pAddStaReq); + qdf_mem_free(psessionEntry->ftPEContext.pAddStaReq); psessionEntry->ftPEContext.pAddStaReq = NULL; } /* The session is being deleted, cleanup the contents */ - cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0); + qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0); } /* @@ -248,12 +248,12 @@ int lim_process_ft_pre_auth_req(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) /* Indicate that this is the session on which preauth is being done */ if (session->ftPEContext.pFTPreAuthReq) { if (session->ftPEContext.pFTPreAuthReq->pbssDescription) { - cdf_mem_free( + qdf_mem_free( session->ftPEContext.pFTPreAuthReq->pbssDescription); session->ftPEContext.pFTPreAuthReq->pbssDescription = NULL; } - cdf_mem_free(session->ftPEContext.pFTPreAuthReq); + qdf_mem_free(session->ftPEContext.pFTPreAuthReq); session->ftPEContext.pFTPreAuthReq = NULL; } @@ -392,22 +392,22 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, return eSIR_FAILURE; } - pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { lim_log(pMac, LOGE, FL("Unable to allocate memory for creating ADD_BSS")); return eSIR_MEM_ALLOC_FAILED; } /* Package SIR_HAL_ADD_BSS_REQ message parameters */ - pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams)); + pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams)); if (NULL == pAddBssParams) { - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); lim_log(pMac, LOGP, FL("Unable to allocate memory for creating ADD_BSS")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0); + 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), @@ -418,11 +418,11 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct, pftSessionEntry); - cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, + qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId, sizeof(tSirMacAddr)); /* Fill in tAddBssParams selfMacAddr */ - cdf_mem_copy(pAddBssParams->selfMacAddr, pftSessionEntry->selfMacAddr, + qdf_mem_copy(pAddBssParams->selfMacAddr, pftSessionEntry->selfMacAddr, sizeof(tSirMacAddr)); pAddBssParams->bssType = pftSessionEntry->bssType; @@ -445,7 +445,7 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, pAddBssParams->rateSet.numRates = pBeaconStruct->supportedRates.numRates; - cdf_mem_copy(pAddBssParams->rateSet.rate, + qdf_mem_copy(pAddBssParams->rateSet.rate, pBeaconStruct->supportedRates.rate, pBeaconStruct->supportedRates.numRates); @@ -469,10 +469,10 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, if (IS_DOT11_MODE_HT(pftSessionEntry->dot11mode) && (pBeaconStruct->HTCaps.present)) { pAddBssParams->htCapable = pBeaconStruct->HTCaps.present; - cdf_mem_copy(&pAddBssParams->staContext.capab_info, + qdf_mem_copy(&pAddBssParams->staContext.capab_info, &pBeaconStruct->capabilityInfo, sizeof(pAddBssParams->staContext.capab_info)); - cdf_mem_copy(&pAddBssParams->staContext.ht_caps, + qdf_mem_copy(&pAddBssParams->staContext.ht_caps, (uint8_t *) &pBeaconStruct->HTCaps + sizeof(uint8_t), sizeof(pAddBssParams->staContext.ht_caps)); @@ -584,7 +584,7 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, { pAddBssParams->staContext.staType = STA_ENTRY_OTHER; - cdf_mem_copy(pAddBssParams->staContext.bssId, + qdf_mem_copy(pAddBssParams->staContext.bssId, bssDescription->bssId, sizeof(tSirMacAddr)); pAddBssParams->staContext.listenInterval = bssDescription->beaconInterval; @@ -748,7 +748,7 @@ tSirRetStatus lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac, lim_log(pMac, LOG1, FL("Saving SIR_HAL_ADD_BSS_REQ for pre-auth ap...")); - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); return 0; } @@ -769,7 +769,7 @@ void lim_fill_ft_session(tpAniSirGlobal pMac, uint32_t selfDot11Mode; ePhyChanBondState cbEnabledMode; - pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { lim_log(pMac, LOGE, FL("No memory for creating lim_fill_ft_session")); @@ -795,18 +795,18 @@ void lim_fill_ft_session(tpAniSirGlobal pMac, pftSessionEntry->rateSet.numRates = pBeaconStruct->supportedRates.numRates; - cdf_mem_copy(pftSessionEntry->rateSet.rate, + qdf_mem_copy(pftSessionEntry->rateSet.rate, pBeaconStruct->supportedRates.rate, pBeaconStruct->supportedRates.numRates); pftSessionEntry->extRateSet.numRates = pBeaconStruct->extendedRates.numRates; - cdf_mem_copy(pftSessionEntry->extRateSet.rate, + qdf_mem_copy(pftSessionEntry->extRateSet.rate, pBeaconStruct->extendedRates.rate, pftSessionEntry->extRateSet.numRates); pftSessionEntry->ssId.length = pBeaconStruct->ssId.length; - cdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId, + qdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId, pftSessionEntry->ssId.length); wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &selfDot11Mode); @@ -962,7 +962,7 @@ void lim_fill_ft_session(tpAniSirGlobal pMac, pftSessionEntry->limRmfEnabled = psessionEntry->limRmfEnabled; #endif - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); } /*------------------------------------------------------------------ @@ -1059,13 +1059,13 @@ void lim_post_ft_pre_auth_rsp(tpAniSirGlobal mac_ctx, tSirMsgQ mmh_msg; uint16_t rsp_len = sizeof(tSirFTPreAuthRsp); - ft_pre_auth_rsp = (tpSirFTPreAuthRsp) cdf_mem_malloc(rsp_len); + ft_pre_auth_rsp = (tpSirFTPreAuthRsp) qdf_mem_malloc(rsp_len); if (NULL == ft_pre_auth_rsp) { lim_log(mac_ctx, LOGE, "Failed to allocate memory"); QDF_ASSERT(ft_pre_auth_rsp != NULL); return; } - cdf_mem_zero(ft_pre_auth_rsp, rsp_len); + qdf_mem_zero(ft_pre_auth_rsp, rsp_len); lim_log(mac_ctx, LOG1, FL("Auth Rsp = %p"), ft_pre_auth_rsp); if (session) { @@ -1073,7 +1073,7 @@ void lim_post_ft_pre_auth_rsp(tpAniSirGlobal mac_ctx, if (!LIM_IS_STA_ROLE(session)) { lim_log(mac_ctx, LOGE, FL("session is not in STA mode")); - cdf_mem_free(ft_pre_auth_rsp); + qdf_mem_free(ft_pre_auth_rsp); return; } ft_pre_auth_rsp->smeSessionId = session->smeSessionId; @@ -1091,7 +1091,7 @@ void lim_post_ft_pre_auth_rsp(tpAniSirGlobal mac_ctx, ft_pre_auth_rsp->ft_ies_length = 0; if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE)) { /* Only 11r assoc has FT IEs */ - cdf_mem_copy(ft_pre_auth_rsp->ft_ies, + qdf_mem_copy(ft_pre_auth_rsp->ft_ies, auth_rsp, auth_rsp_length); ft_pre_auth_rsp->ft_ies_length = auth_rsp_length; } @@ -1154,7 +1154,7 @@ void lim_handle_ft_pre_auth_rsp(tpAniSirGlobal pMac, tSirRetStatus status, */ psessionEntry->ftPEContext.saved_auth_rsp_length = 0; if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE)) { - cdf_mem_copy(psessionEntry->ftPEContext.saved_auth_rsp, + qdf_mem_copy(psessionEntry->ftPEContext.saved_auth_rsp, auth_rsp, auth_rsp_length); psessionEntry->ftPEContext.saved_auth_rsp_length = auth_rsp_length; @@ -1199,7 +1199,7 @@ void lim_handle_ft_pre_auth_rsp(tpAniSirGlobal pMac, tSirRetStatus status, lim_log(pMac, LOGE, FL("Invalid bss type")); } pftSessionEntry->limPrevSmeState = pftSessionEntry->limSmeState; - cdf_mem_copy(&(pftSessionEntry->htConfig), + qdf_mem_copy(&(pftSessionEntry->htConfig), &(psessionEntry->htConfig), sizeof(psessionEntry->htConfig)); pftSessionEntry->limSmeState = eLIM_SME_WT_REASSOC_STATE; @@ -1270,14 +1270,14 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, lim_log(pMac, LOGE, FL("pAddBssReq is NULL")); return; } - pMlmReassocReq = cdf_mem_malloc(sizeof(tLimMlmReassocReq)); + pMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq)); if (NULL == pMlmReassocReq) { lim_log(pMac, LOGE, FL("call to AllocateMemory failed for mlmReassocReq")); return; } - cdf_mem_copy(pMlmReassocReq->peerMacAddr, + qdf_mem_copy(pMlmReassocReq->peerMacAddr, psessionEntry->bssId, sizeof(tSirMacAddr)); if (wlan_cfg_get_int(pMac, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, @@ -1289,7 +1289,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, */ lim_log(pMac, LOGE, FL("could not retrieve ReassocFailureTimeout value")); - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } @@ -1299,7 +1299,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, * from CFG. Log error. */ lim_log(pMac, LOGE, FL("could not retrieve Capabilities value")); - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } pMlmReassocReq->capabilityInfo = caps; @@ -1314,7 +1314,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, eSIR_SUCCESS) { lim_log(pMac, LOGP, FL("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN")); - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } @@ -1327,7 +1327,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, */ lim_log(pMac, LOGE, FL("could not retrieve ListenInterval")); - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } } else { @@ -1339,14 +1339,14 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, */ lim_log(pMac, LOGE, FL("could not retrieve ListenInterval")); - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } } if (lim_set_link_state (pMac, eSIR_LINK_PREASSOC_STATE, psessionEntry->bssId, psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS) { - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); return; } @@ -1365,7 +1365,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf, MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); + qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq); lim_log(pMac, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"), retCode); @@ -1493,14 +1493,14 @@ bool lim_process_ft_update_key(tpAniSirGlobal pMac, uint32_t *pMsgBuf) &psessionEntry->ftPEContext.PreAuthKeyInfo. extSetStaKeyParam; - cdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq)); + qdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq)); qdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr, &pKeyInfo->bssid); pMlmSetKeysReq->sessionId = psessionEntry->peSessionId; pMlmSetKeysReq->smesessionId = psessionEntry->smeSessionId; pMlmSetKeysReq->edType = pKeyInfo->keyMaterial.edType; pMlmSetKeysReq->numKeys = pKeyInfo->keyMaterial.numKeys; - cdf_mem_copy((uint8_t *) &pMlmSetKeysReq->key, + qdf_mem_copy((uint8_t *) &pMlmSetKeysReq->key, (uint8_t *) &pKeyInfo->keyMaterial.key, sizeof(tSirKeys)); @@ -1523,7 +1523,7 @@ bool lim_process_ft_update_key(tpAniSirGlobal pMac, uint32_t *pMsgBuf) pAddBssParams->extSetStaKeyParamValid = 1; pAddBssParams->extSetStaKeyParam.encType = pKeyInfo->keyMaterial.edType; - cdf_mem_copy((uint8_t *) &pAddBssParams->extSetStaKeyParam.key, + qdf_mem_copy((uint8_t *) &pAddBssParams->extSetStaKeyParam.key, (uint8_t *) &pKeyInfo->keyMaterial.key, sizeof(tSirKeys)); if (eSIR_SUCCESS != @@ -1602,13 +1602,13 @@ lim_ft_send_aggr_qos_rsp(tpAniSirGlobal pMac, uint8_t rspReqd, if (!rspReqd) { return; } - rsp = cdf_mem_malloc(sizeof(tSirAggrQosRsp)); + rsp = qdf_mem_malloc(sizeof(tSirAggrQosRsp)); if (NULL == rsp) { lim_log(pMac, LOGP, FL("AllocateMemory failed for tSirAggrQosRsp")); return; } - cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); + qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); rsp->messageType = eWNI_SME_FT_AGGR_QOS_RSP; rsp->sessionId = smesessionId; rsp->length = sizeof(*rsp); @@ -1646,7 +1646,7 @@ void lim_process_ft_aggr_qo_s_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg) FL("Cant find session entry for %s"), __func__); ) if (pAggrQosRspMsg != NULL) { - cdf_mem_free(pAggrQosRspMsg); + qdf_mem_free(pAggrQosRspMsg); } return; } @@ -1681,7 +1681,7 @@ void lim_process_ft_aggr_qo_s_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg) lim_ft_send_aggr_qos_rsp(pMac, rspReqd, pAggrQosRspMsg, psessionEntry->smeSessionId); if (pAggrQosRspMsg != NULL) { - cdf_mem_free(pAggrQosRspMsg); + qdf_mem_free(pAggrQosRspMsg); } return; } @@ -1698,7 +1698,7 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf uint8_t sessionId; int i; - pAggrAddTsParam = cdf_mem_malloc(sizeof(tAggrAddTsParams)); + pAggrAddTsParam = qdf_mem_malloc(sizeof(tAggrAddTsParams)); if (NULL == pAggrAddTsParam) { PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));) return eSIR_MEM_ALLOC_FAILED; @@ -1713,14 +1713,14 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf FL("psession Entry Null for sessionId = %d"), aggrQosReq->sessionId); ) - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); return eSIR_FAILURE; } /* Nothing to be done if the session is not in STA mode */ if (!LIM_IS_STA_ROLE(psessionEntry)) { lim_log(pMac, LOGE, FL("psessionEntry is not in STA mode")); - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); return eSIR_FAILURE; } @@ -1731,11 +1731,11 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf FL ("Station context not found - ignoring AddTsRsp")); ) - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); return eSIR_FAILURE; } - cdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0); + qdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0); pAggrAddTsParam->staIdx = psessionEntry->staId; /* Fill in the sessionId specific to PE */ pAggrAddTsParam->sessionId = sessionId; @@ -1815,7 +1815,7 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf ("Adding entry in lim Tspec Table failed ")); ) pMac->lim.gLimAddtsSent = false; - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); return eSIR_FAILURE; } @@ -1845,7 +1845,7 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf (pMac, LOGW, FL("wma_post_ctrl_msg() failed")); ) SET_LIM_PROCESS_DEFD_MESGS(pMac, true); - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); return eSIR_FAILURE; } } @@ -1859,7 +1859,7 @@ tSirRetStatus lim_process_ft_aggr_qos_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf lim_ft_send_aggr_qos_rsp(pMac, true, pAggrAddTsParam, psessionEntry->smeSessionId); if (pAggrAddTsParam != NULL) { - cdf_mem_free(pAggrAddTsParam); + qdf_mem_free(pAggrAddTsParam); } } #endif @@ -1887,24 +1887,24 @@ QDF_STATUS lim_send_preauth_scan_offload(tpAniSirGlobal mac_ctx, tSirRetStatus rc = eSIR_SUCCESS; tSirMsgQ msg; - scan_offload_req = cdf_mem_malloc(sizeof(tSirScanOffloadReq)); + scan_offload_req = qdf_mem_malloc(sizeof(tSirScanOffloadReq)); if (NULL == scan_offload_req) { lim_log(mac_ctx, LOGE, FL("Memory allocation failed for pScanOffloadReq")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq)); + qdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq)); msg.type = WMA_START_SCAN_OFFLOAD_REQ; msg.bodyptr = scan_offload_req; msg.bodyval = 0; - cdf_mem_copy((uint8_t *) &scan_offload_req->selfMacAddr.bytes, + qdf_mem_copy((uint8_t *) &scan_offload_req->selfMacAddr.bytes, (uint8_t *) ft_preauth_req->self_mac_addr, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) &scan_offload_req->bssId.bytes, + qdf_mem_copy((uint8_t *) &scan_offload_req->bssId.bytes, (uint8_t *) ft_preauth_req->currbssId, sizeof(tSirMacAddr)); scan_offload_req->scanType = eSIR_PASSIVE_SCAN; @@ -1932,7 +1932,7 @@ QDF_STATUS lim_send_preauth_scan_offload(tpAniSirGlobal mac_ctx, rc = wma_post_ctrl_msg(mac_ctx, &msg); if (rc != eSIR_SUCCESS) { lim_log(mac_ctx, LOGE, FL("START_SCAN_OFFLOAD failed %u"), rc); - cdf_mem_free(scan_offload_req); + qdf_mem_free(scan_offload_req); return QDF_STATUS_E_FAILURE; } diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c index 697532dd8af5..a8c26803d40c 100644 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c +++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c @@ -68,7 +68,7 @@ static tLimIbssPeerNode *ibss_peer_find(tpAniSirGlobal pMac, tLimIbssPeerNode *pTempNode = pMac->lim.gLimIbssPeerList; while (pTempNode != NULL) { - if (cdf_mem_compare((uint8_t *) macAddr, + if (!qdf_mem_cmp((uint8_t *) macAddr, (uint8_t *) &pTempNode->peerMacAddr, sizeof(tSirMacAddr))) break; @@ -115,10 +115,10 @@ ibss_peer_add(tpAniSirGlobal pMac, tLimIbssPeerNode *pPeerNode) pTemp = pTemp->next; } if (pTemp->beacon) { - cdf_mem_free(pTemp->beacon); + qdf_mem_free(pTemp->beacon); } - cdf_mem_free(pTemp); + qdf_mem_free(pTemp); pPrev->next = NULL; } else #endif @@ -158,7 +158,7 @@ ibss_peer_collect(tpAniSirGlobal pMac, tpSirMacMgmtHdr pHdr, tLimIbssPeerNode *pPeer, tpPESession psessionEntry) { - cdf_mem_copy(pPeer->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr)); + qdf_mem_copy(pPeer->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr)); pPeer->capabilityInfo = pBeacon->capabilityInfo; pPeer->extendedRatesPresent = pBeacon->extendedRatesPresent; @@ -174,7 +174,7 @@ ibss_peer_collect(tpAniSirGlobal pMac, if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) && (pBeacon->HTCaps.present)) { pPeer->htCapable = pBeacon->HTCaps.present; - cdf_mem_copy((uint8_t *) pPeer->supportedMCSSet, + qdf_mem_copy((uint8_t *) pPeer->supportedMCSSet, (uint8_t *) pBeacon->HTCaps.supportedMCSSet, sizeof(pPeer->supportedMCSSet)); pPeer->htGreenfield = (uint8_t) pBeacon->HTCaps.greenField; @@ -203,18 +203,18 @@ ibss_peer_collect(tpAniSirGlobal pMac, pPeer->vhtCapable = pBeacon->VHTCaps.present; /* Collect VHT capabilities from beacon */ - cdf_mem_copy((uint8_t *) &pPeer->VHTCaps, + qdf_mem_copy((uint8_t *) &pPeer->VHTCaps, (uint8_t *) &pBeacon->VHTCaps, sizeof(tDot11fIEVHTCaps)); } #endif pPeer->erpIePresent = pBeacon->erpPresent; - cdf_mem_copy((uint8_t *) &pPeer->supportedRates, + qdf_mem_copy((uint8_t *) &pPeer->supportedRates, (uint8_t *) &pBeacon->supportedRates, pBeacon->supportedRates.numRates + 1); if (pPeer->extendedRatesPresent) - cdf_mem_copy((uint8_t *) &pPeer->extendedRates, + qdf_mem_copy((uint8_t *) &pPeer->extendedRates, (uint8_t *) &pBeacon->extendedRates, pBeacon->extendedRates.numRates + 1); else @@ -380,9 +380,9 @@ ibss_sta_info_update(tpAniSirGlobal pMac, static void ibss_coalesce_free(tpAniSirGlobal pMac) { if (pMac->lim.ibssInfo.pHdr != NULL) - cdf_mem_free(pMac->lim.ibssInfo.pHdr); + qdf_mem_free(pMac->lim.ibssInfo.pHdr); if (pMac->lim.ibssInfo.pBeacon != NULL) - cdf_mem_free(pMac->lim.ibssInfo.pBeacon); + qdf_mem_free(pMac->lim.ibssInfo.pBeacon); pMac->lim.ibssInfo.pHdr = NULL; pMac->lim.ibssInfo.pBeacon = NULL; @@ -398,12 +398,12 @@ ibss_coalesce_save(tpAniSirGlobal pMac, /* get rid of any saved info */ ibss_coalesce_free(pMac); - pMac->lim.ibssInfo.pHdr = cdf_mem_malloc(sizeof(*pHdr)); + pMac->lim.ibssInfo.pHdr = qdf_mem_malloc(sizeof(*pHdr)); if (NULL == pMac->lim.ibssInfo.pHdr) { PELOGE(lim_log(pMac, LOGE, FL("ibbs-save: Failed malloc pHdr"));) return; } - pMac->lim.ibssInfo.pBeacon = cdf_mem_malloc(sizeof(*pBeacon)); + pMac->lim.ibssInfo.pBeacon = qdf_mem_malloc(sizeof(*pBeacon)); if (NULL == pMac->lim.ibssInfo.pBeacon) { PELOGE(lim_log (pMac, LOGE, FL("ibbs-save: Failed malloc pBeacon")); @@ -412,8 +412,8 @@ ibss_coalesce_save(tpAniSirGlobal pMac, return; } - cdf_mem_copy(pMac->lim.ibssInfo.pHdr, pHdr, sizeof(*pHdr)); - cdf_mem_copy(pMac->lim.ibssInfo.pBeacon, pBeacon, sizeof(*pBeacon)); + qdf_mem_copy(pMac->lim.ibssInfo.pHdr, pHdr, sizeof(*pHdr)); + qdf_mem_copy(pMac->lim.ibssInfo.pBeacon, pBeacon, sizeof(*pBeacon)); } /* @@ -502,7 +502,7 @@ ibss_status_chg_notify(tpAniSirGlobal pMac, beacon, bcnLen, status, sessionId); if (beacon != NULL) { - cdf_mem_free(beacon); + qdf_mem_free(beacon); } } @@ -523,7 +523,7 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry) return; } - cdf_mem_copy(psessionEntry->bssId, pHdr->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(psessionEntry->bssId, pHdr->bssId, sizeof(tSirMacAddr)); sir_copy_mac_addr(pHdr->bssId, psessionEntry->bssId); @@ -544,7 +544,7 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry) psessionEntry->shortSlotTimeSupported = pBeacon->capabilityInfo.shortSlotTime; } - cdf_mem_copy((uint8_t *) &psessionEntry->pLimStartBssReq-> + qdf_mem_copy((uint8_t *) &psessionEntry->pLimStartBssReq-> operationalRateSet, (uint8_t *) &pBeacon->supportedRates, pBeacon->supportedRates.numRates); @@ -575,12 +575,12 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry) * even though all the nodes are capable of doing CB. * so it is decided to leave the self HT capabilties intact. This may change if some issues are found in interop. */ - cdf_mem_set((void *)&mlmStartReq, sizeof(mlmStartReq), 0); + qdf_mem_set((void *)&mlmStartReq, sizeof(mlmStartReq), 0); - cdf_mem_copy(mlmStartReq.bssId, pHdr->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(mlmStartReq.bssId, pHdr->bssId, sizeof(tSirMacAddr)); mlmStartReq.rateSet.numRates = psessionEntry->pLimStartBssReq->operationalRateSet.numRates; - cdf_mem_copy(&mlmStartReq.rateSet.rate[0], + qdf_mem_copy(&mlmStartReq.rateSet.rate[0], &psessionEntry->pLimStartBssReq->operationalRateSet. rate[0], mlmStartReq.rateSet.numRates); mlmStartReq.bssType = eSIR_IBSS_MODE; @@ -597,7 +597,7 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry) mlmStartReq.cbMode = psessionEntry->pLimStartBssReq->cbMode; /* Copy the SSID for RxP filtering based on SSID. */ - cdf_mem_copy((uint8_t *) &mlmStartReq.ssId, + qdf_mem_copy((uint8_t *) &mlmStartReq.ssId, (uint8_t *) &psessionEntry->pLimStartBssReq->ssId, psessionEntry->pLimStartBssReq->ssId.length + 1); @@ -663,7 +663,7 @@ void lim_ibss_init(tpAniSirGlobal pMac) pMac->lim.gLimNumIbssPeers = 0; /* ibss info - params for which ibss to join while coalescing */ - cdf_mem_set(&pMac->lim.ibssInfo, sizeof(tAniSirLimIbss), 0); + qdf_mem_set(&pMac->lim.ibssInfo, sizeof(tAniSirLimIbss), 0); } /*** end lim_ibss_init() ***/ /** @@ -729,9 +729,9 @@ void lim_ibss_delete_all_peers(tpAniSirGlobal pMac, tpPESession psessionEntry) pMac->lim.gLimIbssPeerList = pTempNode; if (pCurrNode->beacon) { - cdf_mem_free(pCurrNode->beacon); + qdf_mem_free(pCurrNode->beacon); } - cdf_mem_free(pCurrNode); + qdf_mem_free(pCurrNode); if (pMac->lim.gLimNumIbssPeers > 0) /* be paranoid */ pMac->lim.gLimNumIbssPeers--; pCurrNode = pTempNode; @@ -838,7 +838,7 @@ lim_ibss_update_protection_params(tpAniSirGlobal pMac, (pMac, pMac->lim.protStaCache[i].addr, LOG1); ) - if (cdf_mem_compare(pMac->lim.protStaCache[i].addr, + if (!qdf_mem_cmp(pMac->lim.protStaCache[i].addr, peerMacAddr, sizeof(tSirMacAddr))) { PELOG1(lim_log @@ -862,7 +862,7 @@ lim_ibss_update_protection_params(tpAniSirGlobal pMac, return; } - cdf_mem_copy(pMac->lim.protStaCache[i].addr, + qdf_mem_copy(pMac->lim.protStaCache[i].addr, peerMacAddr, sizeof(tSirMacAddr)); pMac->lim.protStaCache[i].protStaCacheType = protStaCacheType; @@ -985,7 +985,7 @@ lim_ibss_sta_add(tpAniSirGlobal pMac, void *pBody, tpPESession psessionEntry) tSirMacAddr *pPeerAddr = (tSirMacAddr *) pBody; tUpdateBeaconParams beaconParams; - cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); + qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); if (pBody == 0) { PELOGE(lim_log(pMac, LOGE, FL("Invalid IBSS AddSta"));) @@ -1084,7 +1084,7 @@ lim_ibss_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession psessionEntry) FL("IBSS: ADD_STA_RSP for unknown MAC addr ")); ) lim_print_mac_addr(pMac, pAddStaParams->staMac, LOGE); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); return eSIR_FAILURE; } @@ -1094,7 +1094,7 @@ lim_ibss_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession psessionEntry) pAddStaParams->status); ) lim_print_mac_addr(pMac, pAddStaParams->staMac, LOGE); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); return eSIR_FAILURE; } @@ -1115,7 +1115,7 @@ lim_ibss_add_sta_rsp(tpAniSirGlobal pMac, void *msg, tpPESession psessionEntry) eWNI_SME_IBSS_NEW_PEER_IND, psessionEntry->smeSessionId); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); return eSIR_SUCCESS; } @@ -1151,7 +1151,7 @@ void lim_ibss_del_bss_rsp_when_coalescing(tpAniSirGlobal pMac, void *msg, end: if (pDelBss != NULL) - cdf_mem_free(pDelBss); + qdf_mem_free(pDelBss); } void lim_ibss_add_bss_rsp_when_coalescing(tpAniSirGlobal pMac, void *msg, @@ -1178,10 +1178,10 @@ void lim_ibss_add_bss_rsp_when_coalescing(tpAniSirGlobal pMac, void *msg, infoLen = sizeof(tSirMacAddr) + sizeof(tSirMacChanNum) + sizeof(uint8_t) + pBeacon->ssId.length + 1; - cdf_mem_set((void *)&newBssInfo, sizeof(newBssInfo), 0); - cdf_mem_copy(newBssInfo.bssId.bytes, pHdr->bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_set((void *)&newBssInfo, sizeof(newBssInfo), 0); + qdf_mem_copy(newBssInfo.bssId.bytes, pHdr->bssId, QDF_MAC_ADDR_SIZE); newBssInfo.channelNumber = (tSirMacChanNum) pAddBss->currentOperChannel; - cdf_mem_copy((uint8_t *) &newBssInfo.ssId, + qdf_mem_copy((uint8_t *) &newBssInfo.ssId, (uint8_t *) &pBeacon->ssId, pBeacon->ssId.length + 1); PELOGW(lim_log @@ -1274,7 +1274,7 @@ void lim_ibss_del_bss_rsp(tpAniSirGlobal pMac, void *msg, tpPESession psessionEn end: if (pDelBss != NULL) - cdf_mem_free(pDelBss); + qdf_mem_free(pDelBss); /* Delete PE session once BSS is deleted */ if (NULL != psessionEntry) { lim_send_sme_rsp(pMac, eWNI_SME_STOP_BSS_RSP, rc, @@ -1307,7 +1307,7 @@ __lim_ibss_search_and_delete_peer(tpAniSirGlobal pMac, pTempNextNode = pTempNode->next; /* Delete the STA with MAC address */ - if (cdf_mem_compare((uint8_t *) macAddr, + if (!qdf_mem_cmp((uint8_t *) macAddr, (uint8_t *) &pTempNode->peerMacAddr, sizeof(tSirMacAddr))) { pStaDs = dph_lookup_hash_entry(pMac, macAddr, @@ -1339,7 +1339,7 @@ __lim_ibss_search_and_delete_peer(tpAniSirGlobal pMac, } else pPrevNode->next = pTempNode->next; - cdf_mem_free(pTempNode); + qdf_mem_free(pTempNode); pMac->lim.gLimNumIbssPeers--; pTempNode = pTempNextNode; @@ -1393,7 +1393,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, tpDphHashNode pStaDs; tUpdateBeaconParams beaconParams; - cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); + qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); sir_copy_mac_addr(currentBssId, psessionEntry->bssId); @@ -1403,7 +1403,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, MAC_ADDR_ARRAY(pHdr->bssId)); /* Check for IBSS Coalescing only if Beacon is from different BSS */ - if (!cdf_mem_compare(currentBssId, pHdr->bssId, sizeof(tSirMacAddr)) + if (qdf_mem_cmp(currentBssId, pHdr->bssId, sizeof(tSirMacAddr)) && psessionEntry->isCoalesingInIBSSAllowed) { /* * If STA entry is already available in the LIM hash table, then it is @@ -1444,7 +1444,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, ibss_bss_delete(pMac, psessionEntry); return eSIR_SUCCESS; } else { - if (!cdf_mem_compare + if (qdf_mem_cmp (currentBssId, pHdr->bssId, sizeof(tSirMacAddr))) return eSIR_LIM_IGNORE_BEACON; } @@ -1480,7 +1480,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, frameLen = sizeof(tLimIbssPeerNode) + ieLen - sizeof(uint32_t); - pPeerNode = cdf_mem_malloc((uint16_t) frameLen); + pPeerNode = qdf_mem_malloc((uint16_t) frameLen); if (NULL == pPeerNode) { lim_log(pMac, LOGP, FL @@ -1494,7 +1494,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, ibss_peer_collect(pMac, pBeacon, pHdr, pPeerNode, psessionEntry); - pPeerNode->beacon = cdf_mem_malloc(ieLen); + pPeerNode->beacon = qdf_mem_malloc(ieLen); if (NULL == pPeerNode->beacon) { PELOGE(lim_log (pMac, LOGE, @@ -1502,7 +1502,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac, ("Unable to allocate memory to store beacon")); ) } else { - cdf_mem_copy(pPeerNode->beacon, pIEs, ieLen); + qdf_mem_copy(pPeerNode->beacon, pIEs, ieLen); pPeerNode->beaconLen = (uint16_t) ieLen; } ibss_peer_add(pMac, pPeerNode); @@ -1659,7 +1659,7 @@ void lim_ibss_heart_beat_handle(tpAniSirGlobal mac_ctx, tpPESession session) prevnode->next = tempnode->next; } - cdf_mem_free(tempnode); + qdf_mem_free(tempnode); mac_ctx->lim.gLimNumIbssPeers--; /* we deleted current node, so prevNode remains same. */ @@ -1753,7 +1753,7 @@ void lim_ibss_decide_protection_on_delete(tpAniSirGlobal mac_ctx, for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { if (!mac_ctx->lim.protStaCache[i].active) continue; - if (cdf_mem_compare(mac_ctx->lim.protStaCache[i].addr, + if (!qdf_mem_cmp(mac_ctx->lim.protStaCache[i].addr, stads->staAddr, sizeof(tSirMacAddr))) { session->gLim11bParams.numSta--; mac_ctx->lim.protStaCache[i].active = false; diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index c61e18930916..416edf1dd824 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -78,7 +78,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, msg->staId, msg->reasonCode); if (LIM_IS_IBSS_ROLE(session_entry)) { - cdf_mem_free(msg); + qdf_mem_free(msg); return; } @@ -89,7 +89,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, lim_log(mac_ctx, LOGE, FL("Invalid STA limSystemRole=%d"), GET_LIM_SYSTEM_ROLE(session_entry)); - cdf_mem_free(msg); + qdf_mem_free(msg); return; } stads->del_sta_ctx_rssi = msg->rssi; @@ -100,7 +100,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, if (stads->staIndex != msg->staId) { lim_log(mac_ctx, LOGE, FL("staid mismatch: %d vs %d "), stads->staIndex, msg->staId); - cdf_mem_free(msg); + qdf_mem_free(msg); return; } @@ -125,7 +125,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, lim_log(mac_ctx, LOGE, FL("Inv Del STA staId:%d, assocId:%d"), msg->staId, msg->assocId); - cdf_mem_free(msg); + qdf_mem_free(msg); return; } else { lim_send_disassoc_mgmt_frame(mac_ctx, @@ -172,7 +172,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, "in some transit state, Addr = " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(msg->bssId)); - cdf_mem_free(msg); + qdf_mem_free(msg); return; } @@ -182,7 +182,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg, eLIM_LINK_MONITORING_DEAUTH; /* Issue Deauth Indication to SME. */ - cdf_mem_copy((uint8_t *) &mlm_deauth_ind.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlm_deauth_ind.peerMacAddr, stads->staAddr, sizeof(tSirMacAddr)); mlm_deauth_ind.reasonCode = (uint8_t) stads->mlmStaContext.disassocReason; @@ -229,7 +229,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx, tpSirMsgQ lim_msg) &session_id); if (NULL == session_entry) { lim_log(mac_ctx, LOGE, FL("session does not exist")); - cdf_mem_free(msg); + qdf_mem_free(msg); return; } @@ -251,7 +251,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx, tpSirMsgQ lim_msg) lim_log(mac_ctx, LOGE, FL(" Unknown reason code ")); break; } - cdf_mem_free(msg); + qdf_mem_free(msg); return; } @@ -289,7 +289,7 @@ lim_trigger_sta_deletion(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, sta_ds->mlmStaContext.disassocReason = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON; sta_ds->mlmStaContext.cleanupTrigger = eLIM_LINK_MONITORING_DISASSOC; - cdf_mem_copy(&mlm_disassoc_ind.peerMacAddr, sta_ds->staAddr, + qdf_mem_copy(&mlm_disassoc_ind.peerMacAddr, sta_ds->staAddr, sizeof(tSirMacAddr)); mlm_disassoc_ind.reasonCode = eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON; @@ -329,7 +329,8 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, /* tear down the following sessionEntry */ tpPESession psessionEntry; - if ((psessionEntry = pe_find_session_by_session_id(pMac, sessionId)) == NULL) { + psessionEntry = pe_find_session_by_session_id(pMac, sessionId); + if (psessionEntry == NULL) { lim_log(pMac, LOGP, FL("Session Does not exist for given sessionID")); return; @@ -377,7 +378,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, eLIM_MLM_WT_DEL_STA_RSP_STATE; /* / Issue Deauth Indication to SME. */ - cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr)); /* @@ -397,7 +398,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, lim_log(pMac, LOGE, FL("HB Failure on MAC " MAC_ADDRESS_STR" Store it on Index %d"), - MAC_ADDR_ARRAY(pStaDs->staAddr),apCount); + MAC_ADDR_ARRAY(pStaDs->staAddr), apCount); sir_copy_mac_addr(pMac->lim.gLimHeartBeatApMac[apCount], pStaDs->staAddr); @@ -488,8 +489,8 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx, if (curr_chan < SIR_MAX_24G_5G_CHANNEL_RANGE) { lim_covert_channel_scan_type(mac_ctx, curr_chan, false); - mac_ctx->lim.dfschannelList.timeStamp[curr_chan] - = 0; + mac_ctx->lim.dfschannelList. + timeStamp[curr_chan] = 0; } /* * Connected on DFS channel so should not send the diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c index 1c8b8c73d815..bf79d48ba613 100644 --- a/core/mac/src/pe/lim/lim_p2p.c +++ b/core/mac/src/pe/lim/lim_p2p.c @@ -85,14 +85,14 @@ static QDF_STATUS lim_send_hal_req_remain_on_chan_offload(tpAniSirGlobal pMac, tSirMsgQ msg; tSirRetStatus rc = eSIR_SUCCESS; - pScanOffloadReq = cdf_mem_malloc(sizeof(tSirScanOffloadReq)); + pScanOffloadReq = qdf_mem_malloc(sizeof(tSirScanOffloadReq)); if (NULL == pScanOffloadReq) { lim_log(pMac, LOGE, FL("Memory allocation failed for pScanOffloadReq")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq)); + qdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq)); msg.type = WMA_START_SCAN_OFFLOAD_REQ; msg.bodyptr = pScanOffloadReq; @@ -121,7 +121,7 @@ static QDF_STATUS lim_send_hal_req_remain_on_chan_offload(tpAniSirGlobal pMac, if (rc != eSIR_SUCCESS) { lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure %u"), rc); - cdf_mem_free(pScanOffloadReq); + qdf_mem_free(pScanOffloadReq); return QDF_STATUS_E_FAILURE; } @@ -145,7 +145,7 @@ int lim_process_remain_on_chnl_req(tpAniSirGlobal pMac, uint32_t *pMsg) /* Post the meessage to Sme */ lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, status, msgbuff->sessionId, msgbuff->scan_id); - cdf_mem_free(pMac->lim.gpLimRemainOnChanReq); + qdf_mem_free(pMac->lim.gpLimRemainOnChanReq); pMac->lim.gpLimRemainOnChanReq = NULL; } return false; @@ -356,7 +356,7 @@ void lim_remain_on_chn_rsp(tpAniSirGlobal pMac, QDF_STATUS status, uint32_t *dat status, MsgRemainonChannel->sessionId, 0); - cdf_mem_free(pMac->lim.gpLimRemainOnChanReq); + qdf_mem_free(pMac->lim.gpLimRemainOnChanReq); pMac->lim.gpLimRemainOnChanReq = NULL; pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState; @@ -386,13 +386,13 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType, length = sizeof(tSirSmeMgmtFrameInd) + frameLen; - pSirSmeMgmtFrame = cdf_mem_malloc(length); + pSirSmeMgmtFrame = qdf_mem_malloc(length); if (NULL == pSirSmeMgmtFrame) { lim_log(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_LISTEN_RSP")); return; } - cdf_mem_set((void *)pSirSmeMgmtFrame, length, 0); + qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0); pSirSmeMgmtFrame->frame_len = frameLen; pSirSmeMgmtFrame->sessionId = sessionId; @@ -400,15 +400,15 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType, pSirSmeMgmtFrame->rxRssi = rxRssi; pSirSmeMgmtFrame->rxChan = rxChannel; - cdf_mem_zero(pSirSmeMgmtFrame->frameBuf, frameLen); - cdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen); + qdf_mem_zero(pSirSmeMgmtFrame->frameBuf, frameLen); + qdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen); if (pMac->mgmt_frame_ind_cb) pMac->mgmt_frame_ind_cb(pSirSmeMgmtFrame); else lim_log(pMac, LOGW, FL("Management indication callback not registered!!")); - cdf_mem_free(pSirSmeMgmtFrame); + qdf_mem_free(pSirSmeMgmtFrame); return; } @@ -577,8 +577,8 @@ void lim_send_p2p_action_frame(tpAniSirGlobal mac_ctx, tpSirMacP2PActionFrameHdr action_hdr = (tpSirMacP2PActionFrameHdr) ((uint8_t *) mb_msg->data + ACTION_OFFSET); - if (cdf_mem_compare(action_hdr->Oui, SIR_MAC_P2P_OUI, - SIR_MAC_P2P_OUI_SIZE) && + if ((!qdf_mem_cmp(action_hdr->Oui, SIR_MAC_P2P_OUI, + SIR_MAC_P2P_OUI_SIZE)) && (SIR_MAC_ACTION_P2P_SUBTYPE_PRESENCE_RSP == action_hdr->OuiSubType)) { @@ -663,7 +663,7 @@ void lim_send_p2p_action_frame(tpAniSirGlobal mac_ctx, return; } /* Paranoia: */ - cdf_mem_set(frame, msg_len, 0); + qdf_mem_set(frame, msg_len, 0); /* * Add sequence number to action frames @@ -676,14 +676,14 @@ void lim_send_p2p_action_frame(tpAniSirGlobal mac_ctx, /* Add 2 bytes for length and Arribute field */ uint32_t nBytesToCopy = ((p2p_ie + orig_len + 2) - (uint8_t *) mb_msg->data); - cdf_mem_copy(frame, mb_msg->data, nBytesToCopy); - cdf_mem_copy((frame + nBytesToCopy), noa_stream, noa_len); - cdf_mem_copy((frame + nBytesToCopy + noa_len), + qdf_mem_copy(frame, mb_msg->data, nBytesToCopy); + qdf_mem_copy((frame + nBytesToCopy), noa_stream, noa_len); + qdf_mem_copy((frame + nBytesToCopy + noa_len), mb_msg->data + nBytesToCopy, msg_len - nBytesToCopy - noa_len); } else { - cdf_mem_copy(frame, mb_msg->data, msg_len); + qdf_mem_copy(frame, mb_msg->data, msg_len); } #ifdef WLAN_FEATURE_11W @@ -760,14 +760,14 @@ tSirRetStatus __lim_process_sme_no_a_update(tpAniSirGlobal pMac, uint32_t *pMsgB pNoA = (tpP2pPsConfig) pMsgBuf; - pMsgNoA = cdf_mem_malloc(sizeof(tP2pPsConfig)); + pMsgNoA = qdf_mem_malloc(sizeof(tP2pPsConfig)); if (NULL == pMsgNoA) { lim_log(pMac, LOGE, FL("Unable to allocate memory during NoA Update")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pMsgNoA, sizeof(tP2pPsConfig), 0); + 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 09b833413aae..af506051e44d 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -229,7 +229,7 @@ static void __lim_process_channel_switch_action_frame(tpAniSirGlobal mac_ctx, if (!session->lim11hEnable) return; - chnl_switch_frame = cdf_mem_malloc(sizeof(*chnl_switch_frame)); + chnl_switch_frame = qdf_mem_malloc(sizeof(*chnl_switch_frame)); if (NULL == chnl_switch_frame) { lim_log(mac_ctx, LOGE, FL("AllocateMemory failed")); return; @@ -243,7 +243,7 @@ static void __lim_process_channel_switch_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Failed to unpack and parse (0x%08x, %d bytes)"), status, frame_len); - cdf_mem_free(chnl_switch_frame); + qdf_mem_free(chnl_switch_frame); return; } else if (DOT11F_WARNED(status)) { lim_log(mac_ctx, LOGW, @@ -251,11 +251,11 @@ static void __lim_process_channel_switch_action_frame(tpAniSirGlobal mac_ctx, status, frame_len); } - if (!(cdf_mem_compare((uint8_t *) &session->bssId, - (uint8_t *) &mac_hdr->sa, sizeof(tSirMacAddr)))) { + if (qdf_mem_cmp((uint8_t *) &session->bssId, + (uint8_t *) &mac_hdr->sa, sizeof(tSirMacAddr))) { lim_log(mac_ctx, LOG1, FL("Rcvd action frame not from our BSS, dropping...")); - cdf_mem_free(chnl_switch_frame); + qdf_mem_free(chnl_switch_frame); return; } /* copy the beacon interval from session */ @@ -334,7 +334,7 @@ static void __lim_process_channel_switch_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("Could not start channel switch")); - cdf_mem_free(chnl_switch_frame); + qdf_mem_free(chnl_switch_frame); return; } @@ -368,7 +368,7 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("Received EXT Channel switch action frame")); ext_channel_switch_frame = - cdf_mem_malloc(sizeof(*ext_channel_switch_frame)); + qdf_mem_malloc(sizeof(*ext_channel_switch_frame)); if (NULL == ext_channel_switch_frame) { lim_log(mac_ctx, LOGE, FL("AllocateMemory failed")); return; @@ -383,7 +383,7 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Failed to parse CHANSW action frame (0x%08x, len %d):"), status, frame_len); - cdf_mem_free(ext_channel_switch_frame); + qdf_mem_free(ext_channel_switch_frame); return; } else if (DOT11F_WARNED(status)) { @@ -396,7 +396,7 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx, ext_channel_switch_frame->ext_chan_switch_ann_action.new_channel; /* Free ext_channel_switch_frame here as its no longer needed */ - cdf_mem_free(ext_channel_switch_frame); + qdf_mem_free(ext_channel_switch_frame); /* * Now, validate if channel change is required for the passed * channel and if is valid in the current regulatory domain, @@ -417,14 +417,14 @@ lim_process_ext_channel_switch_action_frame(tpAniSirGlobal mac_ctx, struct sir_sme_ext_cng_chan_ind *ext_cng_chan_ind; tSirMsgQ mmh_msg; - ext_cng_chan_ind = cdf_mem_malloc(sizeof(*ext_cng_chan_ind)); + ext_cng_chan_ind = qdf_mem_malloc(sizeof(*ext_cng_chan_ind)); if (NULL == ext_cng_chan_ind) { lim_log(mac_ctx, LOGP, FL("AllocateMemory failed for ext_cng_chan_ind")); return; } - cdf_mem_zero(ext_cng_chan_ind, + qdf_mem_zero(ext_cng_chan_ind, sizeof(*ext_cng_chan_ind)); ext_cng_chan_ind->session_id = session_entry->smeSessionId; @@ -486,7 +486,7 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGW, FL("channel bonding disabled")); return; } - operating_mode_frm = cdf_mem_malloc(sizeof(*operating_mode_frm)); + operating_mode_frm = qdf_mem_malloc(sizeof(*operating_mode_frm)); if (NULL == operating_mode_frm) { lim_log(mac_ctx, LOGE, FL("AllocateMemory failed")); return; @@ -498,7 +498,7 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Failed to unpack and parse (0x%08x, %d bytes)"), status, frame_len); - cdf_mem_free(operating_mode_frm); + qdf_mem_free(operating_mode_frm); return; } else if (DOT11F_WARNED(status)) { lim_log(mac_ctx, LOGW, @@ -577,7 +577,7 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx, lim_set_nss_change(mac_ctx, session, sta_ptr->vhtSupportedRxNss, sta_ptr->staIndex, mac_hdr->sa); } - cdf_mem_free(operating_mode_frm); + qdf_mem_free(operating_mode_frm); return; } @@ -610,7 +610,7 @@ static void __lim_process_gid_management_action_frame(tpAniSirGlobal mac_ctx, frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); lim_log(mac_ctx, LOG3, FL("Received GID Management action frame")); - gid_mgmt_frame = cdf_mem_malloc(sizeof(*gid_mgmt_frame)); + gid_mgmt_frame = qdf_mem_malloc(sizeof(*gid_mgmt_frame)); if (NULL == gid_mgmt_frame) { lim_log(mac_ctx, LOGE, FL("AllocateMemory failed")); return; @@ -623,7 +623,7 @@ static void __lim_process_gid_management_action_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Fail to parse an Grp id frame (0x%08x, %d bytes):"), status, frame_len); - cdf_mem_free(gid_mgmt_frame); + qdf_mem_free(gid_mgmt_frame); return; } else if (DOT11F_WARNED(status)) { lim_log(mac_ctx, LOGW, @@ -678,7 +678,7 @@ static void __lim_process_gid_management_action_frame(tpAniSirGlobal mac_ctx, lim_check_membership_user_position(mac_ctx, session, membership, usr_position, sta_ptr->staIndex); out: - cdf_mem_free(gid_mgmt_frame); + qdf_mem_free(gid_mgmt_frame); return; } @@ -816,7 +816,7 @@ static void __lim_process_add_ts_rsp(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGW, "TSM IE Present"); session->eseContext.tsm.tid = addts.tspec.tsinfo.traffic.userPrio; - cdf_mem_copy(&session->eseContext.tsm.tsmInfo, + qdf_mem_copy(&session->eseContext.tsm.tsmInfo, &addts.tsmIE, sizeof(tSirMacESETSMIE)); #ifdef FEATURE_WLAN_ESE_UPLOAD lim_send_sme_tsm_ie_ind(mac_ctx, session, addts.tsmIE.tsid, @@ -1188,7 +1188,7 @@ __lim_process_measurement_request_frame(tpAniSirGlobal pMac, pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo); frameLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); - pMeasReqFrame = cdf_mem_malloc(sizeof(tSirMacMeasReqActionFrame)); + pMeasReqFrame = qdf_mem_malloc(sizeof(tSirMacMeasReqActionFrame)); if (NULL == pMeasReqFrame) { lim_log(pMac, LOGE, FL @@ -1239,7 +1239,7 @@ __lim_process_tpc_request_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, (pMac, LOG1, FL("****LIM: Processing TPC Request from peer ****")); ) - pTpcReqFrame = cdf_mem_malloc(sizeof(tSirMacTpcReqActionFrame)); + pTpcReqFrame = qdf_mem_malloc(sizeof(tSirMacTpcReqActionFrame)); if (NULL == pTpcReqFrame) { PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory failed "));) return; @@ -1459,7 +1459,7 @@ __lim_process_neighbor_report(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo); frameLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); - pFrm = cdf_mem_malloc(sizeof(tDot11fNeighborReportResponse)); + pFrm = qdf_mem_malloc(sizeof(tDot11fNeighborReportResponse)); if (NULL == pFrm) { lim_log(pMac, LOGE, FL @@ -1468,7 +1468,7 @@ __lim_process_neighbor_report(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, } if (psessionEntry == NULL) { - cdf_mem_free(pFrm); + qdf_mem_free(pFrm); return; } @@ -1484,7 +1484,7 @@ __lim_process_neighbor_report(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, PELOG2(sir_dump_buf (pMac, SIR_DBG_MODULE_ID, LOG2, pBody, frameLen); ) - cdf_mem_free(pFrm); + qdf_mem_free(pFrm); return; } else if (DOT11F_WARNED(nStatus)) { lim_log(pMac, LOGW, @@ -1498,7 +1498,7 @@ __lim_process_neighbor_report(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, /* Call rrm function to handle the request. */ rrm_process_neighbor_report_response(pMac, pFrm, psessionEntry); - cdf_mem_free(pFrm); + qdf_mem_free(pFrm); } #endif @@ -1556,7 +1556,7 @@ static void __lim_process_sa_query_request_action_frame(tpAniSirGlobal pMac, Category : 1 byte Action : 1 byte Transaction ID : 2 bytes */ - cdf_mem_copy(&transId[0], &pBody[2], 2); + qdf_mem_copy(&transId[0], &pBody[2], 2); /* Send 11w SA query response action frame */ if (lim_send_sa_query_response_frame(pMac, @@ -1643,7 +1643,7 @@ static void __lim_process_sa_query_response_action_frame(tpAniSirGlobal pMac, Category : 1 byte Action : 1 byte Transaction ID : 2 bytes */ - cdf_mem_copy(&transId, &pBody[2], 2); + qdf_mem_copy(&transId, &pBody[2], 2); /* If SA Query is in progress with the station and the station responds then the association request that triggered the SA @@ -1959,10 +1959,10 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx, /* Check if it is a vendor specific action frame. */ if (LIM_IS_STA_ROLE(session) && - (true == cdf_mem_compare(session->selfMacAddr, + (true != qdf_mem_cmp(session->selfMacAddr, &mac_hdr->da[0], sizeof(tSirMacAddr))) && IS_WES_MODE_ENABLED(mac_ctx) - && cdf_mem_compare(vendor_specific->Oui, oui, 3)) { + && !qdf_mem_cmp(vendor_specific->Oui, oui, 3)) { lim_log(mac_ctx, LOGW, FL("Rcvd Vendor specific frame, OUI %x %x %x"), vendor_specific->Oui[0], @@ -2006,7 +2006,7 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx, mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); /* Check if it is a P2P public action frame. */ - if (cdf_mem_compare(pub_action->Oui, p2p_oui, 4)) { + if (!qdf_mem_cmp(pub_action->Oui, p2p_oui, 4)) { /* * Forward to the SME to HDD to wpa_supplicant * type is ACTION @@ -2185,7 +2185,7 @@ void lim_process_action_frame_no_session(tpAniSirGlobal pMac, uint8_t *pBd) frameLen = WMA_GET_RX_PAYLOAD_LEN(pBd); /* Check if it is a P2P public action frame. */ - if (cdf_mem_compare(pActionHdr->Oui, P2POui, 4)) { + if (!qdf_mem_cmp(pActionHdr->Oui, P2POui, 4)) { /* Forward to the SME to HDD to wpa_supplicant */ /* type is ACTION */ lim_send_sme_mgmt_frame_ind(pMac, 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 aa5b4eb73957..2754cbb7309c 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 @@ -328,7 +328,7 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, sir_dump_buf(pMac, SIR_LIM_MODULE_ID, LOG2, (uint8_t *) pBody, framelen); - if (cdf_mem_compare((uint8_t *) pHdr->sa, (uint8_t *) pHdr->da, + if (!qdf_mem_cmp((uint8_t *) pHdr->sa, (uint8_t *) pHdr->da, (uint8_t) (sizeof(tSirMacAddr)))) { lim_log(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as" @@ -349,12 +349,12 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, return; } /* Allocate memory for the Assoc Request frame */ - pAssocReq = cdf_mem_malloc(sizeof(*pAssocReq)); + pAssocReq = qdf_mem_malloc(sizeof(*pAssocReq)); if (NULL == pAssocReq) { lim_log(pMac, LOGP, FL("Allocate Memory failed in assoc_req")); return; } - cdf_mem_set((void *)pAssocReq, sizeof(*pAssocReq), 0); + qdf_mem_set((void *)pAssocReq, sizeof(*pAssocReq), 0); /* Parse Assoc Request frame */ if (subType == LIM_ASSOC) @@ -376,7 +376,7 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, goto error; } - pAssocReq->assocReqFrame = cdf_mem_malloc(framelen); + pAssocReq->assocReqFrame = qdf_mem_malloc(framelen); if (NULL == pAssocReq->assocReqFrame) { lim_log(pMac, LOGE, FL("Unable to allocate memory for the assoc req, " @@ -384,7 +384,7 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, goto error; } - cdf_mem_copy((uint8_t *) pAssocReq->assocReqFrame, + qdf_mem_copy((uint8_t *) pAssocReq->assocReqFrame, (uint8_t *) pBody, framelen); pAssocReq->assocReqFrameLength = framelen; @@ -417,7 +417,7 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, updateContext = false; - if (lim_cmp_ssid(&pAssocReq->ssId, psessionEntry) == false) { + if (lim_cmp_ssid(&pAssocReq->ssId, psessionEntry) != false) { lim_log(pMac, LOGE, FL("Received %s Req with unmatched ssid ( Received" " SSID: %.*s current SSID: %.*s ) from " @@ -684,8 +684,8 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, } /* End if on HT caps turned on in lim. */ /* Clear the buffers so that frame parser knows that there isn't a previously decoded IE in these buffers */ - cdf_mem_set((uint8_t *) &Dot11fIERSN, sizeof(Dot11fIERSN), 0); - cdf_mem_set((uint8_t *) &Dot11fIEWPA, sizeof(Dot11fIEWPA), 0); + qdf_mem_set((uint8_t *) &Dot11fIERSN, sizeof(Dot11fIERSN), 0); + qdf_mem_set((uint8_t *) &Dot11fIEWPA, sizeof(Dot11fIEWPA), 0); /* if additional IE is present, check if it has WscIE */ if (pAssocReq->addIEPresent && pAssocReq->addIE.length) @@ -1008,8 +1008,8 @@ lim_process_assoc_req_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, #endif /* no change in the capability so drop the frame */ - if ((true == - cdf_mem_compare(&pStaDs->mlmStaContext.capabilityInfo, + if ((true != + qdf_mem_cmp(&pStaDs->mlmStaContext.capabilityInfo, &pAssocReq->capabilityInfo, sizeof(tSirMacCapabilityInfo))) && (subType == LIM_ASSOC)) { @@ -1158,11 +1158,11 @@ sendIndToSme: pTempAssocReq = psessionEntry->parsedAssocReq[pStaDs->assocId]; if (pTempAssocReq != NULL) { if (pTempAssocReq->assocReqFrame) { - cdf_mem_free(pTempAssocReq->assocReqFrame); + qdf_mem_free(pTempAssocReq->assocReqFrame); pTempAssocReq->assocReqFrame = NULL; pTempAssocReq->assocReqFrameLength = 0; } - cdf_mem_free(pTempAssocReq); + qdf_mem_free(pTempAssocReq); pTempAssocReq = NULL; } @@ -1598,12 +1598,12 @@ sendIndToSme: error: if (pAssocReq != NULL) { if (pAssocReq->assocReqFrame) { - cdf_mem_free(pAssocReq->assocReqFrame); + qdf_mem_free(pAssocReq->assocReqFrame); pAssocReq->assocReqFrame = NULL; pAssocReq->assocReqFrameLength = 0; } - cdf_mem_free(pAssocReq); + qdf_mem_free(pAssocReq); /* to avoid double free */ if (assoc_req_copied && psessionEntry->parsedAssocReq) psessionEntry->parsedAssocReq[pStaDs->assocId] = NULL; @@ -1617,12 +1617,12 @@ error: psessionEntry->parsedAssocReq[pStaDs->assocId]; if (pTempAssocReq != NULL) { if (pTempAssocReq->assocReqFrame) { - cdf_mem_free(pTempAssocReq-> + qdf_mem_free(pTempAssocReq-> assocReqFrame); pTempAssocReq->assocReqFrame = NULL; pTempAssocReq->assocReqFrameLength = 0; } - cdf_mem_free(pTempAssocReq); + qdf_mem_free(pTempAssocReq); psessionEntry-> parsedAssocReq[pStaDs->assocId] = NULL; } @@ -1656,7 +1656,7 @@ static void lim_fill_assoc_ind_wapi_info(tpAniSirGlobal mac_ctx, assoc_req->wapi.length); assoc_ind->wapiIE.wapiIEdata[0] = SIR_MAC_WAPI_EID; assoc_ind->wapiIE.wapiIEdata[1] = assoc_req->wapi.length; - cdf_mem_copy(&assoc_ind->wapiIE.wapiIEdata[2], + qdf_mem_copy(&assoc_ind->wapiIE.wapiIEdata[2], assoc_req->wapi.info, assoc_req->wapi.length); assoc_ind->wapiIE.length = 2 + assoc_req->wapi.length; @@ -1780,7 +1780,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, if (sub_type == LIM_ASSOC || sub_type == LIM_REASSOC) { temp = sizeof(tLimMlmAssocInd); - assoc_ind = cdf_mem_malloc(temp); + assoc_ind = qdf_mem_malloc(temp); if (NULL == assoc_ind) { lim_release_peer_idx(mac_ctx, sta_ds->assocId, session_entry); @@ -1788,11 +1788,11 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, FL("AllocateMemory failed for assoc_ind")); return; } - cdf_mem_set(assoc_ind, temp, 0); - cdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr, + 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; - cdf_mem_copy((uint8_t *) &assoc_ind->ssId, + qdf_mem_copy((uint8_t *) &assoc_ind->ssId, (uint8_t *) &(assoc_req->ssId), assoc_req->ssId.length + 1); assoc_ind->sessionId = session_entry->peSessionId; @@ -1814,7 +1814,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, assoc_ind->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID; assoc_ind->rsnIE.rsnIEdata[1] = assoc_req->rsn.length; - cdf_mem_copy(&assoc_ind->rsnIE.rsnIEdata[2], + qdf_mem_copy(&assoc_ind->rsnIE.rsnIEdata[2], assoc_req->rsn.info, assoc_req->rsn.length); } @@ -1840,14 +1840,14 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("rsnIEdata index out of bounds %d"), rsn_len); - cdf_mem_free(assoc_ind); + qdf_mem_free(assoc_ind); return; } assoc_ind->rsnIE.rsnIEdata[rsn_len] = SIR_MAC_WPA_EID; assoc_ind->rsnIE.rsnIEdata[rsn_len + 1] = assoc_req->wpa.length; - cdf_mem_copy( + qdf_mem_copy( &assoc_ind->rsnIE.rsnIEdata[rsn_len + 2], assoc_req->wpa.info, assoc_req->wpa.length); assoc_ind->rsnIE.length += 2 + assoc_req->wpa.length; @@ -1859,7 +1859,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, assoc_ind->addIE.length = 0; if (assoc_req->addIEPresent) { - cdf_mem_copy(&assoc_ind->addIE.addIEdata, + qdf_mem_copy(&assoc_ind->addIE.addIEdata, assoc_req->addIE.addIEdata, assoc_req->addIE.length); assoc_ind->addIE.length = assoc_req->addIE.length; @@ -1876,7 +1876,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, SIR_MAC_HT_CAPABILITIES_EID; assoc_ind->addIE.addIEdata[rsn_len + 1] = DOT11F_IE_HTCAPS_MIN_LEN; - cdf_mem_copy( + qdf_mem_copy( &assoc_ind->addIE.addIEdata[rsn_len+2], ((uint8_t *)&assoc_req->HTCaps) + 1, DOT11F_IE_HTCAPS_MIN_LEN); @@ -1932,7 +1932,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx, assoc_ind); lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_IND, (uint32_t *) assoc_ind); - cdf_mem_free(assoc_ind); + qdf_mem_free(assoc_ind); } return; } diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index 876233f83d1f..510e3f2da3f2 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -335,7 +335,7 @@ void lim_update_re_assoc_globals(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, tpPESession psessionEntry) { /* Update the current Bss Information */ - cdf_mem_copy(psessionEntry->bssId, + qdf_mem_copy(psessionEntry->bssId, psessionEntry->limReAssocbssId, sizeof(tSirMacAddr)); psessionEntry->currentOperChannel = psessionEntry->limReassocChannelId; psessionEntry->htSecondaryChannelOffset = @@ -350,7 +350,7 @@ void lim_update_re_assoc_globals(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, psessionEntry->limCurrentBssPropCap = psessionEntry->limReassocBssPropCap; - cdf_mem_copy((uint8_t *) &psessionEntry->ssId, + qdf_mem_copy((uint8_t *) &psessionEntry->ssId, (uint8_t *) &psessionEntry->limReassocSSID, psessionEntry->limReassocSSID.length + 1); @@ -379,7 +379,7 @@ static void lim_update_ric_data(tpAniSirGlobal mac_ctx, tpPESession session_entry, tpSirAssocRsp assoc_rsp) { if (session_entry->ricData != NULL) { - cdf_mem_free(session_entry->ricData); + qdf_mem_free(session_entry->ricData); session_entry->ricData = NULL; session_entry->RICDataLen = 0; } @@ -388,13 +388,13 @@ static void lim_update_ric_data(tpAniSirGlobal mac_ctx, assoc_rsp->num_RICData * sizeof(tDot11fIERICDataDesc); if (session_entry->RICDataLen) { session_entry->ricData = - cdf_mem_malloc(session_entry->RICDataLen); + qdf_mem_malloc(session_entry->RICDataLen); if (NULL == session_entry->ricData) { lim_log(mac_ctx, LOGE, FL("No memory for RIC data")); session_entry->RICDataLen = 0; } else { - cdf_mem_copy(session_entry->ricData, + qdf_mem_copy(session_entry->ricData, &assoc_rsp->RICData[0], session_entry->RICDataLen); } @@ -428,7 +428,7 @@ static void lim_update_ese_tspec(tpAniSirGlobal mac_ctx, tpPESession session_entry, tpSirAssocRsp assoc_rsp) { if (session_entry->tspecIes != NULL) { - cdf_mem_free(session_entry->tspecIes); + qdf_mem_free(session_entry->tspecIes); session_entry->tspecIes = NULL; session_entry->tspecLen = 0; } @@ -438,13 +438,13 @@ static void lim_update_ese_tspec(tpAniSirGlobal mac_ctx, assoc_rsp->num_tspecs * sizeof(tDot11fIEWMMTSPEC); if (session_entry->tspecLen) { session_entry->tspecIes = - cdf_mem_malloc(session_entry->tspecLen); + qdf_mem_malloc(session_entry->tspecLen); if (NULL == session_entry->tspecIes) { lim_log(mac_ctx, LOGE, FL("Tspec IE:Fail to allocate memory")); session_entry->tspecLen = 0; } else { - cdf_mem_copy(session_entry->tspecIes, + qdf_mem_copy(session_entry->tspecIes, &assoc_rsp->TSPECInfo[0], session_entry->tspecLen); } @@ -496,7 +496,7 @@ static void lim_update_ese_tsm(tpAniSirGlobal mac_ctx, EDCA_AC_VO) { tsm_ctx->tid = assoc_rsp->TSPECInfo[cnt].user_priority; - cdf_mem_copy(&tsm_ctx->tsmInfo, + qdf_mem_copy(&tsm_ctx->tsmInfo, &assoc_rsp->tsmIE, sizeof(tSirMacESETSMIE)); #ifdef FEATURE_WLAN_ESE_UPLOAD lim_send_sme_tsm_ie_ind(mac_ctx, @@ -614,7 +614,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, (uint) abs((int8_t) WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info)), MAC_ADDR_ARRAY(hdr->sa)); - beacon = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + beacon = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == beacon) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); return; @@ -629,7 +629,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Should not recieved Re/Assoc Response in role %d "), GET_LIM_SYSTEM_ROLE(session_entry)); - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } #ifdef WLAN_FEATURE_ROAM_OFFLOAD @@ -667,12 +667,12 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, mac_ctx->lim.retry_packet_cnt++; } } - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } sir_copy_mac_addr(current_bssid, session_entry->bssId); if (subtype == LIM_ASSOC) { - if (!cdf_mem_compare + if (qdf_mem_cmp (hdr->sa, current_bssid, sizeof(tSirMacAddr))) { /* * Received Association Response frame from an entity @@ -683,11 +683,11 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, FL("received AssocRsp from unexpected peer " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(hdr->sa)); - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } } else { - if (!cdf_mem_compare + if (qdf_mem_cmp (hdr->sa, session_entry->limReAssocbssId, sizeof(tSirMacAddr))) { /* @@ -699,16 +699,16 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, FL("received ReassocRsp from unexpected peer " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(hdr->sa)); - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } } - assoc_rsp = cdf_mem_malloc(sizeof(*assoc_rsp)); + assoc_rsp = qdf_mem_malloc(sizeof(*assoc_rsp)); if (NULL == assoc_rsp) { lim_log(mac_ctx, LOGP, FL("Allocate Memory failed in AssocRsp")); - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } /* Get pointer to Re/Association Response frame body */ @@ -721,18 +721,18 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, /* parse Re/Association Response frame. */ if (sir_convert_assoc_resp_frame2_struct(mac_ctx, body, frame_len, assoc_rsp) == eSIR_FAILURE) { - cdf_mem_free(assoc_rsp); + qdf_mem_free(assoc_rsp); lim_log(mac_ctx, LOGE, FL("Parse error Assoc resp subtype %d," "length=%d"), frame_len, subtype); - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } if (!assoc_rsp->suppRatesPresent) { lim_log(mac_ctx, LOGE, FL("assoc response does not have supported rate set")); - cdf_mem_copy(&assoc_rsp->supportedRates, + qdf_mem_copy(&assoc_rsp->supportedRates, &session_entry->rateSet, sizeof(tSirMacRateSet)); } @@ -742,12 +742,12 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGW, FL("session_entry->assocRsp is not NULL freeing it " "and setting NULL")); - cdf_mem_free(session_entry->assocRsp); + qdf_mem_free(session_entry->assocRsp); session_entry->assocRsp = NULL; session_entry->assocRspLen = 0; } - session_entry->assocRsp = cdf_mem_malloc(frame_len); + session_entry->assocRsp = qdf_mem_malloc(frame_len); if (NULL == session_entry->assocRsp) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory for assoc res,len=%d"), @@ -757,7 +757,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, * Store the Assoc response. This is sent * to csr/hdd in join cnf response. */ - cdf_mem_copy(session_entry->assocRsp, body, frame_len); + qdf_mem_copy(session_entry->assocRsp, body, frame_len); session_entry->assocRspLen = frame_len; } @@ -771,12 +771,12 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, if (assoc_rsp->FTInfo.R0KH_ID.present) { roam_session->ftSmeContext.r0kh_id_len = assoc_rsp->FTInfo.R0KH_ID.num_PMK_R0_ID; - cdf_mem_copy(roam_session->ftSmeContext.r0kh_id, + qdf_mem_copy(roam_session->ftSmeContext.r0kh_id, assoc_rsp->FTInfo.R0KH_ID.PMK_R0_ID, roam_session->ftSmeContext.r0kh_id_len); } else { roam_session->ftSmeContext.r0kh_id_len = 0; - cdf_mem_zero(roam_session->ftSmeContext.r0kh_id, + qdf_mem_zero(roam_session->ftSmeContext.r0kh_id, SIR_ROAM_R0KH_ID_MAX_LEN); } #endif @@ -794,15 +794,15 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, */ lim_log(mac_ctx, LOGE, FL("received Re/AssocRsp frame with IBSS capability")); - cdf_mem_free(assoc_rsp); - cdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); return; } if (cfg_get_capability_info(mac_ctx, &caps, session_entry) != eSIR_SUCCESS) { - cdf_mem_free(assoc_rsp); - cdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); lim_log(mac_ctx, LOGP, FL("could not retrieve Capabilities ")); return; } @@ -817,7 +817,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, if ((NULL != mac_ctx->lim.pSessionEntry) && (NULL != mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq)) { - cdf_mem_free( + qdf_mem_free( mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq); mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq = NULL; @@ -904,8 +904,8 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, FL("ASSOC resp with try again event recvd. " "But try again time interval IE is wrong.")); } - cdf_mem_free(beacon); - cdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); return; } #endif @@ -920,8 +920,8 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, NULL) != eSIR_SUCCESS) { lim_log(mac_ctx, LOGE, FL("Set link state to POSTASSOC failed")); - cdf_mem_free(beacon); - cdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); return; } } @@ -937,7 +937,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, lim_update_ese_tsm(mac_ctx, session_entry, assoc_rsp); #endif if (session_entry->pLimMlmJoinReq) { - cdf_mem_free(session_entry->pLimMlmJoinReq); + qdf_mem_free(session_entry->pLimMlmJoinReq); session_entry->pLimMlmJoinReq = NULL; } @@ -990,7 +990,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, #ifdef WLAN_FEATURE_ROAM_OFFLOAD } #endif - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } @@ -1023,7 +1023,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, goto assocReject; } } - cdf_mem_free(beacon); + qdf_mem_free(beacon); return; } lim_log(mac_ctx, LOG1, @@ -1047,8 +1047,8 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, assoc_cnf.protStatusCode = eSIR_SME_SUCCESS; lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF, (uint32_t *) &assoc_cnf); - cdf_mem_free(assoc_rsp); - cdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); return; } /* Delete Pre-auth context for the associated BSS */ @@ -1084,10 +1084,10 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, eSIR_SUCCESS, eSIR_SUCCESS); #endif if (assoc_rsp->QosMapSet.present) - cdf_mem_copy(&session_entry->QosMapSet, + qdf_mem_copy(&session_entry->QosMapSet, &assoc_rsp->QosMapSet, sizeof(tSirQosMapSet)); else - cdf_mem_zero(&session_entry->QosMapSet, sizeof(tSirQosMapSet)); + qdf_mem_zero(&session_entry->QosMapSet, sizeof(tSirQosMapSet)); lim_update_stads_ext_cap(mac_ctx, session_entry, assoc_rsp, sta_ds); /* Update the BSS Entry, this entry was added during preassoc. */ @@ -1095,8 +1095,8 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, beacon, &session_entry->pLimJoinReq->bssDescription, true, session_entry)) { - cdf_mem_free(assoc_rsp); - cdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); return; } else { lim_log(mac_ctx, LOGE, FL("could not update the bss entry")); @@ -1123,7 +1123,7 @@ assocReject: session_entry->peSessionId, session_entry->limMlmState)); if (session_entry->pLimMlmJoinReq) { - cdf_mem_free(session_entry->pLimMlmJoinReq); + qdf_mem_free(session_entry->pLimMlmJoinReq); session_entry->pLimMlmJoinReq = NULL; } if (subtype == LIM_ASSOC) { @@ -1144,7 +1144,7 @@ assocReject: session_entry); } - cdf_mem_free(beacon); - cdf_mem_free(assoc_rsp); + qdf_mem_free(beacon); + qdf_mem_free(assoc_rsp); return; } diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c index 803d0e676ef8..41b4c9cf44a7 100644 --- a/core/mac/src/pe/lim/lim_process_auth_frame.c +++ b/core/mac/src/pe/lim/lim_process_auth_frame.c @@ -155,7 +155,7 @@ static void lim_process_auth_shared_system_algo(tpAniSirGlobal mac_ctx, return; } - cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_hdr->sa, + qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_hdr->sa, sizeof(tSirMacAddr)); auth_node->mlmState = eLIM_MLM_WT_AUTH_FRAME3_STATE; auth_node->authType = @@ -206,7 +206,7 @@ static void lim_process_auth_shared_system_algo(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Challenge text preparation failed")); challenge = auth_node->challengeText; - cdf_mem_copy(challenge, (uint8_t *)challenge_txt_arr, + qdf_mem_copy(challenge, (uint8_t *)challenge_txt_arr, sizeof(challenge_txt_arr)); /* * Sending Authenticaton frame with challenge. @@ -217,7 +217,7 @@ static void lim_process_auth_shared_system_algo(tpAniSirGlobal mac_ctx, auth_frame->authStatusCode = eSIR_MAC_SUCCESS_STATUS; auth_frame->type = SIR_MAC_CHALLENGE_TEXT_EID; auth_frame->length = SIR_MAC_AUTH_CHALLENGE_LENGTH; - cdf_mem_copy(auth_frame->challengeText, + qdf_mem_copy(auth_frame->challengeText, auth_node->challengeText, SIR_MAC_AUTH_CHALLENGE_LENGTH); lim_send_auth_mgmt_frame(mac_ctx, auth_frame, @@ -245,7 +245,7 @@ static void lim_process_auth_open_system_algo(tpAniSirGlobal mac_ctx, } lim_log(mac_ctx, LOG1, FL("Alloc new data: %p peer "), auth_node); lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1); - cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, + qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_hdr->sa, sizeof(tSirMacAddr)); auth_node->mlmState = eLIM_MLM_AUTHENTICATED_STATE; auth_node->authType = (tAniAuthType) rx_auth_frm_body->authAlgoNumber; @@ -290,9 +290,9 @@ static void lim_process_auth_frame_type1(tpAniSirGlobal mac_ctx, pMlmDisassocReq = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq; if (pMlmDisassocReq && - cdf_mem_compare((uint8_t *) mac_hdr->sa, (uint8_t *) + (!qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *) &pMlmDisassocReq->peer_macaddr.bytes, - QDF_MAC_ADDR_SIZE)) { + QDF_MAC_ADDR_SIZE))) { lim_log(mac_ctx, LOGE, FL("TODO:Ack for disassoc frame is pending Issue delsta for " MAC_ADDRESS_STR), @@ -304,9 +304,9 @@ static void lim_process_auth_frame_type1(tpAniSirGlobal mac_ctx, pMlmDeauthReq = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq; if (pMlmDeauthReq && - cdf_mem_compare((uint8_t *) mac_hdr->sa, (uint8_t *) + (!qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *) &pMlmDeauthReq->peer_macaddr.bytes, - QDF_MAC_ADDR_SIZE)) { + QDF_MAC_ADDR_SIZE))) { lim_log(mac_ctx, LOGE, FL("TODO:Ack for deauth frame is pending Issue delsta for " MAC_ADDRESS_STR), @@ -386,10 +386,10 @@ static void lim_process_auth_frame_type1(tpAniSirGlobal mac_ctx, &pe_session->dph.dphHashTable); if (NULL == sta_ds_ptr) continue; - if (sta_ds_ptr->valid && cdf_mem_compare( + if (sta_ds_ptr->valid && (!qdf_mem_cmp( (uint8_t *)&sta_ds_ptr->staAddr, (uint8_t *) &(mac_hdr->sa), - (uint8_t) sizeof(tSirMacAddr))) + (uint8_t) sizeof(tSirMacAddr)))) break; sta_ds_ptr = NULL; } @@ -523,7 +523,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, (rx_auth_frm_body->authStatusCode == eSIR_MAC_SUCCESS_STATUS) && (pe_session->ftPEContext.pFTPreAuthReq != NULL) && - (cdf_mem_compare( + (!qdf_mem_cmp( pe_session->ftPEContext.pFTPreAuthReq->preAuthbssId, mac_hdr->sa, sizeof(tSirMacAddr)))) { @@ -534,7 +534,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, pe_session->ftPEContext.saved_auth_rsp_length = 0; if ((body_ptr != NULL) && (frame_len < MAX_FTIE_SIZE)) { - cdf_mem_copy( + qdf_mem_copy( pe_session->ftPEContext.saved_auth_rsp, body_ptr, frame_len); pe_session->ftPEContext.saved_auth_rsp_length = @@ -555,7 +555,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, return; } - if (!cdf_mem_compare((uint8_t *) mac_hdr->sa, + if (qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr))) { /* @@ -632,7 +632,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("Alloc new data: %p peer"), auth_node); lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1); - cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, + qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); auth_node->fTimerStarted = 0; @@ -693,7 +693,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, if (LIM_IS_AP_ROLE(pe_session)) { tpSirKeys key_ptr = &pe_session->WEPKeyMaterial[key_id].key[0]; - cdf_mem_copy(defaultkey, key_ptr->key, + qdf_mem_copy(defaultkey, key_ptr->key, key_ptr->keyLength); } else if (wlan_cfg_get_str(mac_ctx, (uint16_t)(WNI_CFG_WEP_DEFAULT_KEY_1 + key_id), @@ -729,7 +729,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, SIR_MAC_CHALLENGE_TEXT_EID; ((tpSirMacAuthFrameBody)plainbody)->length = SIR_MAC_AUTH_CHALLENGE_LENGTH; - cdf_mem_copy((uint8_t *) ( + qdf_mem_copy((uint8_t *) ( (tpSirMacAuthFrameBody)plainbody)->challengeText, rx_auth_frm_body->challengeText, SIR_MAC_AUTH_CHALLENGE_LENGTH); @@ -864,7 +864,7 @@ static void lim_process_auth_frame_type3(tpAniSirGlobal mac_ctx, * Check if received challenge text is same as one sent in * Authentication frame3 */ - if (cdf_mem_compare(rx_auth_frm_body->challengeText, + if (!qdf_mem_cmp(rx_auth_frm_body->challengeText, auth_node->challengeText, SIR_MAC_AUTH_CHALLENGE_LENGTH)) { /* @@ -948,7 +948,7 @@ static void lim_process_auth_frame_type4(tpAniSirGlobal mac_ctx, return; } - if (!cdf_mem_compare((uint8_t *) mac_hdr->sa, + if (qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr))) { /* @@ -996,7 +996,7 @@ static void lim_process_auth_frame_type4(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("Alloc new data: %p peer "), auth_node); lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1); - cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, + qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); auth_node->fTimerStarted = 0; @@ -1262,7 +1262,7 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, if (LIM_IS_AP_ROLE(pe_session)) { tpSirKeys key_ptr; key_ptr = &pe_session->WEPKeyMaterial[key_id].key[0]; - cdf_mem_copy(defaultkey, key_ptr->key, + qdf_mem_copy(defaultkey, key_ptr->key, key_ptr->keyLength); val = key_ptr->keyLength; } else if (wlan_cfg_get_str(mac_ctx, @@ -1438,7 +1438,7 @@ tSirRetStatus lim_process_auth_frame_no_session(tpAniSirGlobal pMac, uint8_t *pB (pHdr->seqControl.fragNum))); /* Check that its the same bssId we have for preAuth */ - if (!cdf_mem_compare + if (qdf_mem_cmp (psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId, pHdr->bssId, sizeof(tSirMacAddr))) { lim_log(pMac, LOGE, FL("Error: Same bssid as preauth BSSID")); diff --git a/core/mac/src/pe/lim/lim_process_beacon_frame.c b/core/mac/src/pe/lim/lim_process_beacon_frame.c index 6d8075149a71..114e56337969 100644 --- a/core/mac/src/pe/lim/lim_process_beacon_frame.c +++ b/core/mac/src/pe/lim/lim_process_beacon_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -83,7 +83,7 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG2); /* Expect Beacon in any state as Scan is independent of LIM state */ - bcn_ptr = cdf_mem_malloc(sizeof(*bcn_ptr)); + bcn_ptr = qdf_mem_malloc(sizeof(*bcn_ptr)); if (NULL == bcn_ptr) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); @@ -102,7 +102,7 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, session->limMlmState); lim_print_mlm_state(mac_ctx, LOGW, session->limMlmState); - cdf_mem_free(bcn_ptr); + qdf_mem_free(bcn_ptr); return; } /* @@ -113,7 +113,7 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, if ((!session->lastBeaconDtimPeriod) && (sir_compare_mac_addr(session->bssId, bcn_ptr->bssid))) { - cdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp, + qdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp, (uint8_t *) bcn_ptr->timeStamp, sizeof(uint64_t)); session->lastBeaconDtimCount = @@ -148,12 +148,12 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, } else if (session->limMlmState == eLIM_MLM_WT_JOIN_BEACON_STATE) { if (session->beacon != NULL) { - cdf_mem_free(session->beacon); + qdf_mem_free(session->beacon); session->beacon = NULL; session->bcnLen = 0; } session->bcnLen = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); - session->beacon = cdf_mem_malloc(session->bcnLen); + session->beacon = qdf_mem_malloc(session->bcnLen); if (NULL == session->beacon) { lim_log(mac_ctx, LOGE, FL("fail to alloc mem to store bcn")); @@ -162,14 +162,14 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, * Store the Beacon/ProbeRsp. This is sent to * csr/hdd in join cnf response. */ - cdf_mem_copy(session->beacon, + qdf_mem_copy(session->beacon, WMA_GET_RX_MPDU_DATA(rx_pkt_info), session->bcnLen); } lim_check_and_announce_join_success(mac_ctx, bcn_ptr, mac_hdr, session); } - cdf_mem_free(bcn_ptr); + qdf_mem_free(bcn_ptr); return; } @@ -204,7 +204,7 @@ lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo) if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) || (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) || (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)) { - pBeacon = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + pBeacon = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeacon) { lim_log(pMac, LOGE, FL @@ -221,7 +221,7 @@ lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo) ("Received invalid Beacon in global MLM state %X"), pMac->lim.gLimMlmState); lim_print_mlm_state(pMac, LOGW, pMac->lim.gLimMlmState); - cdf_mem_free(pBeacon); + qdf_mem_free(pBeacon); return; } @@ -236,7 +236,7 @@ lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo) &pMac->lim.dfschannelList); } else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) { } /* end of eLIM_MLM_LEARN_STATE) */ - cdf_mem_free(pBeacon); + qdf_mem_free(pBeacon); } /* end of (eLIM_MLM_WT_PROBE_RESP_STATE) || (eLIM_MLM_PASSIVE_SCAN_STATE) */ else { lim_log(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %s (%d)"), diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c index ae1cf2a3c804..ece95d4c100b 100644 --- a/core/mac/src/pe/lim/lim_process_cfg_updates.c +++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -78,7 +78,7 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry) if (pesessionEntry != NULL && LIM_IS_AP_ROLE(pesessionEntry)) { if (pesessionEntry->gLimProtectionControl == WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) - cdf_mem_set((void *)&pesessionEntry->cfgProtection, + qdf_mem_set((void *)&pesessionEntry->cfgProtection, sizeof(tCfgProtection), 0); else { lim_log(pMac, LOG1, @@ -112,7 +112,7 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry) if (pMac->lim.gLimProtectionControl == WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) - cdf_mem_set((void *)&pMac->lim.cfgProtection, + qdf_mem_set((void *)&pMac->lim.cfgProtection, sizeof(tCfgProtection), 0); else { pMac->lim.cfgProtection.fromlla = diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index 2cca55d9f6bd..ba26a694cfe3 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -373,7 +373,7 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, psessionEntry->limMlmState, reasonCode, MAC_ADDR_ARRAY(pHdr->sa)); /* / Issue Deauth Indication to SME. */ - cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, pHdr->sa, sizeof(tSirMacAddr)); mlmDeauthInd.reasonCode = reasonCode; @@ -403,7 +403,7 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_delete_pre_auth_node(pMac, pHdr->sa); if (psessionEntry->pLimMlmJoinReq) { - cdf_mem_free(psessionEntry->pLimMlmJoinReq); + qdf_mem_free(psessionEntry->pLimMlmJoinReq); psessionEntry->pLimMlmJoinReq = NULL; } @@ -548,7 +548,7 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DEAUTH; /* / Issue Deauth Indication to SME. */ - cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr)); mlmDeauthInd.reasonCode = (uint8_t) pStaDs->mlmStaContext.disassocReason; @@ -570,7 +570,7 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_delete_pre_auth_node(pMac, pHdr->sa); if (psessionEntry->limAssocResponseData) { - cdf_mem_free(psessionEntry->limAssocResponseData); + qdf_mem_free(psessionEntry->limAssocResponseData); psessionEntry->limAssocResponseData = NULL; } diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index 70a9a8d86c72..699b02cf5c9c 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -360,7 +360,7 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes) reasonCode; /* Issue Disassoc Indication to SME. */ - cdf_mem_copy((uint8_t *) &mlmDisassocInd.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmDisassocInd.peerMacAddr, (uint8_t *) pStaDs->staAddr, sizeof(tSirMacAddr)); mlmDisassocInd.reasonCode = (uint8_t) pStaDs->mlmStaContext.disassocReason; @@ -383,7 +383,7 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, ) if (psessionEntry->limAssocResponseData) { - cdf_mem_free(psessionEntry->limAssocResponseData); + qdf_mem_free(psessionEntry->limAssocResponseData); psessionEntry->limAssocResponseData = NULL; } 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 7cd2a9dd7713..0e715472ff84 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -67,7 +67,7 @@ #include "qdf_types.h" #include "cds_packet.h" -#include "cdf_memory.h" +#include "qdf_mem.h" void lim_log_session_states(tpAniSirGlobal pMac); static void lim_process_normal_hdd_msg(tpAniSirGlobal mac_ctx, @@ -101,7 +101,7 @@ static void lim_process_dual_mac_cfg_resp(tpAniSirGlobal mac, void *body) len = sizeof(*param); - param = cdf_mem_malloc(len); + param = qdf_mem_malloc(len); if (!param) { lim_log(mac, LOGE, FL("Fail to allocate memory")); /* Memory allocation for param failed. @@ -155,7 +155,7 @@ static void lim_process_set_hw_mode_resp(tpAniSirGlobal mac, void *body) len = sizeof(*param); - param = cdf_mem_malloc(len); + param = qdf_mem_malloc(len); if (!param) { lim_log(mac, LOGE, FL("Fail to allocate memory")); /* Memory allocation for param failed. @@ -218,7 +218,7 @@ static void lim_process_hw_mode_trans_ind(tpAniSirGlobal mac, void *body) len = sizeof(*param); - param = cdf_mem_malloc(len); + param = qdf_mem_malloc(len); if (!param) { lim_log(mac, LOGE, FL("Fail to allocate memory")); return; @@ -345,14 +345,14 @@ __lim_pno_match_fwd_bcn_probepsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, len = sizeof(*result) + (num_results * sizeof(tSirWifiScanResult)) + ie_len; - result = cdf_mem_malloc(len); + result = qdf_mem_malloc(len); if (NULL == result) { lim_log(pmac, LOGE, FL("Memory allocation failed")); return; } hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); body = WMA_GET_RX_MPDU_DATA(rx_pkt_info); - cdf_mem_zero(result, sizeof(*result) + ie_len); + qdf_mem_zero(result, sizeof(*result) + ie_len); /* Received frame does not have request id, hence set 0 */ result->request_id = 0; @@ -369,14 +369,14 @@ __lim_pno_match_fwd_bcn_probepsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, result->ap[i].rtt = 0; result->ap[i].rtt_sd = 0; result->ap[i].ieLength = ie_len; - cdf_mem_copy((uint8_t *) &result->ap[i].ssid[0], + qdf_mem_copy((uint8_t *) &result->ap[i].ssid[0], (uint8_t *) frame->ssId.ssId, frame->ssId.length); result->ap[i].ssid[frame->ssId.length] = '\0'; - cdf_mem_copy((uint8_t *) &result->ap[i].bssid, + qdf_mem_copy((uint8_t *) &result->ap[i].bssid, (uint8_t *) hdr->bssId, sizeof(tSirMacAddr)); /* Copy IE fields */ - cdf_mem_copy((uint8_t *) &result->ap[i].ieData, + qdf_mem_copy((uint8_t *) &result->ap[i].ieData, body + SIR_MAC_B_PR_SSID_OFFSET, ie_len); } @@ -398,14 +398,14 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, tSirMsgQ mmh_msg; tpSirMacMgmtHdr hdr; - result = cdf_mem_malloc(sizeof(*result) + ie_len); + result = qdf_mem_malloc(sizeof(*result) + ie_len); if (NULL == result) { lim_log(pmac, LOGE, FL("Memory allocation failed")); return; } hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); body = WMA_GET_RX_MPDU_DATA(rx_pkt_info); - cdf_mem_zero(result, sizeof(*result) + ie_len); + qdf_mem_zero(result, sizeof(*result) + ie_len); /* Received frame does not have request id, hence set 0 */ result->requestId = 0; @@ -421,14 +421,14 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, result->ap.rtt_sd = 0; result->ap.ieLength = ie_len; - cdf_mem_copy((uint8_t *) &result->ap.ssid[0], + qdf_mem_copy((uint8_t *) &result->ap.ssid[0], (uint8_t *) frame->ssId.ssId, frame->ssId.length); result->ap.ssid[frame->ssId.length] = '\0'; - cdf_mem_copy((uint8_t *) &result->ap.bssid.bytes, + qdf_mem_copy((uint8_t *) &result->ap.bssid.bytes, (uint8_t *) hdr->bssId, QDF_MAC_ADDR_SIZE); /* Copy IE fields */ - cdf_mem_copy((uint8_t *) &result->ap.ieData, + qdf_mem_copy((uint8_t *) &result->ap.ieData, body + SIR_MAC_B_PR_SSID_OFFSET, ie_len); mmh_msg.type = msg_type; @@ -454,7 +454,7 @@ __lim_process_ext_scan_beacon_probe_rsp(tpAniSirGlobal pmac, return; } - frame = cdf_mem_malloc(sizeof(*frame)); + frame = qdf_mem_malloc(sizeof(*frame)); if (NULL == frame) { lim_log(pmac, LOGE, FL("Memory allocation failed")); return; @@ -471,13 +471,13 @@ __lim_process_ext_scan_beacon_probe_rsp(tpAniSirGlobal pmac, status = sir_convert_probe_frame2_struct(pmac, body, frm_len, frame); } else { - cdf_mem_free(frame); + qdf_mem_free(frame); return; } if (status != eSIR_SUCCESS) { lim_log(pmac, LOGE, FL("Frame parsing failed")); - cdf_mem_free(frame); + qdf_mem_free(frame); return; } @@ -491,7 +491,7 @@ __lim_process_ext_scan_beacon_probe_rsp(tpAniSirGlobal pmac, (frm_len - SIR_MAC_B_PR_SSID_OFFSET), eWNI_SME_EPNO_NETWORK_FOUND_IND); - cdf_mem_free(frame); + qdf_mem_free(frame); } #endif @@ -675,8 +675,8 @@ lim_check_mgmt_registered_frames(tpAniSirGlobal mac_ctx, uint8_t *buff_desc, break; } if (mgmt_frame->matchLen <= frm_len && - cdf_mem_compare(mgmt_frame->matchData, body, - mgmt_frame->matchLen)) { + (!qdf_mem_cmp(mgmt_frame->matchData, body, + mgmt_frame->matchLen))) { /* found match! */ match = true; break; @@ -1027,7 +1027,7 @@ QDF_STATUS lim_send_stop_scan_offload_req(tpAniSirGlobal pMac, tSirRetStatus rc = eSIR_SUCCESS; tAbortScanParams *pAbortScanParams; - pAbortScanParams = cdf_mem_malloc(sizeof(tAbortScanParams)); + pAbortScanParams = qdf_mem_malloc(sizeof(tAbortScanParams)); if (NULL == pAbortScanParams) { lim_log(pMac, LOGP, FL("Memory allocation failed for AbortScanParams")); @@ -1044,7 +1044,7 @@ QDF_STATUS lim_send_stop_scan_offload_req(tpAniSirGlobal pMac, rc = wma_post_ctrl_msg(pMac, &msg); if (rc != eSIR_SUCCESS) { lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure")); - cdf_mem_free(pAbortScanParams); + qdf_mem_free(pAbortScanParams); return QDF_STATUS_E_FAILURE; } @@ -1120,7 +1120,7 @@ void lim_oem_data_rsp_handle_resume_link_rsp(tpAniSirGlobal pMac, QDF_STATUS sta } if (NULL != pMac->lim.gpLimMlmOemDataReq) { - cdf_mem_free(pMac->lim.gpLimMlmOemDataReq); + qdf_mem_free(pMac->lim.gpLimMlmOemDataReq); pMac->lim.gpLimMlmOemDataReq = NULL; } /* "Failure" status doesn't mean that Oem Data Rsp did not happen */ @@ -1188,7 +1188,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) #endif tSirMbMsgP2p *p2p_msg = NULL; if (ANI_DRIVER_TYPE(mac_ctx) == eDRIVER_TYPE_MFG) { - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; return; } @@ -1256,7 +1256,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) QDF_ASSERT(0); break; } - cdf_mem_copy((uint8_t *) &new_msg, + qdf_mem_copy((uint8_t *) &new_msg, (uint8_t *) msg, sizeof(tSirMsgQ)); body_ptr = (cds_pkt_t *) new_msg.bodyptr; cds_pkt_get_packet_length(body_ptr, &pkt_len); @@ -1323,7 +1323,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) scan_id = req_msg->scan_id; lim_process_abort_scan_ind(mac_ctx, session_id, scan_id, USER_SCAN_REQUESTOR_ID); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; } break; @@ -1373,20 +1373,20 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) case eWNI_PMC_SMPS_STATE_IND: if (msg->bodyptr) { - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; } break; case eWNI_SME_SEND_ACTION_FRAME_IND: lim_send_p2p_action_frame(mac_ctx, msg); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_ABORT_REMAIN_ON_CHAN_IND: p2p_msg = (tSirMbMsgP2p *) msg->bodyptr; lim_process_abort_scan_ind(mac_ctx, p2p_msg->sessionId, p2p_msg->scan_id, ROC_SCAN_REQUESTOR_ID); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; case SIR_HAL_P2P_NOA_START_IND: @@ -1405,7 +1405,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) (session_entry->pePersona == QDF_P2P_GO_MODE)) { /* Save P2P NOA start attribute for Go persona*/ p2p_go_exists = 1; - cdf_mem_copy(&session_entry->p2pGoPsNoaStartInd, + qdf_mem_copy(&session_entry->p2pGoPsNoaStartInd, msg->bodyptr, sizeof(tSirP2PNoaStart)); qdf_status = session_entry->p2pGoPsNoaStartInd.status; @@ -1426,7 +1426,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) /* We received the NOA start indication. Now we can send down * the SME request which requires off-channel operation */ lim_process_regd_defd_sme_req_after_noa_start(mac_ctx); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; #ifdef FEATURE_WLAN_TDLS @@ -1437,7 +1437,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) if (session_entry == NULL) { lim_log(mac_ctx, LOG1, FL("No session exist for given bssId")); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; return; } @@ -1446,7 +1446,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) if (sta_ds == NULL) { lim_log(mac_ctx, LOG1, FL("No sta_ds exist for given staId")); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; return; } @@ -1458,7 +1458,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) lim_send_sme_tdls_del_sta_ind(mac_ctx, sta_ds, session_entry, tdls_ind->reasonCode); } - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; #endif @@ -1471,7 +1471,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) if ((session_entry != NULL) && (session_entry->valid) && (session_entry->pePersona == QDF_P2P_GO_MODE)) { /* Save P2P attr for Go */ - cdf_mem_copy( + qdf_mem_copy( &session_entry->p2pGoPsUpdate, msg->bodyptr, sizeof(tSirP2PNoaAttr)); @@ -1493,12 +1493,12 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) break; } } - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; case WMA_MISSED_BEACON_IND: lim_ps_offload_handle_missed_beacon_ind(mac_ctx, msg); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; case SIR_LIM_ADDTS_RSP_TIMEOUT: @@ -1634,7 +1634,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) break; case WMA_SET_MIMOPS_RSP: case WMA_SET_TX_POWER_RSP: - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case WMA_SET_MAX_TX_POWER_RSP: @@ -1642,7 +1642,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) rrm_set_max_tx_power_rsp(mac_ctx, msg); #endif if (msg->bodyptr != NULL) { - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; } break; @@ -1652,7 +1652,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) /* message from HAL indicating addr2 mismatch interrupt occurred * msg->bodyptr contains only pointer to 48-bit addr2 field */ - cdf_mem_free((void *)(msg->bodyptr)); + qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; #ifdef WLAN_FEATURE_VOWIFI_11R @@ -1677,7 +1677,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) link_state_param->callback(mac_ctx, link_state_param->callbackArg, link_state_param->status); - cdf_mem_free((void *)(msg->bodyptr)); + qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; case eWNI_SME_SET_BCN_FILTER_REQ: @@ -1688,7 +1688,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) eSIR_SUCCESS)) lim_log(mac_ctx, LOGE, FL("Failied to send Beacon Filter Info ")); - cdf_mem_free((void *)(msg->bodyptr)); + qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; #ifdef FEATURE_WLAN_TDLS @@ -1711,7 +1711,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) session_entry->smeSessionId, NULL, NULL, tdls_link_params->status); } - cdf_mem_free((void *)(msg->bodyptr)); + qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; #endif @@ -1720,7 +1720,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) break; case WMA_IBSS_PEER_INACTIVITY_IND: lim_process_ibss_peer_inactivity(mac_ctx, msg->bodyptr); - cdf_mem_free((void *)(msg->bodyptr)); + qdf_mem_free((void *)(msg->bodyptr)); msg->bodyptr = NULL; break; case WMA_DFS_RADAR_IND: @@ -1731,7 +1731,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) case WMA_DFS_BEACON_TX_SUCCESS_IND: lim_process_beacon_tx_success_ind(mac_ctx, msg->type, (void *)msg->bodyptr); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case WMA_DISASSOC_TX_COMP: @@ -1742,7 +1742,7 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) break; #ifdef FEATURE_AP_MCC_CH_AVOIDANCE case WMA_UPDATE_Q2Q_IE_IND: - cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); beacon_params.paramChangeBitmap = 0; for (i = 0; i < mac_ctx->lim.maxBssId; i++) { vdev_id = ((uint8_t *)msg->bodyptr)[i]; @@ -1778,65 +1778,65 @@ void lim_process_messages(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) session_entry); } } - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; break; #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ case eWNI_SME_NSS_UPDATE_REQ: case eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_CHANNEL_CHANGE_REQ: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_START_BEACON_REQ: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_UPDATE_ADDITIONAL_IES: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_MODIFY_ADDITIONAL_IES: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; #ifdef QCA_HT_2040_COEX case eWNI_SME_SET_HT_2040_MODE: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; #endif case SIR_HAL_SOC_SET_HW_MODE_RESP: lim_process_set_hw_mode_resp(mac_ctx, msg->bodyptr); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case SIR_HAL_SOC_HW_MODE_TRANS_IND: lim_process_hw_mode_trans_ind(mac_ctx, msg->bodyptr); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case SIR_HAL_SOC_DUAL_MAC_CFG_RESP: lim_process_dual_mac_cfg_resp(mac_ctx, msg->bodyptr); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; case eWNI_SME_SET_IE_REQ: lim_process_sme_req_messages(mac_ctx, msg); - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; break; default: - cdf_mem_free((void *)msg->bodyptr); + qdf_mem_free((void *)msg->bodyptr); msg->bodyptr = NULL; /* Unwanted messages */ /* Log error */ @@ -1882,7 +1882,7 @@ void lim_process_deferred_message_queue(tpAniSirGlobal pMac) size = pMac->lim.gLimDeferredMsgQ.size; if (size > 0) { while ((readMsg = lim_read_deferred_msg_q(pMac)) != NULL) { - cdf_mem_copy((uint8_t *) &limMsg, + qdf_mem_copy((uint8_t *) &limMsg, (uint8_t *) readMsg, sizeof(tSirMsgQ)); size--; lim_process_messages(pMac, &limMsg); @@ -1949,7 +1949,7 @@ static void lim_process_normal_hdd_msg(tpAniSirGlobal mac_ctx, tSirMsgQ *msg, #endif lim_log_session_states(mac_ctx); /* Release body */ - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; } } else { @@ -1968,7 +1968,7 @@ static void lim_process_normal_hdd_msg(tpAniSirGlobal mac_ctx, tSirMsgQ *msg, * Release body. limProcessSmeReqMessage consumed the * buffer. We can free it. */ - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; } } 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 8b1e0d2e2b13..32b862b68ced 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 @@ -373,7 +373,7 @@ void lim_send_hal_oem_data_req(tpAniSirGlobal mac_ctx) goto error; } - start_oem_data_req = cdf_mem_malloc(sizeof(*start_oem_data_req)); + start_oem_data_req = qdf_mem_malloc(sizeof(*start_oem_data_req)); if (NULL == start_oem_data_req) { lim_log(mac_ctx, LOGE, FL ("Could not allocate memory for start_oem_data_req")); @@ -381,10 +381,10 @@ void lim_send_hal_oem_data_req(tpAniSirGlobal mac_ctx) } start_oem_data_req->data = - cdf_mem_malloc(mac_ctx->lim.gpLimMlmOemDataReq->data_len); + qdf_mem_malloc(mac_ctx->lim.gpLimMlmOemDataReq->data_len); if (!start_oem_data_req->data) { lim_log(mac_ctx, LOGE, FL("memory allocation failed")); - cdf_mem_free(start_oem_data_req); + qdf_mem_free(start_oem_data_req); goto error; } @@ -394,7 +394,7 @@ void lim_send_hal_oem_data_req(tpAniSirGlobal mac_ctx) start_oem_data_req->data_len = mac_ctx->lim.gpLimMlmOemDataReq->data_len; - cdf_mem_copy(start_oem_data_req->data, + qdf_mem_copy(start_oem_data_req->data, mac_ctx->lim.gpLimMlmOemDataReq->data, mac_ctx->lim.gpLimMlmOemDataReq->data_len); @@ -411,8 +411,8 @@ void lim_send_hal_oem_data_req(tpAniSirGlobal mac_ctx) return; SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true); - cdf_mem_free(start_oem_data_req->data); - cdf_mem_free(start_oem_data_req); + qdf_mem_free(start_oem_data_req->data); + qdf_mem_free(start_oem_data_req); lim_log(mac_ctx, LOGE, FL("OEM_DATA: posting WMA_START_OEM_DATA_REQ to HAL failed")); @@ -421,7 +421,7 @@ error: MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE, NO_SESSION, mac_ctx->lim.gLimMlmState)); - mlm_oem_data_rsp = cdf_mem_malloc(sizeof(tLimMlmOemDataRsp)); + mlm_oem_data_rsp = qdf_mem_malloc(sizeof(tLimMlmOemDataRsp)); if (NULL == mlm_oem_data_rsp) { lim_log(mac_ctx->hHdd, LOGP, FL ("memory allocation for mlm_oem_data_rsp")); @@ -431,11 +431,11 @@ error: if (NULL != mac_ctx->lim.gpLimMlmOemDataReq) { if (NULL != mac_ctx->lim.gpLimMlmOemDataReq->data) { - cdf_mem_free( + qdf_mem_free( mac_ctx->lim.gpLimMlmOemDataReq->data); mac_ctx->lim.gpLimMlmOemDataReq->data = NULL; } - cdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq); mac_ctx->lim.gpLimMlmOemDataReq = NULL; } @@ -467,8 +467,8 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param, wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11mode); sta_param->staType = STA_ENTRY_SELF; /* Identifying self */ - cdf_mem_copy(sta_param->bssId, bssid, sizeof(tSirMacAddr)); - cdf_mem_copy(sta_param->staMac, session_entry->selfMacAddr, + qdf_mem_copy(sta_param->bssId, bssid, sizeof(tSirMacAddr)); + qdf_mem_copy(sta_param->staMac, session_entry->selfMacAddr, sizeof(tSirMacAddr)); /* Configuration related parameters to be changed to support BT-AMP */ @@ -594,7 +594,7 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx, uint32_t retcode; /* Package WMA_ADD_BSS_REQ message parameters */ - addbss_param = cdf_mem_malloc(sizeof(tAddBssParams)); + addbss_param = qdf_mem_malloc(sizeof(tAddBssParams)); if (NULL == addbss_param) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory during ADD_BSS")); @@ -602,13 +602,13 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx, return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(addbss_param, sizeof(tAddBssParams), 0); + qdf_mem_set(addbss_param, sizeof(tAddBssParams), 0); /* Fill in tAddBssParams members */ - cdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId, + qdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId, sizeof(tSirMacAddr)); /* Fill in tAddBssParams selfMacAddr */ - cdf_mem_copy(addbss_param->selfMacAddr, + qdf_mem_copy(addbss_param->selfMacAddr, session->selfMacAddr, sizeof(tSirMacAddr)); addbss_param->bssType = mlm_start_req->bssType; @@ -633,7 +633,7 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx, mlm_start_req->cfParamSet.cfpDurRemaining; addbss_param->rateSet.numRates = mlm_start_req->rateSet.numRates; - cdf_mem_copy(addbss_param->rateSet.rate, mlm_start_req->rateSet.rate, + qdf_mem_copy(addbss_param->rateSet.rate, mlm_start_req->rateSet.rate, mlm_start_req->rateSet.numRates); addbss_param->nwType = mlm_start_req->nwType; @@ -657,7 +657,7 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx, addbss_param->sessionId = mlm_start_req->sessionId; /* Send the SSID to HAL to enable SSID matching for IBSS */ - cdf_mem_copy(&(addbss_param->ssId.ssId), + qdf_mem_copy(&(addbss_param->ssId.ssId), mlm_start_req->ssId.ssId, mlm_start_req->ssId.length); addbss_param->ssId.length = mlm_start_req->ssId.length; addbss_param->bHiddenSSIDEn = mlm_start_req->ssidHidden; @@ -708,7 +708,7 @@ lim_mlm_add_bss(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"), retcode); - cdf_mem_free(addbss_param); + qdf_mem_free(addbss_param); return eSIR_SME_HAL_SEND_MESSAGE_FAIL; } @@ -773,7 +773,7 @@ end: mlm_start_cnf.sessionId = mlm_start_req->sessionId; /* Free up buffer allocated for LimMlmScanReq */ - cdf_mem_free(msg_buf); + qdf_mem_free(msg_buf); /* * Respond immediately to LIM, only if MLME has not been @@ -814,12 +814,12 @@ static void lim_process_mlm_oem_data_req(tpAniSirGlobal mac_ctx, */ if (mac_ctx->lim.gpLimMlmOemDataReq) { if (mac_ctx->lim.gpLimMlmOemDataReq->data) { - cdf_mem_free( + qdf_mem_free( mac_ctx->lim.gpLimMlmOemDataReq->data); mac_ctx->lim.gpLimMlmOemDataReq->data = NULL; } - cdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq); mac_ctx->lim.gpLimMlmOemDataReq = NULL; } @@ -838,15 +838,15 @@ static void lim_process_mlm_oem_data_req(tpAniSirGlobal mac_ctx, lim_print_mlm_state(mac_ctx, LOGW, mac_ctx->lim.gLimMlmState); /* Free up buffer allocated */ - cdf_mem_free(msg_buf); + qdf_mem_free(msg_buf); /* Return Meas confirm with INVALID_PARAMETERS */ - mlm_oem_data_rsp = cdf_mem_malloc(sizeof(tLimMlmOemDataRsp)); + mlm_oem_data_rsp = qdf_mem_malloc(sizeof(tLimMlmOemDataRsp)); if (mlm_oem_data_rsp != NULL) { mlm_oem_data_rsp->target_rsp = false; lim_post_sme_message(mac_ctx, LIM_MLM_OEM_DATA_CNF, (uint32_t *) mlm_oem_data_rsp); - cdf_mem_free(mlm_oem_data_rsp); + qdf_mem_free(mlm_oem_data_rsp); } else { lim_log(mac_ctx, LOGP, FL ("Could not allocate memory for mlm_oem_data_rsp")); @@ -1087,7 +1087,7 @@ static void lim_process_mlm_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg) } error: - cdf_mem_free(msg); + qdf_mem_free(msg); if (session != NULL) session->pLimMlmJoinReq = NULL; mlmjoin_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; @@ -1171,7 +1171,7 @@ static bool lim_is_preauth_ctx_exists(tpAniSirGlobal mac_ctx, ((stads != NULL) && (mac_ctx->lim.gpLimMlmAuthReq->authType == stads->mlmStaContext.authType)) && - (cdf_mem_compare(mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, + (!qdf_mem_cmp(mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, curr_bssid, sizeof(tSirMacAddr)))) || ((preauth_node != NULL) && (preauth_node->authType == @@ -1303,14 +1303,14 @@ static void lim_process_mlm_auth_req(tpAniSirGlobal mac_ctx, uint32_t *msg) } return; end: - cdf_mem_copy((uint8_t *) &mlm_auth_cnf.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlm_auth_cnf.peerMacAddr, (uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); mlm_auth_cnf.authType = mac_ctx->lim.gpLimMlmAuthReq->authType; mlm_auth_cnf.sessionId = session_id; - cdf_mem_free(mac_ctx->lim.gpLimMlmAuthReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmAuthReq); mac_ctx->lim.gpLimMlmAuthReq = NULL; lim_log(mac_ctx, LOG1, "SessionId:%d LimPostSme LIM_MLM_AUTH_CNF ", session_id); @@ -1349,7 +1349,7 @@ static void lim_process_mlm_assoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) lim_log(mac_ctx, LOGP, FL("SessionId:%d Session Does not exist"), mlm_assoc_req->sessionId); - cdf_mem_free(mlm_assoc_req); + qdf_mem_free(mlm_assoc_req); return; } @@ -1359,7 +1359,7 @@ static void lim_process_mlm_assoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) !LIM_IS_BT_AMP_AP_ROLE(session_entry)) && (session_entry->limMlmState == eLIM_MLM_AUTHENTICATED_STATE || session_entry->limMlmState == eLIM_MLM_JOINED_STATE) && - (cdf_mem_compare(mlm_assoc_req->peerMacAddr, + (!qdf_mem_cmp(mlm_assoc_req->peerMacAddr, curr_bssId, sizeof(tSirMacAddr))))) { /* * Received Association request either in invalid state @@ -1435,7 +1435,7 @@ end: /* Update PE session Id */ mlm_assoc_cnf.sessionId = mlm_assoc_req->sessionId; /* Free up buffer allocated for assocReq */ - cdf_mem_free(mlm_assoc_req); + qdf_mem_free(mlm_assoc_req); lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF, (uint32_t *) &mlm_assoc_cnf); } @@ -1471,7 +1471,7 @@ static void lim_process_mlm_reassoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg) lim_log(mac_ctx, LOGE, FL("Session Does not exist for given sessionId %d"), reassoc_req->sessionId); - cdf_mem_free(reassoc_req); + qdf_mem_free(reassoc_req); return; } @@ -1501,7 +1501,7 @@ static void lim_process_mlm_reassoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg) } if (session->pLimMlmReassocReq) - cdf_mem_free(session->pLimMlmReassocReq); + qdf_mem_free(session->pLimMlmReassocReq); /* * Hold Re-Assoc request as part of Session, knock-out mac_ctx @@ -1512,9 +1512,9 @@ static void lim_process_mlm_reassoc_req(tpAniSirGlobal mac_ctx, uint32_t *msg) /* See if we have pre-auth context with new AP */ auth_node = lim_search_pre_auth_list(mac_ctx, session->limReAssocbssId); - if (!auth_node && (!cdf_mem_compare(reassoc_req->peerMacAddr, + if (!auth_node && qdf_mem_cmp(reassoc_req->peerMacAddr, session->bssId, - sizeof(tSirMacAddr)))) { + sizeof(tSirMacAddr))) { /* * Either pre-auth context does not exist AND * we are not reassociating with currently @@ -1559,7 +1559,7 @@ end: /* Update PE sessio Id */ reassoc_cnf.sessionId = reassoc_req->sessionId; /* Free up buffer allocated for reassocReq */ - cdf_mem_free(reassoc_req); + qdf_mem_free(reassoc_req); session->pLimReAssocReq = NULL; lim_post_sme_message(mac_ctx, LIM_MLM_REASSOC_CNF, (uint32_t *) &reassoc_cnf); @@ -1613,7 +1613,7 @@ lim_process_mlm_disassoc_req_ntf(tpAniSirGlobal mac_ctx, session->limMlmState, MAC_ADDR_ARRAY(mlm_disassocreq->peer_macaddr.bytes)); - cdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE); switch (GET_LIM_SYSTEM_ROLE(session)) { case eLIM_STA_ROLE: @@ -1630,7 +1630,7 @@ lim_process_mlm_disassoc_req_ntf(tpAniSirGlobal mac_ctx, * disassociation */ sme_disassoc_rsp = - cdf_mem_malloc(sizeof(tSirSmeDisassocRsp)); + qdf_mem_malloc(sizeof(tSirSmeDisassocRsp)); if (NULL == sme_disassoc_rsp) { lim_log(mac_ctx, LOGP, FL("memory allocation failed for disassoc rsp")); @@ -1751,13 +1751,13 @@ lim_process_mlm_disassoc_req_ntf(tpAniSirGlobal mac_ctx, goto end; } /* Free up buffer allocated for mlmDisassocReq */ - cdf_mem_free(mlm_disassocreq); + qdf_mem_free(mlm_disassocreq); } return; end: - cdf_mem_copy((uint8_t *) &mlm_disassoccnf.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlm_disassoccnf.peerMacAddr, (uint8_t *) mlm_disassocreq->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE); mlm_disassoccnf.aid = mlm_disassocreq->aid; @@ -1767,7 +1767,7 @@ end: mlm_disassoccnf.sessionId = mlm_disassocreq->sessionId; /* Free up buffer allocated for mlmDisassocReq */ - cdf_mem_free(mlm_disassocreq); + qdf_mem_free(mlm_disassocreq); lim_post_sme_message(mac_ctx, LIM_MLM_DISASSOC_CNF, (uint32_t *) &mlm_disassoccnf); @@ -1792,10 +1792,10 @@ bool lim_check_disassoc_deauth_ack_pending(tpAniSirGlobal mac_ctx, disassoc_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq; deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq; - if ((disassoc_req && (cdf_mem_compare((uint8_t *) sta_mac, + if ((disassoc_req && (!qdf_mem_cmp((uint8_t *) sta_mac, (uint8_t *) &disassoc_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE))) || - (deauth_req && (cdf_mem_compare((uint8_t *) sta_mac, + (deauth_req && (!qdf_mem_cmp((uint8_t *) sta_mac, (uint8_t *) &deauth_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE)))) { PELOG1(lim_log(mac_ctx, LOG1, @@ -1826,7 +1826,7 @@ void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac_ctx, tLimMlmDeauthReq *mlm_deauth_req; mlm_disassoc_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq; if (mlm_disassoc_req && - (cdf_mem_compare((uint8_t *) sta_mac, + (!qdf_mem_cmp((uint8_t *) sta_mac, (uint8_t *) &mlm_disassoc_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE))) { if (clean_rx_path) { @@ -1837,7 +1837,7 @@ void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac_ctx, lim_deactivate_and_change_timer(mac_ctx, eLIM_DISASSOC_ACK_TIMER); } - cdf_mem_free(mlm_disassoc_req); + qdf_mem_free(mlm_disassoc_req); mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL; } @@ -1845,7 +1845,7 @@ void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac_ctx, mlm_deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq; if (mlm_deauth_req && - (cdf_mem_compare((uint8_t *) sta_mac, + (!qdf_mem_cmp((uint8_t *) sta_mac, (uint8_t *) &mlm_deauth_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE))) { if (clean_rx_path) { @@ -1856,7 +1856,7 @@ void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac_ctx, lim_deactivate_and_change_timer(mac_ctx, eLIM_DEAUTH_ACK_TIMER); } - cdf_mem_free(mlm_deauth_req); + qdf_mem_free(mlm_deauth_req); mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq = NULL; } @@ -1947,7 +1947,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("session does not exist for given sessionId %d"), mlm_deauth_req->sessionId); - cdf_mem_free(mlm_deauth_req); + qdf_mem_free(mlm_deauth_req); return; } lim_log(mac_ctx, LOG1, FL("Process Deauth Req on sessionID %d Systemrole %d" @@ -1972,7 +1972,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx, case eLIM_MLM_AUTHENTICATED_STATE: case eLIM_MLM_WT_ASSOC_RSP_STATE: case eLIM_MLM_LINK_ESTABLISHED_STATE: - if (!cdf_mem_compare(mlm_deauth_req->peer_macaddr.bytes, + if (qdf_mem_cmp(mlm_deauth_req->peer_macaddr.bytes, curr_bssId, QDF_MAC_ADDR_SIZE)) { lim_log(mac_ctx, LOGE, FL("received MLM_DEAUTH_REQ with invalid BSS id " @@ -1986,7 +1986,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx, * deauthentication */ sme_deauth_rsp = - cdf_mem_malloc(sizeof(tSirSmeDeauthRsp)); + qdf_mem_malloc(sizeof(tSirSmeDeauthRsp)); if (NULL == sme_deauth_rsp) { lim_log(mac_ctx, LOGP, FL("memory allocation failed for deauth rsp")); @@ -2009,7 +2009,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx, mlm_deauth_req->sessionId; sme_deauth_rsp->transactionId = 0; - cdf_mem_copy(sme_deauth_rsp->peer_macaddr.bytes, + qdf_mem_copy(sme_deauth_rsp->peer_macaddr.bytes, mlm_deauth_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE); @@ -2154,7 +2154,7 @@ end: mlm_deauth_cnf.sessionId = mlm_deauth_req->sessionId; /* Free up buffer allocated for mlmDeauthReq */ - cdf_mem_free(mlm_deauth_req); + qdf_mem_free(mlm_deauth_req); lim_post_sme_message(mac_ctx, LIM_MLM_DEAUTH_CNF, (uint32_t *) &mlm_deauth_cnf); } @@ -2261,7 +2261,7 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) mlm_set_keys_req->aid, mlm_set_keys_req->edType, mlm_set_keys_req->numKeys); lim_print_mac_addr(mac_ctx, mlm_set_keys_req->peer_macaddr.bytes, LOGW); - cdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE); switch (GET_LIM_SYSTEM_ROLE(session)) { case eLIM_STA_ROLE: @@ -2535,7 +2535,7 @@ static void lim_process_join_failure_timeout(tpAniSirGlobal mac_ctx) mlm_join_cnf.sessionId = session->peSessionId; /* Freeup buffer allocated to join request */ if (session->pLimMlmJoinReq) { - cdf_mem_free(session->pLimMlmJoinReq); + qdf_mem_free(session->pLimMlmJoinReq); session->pLimMlmJoinReq = NULL; } lim_post_sme_message(mac_ctx, LIM_MLM_JOIN_CNF, @@ -2578,7 +2578,7 @@ static void lim_process_periodic_join_probe_req_timer(tpAniSirGlobal mac_ctx) if ((true == tx_timer_running(&mac_ctx->lim.limTimers.gLimJoinFailureTimer)) && (session->limMlmState == eLIM_MLM_WT_JOIN_BEACON_STATE)) { - cdf_mem_copy(ssid.ssId, session->ssId.ssId, + qdf_mem_copy(ssid.ssId, session->ssId.ssId, session->ssId.length); ssid.length = session->ssId.length; lim_send_probe_req_mgmt_frame(mac_ctx, &ssid, @@ -2803,7 +2803,7 @@ lim_process_assoc_failure_timeout(tpAniSirGlobal mac_ctx, uint32_t msg_type) * MLM state machine */ if (session->pLimMlmJoinReq) { - cdf_mem_free(session->pLimMlmJoinReq); + qdf_mem_free(session->pLimMlmJoinReq); session->pLimMlmJoinReq = NULL; } /* To remove the preauth node in case of fail to associate */ @@ -2870,7 +2870,7 @@ void lim_complete_mlm_scan(tpAniSirGlobal mac_ctx, tSirResultCodes ret_code) lim_restore_pre_scan_state(mac_ctx); /* Free up mac_ctx->lim.gLimMlmScanReq */ if (NULL != mac_ctx->lim.gpLimMlmScanReq) { - cdf_mem_free(mac_ctx->lim.gpLimMlmScanReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmScanReq); mac_ctx->lim.gpLimMlmScanReq = NULL; } 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 9ec47dc98a30..ed6875cb1b06 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 @@ -405,7 +405,7 @@ void lim_send_mlm_assoc_req(tpAniSirGlobal mac_ctx, return; } - assoc_req = cdf_mem_malloc(sizeof(tLimMlmAssocReq)); + assoc_req = qdf_mem_malloc(sizeof(tLimMlmAssocReq)); if (NULL == assoc_req) { lim_log(mac_ctx, LOGP, FL("call to AllocateMemory failed for mlmAssocReq")); @@ -626,21 +626,21 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) */ auth_mode = eSIR_SHARED_KEY; /* Trigger MAC based Authentication */ - auth_req = cdf_mem_malloc(sizeof(tLimMlmAuthReq)); + auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq)); if (NULL == auth_req) { /* Log error */ lim_log(mac_ctx, LOGP, FL("mlmAuthReq :Memory alloc failed ")); return; } - cdf_mem_set((uint8_t *) auth_req, + 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, session_entry->bssId); } else { - cdf_mem_copy((uint8_t *)&auth_req->peerMacAddr, + qdf_mem_copy((uint8_t *)&auth_req->peerMacAddr, (uint8_t *)&mac_ctx->lim.gLimPreAuthPeerAddr, sizeof(tSirMacAddr)); } @@ -815,7 +815,7 @@ void lim_process_mlm_reassoc_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) return; } if (session->pLimReAssocReq) { - cdf_mem_free(session->pLimReAssocReq); + qdf_mem_free(session->pLimReAssocReq); session->pLimReAssocReq = NULL; } @@ -828,12 +828,12 @@ void lim_process_mlm_reassoc_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) lim_log(mac_ctx, LOG1, FL("Freeing pFTPreAuthReq= %p"), session->ftPEContext.pFTPreAuthReq); if (session->ftPEContext.pFTPreAuthReq->pbssDescription) { - cdf_mem_free( + qdf_mem_free( session->ftPEContext.pFTPreAuthReq->pbssDescription); session->ftPEContext.pFTPreAuthReq->pbssDescription = NULL; } - cdf_mem_free(session->ftPEContext.pFTPreAuthReq); + qdf_mem_free(session->ftPEContext.pFTPreAuthReq); session->ftPEContext.pFTPreAuthReq = NULL; session->ftPEContext.ftPreAuthSession = false; } @@ -921,32 +921,32 @@ lim_fill_assoc_ind_params(tpAniSirGlobal mac_ctx, sme_assoc_ind->beaconLength = session_entry->bcnLen; /* Fill in peerMacAddr */ - cdf_mem_copy(sme_assoc_ind->peerMacAddr, assoc_ind->peerMacAddr, + qdf_mem_copy(sme_assoc_ind->peerMacAddr, assoc_ind->peerMacAddr, sizeof(tSirMacAddr)); /* Fill in aid */ sme_assoc_ind->aid = assoc_ind->aid; /* Fill in bssId */ - cdf_mem_copy(sme_assoc_ind->bssId, session_entry->bssId, + qdf_mem_copy(sme_assoc_ind->bssId, session_entry->bssId, sizeof(tSirMacAddr)); /* Fill in authType */ sme_assoc_ind->authType = assoc_ind->authType; /* Fill in ssId */ - cdf_mem_copy((uint8_t *) &sme_assoc_ind->ssId, + qdf_mem_copy((uint8_t *) &sme_assoc_ind->ssId, (uint8_t *) &(assoc_ind->ssId), assoc_ind->ssId.length + 1); sme_assoc_ind->rsnIE.length = assoc_ind->rsnIE.length; - cdf_mem_copy((uint8_t *) &sme_assoc_ind->rsnIE.rsnIEdata, + qdf_mem_copy((uint8_t *) &sme_assoc_ind->rsnIE.rsnIEdata, (uint8_t *) &(assoc_ind->rsnIE.rsnIEdata), assoc_ind->rsnIE.length); #ifdef FEATURE_WLAN_WAPI sme_assoc_ind->wapiIE.length = assoc_ind->wapiIE.length; - cdf_mem_copy((uint8_t *) &sme_assoc_ind->wapiIE.wapiIEdata, + qdf_mem_copy((uint8_t *) &sme_assoc_ind->wapiIE.wapiIEdata, (uint8_t *) &(assoc_ind->wapiIE.wapiIEdata), assoc_ind->wapiIE.length); #endif sme_assoc_ind->addIE.length = assoc_ind->addIE.length; - cdf_mem_copy((uint8_t *) &sme_assoc_ind->addIE.addIEdata, + qdf_mem_copy((uint8_t *) &sme_assoc_ind->addIE.addIEdata, (uint8_t *) &(assoc_ind->addIE.addIEdata), assoc_ind->addIE.length); @@ -959,12 +959,12 @@ lim_fill_assoc_ind_params(tpAniSirGlobal mac_ctx, assoc_ind->powerCap.maxTxPower; sme_assoc_ind->supportedChannels.numChnl = assoc_ind->supportedChannels.numChnl; - cdf_mem_copy((uint8_t *) &sme_assoc_ind->supportedChannels. + qdf_mem_copy((uint8_t *) &sme_assoc_ind->supportedChannels. channelList, (uint8_t *) &(assoc_ind->supportedChannels.channelList), assoc_ind->supportedChannels.numChnl); } - cdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info, + qdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info, sizeof(tSirSmeChanInfo)); /* Fill in WmmInfo */ sme_assoc_ind->wmmEnabledSta = assoc_ind->WmmStaInfoPresent; @@ -1009,7 +1009,7 @@ void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf) } /* / Inform Host of STA association */ len = sizeof(tSirSmeAssocInd); - pSirSmeAssocInd = cdf_mem_malloc(len); + pSirSmeAssocInd = qdf_mem_malloc(len); if (NULL == pSirSmeAssocInd) { /* Log error */ lim_log(pMac, LOGP, @@ -1032,7 +1032,7 @@ void lim_process_mlm_assoc_ind(tpAniSirGlobal pMac, uint32_t *pMsgBuf) FL ("MLM AssocInd: Station context no longer valid (aid %d)"), ((tpLimMlmAssocInd) pMsgBuf)->aid); - cdf_mem_free(pSirSmeAssocInd); + qdf_mem_free(pSirSmeAssocInd); return; } @@ -1553,13 +1553,13 @@ lim_handle_sme_join_result(tpAniSirGlobal mac_ctx, &session_entry->dph.dphHashTable); goto error; } - cdf_mem_free(session_entry->pLimJoinReq); + qdf_mem_free(session_entry->pLimJoinReq); session_entry->pLimJoinReq = NULL; return; } } error: - cdf_mem_free(session_entry->pLimJoinReq); + qdf_mem_free(session_entry->pLimJoinReq); session_entry->pLimJoinReq = NULL; /* Delete teh session if JOIN failure occurred. */ if (result_code != eSIR_SME_SUCCESS) { @@ -1825,7 +1825,7 @@ void lim_process_sta_mlm_add_sta_rsp(tpAniSirGlobal mac_ctx, } end: if (NULL != msg->bodyptr) { - cdf_mem_free(add_sta_params); + qdf_mem_free(add_sta_params); msg->bodyptr = NULL; } /* Updating PE session Id */ @@ -1921,7 +1921,7 @@ void lim_process_sta_mlm_del_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, } end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pDelBssParams); + qdf_mem_free(pDelBssParams); limMsgQ->bodyptr = NULL; } if (pStaDs == NULL) @@ -1956,7 +1956,7 @@ void lim_process_bt_amp_ap_mlm_del_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg if (psessionEntry == NULL) { lim_log(pMac, LOGE, FL("Session entry passed is NULL")); if (pDelBss != NULL) { - cdf_mem_free(pDelBss); + qdf_mem_free(pDelBss); limMsgQ->bodyptr = NULL; } return; @@ -2006,7 +2006,7 @@ end: pe_delete_session(pMac, psessionEntry); if (pDelBss != NULL) { - cdf_mem_free(pDelBss); + qdf_mem_free(pDelBss); limMsgQ->bodyptr = NULL; } } @@ -2046,7 +2046,7 @@ void lim_process_mlm_del_sta_rsp(tpAniSirGlobal mac_ctx, if (NULL == session_entry) { lim_log(mac_ctx, LOGP, FL("Session Doesn't exist")); - cdf_mem_free(del_sta_params); + qdf_mem_free(del_sta_params); msg->bodyptr = NULL; return; } @@ -2079,7 +2079,7 @@ void lim_process_bt_amp_ap_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg FL("DPH Entry for STA %X missing."), pDelStaParams->assocId); statusCode = eSIR_SME_REFUSED; - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); limMsgQ->bodyptr = NULL; return; @@ -2110,7 +2110,7 @@ void lim_process_bt_amp_ap_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg lim_print_mac_addr(pMac, pStaDs->staAddr, LOG1); if (eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE == pStaDs->mlmStaContext.mlmState) { - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); limMsgQ->bodyptr = NULL; if (lim_add_sta(pMac, pStaDs, false, psessionEntry) != eSIR_SUCCESS) { @@ -2160,7 +2160,7 @@ void lim_process_bt_amp_ap_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg statusCode = eSIR_SME_REFUSED; } end: - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); limMsgQ->bodyptr = NULL; if (eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE != pStaDs->mlmStaContext.mlmState) { @@ -2210,7 +2210,7 @@ void lim_process_sta_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, * calling limDelBSS. */ if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); limMsgQ->bodyptr = NULL; } /* Proceed to do DelBSS even if DelSta resulted in failure */ @@ -2219,7 +2219,7 @@ void lim_process_sta_mlm_del_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, return; end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pDelStaParams); + qdf_mem_free(pDelStaParams); limMsgQ->bodyptr = NULL; } return; @@ -2292,7 +2292,7 @@ void lim_process_ap_mlm_add_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, /* fall though to reclaim the original Add STA Response message */ end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); limMsgQ->bodyptr = NULL; } return; @@ -2350,7 +2350,7 @@ static void lim_process_ap_mlm_add_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg FL("session does not exist for given sessionId")); ) if (NULL != pAddBssParams) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); limMsgQ->bodyptr = NULL; } return; @@ -2440,7 +2440,7 @@ static void lim_process_ap_mlm_add_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf); end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); limMsgQ->bodyptr = NULL; } } @@ -2539,7 +2539,7 @@ lim_process_ibss_mlm_add_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf); end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); limMsgQ->bodyptr = NULL; } } @@ -2603,7 +2603,7 @@ lim_process_sta_add_bss_rsp_pre_assoc(tpAniSirGlobal mac_ctx, authMode = cfgAuthType; /* Trigger MAC based Authentication */ - pMlmAuthReq = cdf_mem_malloc(sizeof(tLimMlmAuthReq)); + pMlmAuthReq = qdf_mem_malloc(sizeof(tLimMlmAuthReq)); if (NULL == pMlmAuthReq) { lim_log(mac_ctx, LOGP, FL("Allocate Memory failed for mlmAuthReq")); @@ -2733,14 +2733,14 @@ lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, if (NULL == pMac->lim.pSessionEntry->pLimMlmReassocRetryReq) { /* Take a copy of reassoc request for retrying */ pMac->lim.pSessionEntry->pLimMlmReassocRetryReq = - cdf_mem_malloc(sizeof(tLimMlmReassocReq)); + qdf_mem_malloc(sizeof(tLimMlmReassocReq)); if (NULL == pMac->lim.pSessionEntry->pLimMlmReassocRetryReq) goto end; - cdf_mem_set(pMac->lim.pSessionEntry-> + qdf_mem_set(pMac->lim.pSessionEntry-> pLimMlmReassocRetryReq, sizeof(tLimMlmReassocReq), 0); - cdf_mem_copy(pMac->lim.pSessionEntry-> + qdf_mem_copy(pMac->lim.pSessionEntry-> pLimMlmReassocRetryReq, psessionEntry->pLimMlmReassocReq, sizeof(tLimMlmReassocReq)); @@ -2779,20 +2779,20 @@ lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, rrm_cache_mgmt_tx_power(pMac, pAddBssParams->txMgmtPower, psessionEntry); #endif - pAddStaParams = cdf_mem_malloc(sizeof(tAddStaParams)); + pAddStaParams = qdf_mem_malloc(sizeof(tAddStaParams)); if (NULL == pAddStaParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during ADD_STA")); goto end; } - cdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0); + qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0); /* / Add STA context at MAC HW (BMU, RHP & TFP) */ - cdf_mem_copy((uint8_t *) pAddStaParams->staMac, + qdf_mem_copy((uint8_t *) pAddStaParams->staMac, (uint8_t *) psessionEntry->selfMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) pAddStaParams->bssId, + qdf_mem_copy((uint8_t *) pAddStaParams->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); pAddStaParams->staType = STA_ENTRY_SELF; @@ -2870,7 +2870,7 @@ lim_process_sta_mlm_add_bss_rsp_ft(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, psessionEntry->ftPEContext.pAddStaReq = pAddStaParams; if (pAddBssParams != NULL) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); pAddBssParams = NULL; limMsgQ->bodyptr = NULL; } @@ -2888,12 +2888,12 @@ end: /* Free up buffer allocated for reassocReq */ if (psessionEntry != NULL) if (psessionEntry->pLimMlmReassocReq != NULL) { - cdf_mem_free(psessionEntry->pLimMlmReassocReq); + qdf_mem_free(psessionEntry->pLimMlmReassocReq); psessionEntry->pLimMlmReassocReq = NULL; } if (pAddBssParams != NULL) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); pAddBssParams = NULL; limMsgQ->bodyptr = NULL; } @@ -3075,7 +3075,7 @@ lim_process_sta_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx, } end: if (0 != msg->bodyptr) { - cdf_mem_free(add_bss_params); + qdf_mem_free(add_bss_params); msg->bodyptr = NULL; } } @@ -3129,7 +3129,7 @@ void lim_process_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("SessionId:%d Session Doesn't exist"), add_bss_param->sessionId); if (NULL != add_bss_param) { - cdf_mem_free(add_bss_param); + qdf_mem_free(add_bss_param); msg->bodyptr = NULL; } return; @@ -3154,7 +3154,7 @@ void lim_process_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx, mlm_start_cnf.resultCode = eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED; if (0 != msg->bodyptr) { - cdf_mem_free(add_bss_param); + qdf_mem_free(add_bss_param); msg->bodyptr = NULL; } lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF, @@ -3223,7 +3223,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, tpPESession session_entry; SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true); - cdf_mem_set((void *)&mlm_set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0); + qdf_mem_set((void *)&mlm_set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0); if (NULL == msg->bodyptr) { PELOGE(lim_log(mac_ctx, LOGE, FL("msg bodyptr is NULL"));) return; @@ -3233,7 +3233,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, if (session_entry == NULL) { PELOGE(lim_log(mac_ctx, LOGE, FL("session does not exist for given session_id"));) - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; return; } @@ -3249,7 +3249,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, (uint16_t)(((tpSetStaKeyParams) msg->bodyptr)->status); } - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; /* Restore MLME state */ session_entry->limMlmState = session_entry->limPrevMlmState; @@ -3266,7 +3266,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, * Free the buffer cached for the global * mac_ctx->lim.gpLimMlmSetKeysReq */ - cdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq); mac_ctx->lim.gpLimMlmSetKeysReq = NULL; } mlm_set_key_cnf.sessionId = session_id; @@ -3296,7 +3296,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx, tpLimMlmSetKeysReq set_key_req; SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true); - cdf_mem_set((void *)&set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0); + qdf_mem_set((void *)&set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0); if (NULL == msg->bodyptr) { PELOGE(lim_log(mac_ctx, LOGE, FL("msg bodyptr is null"));) return; @@ -3307,7 +3307,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx, PELOGE(lim_log(mac_ctx, LOGE, FL("session does not exist for given sessionId [%d]"), session_id);) - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; return; } @@ -3334,7 +3334,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx, set_key_cnf.resultCode = result_status; } - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); msg->bodyptr = NULL; /* Restore MLME state */ session_entry->limMlmState = session_entry->limPrevMlmState; @@ -3354,7 +3354,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx, * Free the buffer cached for the * global mac_ctx->lim.gpLimMlmSetKeysReq */ - cdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq); + qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq); mac_ctx->lim.gpLimMlmSetKeysReq = NULL; } lim_post_sme_message(mac_ctx, LIM_MLM_SETKEYS_CNF, @@ -3426,7 +3426,7 @@ end: if (pMlmReassocReq != NULL) { /* Update PE session Id */ mlmReassocCnf.sessionId = pMlmReassocReq->sessionId; - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); psessionEntry->pLimMlmReassocReq = NULL; } else { mlmReassocCnf.sessionId = 0; @@ -3509,7 +3509,7 @@ static void lim_process_switch_channel_join_req( for (apCount = 0; apCount < 2; apCount++) { - if (cdf_mem_compare(session_entry->pLimMlmJoinReq->bssDescription.bssId, + if (!qdf_mem_cmp(session_entry->pLimMlmJoinReq->bssDescription.bssId, mac_ctx->lim.gLimHeartBeatApMac[apCount], sizeof(tSirMacAddr))) { lim_log(mac_ctx, LOGE, FL("Index %d Sessionid: %d Send deauth on " @@ -3522,7 +3522,7 @@ static void lim_process_switch_channel_join_req( session_entry->pLimMlmJoinReq->bssDescription.bssId, session_entry, false); - cdf_mem_zero(mac_ctx->lim.gLimHeartBeatApMac[apCount], + qdf_mem_zero(mac_ctx->lim.gLimHeartBeatApMac[apCount], sizeof(tSirMacAddr)); break; } @@ -3530,7 +3530,7 @@ static void lim_process_switch_channel_join_req( } /* Wait for Beacon to announce join success */ - cdf_mem_copy(ssId.ssId, + qdf_mem_copy(ssId.ssId, session_entry->ssId.ssId, session_entry->ssId.length); ssId.length = session_entry->ssId.length; @@ -3586,11 +3586,11 @@ static void lim_process_switch_channel_join_req( error: if (NULL != session_entry) { if (session_entry->pLimMlmJoinReq) { - cdf_mem_free(session_entry->pLimMlmJoinReq); + qdf_mem_free(session_entry->pLimMlmJoinReq); session_entry->pLimMlmJoinReq = NULL; } if (session_entry->pLimJoinReq) { - cdf_mem_free(session_entry->pLimJoinReq); + qdf_mem_free(session_entry->pLimJoinReq); session_entry->pLimJoinReq = NULL; } join_cnf.sessionId = session_entry->peSessionId; @@ -3698,7 +3698,7 @@ void lim_process_switch_channel_rsp(tpAniSirGlobal pMac, void *body) default: break; } - cdf_mem_free(body); + qdf_mem_free(body); } /** @@ -3736,7 +3736,7 @@ lim_handle_del_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs tpDphHashNode pStaDs; tSirRetStatus retStatus = eSIR_SUCCESS; tpSchBeaconStruct beacon_struct; - beacon_struct = cdf_mem_malloc(sizeof(tSchBeaconStruct)); + beacon_struct = qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == beacon_struct) { lim_log(pMac, LOGE, FL("beaconStruct alloc failed")); mlmReassocCnf.resultCode = @@ -3767,7 +3767,7 @@ lim_handle_del_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs mlmReassocCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; mlmReassocCnf.protStatusCode = eSIR_SME_SUCCESS; - cdf_mem_free(beacon_struct); + qdf_mem_free(beacon_struct); goto error; } /* @@ -3812,13 +3812,13 @@ lim_handle_del_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs eSIR_SME_RESOURCES_UNAVAILABLE; mlmReassocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; - cdf_mem_free(assocRsp); + qdf_mem_free(assocRsp); pMac->lim.gLimAssocResponseData = NULL; - cdf_mem_free(beacon_struct); + qdf_mem_free(beacon_struct); goto error; } - cdf_mem_free(assocRsp); - cdf_mem_free(beacon_struct); + qdf_mem_free(assocRsp); + qdf_mem_free(beacon_struct); psessionEntry->limAssocResponseData = NULL; } break; @@ -3907,7 +3907,7 @@ lim_process_btamp_add_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf); end: if (0 != limMsgQ->bodyptr) { - cdf_mem_free(pAddBssParams); + qdf_mem_free(pAddBssParams); limMsgQ->bodyptr = NULL; } } @@ -3946,7 +3946,7 @@ lim_handle_add_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs tSirRetStatus retStatus = eSIR_SUCCESS; tSchBeaconStruct *pBeaconStruct; pBeaconStruct = - cdf_mem_malloc(sizeof(tSchBeaconStruct)); + qdf_mem_malloc(sizeof(tSchBeaconStruct)); if (NULL == pBeaconStruct) { lim_log(pMac, LOGE, FL @@ -3970,7 +3970,7 @@ lim_handle_add_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs mlmReassocCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; mlmReassocCnf.protStatusCode = eSIR_SME_SUCCESS; - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); goto Error; } /** While Processing the ReAssoc Response Frame the ReAssocRsp Frame @@ -4021,14 +4021,14 @@ lim_handle_add_bss_in_re_assoc_context(tpAniSirGlobal pMac, tpDphHashNode pStaDs eSIR_SME_RESOURCES_UNAVAILABLE; mlmReassocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS; - cdf_mem_free(assocRsp); + qdf_mem_free(assocRsp); pMac->lim.gLimAssocResponseData = NULL; - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); goto Error; } - cdf_mem_free(assocRsp); + qdf_mem_free(assocRsp); psessionEntry->limAssocResponseData = NULL; - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); } break; case eLIM_SME_WT_REASSOC_LINK_FAIL_STATE: { @@ -4086,7 +4086,7 @@ void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry) ) return; } - pBeaconGenParams = cdf_mem_malloc(sizeof(*pBeaconGenParams)); + pBeaconGenParams = qdf_mem_malloc(sizeof(*pBeaconGenParams)); if (NULL == pBeaconGenParams) { PELOGE(lim_log(pMac, LOGP, FL @@ -4094,8 +4094,8 @@ void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry) ) return; } - cdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0); - cdf_mem_copy((void *)pBeaconGenParams->bssId, + qdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0); + qdf_mem_copy((void *)pBeaconGenParams->bssId, (void *)psessionEntry->bssId, QDF_MAC_ADDR_SIZE); limMsg.bodyptr = pBeaconGenParams; sch_process_pre_beacon_ind(pMac, &limMsg); @@ -4167,7 +4167,7 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf) QDF_STATUS_SUCCESS, pScanEvent->sessionId, pScanEvent->scanId); - cdf_mem_free(pMac->lim.gpLimRemainOnChanReq); + qdf_mem_free(pMac->lim.gpLimRemainOnChanReq); pMac->lim.gpLimRemainOnChanReq = NULL; /* * If remain on channel timer expired and action frame @@ -4216,5 +4216,5 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf) "Received unhandled scan event %u", pScanEvent->event); } - cdf_mem_free(buf); + qdf_mem_free(buf); } diff --git a/core/mac/src/pe/lim/lim_process_probe_req_frame.c b/core/mac/src/pe/lim/lim_process_probe_req_frame.c index 0a75bd445916..91b887da46f4 100644 --- a/core/mac/src/pe/lim/lim_process_probe_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_req_frame.c @@ -82,7 +82,7 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, struct qdf_mac_addr addr, cur_time = (uint32_t) (qdf_mc_timer_get_system_ticks() / QDF_TICKS_PER_SECOND); qdf_zero_macaddr(&addr); - cdf_mem_set((uint8_t *) uuid_e, SIR_WPS_UUID_LEN, 0); + qdf_mem_set((uint8_t *) uuid_e, SIR_WPS_UUID_LEN, 0); for (pbc = session->pAPWPSPBCSession; pbc; pbc = pbc->next) { if (cur_time > pbc->timestamp + SIR_WPS_PBC_WALK_TIME) break; @@ -90,7 +90,7 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, struct qdf_mac_addr addr, if (count > 1) break; qdf_copy_macaddr(&addr, &pbc->addr); - cdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e, + qdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e, SIR_WPS_UUID_LEN); } if (count > 1) @@ -140,7 +140,7 @@ static void lim_remove_timeout_pbc_sessions(tpAniSirGlobal pMac, SIR_WPS_UUID_LEN); ) - cdf_mem_free(prev); + qdf_mem_free(prev); } } @@ -163,7 +163,7 @@ void lim_remove_pbc_sessions(tpAniSirGlobal mac, struct qdf_mac_addr remove_mac, prev->next = pbc->next; if (pbc == session_entry->pAPWPSPBCSession) session_entry->pAPWPSPBCSession = pbc->next; - cdf_mem_free(pbc); + qdf_mem_free(pbc); return; } prev = pbc; @@ -220,11 +220,11 @@ static void lim_update_pbc_session_entry(tpAniSirGlobal pMac, pbc = psessionEntry->pAPWPSPBCSession; while (pbc) { - if (cdf_mem_compare + if ((!qdf_mem_cmp ((uint8_t *) pbc->addr.bytes, (uint8_t *) addr, - QDF_MAC_ADDR_SIZE) - && cdf_mem_compare((uint8_t *) pbc->uuid_e, - (uint8_t *) uuid_e, SIR_WPS_UUID_LEN)) { + QDF_MAC_ADDR_SIZE)) + && (!qdf_mem_cmp((uint8_t *) pbc->uuid_e, + (uint8_t *) uuid_e, SIR_WPS_UUID_LEN))) { if (prev) prev->next = pbc->next; else @@ -236,18 +236,18 @@ static void lim_update_pbc_session_entry(tpAniSirGlobal pMac, } if (!pbc) { - pbc = cdf_mem_malloc(sizeof(tSirWPSPBCSession)); + pbc = qdf_mem_malloc(sizeof(tSirWPSPBCSession)); if (NULL == pbc) { PELOGE(lim_log (pMac, LOGE, FL("memory allocate failed!")); ) return; } - cdf_mem_copy((uint8_t *) pbc->addr.bytes, (uint8_t *) addr, + qdf_mem_copy((uint8_t *) pbc->addr.bytes, (uint8_t *) addr, QDF_MAC_ADDR_SIZE); if (uuid_e) - cdf_mem_copy((uint8_t *) pbc->uuid_e, + qdf_mem_copy((uint8_t *) pbc->uuid_e, (uint8_t *) uuid_e, SIR_WPS_UUID_LEN); } @@ -451,7 +451,7 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, } ssid.length = session->ssId.length; /* Copy the SSID from sessio entry to local variable */ - cdf_mem_copy(ssid.ssId, session->ssId.ssId, + qdf_mem_copy(ssid.ssId, session->ssId.ssId, session->ssId.length); /* @@ -462,7 +462,7 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, if (!ssid.length) goto multipleSSIDcheck; - if (cdf_mem_compare((uint8_t *) &ssid, + if (!qdf_mem_cmp((uint8_t *) &ssid, (uint8_t *) &(probe_req.ssId), (uint8_t) (ssid.length + 1))) { lim_send_probe_rsp_mgmt_frame(mac_ctx, @@ -476,7 +476,7 @@ lim_process_probe_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, QDF_P2P_GO_MODE) { uint8_t direct_ssid[7] = "DIRECT-"; uint8_t direct_ssid_len = 7; - if (cdf_mem_compare((uint8_t *) &direct_ssid, + if (!qdf_mem_cmp((uint8_t *) &direct_ssid, (uint8_t *) &(probe_req.ssId.ssId), (uint8_t) (direct_ssid_len))) { lim_send_probe_rsp_mgmt_frame(mac_ctx, @@ -651,7 +651,7 @@ lim_send_sme_probe_req_ind(tpAniSirGlobal pMac, tSirSmeProbeReqInd *pSirSmeProbeReqInd; tSirMsgQ msgQ; - pSirSmeProbeReqInd = cdf_mem_malloc(sizeof(tSirSmeProbeReqInd)); + pSirSmeProbeReqInd = qdf_mem_malloc(sizeof(tSirSmeProbeReqInd)); if (NULL == pSirSmeProbeReqInd) { /* Log error */ lim_log(pMac, LOGP, @@ -668,15 +668,15 @@ lim_send_sme_probe_req_ind(tpAniSirGlobal pMac, pSirSmeProbeReqInd->length = sizeof(tSirSmeProbeReq); pSirSmeProbeReqInd->sessionId = psessionEntry->smeSessionId; - cdf_mem_copy(pSirSmeProbeReqInd->bssid.bytes, psessionEntry->bssId, + qdf_mem_copy(pSirSmeProbeReqInd->bssid.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.peer_macaddr.bytes, + qdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.peer_macaddr.bytes, peerMacAddr, QDF_MAC_ADDR_SIZE); MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type)); pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIELen = (uint16_t) ProbeReqIELen; - cdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIE, pProbeReqIE, + qdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIE, pProbeReqIE, ProbeReqIELen); if (lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT) != eSIR_SUCCESS) { diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c index 195e223b6c07..87783a0912e1 100644 --- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c @@ -97,7 +97,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, lim_log(mac_ctx, LOG1, "SessionId:%d ProbeRsp Frame is received", session_entry->peSessionId); - probe_rsp = cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + probe_rsp = qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == probe_rsp) { lim_log(mac_ctx, LOGE, FL @@ -120,7 +120,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, eSIR_SUCCESS) { lim_log(mac_ctx, LOG1, FL("Parse error ProbeResponse, length=%d"), frame_len); - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } @@ -138,7 +138,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, !probe_rsp->ssidPresent) { lim_log(mac_ctx, LOG1, FL("Parse error ProbeResponse, length=%d"), frame_len); - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } lim_check_and_add_bss_description(mac_ctx, probe_rsp, @@ -159,14 +159,14 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, * Hence store it in same buffer. */ if (session_entry->beacon != NULL) { - cdf_mem_free(session_entry->beacon); + qdf_mem_free(session_entry->beacon); session_entry->beacon = NULL; session_entry->bcnLen = 0; } session_entry->bcnLen = WMA_GET_RX_PAYLOAD_LEN(rx_Packet_info); session_entry->beacon = - cdf_mem_malloc(session_entry->bcnLen); + qdf_mem_malloc(session_entry->bcnLen); if (NULL == session_entry->beacon) { lim_log(mac_ctx, LOGE, FL("No Memory to store beacon")); @@ -175,7 +175,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, * Store the Beacon/ProbeRsp. * This is sent to csr/hdd in join cnf response. */ - cdf_mem_copy(session_entry->beacon, + qdf_mem_copy(session_entry->beacon, WMA_GET_RX_MPDU_DATA (rx_Packet_info), session_entry->bcnLen); @@ -193,9 +193,9 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, * heart beat threshold */ sir_copy_mac_addr(current_bssid, session_entry->bssId); - if (!cdf_mem_compare(current_bssid, header->bssId, + if (qdf_mem_cmp(current_bssid, header->bssId, sizeof(tSirMacAddr))) { - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } if (!LIM_IS_CONNECTION_ACTIVE(session_entry)) { @@ -294,7 +294,7 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, lim_handle_ibss_coalescing(mac_ctx, probe_rsp, rx_Packet_info, session_entry); } - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); /* Ignore Probe Response frame in all other states */ return; @@ -318,7 +318,7 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr header; tSirProbeRespBeacon *probe_rsp; - probe_rsp = cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + probe_rsp = qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == probe_rsp) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); @@ -340,7 +340,7 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx, eSIR_SUCCESS) { lim_log(mac_ctx, LOG1, FL("Parse error ProbeResponse, length=%d"), frame_len); - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } @@ -360,12 +360,12 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("Parse error ProbeResponse, length=%d\n"), frame_len); - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache")); lim_check_and_add_bss_description(mac_ctx, probe_rsp, rx_packet_info, false, true); - cdf_mem_free(probe_rsp); + qdf_mem_free(probe_rsp); return; } 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 99b5795c6f45..d71fa9701f6b 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 @@ -148,16 +148,16 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg) len = sizeof(*req_msg); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - lim_log(mac, LOGE, FL("cdf_mem_malloc failed")); + lim_log(mac, LOGE, FL("qdf_mem_malloc failed")); /* Free the active command list * Probably the malloc is going to fail there as well?! */ return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); req_msg->hw_mode_index = buf->set_hw.hw_mode_index; req_msg->reason = buf->set_hw.reason; @@ -172,12 +172,12 @@ static QDF_STATUS lim_process_set_hw_mode(tpAniSirGlobal mac, uint32_t *msg) lim_log(mac, LOGE, FL("vos_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); goto fail; } return status; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { lim_log(mac, LOGE, FL("HW mode resp failed")); return QDF_STATUS_E_FAILURE; @@ -221,7 +221,7 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac, len = sizeof(*req_msg); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { lim_log(mac, LOGE, FL("vos_mem_malloc failed")); /* Free the active command list @@ -230,7 +230,7 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac, return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + 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; @@ -247,12 +247,12 @@ static QDF_STATUS lim_process_set_dual_mac_cfg_req(tpAniSirGlobal mac, lim_log(mac, LOGE, FL("vos_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); goto fail; } return status; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { lim_log(mac, LOGE, FL("Dual mac config resp failed")); return QDF_STATUS_E_FAILURE; @@ -592,7 +592,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) (mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE)) { size = sizeof(tSirSmeStartBssReq); - sme_start_bss_req = cdf_mem_malloc(size); + sme_start_bss_req = qdf_mem_malloc(size); if (NULL == sme_start_bss_req) { lim_log(mac_ctx, LOGE, FL("Allocate Memory fail for LimStartBssReq")); @@ -601,8 +601,8 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) goto end; } - cdf_mem_set((void *)sme_start_bss_req, size, 0); - cdf_mem_copy(sme_start_bss_req, msg_buf, + 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, sme_start_bss_req)) { @@ -669,7 +669,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) session->transactionId = sme_start_bss_req->transactionId; - cdf_mem_copy(&(session->htConfig), + qdf_mem_copy(&(session->htConfig), &(sme_start_bss_req->htConfig), sizeof(session->htConfig)); @@ -677,7 +677,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) sme_start_bss_req->self_macaddr.bytes); /* Copy SSID to session table */ - cdf_mem_copy((uint8_t *) &session->ssId, + qdf_mem_copy((uint8_t *) &session->ssId, (uint8_t *) &sme_start_bss_req->ssId, (sme_start_bss_req->ssId.length + 1)); @@ -729,10 +729,10 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) session->limRmfEnabled); #endif - cdf_mem_copy((void *)&session->rateSet, + qdf_mem_copy((void *)&session->rateSet, (void *)&sme_start_bss_req->operationalRateSet, sizeof(tSirMacRateSet)); - cdf_mem_copy((void *)&session->extRateSet, + qdf_mem_copy((void *)&session->extRateSet, (void *)&sme_start_bss_req->extendedRateSet, sizeof(tSirMacRateSet)); @@ -788,7 +788,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) if ((sme_start_bss_req->bssType == eSIR_BTAMP_AP_MODE) || (sme_start_bss_req->bssType == eSIR_INFRA_AP_MODE)) { session->parsedAssocReq = - cdf_mem_malloc(session->dph.dphHashTable. + qdf_mem_malloc(session->dph.dphHashTable. size * sizeof(tpSirAssocReq)); if (NULL == session->parsedAssocReq) { lim_log(mac_ctx, LOGW, @@ -796,7 +796,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) ret_code = eSIR_SME_RESOURCES_UNAVAILABLE; goto free; } - cdf_mem_set(session->parsedAssocReq, + qdf_mem_set(session->parsedAssocReq, (session->dph.dphHashTable.size * sizeof(tpSirAssocReq)), 0); } @@ -878,14 +878,14 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 * reserved reserved RIFS Lsig n-GF ht20 11g 11b */ - cdf_mem_copy((void *)&session->cfgProtection, + qdf_mem_copy((void *)&session->cfgProtection, (void *)&sme_start_bss_req->ht_capab, sizeof(uint16_t)); /* Initialize WPS PBC session link list */ session->pAPWPSPBCSession = NULL; } /* Prepare and Issue LIM_MLM_START_REQ to MLM */ - mlm_start_req = cdf_mem_malloc(sizeof(tLimMlmStartReq)); + mlm_start_req = qdf_mem_malloc(sizeof(tLimMlmStartReq)); if (NULL == mlm_start_req) { lim_log(mac_ctx, LOGP, FL("Allocate Memory failed for mlmStartReq")); @@ -893,10 +893,10 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) goto free; } - cdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0); + qdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0); /* Copy SSID to the MLM start structure */ - cdf_mem_copy((uint8_t *) &mlm_start_req->ssId, + qdf_mem_copy((uint8_t *) &mlm_start_req->ssId, (uint8_t *) &sme_start_bss_req->ssId, sme_start_bss_req->ssId.length + 1); mlm_start_req->ssidHidden = sme_start_bss_req->ssidHidden; @@ -999,7 +999,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) * as rateSet is now included in the * session entry and MLM has session context. */ - cdf_mem_copy((void *)&mlm_start_req->rateSet, + qdf_mem_copy((void *)&mlm_start_req->rateSet, (void *)&session->rateSet, sizeof(tSirMacRateSet)); @@ -1078,8 +1078,8 @@ free: (session->pLimStartBssReq == sme_start_bss_req)) { session->pLimStartBssReq = NULL; } - cdf_mem_free(sme_start_bss_req); - cdf_mem_free(mlm_start_req); + qdf_mem_free(sme_start_bss_req); + qdf_mem_free(mlm_start_req); end: if (sme_start_bss_req != NULL) { @@ -1147,7 +1147,7 @@ void lim_get_random_bssid(tpAniSirGlobal pMac, uint8_t *data) random[0] = tx_time_get(); random[0] |= (random[0] << 15); random[1] = random[0] >> 1; - cdf_mem_copy(data, (uint8_t *) random, sizeof(tSirMacAddr)); + qdf_mem_copy(data, (uint8_t *) random, sizeof(tSirMacAddr)); } static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, @@ -1219,14 +1219,14 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, } #endif /* WLAN_FEATURE_11AC */ - pScanOffloadReq = cdf_mem_malloc(len); + pScanOffloadReq = qdf_mem_malloc(len); if (NULL == pScanOffloadReq) { lim_log(pMac, LOGE, FL("AllocateMemory failed for pScanOffloadReq")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set((uint8_t *) pScanOffloadReq, len, 0); + qdf_mem_set((uint8_t *) pScanOffloadReq, len, 0); msg.type = WMA_START_SCAN_OFFLOAD_REQ; msg.bodyptr = pScanOffloadReq; @@ -1238,14 +1238,14 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, lim_log(pMac, LOGE, FL("Invalid value (%d) for numSsid"), SIR_SCAN_MAX_NUM_SSID); - cdf_mem_free(pScanOffloadReq); + qdf_mem_free(pScanOffloadReq); return QDF_STATUS_E_FAILURE; } pScanOffloadReq->numSsid = pScanReq->numSsid; for (i = 0; i < pScanOffloadReq->numSsid; i++) { pScanOffloadReq->ssId[i].length = pScanReq->ssId[i].length; - cdf_mem_copy((uint8_t *) pScanOffloadReq->ssId[i].ssId, + qdf_mem_copy((uint8_t *) pScanOffloadReq->ssId[i].ssId, (uint8_t *) pScanReq->ssId[i].ssId, pScanOffloadReq->ssId[i].length); } @@ -1281,7 +1281,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, pScanOffloadReq->uIEFieldLen = pScanReq->uIEFieldLen; pScanOffloadReq->uIEFieldOffset = len - addn_ie_len - pScanOffloadReq->uIEFieldLen; - cdf_mem_copy((uint8_t *) pScanOffloadReq + + qdf_mem_copy((uint8_t *) pScanOffloadReq + pScanOffloadReq->uIEFieldOffset, (uint8_t *) pScanReq + pScanReq->uIEFieldOffset, pScanReq->uIEFieldLen); @@ -1292,7 +1292,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, ht_cap_ie = (uint8_t *) pScanOffloadReq + pScanOffloadReq->uIEFieldOffset + pScanOffloadReq->uIEFieldLen; - cdf_mem_set(ht_cap_ie, ht_cap_len, 0); + qdf_mem_set(ht_cap_ie, ht_cap_len, 0); *ht_cap_ie = SIR_MAC_HT_CAPABILITIES_EID; *(ht_cap_ie + 1) = ht_cap_len - 2; lim_set_ht_caps(pMac, NULL, ht_cap_ie, ht_cap_len); @@ -1306,7 +1306,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, vht_cap_ie = (uint8_t *) pScanOffloadReq + pScanOffloadReq->uIEFieldOffset + pScanOffloadReq->uIEFieldLen; - cdf_mem_set(vht_cap_ie, vht_cap_len, 0); + qdf_mem_set(vht_cap_ie, vht_cap_len, 0); *vht_cap_ie = SIR_MAC_VHT_CAPABILITIES_EID; *(vht_cap_ie + 1) = vht_cap_len - 2; lim_set_vht_caps(pMac, NULL, vht_cap_ie, vht_cap_len); @@ -1317,7 +1317,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac, rc = wma_post_ctrl_msg(pMac, &msg); if (rc != eSIR_SUCCESS) { lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure")); - cdf_mem_free(pScanOffloadReq); + qdf_mem_free(pScanOffloadReq); return QDF_STATUS_E_FAILURE; } @@ -1448,26 +1448,26 @@ static void __lim_process_sme_oem_data_req(tpAniSirGlobal pMac, uint32_t *pMsgBu pOemDataReq = (tpSirOemDataReq) pMsgBuf; /* post the lim mlm message now */ - pMlmOemDataReq = cdf_mem_malloc(sizeof(*pMlmOemDataReq)); + pMlmOemDataReq = qdf_mem_malloc(sizeof(*pMlmOemDataReq)); if (NULL == pMlmOemDataReq) { lim_log(pMac, LOGP, FL("AllocateMemory failed for mlmOemDataReq")); return; } - pMlmOemDataReq->data = cdf_mem_malloc(pOemDataReq->data_len); + pMlmOemDataReq->data = qdf_mem_malloc(pOemDataReq->data_len); if (!pMlmOemDataReq->data) { lim_log(pMac, LOGP, FL("memory allocation failed")); - cdf_mem_free(pMlmOemDataReq); + qdf_mem_free(pMlmOemDataReq); return; } qdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr, &pOemDataReq->selfMacAddr); pMlmOemDataReq->data_len = pOemDataReq->data_len; - cdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data, + qdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data, pOemDataReq->data_len); /* buffer from SME copied, free it now */ - cdf_mem_free(pOemDataReq->data); + qdf_mem_free(pOemDataReq->data); /* Issue LIM_MLM_OEM_DATA_REQ to MLM */ lim_post_mlm_message(pMac, LIM_MLM_OEM_DATA_REQ, (uint32_t *) pMlmOemDataReq); @@ -1497,7 +1497,7 @@ static void __lim_process_sme_oem_data_req(tpAniSirGlobal pMac, uint32_t *pMsgBu */ static void __lim_process_clear_dfs_channel_list(tpAniSirGlobal pMac, tpSirMsgQ pMsg) { - cdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0); + qdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0); } /** @@ -1548,15 +1548,15 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) n_size = __lim_get_sme_join_req_size_for_alloc((uint8_t *) msg_buf); - sme_join_req = cdf_mem_malloc(n_size); + sme_join_req = qdf_mem_malloc(n_size); if (NULL == sme_join_req) { lim_log(mac_ctx, LOGP, FL("AllocateMemory failed for sme_join_req")); ret_code = eSIR_SME_RESOURCES_UNAVAILABLE; return; } - (void)cdf_mem_set((void *)sme_join_req, n_size, 0); - (void)cdf_mem_copy((void *)sme_join_req, (void *)msg_buf, + (void)qdf_mem_set((void *)sme_join_req, n_size, 0); + (void)qdf_mem_copy((void *)sme_join_req, (void *)msg_buf, n_size); if (!lim_is_sme_join_req_valid(mac_ctx, sme_join_req)) { @@ -1652,7 +1652,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) session->beaconParams.beaconInterval = bss_desc.beaconInterval; - cdf_mem_copy(&(session->htConfig), &(sme_join_req->htConfig), + qdf_mem_copy(&(session->htConfig), &(sme_join_req->htConfig), sizeof(session->htConfig)); /* Copying of bssId is already done, while creating session */ @@ -1791,7 +1791,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) /* Copy the SSID from smejoinreq to session entry */ session->ssId.length = sme_join_req->ssId.length; - cdf_mem_copy(session->ssId.ssId, sme_join_req->ssId.ssId, + qdf_mem_copy(session->ssId.ssId, sme_join_req->ssId.ssId, session->ssId.length); /* @@ -1830,22 +1830,22 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) } if (sme_join_req->addIEScan.length) - cdf_mem_copy(&session->pLimJoinReq->addIEScan, + qdf_mem_copy(&session->pLimJoinReq->addIEScan, &sme_join_req->addIEScan, sizeof(tSirAddie)); if (sme_join_req->addIEAssoc.length) - cdf_mem_copy(&session->pLimJoinReq->addIEAssoc, + qdf_mem_copy(&session->pLimJoinReq->addIEAssoc, &sme_join_req->addIEAssoc, sizeof(tSirAddie)); val = sizeof(tLimMlmJoinReq) + session->pLimJoinReq->bssDescription.length + 2; - mlm_join_req = cdf_mem_malloc(val); + mlm_join_req = qdf_mem_malloc(val); if (NULL == mlm_join_req) { lim_log(mac_ctx, LOGP, FL("AllocateMemory failed for mlmJoinReq")); return; } - (void)cdf_mem_set((void *)mlm_join_req, val, 0); + (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; @@ -1861,17 +1861,17 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) } /* copy operational rate from session */ - cdf_mem_copy((void *)&session->rateSet, + qdf_mem_copy((void *)&session->rateSet, (void *)&sme_join_req->operationalRateSet, sizeof(tSirMacRateSet)); - cdf_mem_copy((void *)&session->extRateSet, + qdf_mem_copy((void *)&session->extRateSet, (void *)&sme_join_req->extendedRateSet, sizeof(tSirMacRateSet)); /* * this may not be needed anymore now, as rateSet is now * included in the session entry and MLM has session context. */ - cdf_mem_copy((void *)&mlm_join_req->operationalRateSet, + qdf_mem_copy((void *)&mlm_join_req->operationalRateSet, (void *)&session->rateSet, sizeof(tSirMacRateSet)); @@ -1880,7 +1880,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) mlm_join_req->bssDescription.length = session->pLimJoinReq->bssDescription.length; - cdf_mem_copy((uint8_t *) &mlm_join_req->bssDescription.bssId, + qdf_mem_copy((uint8_t *) &mlm_join_req->bssDescription.bssId, (uint8_t *) &session->pLimJoinReq->bssDescription.bssId, session->pLimJoinReq->bssDescription.length + 2); @@ -2002,7 +2002,7 @@ end: sme_transaction_id = sme_join_req->transactionId; if (sme_join_req) { - cdf_mem_free(sme_join_req); + qdf_mem_free(sme_join_req); sme_join_req = NULL; if (NULL != session) session->pLimJoinReq = NULL; @@ -2070,7 +2070,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG3, FL("Received REASSOC_REQ")); size = __lim_get_sme_join_req_size_for_alloc((uint8_t *)msg_buf); - reassoc_req = cdf_mem_malloc(size); + reassoc_req = qdf_mem_malloc(size); if (NULL == reassoc_req) { lim_log(mac_ctx, LOGP, FL("call to AllocateMemory failed for reassoc_req")); @@ -2078,8 +2078,8 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, ret_code = eSIR_SME_RESOURCES_UNAVAILABLE; goto end; } - (void)cdf_mem_set((void *)reassoc_req, size, 0); - (void)cdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size); + (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, (tpSirSmeJoinReq)reassoc_req)) { @@ -2132,7 +2132,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, session_entry->peSessionId); /* Make sure its our preauth bssid */ - if (!cdf_mem_compare(reassoc_req->bssDescription.bssId, + if (qdf_mem_cmp(reassoc_req->bssDescription.bssId, session_entry->limReAssocbssId, 6)) { lim_print_mac_addr(mac_ctx, @@ -2160,7 +2160,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, goto end; } - cdf_mem_copy(session_entry->limReAssocbssId, + qdf_mem_copy(session_entry->limReAssocbssId, session_entry->pLimReAssocReq->bssDescription.bssId, sizeof(tSirMacAddr)); @@ -2197,7 +2197,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, #endif /* Copy the SSID from session entry to local variable */ session_entry->limReassocSSID.length = reassoc_req->ssId.length; - cdf_mem_copy(session_entry->limReassocSSID.ssId, + qdf_mem_copy(session_entry->limReassocSSID.ssId, reassoc_req->ssId.ssId, session_entry->limReassocSSID.length); if (session_entry->gLimCurrentBssUapsd) { @@ -2208,7 +2208,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, session_entry->gUapsdPerAcBitmask); } - mlm_reassoc_req = cdf_mem_malloc(sizeof(tLimMlmReassocReq)); + mlm_reassoc_req = qdf_mem_malloc(sizeof(tLimMlmReassocReq)); if (NULL == mlm_reassoc_req) { lim_log(mac_ctx, LOGP, FL("call to AllocateMemory failed for mlmReassocReq")); @@ -2217,7 +2217,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, goto end; } - cdf_mem_copy(mlm_reassoc_req->peerMacAddr, + qdf_mem_copy(mlm_reassoc_req->peerMacAddr, session_entry->limReAssocbssId, sizeof(tSirMacAddr)); if (wlan_cfg_get_int(mac_ctx, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT, @@ -2299,7 +2299,7 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx, return; end: if (reassoc_req) { - cdf_mem_free(reassoc_req); + qdf_mem_free(reassoc_req); if (session_entry) session_entry->pLimReAssocReq = NULL; } @@ -2365,7 +2365,7 @@ static void __lim_process_sme_disassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBu return; } - cdf_mem_copy(&smeDisassocReq, pMsgBuf, sizeof(tSirSmeDisassocReq)); + qdf_mem_copy(&smeDisassocReq, pMsgBuf, sizeof(tSirSmeDisassocReq)); smesessionId = smeDisassocReq.sessionId; smetransactionId = smeDisassocReq.transactionId; if (!lim_is_sme_disassoc_req_valid(pMac, @@ -2529,7 +2529,7 @@ static void __lim_process_sme_disassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBu " : %d, reasonCode : %d"), disassocTrigger, reasonCode); - pMlmDisassocReq = cdf_mem_malloc(sizeof(tLimMlmDisassocReq)); + pMlmDisassocReq = qdf_mem_malloc(sizeof(tLimMlmDisassocReq)); if (NULL == pMlmDisassocReq) { /* Log error */ lim_log(pMac, LOGP, @@ -2588,7 +2588,7 @@ static void __lim_process_sme_disassoc_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBu PELOG1(lim_log(pMac, LOG1, FL("received DISASSOC_CNF message"));) - cdf_mem_copy(&smeDisassocCnf, pMsgBuf, + qdf_mem_copy(&smeDisassocCnf, pMsgBuf, sizeof(struct sSirSmeDisassocCnf)); psessionEntry = pe_find_session_by_bssid(pMac, @@ -2709,7 +2709,7 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("received DEAUTH_REQ message")); - cdf_mem_copy(&sme_deauth_req, msg_buf, sizeof(tSirSmeDeauthReq)); + qdf_mem_copy(&sme_deauth_req, msg_buf, sizeof(tSirSmeDeauthReq)); sme_session_id = sme_deauth_req.sessionId; sme_transaction_id = sme_deauth_req.transactionId; @@ -2861,7 +2861,7 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx, } /* Trigger Deauthentication frame to peer MAC entity */ - mlm_deauth_req = cdf_mem_malloc(sizeof(tLimMlmDeauthReq)); + mlm_deauth_req = qdf_mem_malloc(sizeof(tLimMlmDeauthReq)); if (NULL == mlm_deauth_req) { lim_log(mac_ctx, LOGP, FL("call to AllocateMemory failed for mlmDeauthReq")); @@ -2922,13 +2922,13 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) return; } - set_context_req = cdf_mem_malloc(sizeof(struct sSirSmeSetContextReq)); + set_context_req = qdf_mem_malloc(sizeof(struct sSirSmeSetContextReq)); if (NULL == set_context_req) { lim_log(mac_ctx, LOGP, FL( "call to AllocateMemory failed for set_context_req")); return; } - cdf_mem_copy(set_context_req, msg_buf, + qdf_mem_copy(set_context_req, msg_buf, sizeof(struct sSirSmeSetContextReq)); sme_session_id = set_context_req->sessionId; sme_transaction_id = set_context_req->transactionId; @@ -2975,7 +2975,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) LIM_IS_BT_AMP_AP_ROLE(session_entry)) && (session_entry->limSmeState == eLIM_SME_NORMAL_STATE))) { /* Trigger MLM_SETKEYS_REQ */ - mlm_set_key_req = cdf_mem_malloc(sizeof(tLimMlmSetKeysReq)); + mlm_set_key_req = qdf_mem_malloc(sizeof(tLimMlmSetKeysReq)); if (NULL == mlm_set_key_req) { lim_log(mac_ctx, LOGP, FL( "mem alloc failed for mlmSetKeysReq")); @@ -2993,7 +2993,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) qdf_copy_macaddr(&mlm_set_key_req->peer_macaddr, &set_context_req->peer_macaddr); - cdf_mem_copy((uint8_t *) &mlm_set_key_req->key, + qdf_mem_copy((uint8_t *) &mlm_set_key_req->key, (uint8_t *) &set_context_req->keyMaterial.key, sizeof(tSirKeys) * (mlm_set_key_req->numKeys ? mlm_set_key_req-> @@ -3012,7 +3012,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) uint8_t key_id; key_id = set_context_req->keyMaterial.key[0].keyId; - cdf_mem_copy((uint8_t *) + qdf_mem_copy((uint8_t *) &session_entry->WEPKeyMaterial[key_id], (uint8_t *) &set_context_req->keyMaterial, sizeof(tSirKeyMaterial)); @@ -3020,7 +3020,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) uint32_t i; for (i = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++) { - cdf_mem_copy((uint8_t *) + qdf_mem_copy((uint8_t *) &mlm_set_key_req->key[i], (uint8_t *)session_entry->WEPKeyMaterial[i].key, sizeof(tSirKeys)); @@ -3043,7 +3043,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf) sme_transaction_id); } end: - cdf_mem_free(set_context_req); + qdf_mem_free(set_context_req); return; } @@ -3077,7 +3077,7 @@ void lim_process_sme_get_assoc_sta_info(tpAniSirGlobal mac_ctx, return; } - cdf_mem_copy(&get_assoc_stas_req, msg_buf, + qdf_mem_copy(&get_assoc_stas_req, msg_buf, sizeof(struct sSirSmeGetAssocSTAsReq)); /* * Get Associated stations from PE. @@ -3112,13 +3112,13 @@ void lim_process_sme_get_assoc_sta_info(tpAniSirGlobal mac_ctx, if (NULL == sta_ds) continue; if (sta_ds->valid) { - cdf_mem_copy((uint8_t *) &assoc_sta_tmp->staMac, + qdf_mem_copy((uint8_t *) &assoc_sta_tmp->staMac, (uint8_t *) &sta_ds->staAddr, QDF_MAC_ADDR_SIZE); assoc_sta_tmp->assocId = (uint8_t) sta_ds->assocId; assoc_sta_tmp->staId = (uint8_t) sta_ds->staIndex; - cdf_mem_copy((uint8_t *)&assoc_sta_tmp->supportedRates, + qdf_mem_copy((uint8_t *)&assoc_sta_tmp->supportedRates, (uint8_t *)&sta_ds->supportedRates, sizeof(tSirSupportedRates)); assoc_sta_tmp->ShortGI40Mhz = sta_ds->htShortGI40Mhz; @@ -3184,7 +3184,7 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, sap_get_wpspbc_event = &sap_event.sapevt.sapGetWPSPBCSessionEvent; sap_get_wpspbc_event->status = QDF_STATUS_E_FAULT; - cdf_mem_copy(&get_wps_pbc_sessions_req, msg_buf, + qdf_mem_copy(&get_wps_pbc_sessions_req, msg_buf, sizeof(struct sSirSmeGetWPSPBCSessionsReq)); /* * Get Associated stations from PE @@ -3274,7 +3274,7 @@ void lim_process_tkip_counter_measures(tpAniSirGlobal pMac, uint32_t *pMsgBuf) tpPESession psessionEntry; uint8_t sessionId; /* PE sessionId */ - cdf_mem_copy(&tkipCntrMeasReq, pMsgBuf, + qdf_mem_copy(&tkipCntrMeasReq, pMsgBuf, sizeof(struct sSirSmeTkipCntrMeasReq)); psessionEntry = pe_find_session_by_bssid(pMac, @@ -3304,7 +3304,7 @@ __lim_handle_sme_stop_bss_request(tpAniSirGlobal pMac, uint32_t *pMsgBuf) uint8_t i = 0; tpDphHashNode pStaDs = NULL; - cdf_mem_copy(&stopBssReq, pMsgBuf, sizeof(tSirSmeStopBssReq)); + qdf_mem_copy(&stopBssReq, pMsgBuf, sizeof(tSirSmeStopBssReq)); smesessionId = stopBssReq.sessionId; smetransactionId = stopBssReq.transactionId; @@ -3386,15 +3386,15 @@ __lim_handle_sme_stop_bss_request(tpAniSirGlobal pMac, uint32_t *pMsgBuf) } /* Free the buffer allocated in START_BSS_REQ */ - cdf_mem_free(psessionEntry->addIeParams.probeRespData_buff); + qdf_mem_free(psessionEntry->addIeParams.probeRespData_buff); psessionEntry->addIeParams.probeRespDataLen = 0; psessionEntry->addIeParams.probeRespData_buff = NULL; - cdf_mem_free(psessionEntry->addIeParams.assocRespData_buff); + qdf_mem_free(psessionEntry->addIeParams.assocRespData_buff); psessionEntry->addIeParams.assocRespDataLen = 0; psessionEntry->addIeParams.assocRespData_buff = NULL; - cdf_mem_free(psessionEntry->addIeParams.probeRespBCNData_buff); + qdf_mem_free(psessionEntry->addIeParams.probeRespBCNData_buff); psessionEntry->addIeParams.probeRespBCNDataLen = 0; psessionEntry->addIeParams.probeRespBCNData_buff = NULL; @@ -3506,7 +3506,7 @@ void __lim_process_sme_assoc_cnf_new(tpAniSirGlobal mac_ctx, uint32_t msg_type, goto end; } - cdf_mem_copy(&assoc_cnf, msg_buf, sizeof(struct sSirSmeAssocCnf)); + qdf_mem_copy(&assoc_cnf, msg_buf, sizeof(struct sSirSmeAssocCnf)); if (!__lim_is_sme_assoc_cnf_valid(&assoc_cnf)) { lim_log(mac_ctx, LOGE, FL("Received invalid SME_RE(ASSOC)_CNF message ")); @@ -3552,7 +3552,7 @@ void __lim_process_sme_assoc_cnf_new(tpAniSirGlobal mac_ctx, uint32_t msg_type, session_entry); goto end; } - if (!cdf_mem_compare((uint8_t *)sta_ds->staAddr, + if (qdf_mem_cmp((uint8_t *)sta_ds->staAddr, (uint8_t *) assoc_cnf.peer_macaddr.bytes, QDF_MAC_ADDR_SIZE)) { lim_log(mac_ctx, LOG1, FL( @@ -3623,10 +3623,10 @@ end: assoc_req = (tpSirAssocReq) session_entry->parsedAssocReq[sta_ds->assocId]; if (assoc_req->assocReqFrame) { - cdf_mem_free(assoc_req->assocReqFrame); + qdf_mem_free(assoc_req->assocReqFrame); assoc_req->assocReqFrame = NULL; } - cdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]); + qdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]); session_entry->parsedAssocReq[sta_ds->assocId] = NULL; } } @@ -3757,7 +3757,7 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf) /* save the addts request */ pMac->lim.gLimAddtsSent = true; - cdf_mem_copy((uint8_t *) &pMac->lim.gLimAddtsReq, + qdf_mem_copy((uint8_t *) &pMac->lim.gLimAddtsReq, (uint8_t *) pSirAddts, sizeof(tSirAddtsReq)); /* ship out the message now */ @@ -3980,7 +3980,7 @@ __lim_process_sme_get_statistics_request(tpAniSirGlobal pMac, uint32_t *pMsgBuf) MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); if (eSIR_SUCCESS != (wma_post_ctrl_msg(pMac, &msgQ))) { - cdf_mem_free(pMsgBuf); + qdf_mem_free(pMsgBuf); pMsgBuf = NULL; lim_log(pMac, LOGP, "Unable to forward request"); return; @@ -4011,7 +4011,7 @@ __lim_process_sme_get_tsm_stats_request(tpAniSirGlobal pMac, uint32_t *pMsgBuf) MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); if (eSIR_SUCCESS != (wma_post_ctrl_msg(pMac, &msgQ))) { - cdf_mem_free(pMsgBuf); + qdf_mem_free(pMsgBuf); pMsgBuf = NULL; lim_log(pMac, LOGP, "Unable to forward request"); return; @@ -4033,14 +4033,14 @@ __lim_process_sme_update_apwpsi_es(tpAniSirGlobal pMac, uint32_t *pMsgBuf) return; } - pUpdateAPWPSIEsReq = cdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq)); + pUpdateAPWPSIEsReq = qdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq)); if (NULL == pUpdateAPWPSIEsReq) { lim_log(pMac, LOGP, FL ("call to AllocateMemory failed for pUpdateAPWPSIEsReq")); return; } - cdf_mem_copy(pUpdateAPWPSIEsReq, pMsgBuf, + qdf_mem_copy(pUpdateAPWPSIEsReq, pMsgBuf, sizeof(struct sSirUpdateAPWPSIEsReq)); psessionEntry = pe_find_session_by_bssid(pMac, @@ -4052,14 +4052,14 @@ __lim_process_sme_update_apwpsi_es(tpAniSirGlobal pMac, uint32_t *pMsgBuf) goto end; } - cdf_mem_copy(&psessionEntry->APWPSIEs, &pUpdateAPWPSIEsReq->APWPSIEs, + qdf_mem_copy(&psessionEntry->APWPSIEs, &pUpdateAPWPSIEsReq->APWPSIEs, sizeof(tSirAPWPSIEs)); sch_set_fixed_beacon_fields(pMac, psessionEntry); lim_send_beacon_ind(pMac, psessionEntry); end: - cdf_mem_free(pUpdateAPWPSIEsReq); + qdf_mem_free(pUpdateAPWPSIEsReq); return; } @@ -4080,7 +4080,7 @@ lim_send_vdev_restart(tpAniSirGlobal pMac, } pHalHiddenSsidVdevRestart = - cdf_mem_malloc(sizeof(tHalHiddenSsidVdevRestart)); + qdf_mem_malloc(sizeof(tHalHiddenSsidVdevRestart)); if (NULL == pHalHiddenSsidVdevRestart) { PELOGE(lim_log (pMac, LOGE, "%s:%d: Unable to allocate memory", @@ -4102,7 +4102,7 @@ lim_send_vdev_restart(tpAniSirGlobal pMac, (pMac, LOGE, "%s:%d: wma_post_ctrl_msg() failed", __func__, __LINE__); ) - cdf_mem_free(pHalHiddenSsidVdevRestart); + qdf_mem_free(pHalHiddenSsidVdevRestart); } } @@ -4153,14 +4153,14 @@ static void __lim_process_sme_set_wparsni_es(tpAniSirGlobal pMac, uint32_t *pMsg return; } - pUpdateAPWPARSNIEsReq = cdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq)); + pUpdateAPWPARSNIEsReq = qdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq)); if (NULL == pUpdateAPWPARSNIEsReq) { lim_log(pMac, LOGP, FL ("call to AllocateMemory failed for pUpdateAPWPARSNIEsReq")); return; } - cdf_mem_copy(pUpdateAPWPARSNIEsReq, pMsgBuf, + qdf_mem_copy(pUpdateAPWPARSNIEsReq, pMsgBuf, sizeof(struct sSirUpdateAPWPARSNIEsReq)); psessionEntry = pe_find_session_by_bssid(pMac, @@ -4172,7 +4172,7 @@ static void __lim_process_sme_set_wparsni_es(tpAniSirGlobal pMac, uint32_t *pMsg goto end; } - cdf_mem_copy(&psessionEntry->pLimStartBssReq->rsnIE, + qdf_mem_copy(&psessionEntry->pLimStartBssReq->rsnIE, &pUpdateAPWPARSNIEsReq->APWPARSNIEs, sizeof(tSirRSNie)); lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(pMac, @@ -4187,7 +4187,7 @@ static void __lim_process_sme_set_wparsni_es(tpAniSirGlobal pMac, uint32_t *pMsg lim_send_beacon_ind(pMac, psessionEntry); end: - cdf_mem_free(pUpdateAPWPARSNIEsReq); + qdf_mem_free(pUpdateAPWPARSNIEsReq); return; } /*** end __lim_process_sme_set_wparsni_es(tpAniSirGlobal pMac, uint32_t *pMsgBuf) ***/ @@ -4210,7 +4210,7 @@ static void __lim_process_sme_change_bi(tpAniSirGlobal pMac, uint32_t *pMsgBuf) return; } - cdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); pChangeBIParams = (tpSirChangeBIParams) pMsgBuf; psessionEntry = pe_find_session_by_bssid(pMac, @@ -4330,7 +4330,7 @@ static void __lim_process_sme_set_ht2040_mode(tpAniSirGlobal pMac, continue; if (pStaDs->valid && pStaDs->htSupportedChannelWidthSet) { - pHtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode)); + pHtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode)); if (NULL == pHtOpMode) { lim_log(pMac, LOGE, FL @@ -4343,7 +4343,7 @@ static void __lim_process_sme_set_ht2040_mode(tpAniSirGlobal pMac, PHY_SINGLE_CHANNEL_CENTERED) ? eHT_CHANNEL_WIDTH_20MHZ : eHT_CHANNEL_WIDTH_40MHZ; pHtOpMode->staId = staId; - cdf_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr, + qdf_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr, sizeof(tSirMacAddr)); pHtOpMode->smesessionId = sessionId; @@ -4356,7 +4356,7 @@ static void __lim_process_sme_set_ht2040_mode(tpAniSirGlobal pMac, FL ("%s: Not able to post WMA_UPDATE_OP_MODE message to WMA"), __func__); - cdf_mem_free(pHtOpMode); + qdf_mem_free(pHtOpMode); return; } lim_log(pMac, LOG1, @@ -4439,7 +4439,7 @@ lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, return eSIR_FAILURE; } - pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams)); + pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams)); if (NULL == pMaxTxParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory for pMaxTxParams ")); @@ -4455,9 +4455,9 @@ lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, return eSIR_FAILURE; } pMaxTxParams->power = txPower; - cdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId, + qdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes, + qdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes, pSessionEntry->selfMacAddr, QDF_MAC_ADDR_SIZE); @@ -4471,7 +4471,7 @@ lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() failed")); - cdf_mem_free(pMaxTxParams); + qdf_mem_free(pMaxTxParams); } return retCode; } @@ -4512,7 +4512,7 @@ static void __lim_process_sme_register_mgmt_frame_req(tpAniSirGlobal mac_ctx, goto skip_match; if (sme_req->matchLen) { if ((lim_mgmt_regn->matchLen == sme_req->matchLen) && - (cdf_mem_compare(lim_mgmt_regn->matchData, + (!qdf_mem_cmp(lim_mgmt_regn->matchData, sme_req->matchData, lim_mgmt_regn->matchLen))) { /* found match! */ @@ -4540,22 +4540,22 @@ skip_match: &mac_ctx->lim.gLimMgmtFrameRegistratinQueue, (qdf_list_node_t *)lim_mgmt_regn); qdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock); - cdf_mem_free(lim_mgmt_regn); + qdf_mem_free(lim_mgmt_regn); } if (sme_req->registerFrame) { lim_mgmt_regn = - cdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) + + qdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) + sme_req->matchLen); if (lim_mgmt_regn != NULL) { - cdf_mem_set((void *)lim_mgmt_regn, + 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; if (sme_req->matchLen) { - cdf_mem_copy(lim_mgmt_regn->matchData, + qdf_mem_copy(lim_mgmt_regn->matchData, sme_req->matchData, sme_req->matchLen); } @@ -4578,7 +4578,7 @@ static void __lim_deregister_deferred_sme_req_after_noa_start(tpAniSirGlobal pMa pMac->lim.gDeferMsgTypeForNOA = 0; if (pMac->lim.gpDefdSmeMsgForNOA != NULL) { /* __lim_process_sme_scan_req consumed the buffer. We can free it. */ - cdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA); + qdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA); pMac->lim.gpDefdSmeMsgForNOA = NULL; } } @@ -4938,7 +4938,7 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) lim_process_ext_change_channel(pMac, pMsgBuf); break; default: - cdf_mem_free((void *)pMsg->bodyptr); + qdf_mem_free((void *)pMsg->bodyptr); pMsg->bodyptr = NULL; break; } /* switch (msgType) */ @@ -5096,10 +5096,10 @@ static void lim_process_sme_channel_change_request(tpAniSirGlobal mac_ctx, session_entry->lim11hEnable = val; session_entry->dot11mode = ch_change_req->dot11mode; - cdf_mem_copy(&session_entry->rateSet, + qdf_mem_copy(&session_entry->rateSet, &ch_change_req->operational_rateset, sizeof(session_entry->rateSet)); - cdf_mem_copy(&session_entry->extRateSet, + qdf_mem_copy(&session_entry->extRateSet, &ch_change_req->extended_rateset, sizeof(session_entry->extRateSet)); lim_set_channel(mac_ctx, ch_change_req->targetChannel, @@ -5139,14 +5139,14 @@ lim_start_bss_update_add_ie_buffer(tpAniSirGlobal pMac, if (srcDataLen > 0 && pSrcData_buff != NULL) { *pDstDataLen = srcDataLen; - *pDstData_buff = cdf_mem_malloc(*pDstDataLen); + *pDstData_buff = qdf_mem_malloc(*pDstDataLen); if (NULL == *pDstData_buff) { lim_log(pMac, LOGE, FL("AllocateMemory failed for pDstData_buff")); return; } - cdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen); + qdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen); } else { *pDstData_buff = NULL; *pDstDataLen = 0; @@ -5190,9 +5190,9 @@ lim_update_add_ie_buffer(tpAniSirGlobal pMac, if (srcDataLen > *pDstDataLen) { *pDstDataLen = srcDataLen; /* free old buffer */ - cdf_mem_free(*pDstData_buff); + qdf_mem_free(*pDstData_buff); /* allocate a new */ - *pDstData_buff = cdf_mem_malloc(*pDstDataLen); + *pDstData_buff = qdf_mem_malloc(*pDstDataLen); if (NULL == *pDstData_buff) { lim_log(pMac, LOGE, FL("Memory allocation failed.")); @@ -5204,7 +5204,7 @@ lim_update_add_ie_buffer(tpAniSirGlobal pMac, /* copy the content of buffer into dst buffer */ *pDstDataLen = srcDataLen; - cdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen); + qdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen); } @@ -5283,7 +5283,7 @@ static void lim_process_modify_add_ies(tpAniSirGlobal mac_ctx, break; } end: - cdf_mem_free(modify_add_ies->modifyIE.pIEBuffer); + qdf_mem_free(modify_add_ies->modifyIE.pIEBuffer); modify_add_ies->modifyIE.pIEBuffer = NULL; } @@ -5328,17 +5328,17 @@ static void lim_process_update_add_ies(tpAniSirGlobal mac_ctx, if (0 == update_ie->ieBufferlength) { switch (update_add_ies->updateType) { case eUPDATE_IE_PROBE_RESP: - cdf_mem_free(addn_ie->probeRespData_buff); + qdf_mem_free(addn_ie->probeRespData_buff); addn_ie->probeRespData_buff = NULL; addn_ie->probeRespDataLen = 0; break; case eUPDATE_IE_ASSOC_RESP: - cdf_mem_free(addn_ie->assocRespData_buff); + qdf_mem_free(addn_ie->assocRespData_buff); addn_ie->assocRespData_buff = NULL; addn_ie->assocRespDataLen = 0; break; case eUPDATE_IE_PROBE_BCN: - cdf_mem_free(addn_ie->probeRespBCNData_buff); + qdf_mem_free(addn_ie->probeRespBCNData_buff); addn_ie->probeRespBCNData_buff = NULL; addn_ie->probeRespBCNDataLen = 0; @@ -5360,20 +5360,20 @@ static void lim_process_update_add_ies(tpAniSirGlobal mac_ctx, */ new_length = update_ie->ieBufferlength + addn_ie->probeRespDataLen; - new_ptr = cdf_mem_malloc(new_length); + new_ptr = qdf_mem_malloc(new_length); if (NULL == new_ptr) { lim_log(mac_ctx, LOGE, FL( "Memory allocation failed.")); goto end; } /* append buffer to end of local buffers */ - cdf_mem_copy(new_ptr, addn_ie->probeRespData_buff, + qdf_mem_copy(new_ptr, addn_ie->probeRespData_buff, addn_ie->probeRespDataLen); - cdf_mem_copy(&new_ptr[addn_ie->probeRespDataLen], + qdf_mem_copy(&new_ptr[addn_ie->probeRespDataLen], update_ie->pAdditionIEBuffer, update_ie->ieBufferlength); /* free old memory */ - cdf_mem_free(addn_ie->probeRespData_buff); + qdf_mem_free(addn_ie->probeRespData_buff); /* adjust length accordingly */ addn_ie->probeRespDataLen = new_length; /* save refernece of local buffer in PE session */ @@ -5409,7 +5409,7 @@ static void lim_process_update_add_ies(tpAniSirGlobal mac_ctx, break; } end: - cdf_mem_free(update_ie->pAdditionIEBuffer); + qdf_mem_free(update_ie->pAdditionIEBuffer); update_ie->pAdditionIEBuffer = NULL; } diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index c4653bee86de..26abe4dc5d71 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -277,12 +277,12 @@ static uint32_t lim_prepare_tdls_frame_header(tpAniSirGlobal pMac, uint8_t *pFra pMacHdr->fc.powerMgmt = 0; pMacHdr->fc.wep = (psessionEntry->encryptType == eSIR_ED_NONE) ? 0 : 1; - cdf_mem_copy((uint8_t *) pMacHdr->addr1, + qdf_mem_copy((uint8_t *) pMacHdr->addr1, (uint8_t *) addr1, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) pMacHdr->addr2, + qdf_mem_copy((uint8_t *) pMacHdr->addr2, (uint8_t *) staMac, sizeof(tSirMacAddr)); - cdf_mem_copy((uint8_t *) pMacHdr->addr3, + qdf_mem_copy((uint8_t *) pMacHdr->addr3, (uint8_t *) (addr3), sizeof(tSirMacAddr)); lim_log(pMac, LOG1, @@ -305,7 +305,7 @@ static uint32_t lim_prepare_tdls_frame_header(tpAniSirGlobal pMac, uint8_t *pFra /* * Now form RFC1042 header */ - cdf_mem_copy((uint8_t *) (pFrame + header_offset), + qdf_mem_copy((uint8_t *) (pFrame + header_offset), (uint8_t *) eth_890d_header, sizeof(eth_890d_header)); header_offset += sizeof(eth_890d_header); @@ -372,7 +372,7 @@ tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, * and then hand it off to 'dot11f_pack_probe_request' (for * serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &tdlsDisReq, sizeof(tDot11fTDLSDisReq), 0); + qdf_mem_set((uint8_t *) &tdlsDisReq, sizeof(tDot11fTDLSDisReq), 0); /* * setup Fixed fields, @@ -449,7 +449,7 @@ tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -496,7 +496,7 @@ tSirRetStatus lim_send_tdls_dis_req_frame(tpAniSirGlobal pMac, /* padding zero if more than 5 bytes are required */ if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE) - cdf_mem_set(pFrame + header_offset + nPayload + + qdf_mem_set(pFrame + header_offset + nPayload + MIN_VENDOR_SPECIFIC_IE_SIZE, padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0); } @@ -626,7 +626,7 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac, * and then hand it off to 'dot11f_pack_probe_request' (for * serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &tdlsDisRsp, sizeof(tDot11fTDLSDisRsp), 0); + qdf_mem_set((uint8_t *) &tdlsDisRsp, sizeof(tDot11fTDLSDisRsp), 0); /* * setup Fixed fields, @@ -729,7 +729,7 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -772,7 +772,7 @@ static tSirRetStatus lim_send_tdls_dis_rsp_frame(tpAniSirGlobal pMac, if (0 != addIeLen) { lim_log(pMac, LOG1, FL("Copy Additional Ie Len = %d"), addIeLen); - cdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, addIe, + qdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, addIe, addIeLen); } lim_log(pMac, LOG1, @@ -883,7 +883,7 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, */ smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &tdlsSetupReq, sizeof(tDot11fTDLSSetupReq), 0); + qdf_mem_set((uint8_t *) &tdlsSetupReq, sizeof(tDot11fTDLSSetupReq), 0); tdlsSetupReq.Category.category = SIR_MAC_ACTION_TDLS; tdlsSetupReq.Action.action = SIR_MAC_TDLS_SETUP_REQ; tdlsSetupReq.DialogToken.token = dialog; @@ -1051,7 +1051,7 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -1098,7 +1098,7 @@ tSirRetStatus lim_send_tdls_link_setup_req_frame(tpAniSirGlobal pMac, if (addIeLen != 0) { lim_log(pMac, LOG1, FL("Copy Additional Ie Len = %d"), addIeLen); - cdf_mem_copy(pFrame + header_offset + nPayload, addIe, + qdf_mem_copy(pFrame + header_offset + nPayload, addIe, addIeLen); } @@ -1164,7 +1164,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, * and then hand it off to 'dot11f_pack_probe_request' (for * serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &teardown, sizeof(tDot11fTDLSTeardown), 0); + qdf_mem_set((uint8_t *) &teardown, sizeof(tDot11fTDLSTeardown), 0); teardown.Category.category = SIR_MAC_ACTION_TDLS; teardown.Action.action = SIR_MAC_TDLS_TEARDOWN; teardown.Reason.code = reason; @@ -1236,7 +1236,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -1277,7 +1277,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, if (addIeLen != 0) { lim_log(pMac, LOGW, FL("Copy Additional Ie Len = %d"), addIeLen); - cdf_mem_copy(pFrame + header_offset + nPayload, addIe, + qdf_mem_copy(pFrame + header_offset + nPayload, addIe, addIeLen); } #ifndef NO_PAD_TDLS_MIN_8023_SIZE @@ -1297,7 +1297,7 @@ tSirRetStatus lim_send_tdls_teardown_frame(tpAniSirGlobal pMac, /* padding zero if more than 5 bytes are required */ if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE) - cdf_mem_set(pFrame + header_offset + nPayload + + qdf_mem_set(pFrame + header_offset + nPayload + addIeLen + MIN_VENDOR_SPECIFIC_IE_SIZE, padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0); } @@ -1370,7 +1370,7 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, * and then hand it off to 'dot11f_pack_probe_request' (for * serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &tdlsSetupRsp, sizeof(tDot11fTDLSSetupRsp), 0); + qdf_mem_set((uint8_t *) &tdlsSetupRsp, sizeof(tDot11fTDLSSetupRsp), 0); /* * setup Fixed fields, @@ -1533,7 +1533,7 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -1578,7 +1578,7 @@ static tSirRetStatus lim_send_tdls_setup_rsp_frame(tpAniSirGlobal pMac, /* follow the order. This should be ok, but we should consider changing this */ /* if there is any IOT issue. */ if (addIeLen != 0) { - cdf_mem_copy(pFrame + header_offset + nPayload, addIe, + qdf_mem_copy(pFrame + header_offset + nPayload, addIe, addIeLen); } @@ -1640,7 +1640,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, */ smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &tdlsSetupCnf, sizeof(tDot11fTDLSSetupCnf), 0); + qdf_mem_set((uint8_t *) &tdlsSetupCnf, sizeof(tDot11fTDLSSetupCnf), 0); /* * setup Fixed fields, @@ -1740,7 +1740,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, } /* zero out the memory */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* * IE formation, memory allocation is completed, Now form TDLS discovery @@ -1776,7 +1776,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, /* follow the order. This should be ok, but we should consider changing this */ /* if there is any IOT issue. */ if (addIeLen != 0) { - cdf_mem_copy(pFrame + header_offset + nPayload, addIe, + qdf_mem_copy(pFrame + header_offset + nPayload, addIe, addIeLen); } #ifndef NO_PAD_TDLS_MIN_8023_SIZE @@ -1796,7 +1796,7 @@ tSirRetStatus lim_send_tdls_link_setup_cnf_frame(tpAniSirGlobal pMac, /* padding zero if more than 5 bytes are required */ if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE) - cdf_mem_set(pFrame + header_offset + nPayload + + qdf_mem_set(pFrame + header_offset + nPayload + addIeLen + MIN_VENDOR_SPECIFIC_IE_SIZE, padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0); } @@ -1913,7 +1913,7 @@ static tSirRetStatus lim_tdls_populate_dot11f_ht_caps(tpAniSirGlobal pMac, lim_log(pMac, LOG1, FL("AMPDU Param: %x"), nCfgValue); - cdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.suppMcsSet, + qdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.suppMcsSet, SIZE_OF_SUPPORTED_MCS_SET); nCfgValue = pTdlsAddStaReq->htCap.extendedHtCapInfo; @@ -2157,7 +2157,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads, temp_rate_set.numRates = supp_rates_len; rates = &stads->supportedRates; - cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); + qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0); for (i = 0; i < temp_rate_set2.numRates; i++) { for (j = 0; j < temp_rate_set.numRates; j++) { @@ -2480,7 +2480,7 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(tpAniSirGlobal pMac, tSirTdlsAddStaRsp *addStaRsp = NULL; mmhMsg.type = eWNI_SME_TDLS_ADD_STA_RSP; - addStaRsp = cdf_mem_malloc(sizeof(tSirTdlsAddStaRsp)); + addStaRsp = qdf_mem_malloc(sizeof(tSirTdlsAddStaRsp)); if (NULL == addStaRsp) { lim_log(pMac, LOGE, FL("Failed to allocate memory")); return QDF_STATUS_E_NOMEM; @@ -2494,7 +2494,7 @@ static QDF_STATUS lim_send_sme_tdls_add_sta_rsp(tpAniSirGlobal pMac, addStaRsp->bcastSig = pStaDs->ucBcastSig; } if (peerMac) { - cdf_mem_copy(addStaRsp->peermac.bytes, + qdf_mem_copy(addStaRsp->peermac.bytes, (uint8_t *) peerMac, QDF_MAC_ADDR_SIZE); } if (updateSta) @@ -2554,7 +2554,7 @@ add_sta_error: pAddStaParams->staMac, pAddStaParams->updateSta, pStaDs, status); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); return status; } @@ -2677,13 +2677,13 @@ void populate_dot11f_link_iden(tpAniSirGlobal pMac, tpPESession psessionEntry, (respStaAddr = linkIden->RespStaAddr)) : ((respStaAddr = linkIden->InitStaAddr), (initStaAddr = linkIden->RespStaAddr)); - cdf_mem_copy((uint8_t *) linkIden->bssid, + qdf_mem_copy((uint8_t *) linkIden->bssid, (uint8_t *) psessionEntry->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy((uint8_t *) initStaAddr, + qdf_mem_copy((uint8_t *) initStaAddr, psessionEntry->selfMacAddr, QDF_MAC_ADDR_SIZE); - cdf_mem_copy((uint8_t *) respStaAddr, (uint8_t *) peer_mac.bytes, + qdf_mem_copy((uint8_t *) respStaAddr, (uint8_t *) peer_mac.bytes, QDF_MAC_ADDR_SIZE); linkIden->present = 1; @@ -2855,7 +2855,7 @@ void lim_send_sme_tdls_link_establish_req_rsp(tpAniSirGlobal pMac, tSirTdlsLinkEstablishReqRsp *pTdlsLinkEstablishReqRsp = NULL; pTdlsLinkEstablishReqRsp = - cdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReqRsp)); + qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReqRsp)); if (NULL == pTdlsLinkEstablishReqRsp) { lim_log(pMac, LOGE, FL("Failed to allocate memory")); return; @@ -2885,7 +2885,7 @@ static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac, tSirTdlsDelStaRsp *pDelSta = NULL; mmhMsg.type = eWNI_SME_TDLS_DEL_STA_RSP; - pDelSta = cdf_mem_malloc(sizeof(tSirTdlsDelStaRsp)); + pDelSta = qdf_mem_malloc(sizeof(tSirTdlsDelStaRsp)); if (NULL == pDelSta) { lim_log(pMac, LOGE, FL("Failed to allocate memory")); return QDF_STATUS_E_NOMEM; @@ -3145,14 +3145,14 @@ tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("stads is NULL")); goto lim_tdls_link_establish_error; } - tdls_req_params = cdf_mem_malloc(sizeof(tTdlsLinkEstablishParams)); + tdls_req_params = qdf_mem_malloc(sizeof(tTdlsLinkEstablishParams)); if (NULL == tdls_req_params) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory TDLS Link Establish Request")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) tdls_req_params, + qdf_mem_set((uint8_t *) tdls_req_params, sizeof(tTdlsLinkEstablishParams), 0); tdls_req_params->staIdx = stads->staIndex; @@ -3195,7 +3195,7 @@ tSirRetStatus lim_process_sme_tdls_link_establish_req(tpAniSirGlobal mac_ctx, &tdls_req_params->validChannelsLen); send_tdls_establish_request: - cdf_mem_copy(tdls_req_params->validOperClasses, + qdf_mem_copy(tdls_req_params->validOperClasses, tdls_req->supportedOperClasses, tdls_req->supportedOperClassesLen); tdls_req_params->validOperClassesLen = 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 ac882aeab1ba..7f966339d55e 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -87,13 +87,13 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, tSirRetStatus cfg_set_status = eSIR_FAILURE; tSirRetStatus cfg_get_status = eSIR_FAILURE; - beacon_struct = cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + beacon_struct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == beacon_struct) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); return; } - cdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0); + qdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0); *qos_cap = 0; *prop_cap = 0; *uapsd = 0; @@ -239,7 +239,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie, if (beacon_struct->countryInfoPresent) session->country_info_present = true; } - cdf_mem_free(beacon_struct); + qdf_mem_free(beacon_struct); return; } /****** end lim_extract_ap_capability() ******/ 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 2bc0f2047a50..e8a68131d938 100644 --- a/core/mac/src/pe/lim/lim_scan_result_utils.c +++ b/core/mac/src/pe/lim/lim_scan_result_utils.c @@ -123,7 +123,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac, - sizeof(pBssDescr->length) + ieLen); /* Copy BSS Id */ - cdf_mem_copy((uint8_t *) &pBssDescr->bssId, + qdf_mem_copy((uint8_t *) &pBssDescr->bssId, (uint8_t *) pHdr->bssId, sizeof(tSirMacAddr)); /* Copy Timestamp, Beacon Interval and Capability Info */ @@ -227,7 +227,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac, } #endif /* Copy IE fields */ - cdf_mem_copy((uint8_t *) &pBssDescr->ieFields, + qdf_mem_copy((uint8_t *) &pBssDescr->ieFields, pBody + SIR_MAC_B_PR_SSID_OFFSET, ieLen); /*set channel number in beacon in case it is not present */ @@ -269,7 +269,7 @@ bool lim_is_scan_requested_ssid(tpAniSirGlobal pMac, tSirMacSSid *ssId) uint8_t i = 0; for (i = 0; i < pMac->lim.gpLimMlmScanReq->numSsid; i++) { - if (true == cdf_mem_compare((uint8_t *) ssId, + if (true != qdf_mem_cmp((uint8_t *) ssId, (uint8_t *) &pMac->lim. gpLimMlmScanReq->ssId[i], (uint8_t) (pMac->lim. @@ -317,7 +317,7 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx, hdr = WMA_GET_RX_MPDUHEADER3A((uint8_t *) rx_packet_info); /* Check For Null BSSID and Skip in case of P2P */ - if (cdf_mem_compare(bssid_zero, &hdr->addr3, 6)) + if (!qdf_mem_cmp(bssid_zero, &hdr->addr3, 6)) return; /* @@ -388,12 +388,12 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx, /* IEs will be overlap ieFields field. Adjust the length accordingly */ frame_len = sizeof(*bssdescr) + ie_len - sizeof(bssdescr->ieFields[1]); - bssdescr = (tSirBssDescription *) cdf_mem_malloc(frame_len); + bssdescr = (tSirBssDescription *) qdf_mem_malloc(frame_len); if (NULL == bssdescr) { /* Log error */ lim_log(mac_ctx, LOGE, - FL("cdf_mem_malloc(length=%d) failed"), frame_len); + FL("qdf_mem_malloc(length=%d) failed"), frame_len); return; } /* In scan state, store scan result. */ @@ -422,7 +422,7 @@ lim_check_and_add_bss_description(tpAniSirGlobal mac_ctx, status = QDF_STATUS_E_INVAL; } last: - cdf_mem_free(bssdescr); + qdf_mem_free(bssdescr); return; } diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c index 1da781411b8f..2283bf755b3a 100644 --- a/core/mac/src/pe/lim/lim_security_utils.c +++ b/core/mac/src/pe/lim/lim_security_utils.c @@ -238,7 +238,7 @@ struct tLimPreAuthNode *lim_search_pre_auth_list(tpAniSirGlobal pMac, struct tLimPreAuthNode *pTempNode = pMac->lim.pLimPreAuthList; while (pTempNode != NULL) { - if (cdf_mem_compare((uint8_t *) macAddr, + if (!qdf_mem_cmp((uint8_t *) macAddr, (uint8_t *) &pTempNode->peerMacAddr, sizeof(tSirMacAddr))) break; @@ -388,7 +388,7 @@ void lim_delete_pre_auth_node(tpAniSirGlobal pMac, tSirMacAddr macAddr) if (pTempNode == NULL) return; - if (cdf_mem_compare((uint8_t *) macAddr, + if (!qdf_mem_cmp((uint8_t *) macAddr, (uint8_t *) &pTempNode->peerMacAddr, sizeof(tSirMacAddr))) { /* First node to be deleted */ @@ -414,7 +414,7 @@ void lim_delete_pre_auth_node(tpAniSirGlobal pMac, tSirMacAddr macAddr) pTempNode = pTempNode->next; while (pTempNode != NULL) { - if (cdf_mem_compare((uint8_t *) macAddr, + if (!qdf_mem_cmp((uint8_t *) macAddr, (uint8_t *) &pTempNode->peerMacAddr, sizeof(tSirMacAddr))) { /* Found node to be deleted */ @@ -481,7 +481,7 @@ lim_restore_from_auth_state(tpAniSirGlobal pMac, tSirResultCodes resultCode, resultCode, protStatusCode); #endif - cdf_mem_copy((uint8_t *) &mlmAuthCnf.peerMacAddr, + qdf_mem_copy((uint8_t *) &mlmAuthCnf.peerMacAddr, (uint8_t *) &pMac->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); mlmAuthCnf.authType = pMac->lim.gpLimMlmAuthReq->authType; @@ -493,7 +493,7 @@ lim_restore_from_auth_state(tpAniSirGlobal pMac, tSirResultCodes resultCode, /* / Free up buffer allocated */ /* / for pMac->lim.gLimMlmAuthReq */ - cdf_mem_free(pMac->lim.gpLimMlmAuthReq); + qdf_mem_free(pMac->lim.gpLimMlmAuthReq); pMac->lim.gpLimMlmAuthReq = NULL; sessionEntry->limMlmState = sessionEntry->limPrevMlmState; @@ -548,12 +548,12 @@ lim_encrypt_auth_frame(tpAniSirGlobal pMac, uint8_t keyId, uint8_t *pKey, keyLength += 3; /* Bytes 3-7 of seed is key */ - cdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3); + qdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3); /* Compute CRC-32 and place them in last 4 bytes of plain text */ lim_compute_crc32(icv, pPlainText, sizeof(tSirMacAuthFrameBody)); - cdf_mem_copy(pPlainText + sizeof(tSirMacAuthFrameBody), + qdf_mem_copy(pPlainText + sizeof(tSirMacAuthFrameBody), icv, SIR_MAC_WEP_ICV_LENGTH); /* Run RC4 on plain text with the seed */ @@ -732,10 +732,10 @@ lim_decrypt_auth_frame(tpAniSirGlobal pMac, uint8_t *pKey, uint8_t *pEncrBody, keyLength += 3; /* Bytes 0-2 of seed is received IV */ - cdf_mem_copy((uint8_t *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1); + qdf_mem_copy((uint8_t *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1); /* Bytes 3-7 of seed is key */ - cdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3); + qdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3); /* Run RC4 on encrypted text with the seed */ lim_rc4(pPlainBody, @@ -778,7 +778,7 @@ void lim_post_sme_set_keys_cnf(tpAniSirGlobal pMac, &pMlmSetKeysReq->peer_macaddr); /* Free up buffer allocated for mlmSetKeysReq */ - cdf_mem_free(pMlmSetKeysReq); + qdf_mem_free(pMlmSetKeysReq); pMac->lim.gpLimMlmSetKeysReq = NULL; lim_post_sme_message(pMac, @@ -827,7 +827,7 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac, } /* Package WMA_SET_BSSKEY_REQ message parameters */ - pSetBssKeyParams = cdf_mem_malloc(sizeof(tSetBssKeyParams)); + pSetBssKeyParams = qdf_mem_malloc(sizeof(tSetBssKeyParams)); if (NULL == pSetBssKeyParams) { lim_log(pMac, LOGE, FL("Unable to allocate memory during SET_BSSKEY")); @@ -836,7 +836,7 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac, mlmSetKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE; goto end; } else - cdf_mem_set((void *)pSetBssKeyParams, + qdf_mem_set((void *)pSetBssKeyParams, sizeof(tSetBssKeyParams), 0); /* Update the WMA_SET_BSSKEY_REQ parameters */ @@ -861,14 +861,14 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac, /* IF the key id is non-zero and encryption type is WEP, Send all the 4 * keys to HAL with filling the key at right index in pSetBssKeyParams->key. */ pSetBssKeyParams->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; - cdf_mem_copy((uint8_t *) &pSetBssKeyParams-> + qdf_mem_copy((uint8_t *) &pSetBssKeyParams-> key[pMlmSetKeysReq->key[0].keyId], (uint8_t *) &pMlmSetKeysReq->key[0], sizeof(pMlmSetKeysReq->key[0])); } else { pSetBssKeyParams->numKeys = pMlmSetKeysReq->numKeys; - cdf_mem_copy((uint8_t *) &pSetBssKeyParams->key, + qdf_mem_copy((uint8_t *) &pSetBssKeyParams->key, (uint8_t *) &pMlmSetKeysReq->key, sizeof(tSirKeys) * pMlmSetKeysReq->numKeys); } @@ -931,13 +931,13 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac, uint32_t val = 0; /* Package WMA_SET_STAKEY_REQ message parameters */ - pSetStaKeyParams = cdf_mem_malloc(sizeof(tSetStaKeyParams)); + pSetStaKeyParams = qdf_mem_malloc(sizeof(tSetStaKeyParams)); if (NULL == pSetStaKeyParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during SET_BSSKEY")); return; } else - cdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams), + qdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams), 0); /* Update the WMA_SET_STAKEY_REQ parameters */ @@ -1002,7 +1002,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac, uint32_t i; for (i = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++) { - cdf_mem_copy((uint8_t *) &pSetStaKeyParams-> + qdf_mem_copy((uint8_t *) &pSetStaKeyParams-> key[i], (uint8_t *) &pMlmSetKeysReq-> key[i], sizeof(tSirKeys)); @@ -1018,7 +1018,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac, /*This case the keys are coming from upper layer so need to fill the * key at the default wep key index and send to the HAL */ if (defWEPIdx < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS) { - cdf_mem_copy((uint8_t *) &pSetStaKeyParams-> + qdf_mem_copy((uint8_t *) &pSetStaKeyParams-> key[defWEPIdx], (uint8_t *) &pMlmSetKeysReq-> key[0], @@ -1028,7 +1028,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac, } else { lim_log(pMac, LOGE, FL("Wrong Key Index %d"), defWEPIdx); - cdf_mem_free(pSetStaKeyParams); + qdf_mem_free(pSetStaKeyParams); return; } } @@ -1039,7 +1039,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac, case eSIR_ED_WPI: #endif { - cdf_mem_copy((uint8_t *) &pSetStaKeyParams->key, + qdf_mem_copy((uint8_t *) &pSetStaKeyParams->key, (uint8_t *) &pMlmSetKeysReq->key[0], sizeof(tSirKeys)); } 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 bc12d9a21bde..52220506ebcd 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -163,14 +163,14 @@ void lim_populate_mac_header(tpAniSirGlobal mac_ctx, uint8_t *buf, mac_hdr->fc.subType = sub_type; /* Prepare Address 1 */ - cdf_mem_copy((uint8_t *) mac_hdr->da, + qdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr, sizeof(tSirMacAddr)); /* Prepare Address 2 */ sir_copy_mac_addr(mac_hdr->sa, self_mac_addr); /* Prepare Address 3 */ - cdf_mem_copy((uint8_t *) mac_hdr->bssId, + qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr, sizeof(tSirMacAddr)); /* Prepare sequence number */ @@ -255,7 +255,7 @@ lim_send_probe_req_mgmt_frame(tpAniSirGlobal mac_ctx, /* The scheme here is to fill out a 'tDot11fProbeRequest' structure */ /* and then hand it off to 'dot11f_pack_probe_request' (for */ /* serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); + qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); /* & delegating to assorted helpers: */ populate_dot11f_ssid(mac_ctx, ssid, &pr.SSID); @@ -380,7 +380,7 @@ lim_send_probe_req_mgmt_frame(tpAniSirGlobal mac_ctx, return eSIR_MEM_ALLOC_FAILED; } /* Paranoia: */ - cdf_mem_set(frame, bytes, 0); + qdf_mem_set(frame, bytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -400,7 +400,7 @@ lim_send_probe_req_mgmt_frame(tpAniSirGlobal mac_ctx, } /* Append any AddIE if present. */ if (addn_ielen) { - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, additional_ie, addn_ielen); payload += addn_ielen; } @@ -456,7 +456,7 @@ tSirRetStatus lim_get_addn_ie_for_probe_resp(tpAniSirGlobal pMac, return eSIR_FAILURE; } - tempbuf = cdf_mem_malloc(left); + tempbuf = qdf_mem_malloc(left); if (NULL == tempbuf) { PELOGE(lim_log(pMac, LOGE, FL @@ -474,23 +474,23 @@ tSirRetStatus lim_get_addn_ie_for_probe_resp(tpAniSirGlobal pMac, FL ("****Invalid IEs eid = %d elem_len=%d left=%d*****"), elem_id, elem_len, left); - cdf_mem_free(tempbuf); + qdf_mem_free(tempbuf); return eSIR_FAILURE; } if (!((SIR_MAC_EID_VENDOR == elem_id) && (memcmp (&ptr[2], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE) == 0))) { - cdf_mem_copy(tempbuf + tempLen, &ptr[0], + qdf_mem_copy(tempbuf + tempLen, &ptr[0], elem_len + 2); tempLen += (elem_len + 2); } left -= elem_len; ptr += (elem_len + 2); } - cdf_mem_copy(addIE, tempbuf, tempLen); + qdf_mem_copy(addIE, tempbuf, tempLen); *addnIELen = tempLen; - cdf_mem_free(tempbuf); + qdf_mem_free(tempbuf); } return eSIR_SUCCESS; } @@ -561,20 +561,20 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, return; } sme_sessionid = pe_session->smeSessionId; - frm = cdf_mem_malloc(sizeof(tDot11fProbeResponse)); + frm = qdf_mem_malloc(sizeof(tDot11fProbeResponse)); if (NULL == frm) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); return; } - cdf_mem_zero(&extracted_ext_cap, sizeof(extracted_ext_cap)); + 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'. */ - cdf_mem_set((uint8_t *) frm, sizeof(tDot11fProbeResponse), 0); + qdf_mem_set((uint8_t *) frm, sizeof(tDot11fProbeResponse), 0); /* * Timestamp to be updated by TFP, below. @@ -720,7 +720,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, if (addn_ie_present) { - add_ie = cdf_mem_malloc( + add_ie = qdf_mem_malloc( pe_session->addIeParams.probeRespDataLen); if (NULL == add_ie) { lim_log(mac_ctx, LOGE, @@ -728,7 +728,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, goto err_ret; } - cdf_mem_copy(add_ie, + qdf_mem_copy(add_ie, pe_session->addIeParams.probeRespData_buff, pe_session->addIeParams.probeRespDataLen); addn_ie_len = pe_session->addIeParams.probeRespDataLen; @@ -775,7 +775,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, goto err_ret; } /* Paranoia: */ - cdf_mem_set(frame, bytes, 0); + qdf_mem_set(frame, bytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -812,13 +812,13 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, mac_ctx->sys.probeRespond++; if (mac_ctx->lim.gpLimRemainOnChanReq) - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, mac_ctx->lim.gpLimRemainOnChanReq->probeRspIe, (mac_ctx->lim.gpLimRemainOnChanReq->length - sizeof(tSirRemainOnChnReq))); if (addn_ie_present) - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, &add_ie[0], addn_ie_len); if (noalen != 0) { @@ -829,7 +829,7 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, total_noalen); goto err_ret; } else { - cdf_mem_copy(&frame[bytes - (total_noalen)], + qdf_mem_copy(&frame[bytes - (total_noalen)], &noa_ie[0], total_noalen); } } @@ -853,16 +853,16 @@ lim_send_probe_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Could not send Probe Response.")); if (add_ie != NULL) - cdf_mem_free(add_ie); + qdf_mem_free(add_ie); - cdf_mem_free(frm); + qdf_mem_free(frm); return; err_ret: if (add_ie != NULL) - cdf_mem_free(add_ie); + qdf_mem_free(add_ie); if (frm != NULL) - cdf_mem_free(frm); + qdf_mem_free(frm); if (packet != NULL) cds_packet_free((void *)packet); return; @@ -895,7 +895,7 @@ lim_send_addts_req_action_frame(tpAniSirGlobal pMac, smeSessionId = psessionEntry->smeSessionId; if (!pAddTS->wmeTspecPresent) { - cdf_mem_set((uint8_t *) &AddTSReq, sizeof(AddTSReq), 0); + qdf_mem_set((uint8_t *) &AddTSReq, sizeof(AddTSReq), 0); AddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ; AddTSReq.DialogToken.token = pAddTS->dialogToken; @@ -952,7 +952,7 @@ lim_send_addts_req_action_frame(tpAniSirGlobal pMac, " (0x%08x)."), nStatus); } } else { - cdf_mem_set((uint8_t *) &WMMAddTSReq, sizeof(WMMAddTSReq), 0); + qdf_mem_set((uint8_t *) &WMMAddTSReq, sizeof(WMMAddTSReq), 0); WMMAddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ; WMMAddTSReq.DialogToken.token = pAddTS->dialogToken; @@ -1005,7 +1005,7 @@ lim_send_addts_req_action_frame(tpAniSirGlobal pMac, return; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -1136,7 +1136,7 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, sme_session = pe_session->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); limGetQosMode(pe_session, &qos_mode); limGetWmeMode(pe_session, &wme_mode); @@ -1257,7 +1257,7 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, #endif } - cdf_mem_set((uint8_t *) &beacon_params, sizeof(beacon_params), 0); + qdf_mem_set((uint8_t *) &beacon_params, sizeof(beacon_params), 0); if (LIM_IS_AP_ROLE(pe_session) && (pe_session->gLimProtectionControl != @@ -1305,11 +1305,11 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, /* Nonzero length indicates Assoc rsp IE available */ if (addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN && (bytes + addn_ie_len) <= SIR_MAX_PACKET_SIZE) { - cdf_mem_copy(add_ie, + qdf_mem_copy(add_ie, pe_session->addIeParams.assocRespData_buff, pe_session->addIeParams.assocRespDataLen); - cdf_mem_set((uint8_t *) &extracted_ext_cap, + qdf_mem_set((uint8_t *) &extracted_ext_cap, sizeof(extracted_ext_cap), 0); stripoff_len = addn_ie_len; @@ -1337,7 +1337,7 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, return; } /* Paranoia: */ - cdf_mem_set(frame, bytes, 0); + qdf_mem_set(frame, bytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -1379,7 +1379,7 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx, lim_print_mac_addr(mac_ctx, mac_hdr->da, LOG1); if (addn_ie_len && addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN) - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, &add_ie[0], addn_ie_len); if ((SIR_BAND_5_GHZ == @@ -1438,7 +1438,7 @@ lim_send_delts_req_action_frame(tpAniSirGlobal pMac, smeSessionId = psessionEntry->smeSessionId; if (!wmmTspecPresent) { - cdf_mem_set((uint8_t *) &DelTS, sizeof(DelTS), 0); + qdf_mem_set((uint8_t *) &DelTS, sizeof(DelTS), 0); DelTS.Category.category = SIR_MAC_ACTION_QOS_MGMT; DelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ; @@ -1458,7 +1458,7 @@ lim_send_delts_req_action_frame(tpAniSirGlobal pMac, " (0x%08x)."), nStatus); } } else { - cdf_mem_set((uint8_t *) &WMMDelTS, sizeof(WMMDelTS), 0); + qdf_mem_set((uint8_t *) &WMMDelTS, sizeof(WMMDelTS), 0); WMMDelTS.Category.category = SIR_MAC_ACTION_WME; WMMDelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ; @@ -1492,7 +1492,7 @@ lim_send_delts_req_action_frame(tpAniSirGlobal pMac, return; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -1621,16 +1621,16 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, add_ie_len = pe_session->pLimJoinReq->addIEAssoc.length; add_ie = pe_session->pLimJoinReq->addIEAssoc.addIEdata; - frm = cdf_mem_malloc(sizeof(tDot11fAssocRequest)); + frm = qdf_mem_malloc(sizeof(tDot11fAssocRequest)); if (NULL == frm) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); return; } - cdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0); + qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0); if (add_ie_len) { - cdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap), + qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap), 0); sir_status = lim_strip_extcap_update_struct(mac_ctx, add_ie, &add_ie_len, &extr_ext_cap); @@ -1881,11 +1881,11 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF, (uint32_t *) &assoc_cnf); - cdf_mem_free(frm); + qdf_mem_free(frm); return; } /* Paranoia: */ - cdf_mem_set(frame, bytes, 0); + qdf_mem_set(frame, bytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -1901,7 +1901,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Assoc request pack failure (0x%08x)"), status); cds_packet_free((void *)packet); - cdf_mem_free(frm); + qdf_mem_free(frm); return; } else if (DOT11F_WARNED(status)) { lim_log(mac_ctx, LOGW, @@ -1911,18 +1911,18 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("*** Sending Association Request length %d to "), bytes); if (pe_session->assocReq != NULL) { - cdf_mem_free(pe_session->assocReq); + qdf_mem_free(pe_session->assocReq); pe_session->assocReq = NULL; pe_session->assocReqLen = 0; } if (add_ie_len) { - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, add_ie, add_ie_len); payload += add_ie_len; } - pe_session->assocReq = cdf_mem_malloc(payload); + pe_session->assocReq = qdf_mem_malloc(payload); if (NULL == pe_session->assocReq) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); } else { @@ -1930,7 +1930,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, * Store the Assoc request. This is sent to csr/hdd in * join cnf response. */ - cdf_mem_copy(pe_session->assocReq, + qdf_mem_copy(pe_session->assocReq, frame + sizeof(tSirMacMgmtHdr), payload); pe_session->assocReqLen = payload; } @@ -1965,13 +1965,13 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx, FL("Failed to send Association Request (%X)!"), qdf_status); /* Pkt will be freed up by the callback */ - cdf_mem_free(frm); + qdf_mem_free(frm); return; } /* Free up buffer allocated for mlm_assoc_req */ - cdf_mem_free(mlm_assoc_req); + qdf_mem_free(mlm_assoc_req); mlm_assoc_req = NULL; - cdf_mem_free(frm); + qdf_mem_free(frm); return; } @@ -2029,7 +2029,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("called in state (%d)."), pe_session->limMlmState); - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); caps = mlm_reassoc_req->capabilityInfo; #if defined(FEATURE_WLAN_WAPI) @@ -2053,7 +2053,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, * The previous ap bssid is stored in the FT Session * while creating the PE FT Session for reassociation. */ - cdf_mem_copy((uint8_t *)frm.CurrentAPAddress.mac, + qdf_mem_copy((uint8_t *)frm.CurrentAPAddress.mac, pe_session->prev_ap_bssid, sizeof(tSirMacAddr)); populate_dot11f_ssid2(mac_ctx, &frm.SSID); @@ -2286,7 +2286,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, goto end; } /* Paranoia: */ - cdf_mem_set(frame, bytes + ft_ies_length, 0); + qdf_mem_set(frame, bytes + ft_ies_length, 0); lim_print_mac_addr(mac_ctx, pe_session->limReAssocbssId, LOG1); /* Next, we fill out the buffer descriptor: */ @@ -2312,18 +2312,18 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, bytes, payload); if (pe_session->assocReq != NULL) { - cdf_mem_free(pe_session->assocReq); + qdf_mem_free(pe_session->assocReq); pe_session->assocReq = NULL; pe_session->assocReqLen = 0; } if (add_ie_len) { - cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, + qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload, add_ie, add_ie_len); payload += add_ie_len; } - pe_session->assocReq = cdf_mem_malloc(payload); + pe_session->assocReq = qdf_mem_malloc(payload); if (NULL == pe_session->assocReq) { lim_log(mac_ctx, LOGE, FL("Failed to alloc memory")); } else { @@ -2331,7 +2331,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, * Store the Assoc request. This is sent to csr/hdd in * join cnf response. */ - cdf_mem_copy(pe_session->assocReq, + qdf_mem_copy(pe_session->assocReq, frame + sizeof(tSirMacMgmtHdr), payload); pe_session->assocReqLen = payload; } @@ -2356,12 +2356,12 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, } if (NULL != pe_session->assocReq) { - cdf_mem_free(pe_session->assocReq); + qdf_mem_free(pe_session->assocReq); pe_session->assocReq = NULL; pe_session->assocReqLen = 0; } if (ft_ies_length) { - pe_session->assocReq = cdf_mem_malloc(ft_ies_length); + pe_session->assocReq = qdf_mem_malloc(ft_ies_length); if (NULL == pe_session->assocReq) { lim_log(mac_ctx, LOGE, FL("Failed to alloc memory for FT IEs")); @@ -2371,7 +2371,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, * Store the FT IEs. This is sent to csr/hdd in * join cnf response. */ - cdf_mem_copy(pe_session->assocReq, + qdf_mem_copy(pe_session->assocReq, ft_sme_context->reassoc_ft_ies, ft_ies_length); pe_session->assocReqLen = ft_ies_length; } @@ -2401,7 +2401,7 @@ lim_send_reassoc_req_with_ft_ies_mgmt_frame(tpAniSirGlobal mac_ctx, end: /* Free up buffer allocated for mlmAssocReq */ - cdf_mem_free(mlm_reassoc_req); + qdf_mem_free(mlm_reassoc_req); pe_session->pLimMlmReassocReq = NULL; } @@ -2413,11 +2413,11 @@ void lim_send_retry_reassoc_req_frame(tpAniSirGlobal pMac, tLimMlmReassocCnf mlmReassocCnf; /* keep sme */ tLimMlmReassocReq *pTmpMlmReassocReq = NULL; if (NULL == pTmpMlmReassocReq) { - pTmpMlmReassocReq = cdf_mem_malloc(sizeof(tLimMlmReassocReq)); + pTmpMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq)); if (NULL == pTmpMlmReassocReq) goto end; - cdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0); - cdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq, + qdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0); + qdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq, sizeof(tLimMlmReassocReq)); } /* Prepare and send Reassociation request frame */ @@ -2447,11 +2447,11 @@ void lim_send_retry_reassoc_req_frame(tpAniSirGlobal pMac, end: /* Free up buffer allocated for reassocReq */ if (pMlmReassocReq != NULL) { - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); pMlmReassocReq = NULL; } if (pTmpMlmReassocReq != NULL) { - cdf_mem_free(pTmpMlmReassocReq); + qdf_mem_free(pTmpMlmReassocReq); pTmpMlmReassocReq = NULL; } mlmReassocCnf.resultCode = eSIR_SME_FT_REASSOC_FAILURE; @@ -2500,7 +2500,7 @@ lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal pMac, nAddIELen = psessionEntry->pLimReAssocReq->addIEAssoc.length; pAddIE = psessionEntry->pLimReAssocReq->addIEAssoc.addIEdata; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); caps = pMlmReassocReq->capabilityInfo; #if defined(FEATURE_WLAN_WAPI) @@ -2517,7 +2517,7 @@ lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal pMac, frm.ListenInterval.interval = pMlmReassocReq->listenInterval; - cdf_mem_copy((uint8_t *) frm.CurrentAPAddress.mac, + qdf_mem_copy((uint8_t *) frm.CurrentAPAddress.mac, (uint8_t *) psessionEntry->bssId, 6); populate_dot11f_ssid2(pMac, &frm.SSID); @@ -2654,7 +2654,7 @@ lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal pMac, goto end; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -2684,23 +2684,23 @@ lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal pMac, ) if (psessionEntry->assocReq != NULL) { - cdf_mem_free(psessionEntry->assocReq); + qdf_mem_free(psessionEntry->assocReq); psessionEntry->assocReq = NULL; psessionEntry->assocReqLen = 0; } if (nAddIELen) { - cdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, + qdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, pAddIE, nAddIELen); nPayload += nAddIELen; } - psessionEntry->assocReq = cdf_mem_malloc(nPayload); + psessionEntry->assocReq = qdf_mem_malloc(nPayload); if (NULL == psessionEntry->assocReq) { lim_log(pMac, LOGE, FL("Unable to allocate mem for assoc req")); } else { /* Store the Assoc request. This is sent to csr/hdd in join cnf response. */ - cdf_mem_copy(psessionEntry->assocReq, + qdf_mem_copy(psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload); psessionEntry->assocReqLen = nPayload; } @@ -2739,7 +2739,7 @@ lim_send_reassoc_req_mgmt_frame(tpAniSirGlobal pMac, end: /* Free up buffer allocated for mlmAssocReq */ - cdf_mem_free(pMlmReassocReq); + qdf_mem_free(pMlmReassocReq); psessionEntry->pLimMlmReassocReq = NULL; } /* lim_send_reassoc_req_mgmt_frame */ @@ -2910,7 +2910,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, return; } - cdf_mem_zero(frame, frame_len); + qdf_mem_zero(frame, frame_len); /* Prepare BD */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -2921,7 +2921,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, /* Prepare BSSId */ if (LIM_IS_AP_ROLE(session) || LIM_IS_BT_AMP_AP_ROLE(session)) - cdf_mem_copy((uint8_t *) mac_hdr->bssId, + qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) session->bssId, sizeof(tSirMacAddr)); @@ -2929,7 +2929,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, body = frame + sizeof(tSirMacMgmtHdr); if (wep_bit == LIM_WEP_IN_FC) { - cdf_mem_copy(body, (uint8_t *) auth_frame, body_len); + qdf_mem_copy(body, (uint8_t *) auth_frame, body_len); lim_log(mac_ctx, LOG1, FL("*** Sending Auth seq# 3 status %d (%d) to" @@ -2957,7 +2957,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, if (body_len <= (sizeof(auth_frame->type) + sizeof(auth_frame->length) + sizeof(auth_frame->challengeText))) - cdf_mem_copy(body, (uint8_t *) &auth_frame->type, + qdf_mem_copy(body, (uint8_t *) &auth_frame->type, body_len); #if defined WLAN_FEATURE_VOWIFI_11R @@ -2967,7 +2967,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, (session->ftPEContext.pFTPreAuthReq != NULL)) { if (ft_ies_length > 0) { - cdf_mem_copy(body, + qdf_mem_copy(body, session->ftPEContext. pFTPreAuthReq->ft_ies, ft_ies_length); @@ -2983,7 +2983,7 @@ lim_send_auth_mgmt_frame(tpAniSirGlobal mac_ctx, body++; *body = SIR_MDIE_SIZE; body++; - cdf_mem_copy(body, + qdf_mem_copy(body, &session->ftPEContext.pFTPreAuthReq-> pbssDescription->mdie[0], SIR_MDIE_SIZE); @@ -3106,7 +3106,7 @@ QDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac) } #endif /* / Free up buffer allocated for mlmDeauthReq */ - cdf_mem_free(pMlmDeauthReq); + qdf_mem_free(pMlmDeauthReq); pMac->lim.limDisassocDeauthCnfReq.pMlmDeauthReq = NULL; } return QDF_STATUS_SUCCESS; @@ -3119,7 +3119,7 @@ end: /* Free up buffer allocated */ /* for mlmDeauthReq */ - cdf_mem_free(pMlmDeauthReq); + qdf_mem_free(pMlmDeauthReq); lim_post_sme_message(pMac, LIM_MLM_DEAUTH_CNF, (uint32_t *) &mlmDeauthCnf); @@ -3213,14 +3213,14 @@ QDF_STATUS lim_send_disassoc_cnf(tpAniSirGlobal mac_ctx) } #endif /* Free up buffer allocated for mlmDisassocReq */ - cdf_mem_free(disassoc_req); + qdf_mem_free(disassoc_req); mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL; return QDF_STATUS_SUCCESS; } else { return QDF_STATUS_SUCCESS; } end: - cdf_mem_copy((uint8_t *) &disassoc_cnf.peerMacAddr, + qdf_mem_copy((uint8_t *) &disassoc_cnf.peerMacAddr, (uint8_t *) disassoc_req->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE); disassoc_cnf.aid = disassoc_req->aid; @@ -3231,7 +3231,7 @@ end: if (disassoc_req != NULL) { /* / Free up buffer allocated for mlmDisassocReq */ - cdf_mem_free(disassoc_req); + qdf_mem_free(disassoc_req); mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL; } @@ -3300,7 +3300,7 @@ lim_send_disassoc_mgmt_frame(tpAniSirGlobal pMac, } smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Reason.code = nReason; @@ -3327,7 +3327,7 @@ lim_send_disassoc_mgmt_frame(tpAniSirGlobal pMac, return; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -3479,7 +3479,7 @@ lim_send_deauth_mgmt_frame(tpAniSirGlobal pMac, } smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Reason.code = nReason; @@ -3506,7 +3506,7 @@ lim_send_deauth_mgmt_frame(tpAniSirGlobal pMac, return; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -3660,7 +3660,7 @@ lim_send_meas_report_frame(tpAniSirGlobal pMac, void *pPacket; QDF_STATUS qdf_status; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT; frm.Action.action = SIR_MAC_ACTION_MEASURE_REPORT_ID; @@ -3717,14 +3717,14 @@ lim_send_meas_report_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, SIR_MAC_MGMT_ACTION, peer); pMacHdr = (tpSirMacMgmtHdr) pFrame; - cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); #ifdef WLAN_FEATURE_11W lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr); @@ -3790,7 +3790,7 @@ lim_send_tpc_request_frame(tpAniSirGlobal pMac, void *pPacket; QDF_STATUS qdf_status; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT; frm.Action.action = SIR_MAC_ACTION_TPC_REQUEST_ID; @@ -3821,14 +3821,14 @@ lim_send_tpc_request_frame(tpAniSirGlobal pMac, return; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, SIR_MAC_MGMT_ACTION, peer); pMacHdr = (tpSirMacMgmtHdr) pFrame; - cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); #ifdef WLAN_FEATURE_11W lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr); @@ -3893,7 +3893,7 @@ lim_send_tpc_report_frame(tpAniSirGlobal pMac, void *pPacket; QDF_STATUS qdf_status; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT; frm.Action.action = SIR_MAC_ACTION_TPC_REPORT_ID; @@ -3927,7 +3927,7 @@ lim_send_tpc_report_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -3935,7 +3935,7 @@ lim_send_tpc_report_frame(tpAniSirGlobal pMac, pMacHdr = (tpSirMacMgmtHdr) pFrame; - cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr)); #ifdef WLAN_FEATURE_11W lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr); @@ -4021,7 +4021,7 @@ lim_send_channel_switch_mgmt_frame(tpAniSirGlobal pMac, } smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT; frm.Action.action = SIR_MAC_ACTION_CHANNEL_SWITCH_ID; @@ -4054,14 +4054,14 @@ lim_send_channel_switch_mgmt_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, SIR_MAC_MGMT_ACTION, peer, psessionEntry->selfMacAddr); pMacHdr = (tpSirMacMgmtHdr) pFrame; - cdf_mem_copy((uint8_t *) pMacHdr->bssId, + qdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) psessionEntry->bssId, sizeof(tSirMacAddr)); #ifdef WLAN_FEATURE_11W @@ -4146,7 +4146,7 @@ lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, sme_session_id = session_entry->smeSessionId; - cdf_mem_set(&frm, sizeof(frm), 0); + qdf_mem_set(&frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_PUBLIC_USAGE; frm.Action.action = SIR_MAC_ACTION_EXT_CHANNEL_SWITCH_ID; @@ -4184,13 +4184,13 @@ lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx, } /* Paranoia*/ - cdf_mem_set(frame, num_bytes, 0); + qdf_mem_set(frame, num_bytes, 0); /* Next, we fill out the buffer descriptor */ lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, SIR_MAC_MGMT_ACTION, peer, session_entry->selfMacAddr); mac_hdr = (tpSirMacMgmtHdr) frame; - cdf_mem_copy((uint8_t *) mac_hdr->bssId, + qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) session_entry->bssId, sizeof(tSirMacAddr)); @@ -4264,7 +4264,7 @@ lim_send_vht_opmode_notification_frame(tpAniSirGlobal pMac, } smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_VHT; frm.Action.action = SIR_MAC_VHT_OPMODE_NOTIFICATION; @@ -4297,7 +4297,7 @@ lim_send_vht_opmode_notification_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Next, we fill out the buffer descriptor: */ if (psessionEntry->pePersona == QDF_SAP_MODE) @@ -4309,7 +4309,7 @@ lim_send_vht_opmode_notification_frame(tpAniSirGlobal pMac, SIR_MAC_MGMT_ACTION, psessionEntry->bssId, psessionEntry->selfMacAddr); pMacHdr = (tpSirMacMgmtHdr) pFrame; - cdf_mem_copy((uint8_t *) pMacHdr->bssId, + qdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) psessionEntry->bssId, sizeof(tSirMacAddr)); nStatus = dot11f_pack_operating_mode(pMac, &frm, pFrame + sizeof(tSirMacMgmtHdr), @@ -4393,7 +4393,7 @@ lim_send_neighbor_report_request_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_RRM; frm.Action.action = SIR_MAC_RRM_NEIGHBOR_REQ; @@ -4429,7 +4429,7 @@ lim_send_neighbor_report_request_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Copy necessary info to BD */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -4543,7 +4543,7 @@ lim_send_link_report_action_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_RRM; frm.Action.action = SIR_MAC_RRM_LINK_MEASUREMENT_RPT; @@ -4588,7 +4588,7 @@ lim_send_link_report_action_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Copy necessary info to BD */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -4701,7 +4701,7 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac, uint8_t smeSessionId = 0; tDot11fRadioMeasurementReport *frm = - cdf_mem_malloc(sizeof(tDot11fRadioMeasurementReport)); + qdf_mem_malloc(sizeof(tDot11fRadioMeasurementReport)); if (!frm) { lim_log(pMac, LOGE, FL @@ -4713,10 +4713,10 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac, lim_log(pMac, LOGE, FL ("(psession == NULL) in Request to send Beacon Report action frame")); - cdf_mem_free(frm); + qdf_mem_free(frm); return eSIR_FAILURE; } - cdf_mem_set((uint8_t *) frm, sizeof(*frm), 0); + 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; @@ -4761,7 +4761,7 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac, nStatus); /* We'll fall back on the worst case scenario: */ nPayload = sizeof(tDot11fLinkMeasurementReport); - cdf_mem_free(frm); + qdf_mem_free(frm); return eSIR_FAILURE; } else if (DOT11F_WARNED(nStatus)) { lim_log(pMac, LOGW, FL("There were warnings while calculating " @@ -4778,11 +4778,11 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac, lim_log(pMac, LOGP, FL("Failed to allocate %d bytes for a Radio Measure " "Report."), nBytes); - cdf_mem_free(frm); + qdf_mem_free(frm); return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Copy necessary info to BD */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -4846,15 +4846,15 @@ lim_send_radio_measure_report_action_frame(tpAniSirGlobal pMac, ) statusCode = eSIR_FAILURE; /* Pkt will be freed up by the callback */ - cdf_mem_free(frm); + qdf_mem_free(frm); return statusCode; } else { - cdf_mem_free(frm); + qdf_mem_free(frm); return eSIR_SUCCESS; } returnAfterError: - cdf_mem_free(frm); + qdf_mem_free(frm); cds_packet_free((void *)pPacket); return statusCode; } @@ -4895,14 +4895,14 @@ tSirRetStatus lim_send_sa_query_request_frame(tpAniSirGlobal pMac, uint8_t *tran uint8_t txFlag = 0; uint8_t smeSessionId = 0; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SA_QUERY; /* 11w action field is : action: 0 --> SA Query Request action frame action: 1 --> SA Query Response action frame */ frm.Action.action = SIR_MAC_SA_QUERY_REQ; /* 11w SA Query Request transId */ - cdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2); + qdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2); nStatus = dot11f_get_packed_sa_query_req_size(pMac, &frm, &nPayload); if (DOT11F_FAILED(nStatus)) { @@ -4927,7 +4927,7 @@ tSirRetStatus lim_send_sa_query_request_frame(tpAniSirGlobal pMac, uint8_t *tran return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Copy necessary info to BD */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, @@ -5036,7 +5036,7 @@ tSirRetStatus lim_send_sa_query_response_frame(tpAniSirGlobal pMac, smeSessionId = psessionEntry->smeSessionId; - cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); + qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0); frm.Category.category = SIR_MAC_ACTION_SA_QUERY; /*11w action field is : action: 0 --> SA query request action frame @@ -5044,7 +5044,7 @@ tSirRetStatus lim_send_sa_query_response_frame(tpAniSirGlobal pMac, frm.Action.action = SIR_MAC_SA_QUERY_RSP; /*11w SA query response transId is same as SA query request transId */ - cdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2); + qdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2); nStatus = dot11f_get_packed_sa_query_rsp_size(pMac, &frm, &nPayload); if (DOT11F_FAILED(nStatus)) { @@ -5069,7 +5069,7 @@ tSirRetStatus lim_send_sa_query_response_frame(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Paranoia: */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); /* Copy necessary info to BD */ lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME, diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c index 05ad92f3aa01..ad53515619b5 100644 --- a/core/mac/src/pe/lim/lim_send_messages.c +++ b/core/mac/src/pe/lim/lim_send_messages.c @@ -99,14 +99,14 @@ tSirRetStatus lim_send_cf_params(tpAniSirGlobal pMac, uint8_t bssIdx, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pCFParams = cdf_mem_malloc(sizeof(tUpdateCFParams)); + pCFParams = qdf_mem_malloc(sizeof(tUpdateCFParams)); if (NULL == pCFParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update CF Params")); retCode = eSIR_MEM_ALLOC_FAILED; goto returnFailure; } - cdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0); + qdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0); pCFParams->cfpCount = cfpCount; pCFParams->cfpPeriod = cfpPeriod; pCFParams->bssIdx = bssIdx; @@ -119,7 +119,7 @@ tSirRetStatus lim_send_cf_params(tpAniSirGlobal pMac, uint8_t bssIdx, MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pCFParams); + qdf_mem_free(pCFParams); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_CF_IND failed, reason=%X"), retCode); @@ -148,13 +148,13 @@ tSirRetStatus lim_send_beacon_params(tpAniSirGlobal pMac, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pBcnParams = cdf_mem_malloc(sizeof(*pBcnParams)); + pBcnParams = qdf_mem_malloc(sizeof(*pBcnParams)); if (NULL == pBcnParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update Beacon Params")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((uint8_t *) pBcnParams, pUpdatedBcnParams, + qdf_mem_copy((uint8_t *) pBcnParams, pUpdatedBcnParams, sizeof(*pBcnParams)); msgQ.type = WMA_UPDATE_BEACON_IND; msgQ.reserved = 0; @@ -164,7 +164,7 @@ tSirRetStatus lim_send_beacon_params(tpAniSirGlobal pMac, FL("Sending WMA_UPDATE_BEACON_IND, paramChangeBitmap in hex = %x"), pUpdatedBcnParams->paramChangeBitmap);) if (NULL == psessionEntry) { - cdf_mem_free(pBcnParams); + qdf_mem_free(pBcnParams); MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); return eSIR_FAILURE; } else { @@ -175,7 +175,7 @@ tSirRetStatus lim_send_beacon_params(tpAniSirGlobal pMac, pBcnParams->smeSessionId = psessionEntry->smeSessionId; retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pBcnParams); + qdf_mem_free(pBcnParams); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_BEACON_IND, reason=%X"), retCode); @@ -235,25 +235,25 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac, peSessionId); return eSIR_FAILURE; } - pChnlParams = cdf_mem_malloc(sizeof(tSwitchChannelParams)); + pChnlParams = qdf_mem_malloc(sizeof(tSwitchChannelParams)); if (NULL == pChnlParams) { lim_log(pMac, LOGP, FL( "Unable to allocate memory for Switch Ch Params")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pChnlParams, sizeof(tSwitchChannelParams), 0); + 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; pChnlParams->ch_width = ch_width; - cdf_mem_copy(pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr, + qdf_mem_copy(pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr, sizeof(tSirMacAddr)); #if defined WLAN_FEATURE_VOWIFI pChnlParams->maxTxPower = maxTxPower; #else pChnlParams->localPowerConstraint = localPwrConstraint; #endif - cdf_mem_copy(pChnlParams->bssId, pSessionEntry->bssId, + qdf_mem_copy(pChnlParams->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr)); pChnlParams->peSessionId = peSessionId; pChnlParams->vhtCapable = pSessionEntry->vhtCapability; @@ -291,7 +291,7 @@ tSirRetStatus lim_send_switch_chnl_params(tpAniSirGlobal pMac, #endif MTRACE(mac_trace_msg_tx(pMac, peSessionId, msgQ.type)); if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msgQ)) { - cdf_mem_free(pChnlParams); + qdf_mem_free(pChnlParams); lim_log(pMac, LOGP, FL( "Posting CH_SWITCH_REQ to WMA failed")); return eSIR_FAILURE; @@ -329,7 +329,7 @@ tSirRetStatus lim_send_edca_params(tpAniSirGlobal pMac, tSirMsgQ msgQ; uint8_t i; - pEdcaParams = cdf_mem_malloc(sizeof(tEdcaParams)); + pEdcaParams = qdf_mem_malloc(sizeof(tEdcaParams)); if (NULL == pEdcaParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update EDCA Params")); @@ -359,7 +359,7 @@ tSirRetStatus lim_send_edca_params(tpAniSirGlobal pMac, MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pEdcaParams); + qdf_mem_free(pEdcaParams); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_EDCA_PROFILE_IND failed, reason=%X"), retCode); @@ -493,7 +493,7 @@ tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state, tSirRetStatus retCode; tpLinkStateParams pLinkStateParams = NULL; /* Allocate memory. */ - pLinkStateParams = cdf_mem_malloc(sizeof(tLinkStateParams)); + pLinkStateParams = qdf_mem_malloc(sizeof(tLinkStateParams)); if (NULL == pLinkStateParams) { lim_log(pMac, LOGP, FL @@ -501,7 +501,7 @@ tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state, retCode = eSIR_MEM_ALLOC_FAILED; return retCode; } - cdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0); + qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0); pLinkStateParams->state = state; pLinkStateParams->callback = callback; pLinkStateParams->callbackArg = callbackArg; @@ -519,7 +519,7 @@ tSirRetStatus lim_set_link_state(tpAniSirGlobal pMac, tSirLinkState state, retCode = (uint32_t) wma_post_ctrl_msg(pMac, &msgQ); if (retCode != eSIR_SUCCESS) { - cdf_mem_free(pLinkStateParams); + qdf_mem_free(pLinkStateParams); lim_log(pMac, LOGP, FL("Posting link state %d failed, reason = %x "), state, retCode); @@ -537,7 +537,7 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState tSirRetStatus retCode; tpLinkStateParams pLinkStateParams = NULL; /* Allocate memory. */ - pLinkStateParams = cdf_mem_malloc(sizeof(tLinkStateParams)); + pLinkStateParams = qdf_mem_malloc(sizeof(tLinkStateParams)); if (NULL == pLinkStateParams) { lim_log(pMac, LOGP, FL @@ -545,7 +545,7 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState retCode = eSIR_MEM_ALLOC_FAILED; return retCode; } - cdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0); + qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0); pLinkStateParams->state = state; /* Copy Mac address */ sir_copy_mac_addr(pLinkStateParams->bssid, bssId); @@ -566,7 +566,7 @@ extern tSirRetStatus lim_set_link_state_ft(tpAniSirGlobal pMac, tSirLinkState retCode = (uint32_t) wma_post_ctrl_msg(pMac, &msgQ); if (retCode != eSIR_SUCCESS) { - cdf_mem_free(pLinkStateParams); + qdf_mem_free(pLinkStateParams); lim_log(pMac, LOGP, FL("Posting link state %d failed, reason = %x "), state, retCode); @@ -598,14 +598,14 @@ tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac, return retCode; } msgSize = sizeof(tBeaconFilterMsg) + sizeof(beacon_filter_table); - pBeaconFilterMsg = cdf_mem_malloc(msgSize); + pBeaconFilterMsg = qdf_mem_malloc(msgSize); if (NULL == pBeaconFilterMsg) { lim_log(pMac, LOGP, FL("Fail to allocate memory for beaconFiilterMsg ")); retCode = eSIR_MEM_ALLOC_FAILED; return retCode; } - cdf_mem_set((uint8_t *) pBeaconFilterMsg, msgSize, 0); + 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; @@ -638,7 +638,7 @@ tSirRetStatus lim_send_beacon_filter_info(tpAniSirGlobal pMac, MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pBeaconFilterMsg); + qdf_mem_free(pBeaconFilterMsg); lim_log(pMac, LOGP, FL("Posting WMA_BEACON_FILTER_IND failed, reason=%X"), retCode); @@ -656,13 +656,13 @@ tSirRetStatus lim_send_mode_update(tpAniSirGlobal pMac, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pVhtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode)); + pVhtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode)); if (NULL == pVhtOpMode) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update Op Mode")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((uint8_t *) pVhtOpMode, pTempParam, + qdf_mem_copy((uint8_t *) pVhtOpMode, pTempParam, sizeof(tUpdateVHTOpMode)); msgQ.type = WMA_UPDATE_OP_MODE; msgQ.reserved = 0; @@ -679,7 +679,7 @@ tSirRetStatus lim_send_mode_update(tpAniSirGlobal pMac, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pVhtOpMode); + qdf_mem_free(pVhtOpMode); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_OP_MODE failed, reason=%X"), retCode); @@ -696,13 +696,13 @@ tSirRetStatus lim_send_rx_nss_update(tpAniSirGlobal pMac, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pRxNss = cdf_mem_malloc(sizeof(tUpdateRxNss)); + pRxNss = qdf_mem_malloc(sizeof(tUpdateRxNss)); if (NULL == pRxNss) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update Rx Nss")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((uint8_t *) pRxNss, pTempParam, sizeof(tUpdateRxNss)); + qdf_mem_copy((uint8_t *) pRxNss, pTempParam, sizeof(tUpdateRxNss)); msgQ.type = WMA_UPDATE_RX_NSS; msgQ.reserved = 0; msgQ.bodyptr = pRxNss; @@ -716,7 +716,7 @@ tSirRetStatus lim_send_rx_nss_update(tpAniSirGlobal pMac, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pRxNss); + qdf_mem_free(pRxNss); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_RX_NSS failed, reason=%X"), retCode); @@ -733,13 +733,13 @@ tSirRetStatus lim_set_membership(tpAniSirGlobal pMac, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pMembership = cdf_mem_malloc(sizeof(tUpdateMembership)); + pMembership = qdf_mem_malloc(sizeof(tUpdateMembership)); if (NULL == pMembership) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update Membership Mode")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((uint8_t *) pMembership, pTempParam, + qdf_mem_copy((uint8_t *) pMembership, pTempParam, sizeof(tUpdateMembership)); msgQ.type = WMA_UPDATE_MEMBERSHIP; @@ -755,7 +755,7 @@ tSirRetStatus lim_set_membership(tpAniSirGlobal pMac, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pMembership); + qdf_mem_free(pMembership); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_MEMBERSHIP failed, reason=%X"), retCode); @@ -772,13 +772,13 @@ tSirRetStatus lim_set_user_pos(tpAniSirGlobal pMac, tSirRetStatus retCode = eSIR_SUCCESS; tSirMsgQ msgQ; - pUserPos = cdf_mem_malloc(sizeof(tUpdateUserPos)); + pUserPos = qdf_mem_malloc(sizeof(tUpdateUserPos)); if (NULL == pUserPos) { lim_log(pMac, LOGP, FL("Unable to allocate memory during Update User Position")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((uint8_t *) pUserPos, pTempParam, sizeof(tUpdateUserPos)); + qdf_mem_copy((uint8_t *) pUserPos, pTempParam, sizeof(tUpdateUserPos)); msgQ.type = WMA_UPDATE_USERPOS; msgQ.reserved = 0; @@ -793,7 +793,7 @@ tSirRetStatus lim_set_user_pos(tpAniSirGlobal pMac, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pUserPos); + qdf_mem_free(pUserPos); lim_log(pMac, LOGP, FL("Posting WMA_UPDATE_USERPOS failed, reason=%X"), retCode); @@ -825,7 +825,7 @@ tSirRetStatus lim_send_exclude_unencrypt_ind(tpAniSirGlobal pMac, tSirWlanExcludeUnencryptParam *pExcludeUnencryptParam; pExcludeUnencryptParam = - cdf_mem_malloc(sizeof(tSirWlanExcludeUnencryptParam)); + qdf_mem_malloc(sizeof(tSirWlanExcludeUnencryptParam)); if (NULL == pExcludeUnencryptParam) { lim_log(pMac, LOGP, FL("Unable to allocate memory during lim_send_exclude_unencrypt_ind")); @@ -833,7 +833,7 @@ tSirRetStatus lim_send_exclude_unencrypt_ind(tpAniSirGlobal pMac, } pExcludeUnencryptParam->excludeUnencrypt = excludeUnenc; - cdf_mem_copy(pExcludeUnencryptParam->bssid.bytes, psessionEntry->bssId, + qdf_mem_copy(pExcludeUnencryptParam->bssid.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); msgQ.type = WMA_EXCLUDE_UNENCRYPTED_IND; @@ -844,7 +844,7 @@ tSirRetStatus lim_send_exclude_unencrypt_ind(tpAniSirGlobal pMac, MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type)); retCode = wma_post_ctrl_msg(pMac, &msgQ); if (eSIR_SUCCESS != retCode) { - cdf_mem_free(pExcludeUnencryptParam); + qdf_mem_free(pExcludeUnencryptParam); lim_log(pMac, LOGP, FL("Posting WMA_EXCLUDE_UNENCRYPTED_IND failed, reason=%X"), retCode); 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 49248017322c..358016afc01c 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 @@ -88,7 +88,7 @@ lim_send_sme_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type, lim_log(mac_ctx, LOG1, FL("Sending message %s with reasonCode %s"), lim_msg_str(msg_type), lim_result_code_str(result_code)); - sme_rsp = cdf_mem_malloc(sizeof(tSirSmeRsp)); + sme_rsp = qdf_mem_malloc(sizeof(tSirSmeRsp)); if (NULL == sme_rsp) { /* Buffer not available. Log error */ QDF_TRACE(QDF_MODULE_ID_PE, LOGP, @@ -147,7 +147,7 @@ lim_send_sme_roc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type, lim_msg_str(msg_type), lim_result_code_str(result_code), scan_id); - sme_rsp = cdf_mem_malloc(sizeof(struct sir_roc_rsp)); + sme_rsp = qdf_mem_malloc(sizeof(struct sir_roc_rsp)); if (NULL == sme_rsp) { QDF_TRACE(QDF_MODULE_ID_PE, LOGP, FL("call to AllocateMemory failed for eWNI_SME_*_RSP")); @@ -266,10 +266,10 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, if (result_code == eSIR_SME_SUCCESS) { if (session_entry->beacon != NULL) { sme_join_rsp->beaconLength = session_entry->bcnLen; - cdf_mem_copy(sme_join_rsp->frames, + qdf_mem_copy(sme_join_rsp->frames, session_entry->beacon, sme_join_rsp->beaconLength); - cdf_mem_free(session_entry->beacon); + qdf_mem_free(session_entry->beacon); session_entry->beacon = NULL; session_entry->bcnLen = 0; lim_log(mac_ctx, LOG1, FL("Beacon=%d"), @@ -278,11 +278,11 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, if (session_entry->assocReq != NULL) { sme_join_rsp->assocReqLength = session_entry->assocReqLen; - cdf_mem_copy(sme_join_rsp->frames + + qdf_mem_copy(sme_join_rsp->frames + sme_join_rsp->beaconLength, session_entry->assocReq, sme_join_rsp->assocReqLength); - cdf_mem_free(session_entry->assocReq); + qdf_mem_free(session_entry->assocReq); session_entry->assocReq = NULL; session_entry->assocReqLen = 0; lim_log(mac_ctx, @@ -292,12 +292,12 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, if (session_entry->assocRsp != NULL) { sme_join_rsp->assocRspLength = session_entry->assocRspLen; - cdf_mem_copy(sme_join_rsp->frames + + qdf_mem_copy(sme_join_rsp->frames + sme_join_rsp->beaconLength + sme_join_rsp->assocReqLength, session_entry->assocRsp, sme_join_rsp->assocRspLength); - cdf_mem_free(session_entry->assocRsp); + qdf_mem_free(session_entry->assocRsp); session_entry->assocRsp = NULL; session_entry->assocRspLen = 0; } @@ -305,13 +305,13 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, if (session_entry->ricData != NULL) { sme_join_rsp->parsedRicRspLen = session_entry->RICDataLen; - cdf_mem_copy(sme_join_rsp->frames + + qdf_mem_copy(sme_join_rsp->frames + sme_join_rsp->beaconLength + sme_join_rsp->assocReqLength + sme_join_rsp->assocRspLength, session_entry->ricData, sme_join_rsp->parsedRicRspLen); - cdf_mem_free(session_entry->ricData); + qdf_mem_free(session_entry->ricData); session_entry->ricData = NULL; session_entry->RICDataLen = 0; lim_log(mac_ctx, LOG1, FL("RicLength=%d"), @@ -322,14 +322,14 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, if (session_entry->tspecIes != NULL) { sme_join_rsp->tspecIeLen = session_entry->tspecLen; - cdf_mem_copy(sme_join_rsp->frames + + qdf_mem_copy(sme_join_rsp->frames + sme_join_rsp->beaconLength + sme_join_rsp->assocReqLength + sme_join_rsp->assocRspLength + sme_join_rsp->parsedRicRspLen, session_entry->tspecIes, sme_join_rsp->tspecIeLen); - cdf_mem_free(session_entry->tspecIes); + qdf_mem_free(session_entry->tspecIes); session_entry->tspecIes = NULL; session_entry->tspecLen = 0; lim_log(mac_ctx, LOG1, FL("ESE-TspecLen=%d"), @@ -365,30 +365,30 @@ static void lim_handle_join_rsp_status(tpAniSirGlobal mac_ctx, #endif } else { if (session_entry->beacon != NULL) { - cdf_mem_free(session_entry->beacon); + qdf_mem_free(session_entry->beacon); session_entry->beacon = NULL; session_entry->bcnLen = 0; } if (session_entry->assocReq != NULL) { - cdf_mem_free(session_entry->assocReq); + qdf_mem_free(session_entry->assocReq); session_entry->assocReq = NULL; session_entry->assocReqLen = 0; } if (session_entry->assocRsp != NULL) { - cdf_mem_free(session_entry->assocRsp); + qdf_mem_free(session_entry->assocRsp); session_entry->assocRsp = NULL; session_entry->assocRspLen = 0; } #ifdef WLAN_FEATURE_VOWIFI_11R if (session_entry->ricData != NULL) { - cdf_mem_free(session_entry->ricData); + qdf_mem_free(session_entry->ricData); session_entry->ricData = NULL; session_entry->RICDataLen = 0; } #endif #ifdef FEATURE_WLAN_ESE if (session_entry->tspecIes != NULL) { - cdf_mem_free(session_entry->tspecIes); + qdf_mem_free(session_entry->tspecIes); session_entry->tspecIes = NULL; session_entry->tspecLen = 0; } @@ -436,14 +436,14 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type, if (session_entry == NULL) { rsp_len = sizeof(tSirSmeJoinRsp); - sme_join_rsp = cdf_mem_malloc(rsp_len); + sme_join_rsp = qdf_mem_malloc(rsp_len); if (NULL == sme_join_rsp) { lim_log(mac_ctx, LOGP, FL("Mem Alloc fail - JOIN/REASSOC_RSP")); return; } - cdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0); + 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; @@ -457,13 +457,13 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type, session_entry->tspecLen + #endif sizeof(tSirSmeJoinRsp) - sizeof(uint8_t); - sme_join_rsp = cdf_mem_malloc(rsp_len); + sme_join_rsp = qdf_mem_malloc(rsp_len); if (NULL == sme_join_rsp) { lim_log(mac_ctx, LOGP, FL("MemAlloc fail - JOIN/REASSOC_RSP")); return; } - cdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0); + 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, @@ -562,7 +562,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, size = sizeof(tSirSmeStartBssRsp); if (psessionEntry == NULL) { - pSirSmeRsp = cdf_mem_malloc(size); + pSirSmeRsp = qdf_mem_malloc(size); if (NULL == pSirSmeRsp) { /* / Buffer not available. Log error */ lim_log(pMac, LOGP, @@ -570,7 +570,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, ("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP")); return; } - cdf_mem_set((uint8_t *) pSirSmeRsp, size, 0); + qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0); } else { /* subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID */ @@ -580,7 +580,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, /* calculate the memory size to allocate */ size += ieLen; - pSirSmeRsp = cdf_mem_malloc(size); + pSirSmeRsp = qdf_mem_malloc(size); if (NULL == pSirSmeRsp) { /* / Buffer not available. Log error */ lim_log(pMac, LOGP, @@ -589,7 +589,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, return; } - cdf_mem_set((uint8_t *) pSirSmeRsp, size, 0); + qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0); size = sizeof(tSirSmeStartBssRsp); if (resultCode == eSIR_SME_SUCCESS) { @@ -618,12 +618,12 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, psessionEntry->currentOperChannel; curLen = psessionEntry->schBeaconOffsetBegin - ieOffset; - cdf_mem_copy((uint8_t *) &pSirSmeRsp->bssDescription. + qdf_mem_copy((uint8_t *) &pSirSmeRsp->bssDescription. ieFields, psessionEntry->pSchBeaconFrameBegin + ieOffset, (uint32_t) curLen); - cdf_mem_copy(((uint8_t *) &pSirSmeRsp->bssDescription. + qdf_mem_copy(((uint8_t *) &pSirSmeRsp->bssDescription. ieFields) + curLen, psessionEntry->pSchBeaconFrameEnd, (uint32_t) psessionEntry-> @@ -747,13 +747,13 @@ lim_post_sme_scan_rsp_message(tpAniSirGlobal pMac, lim_log(pMac, LOG1, FL("send SME_SCAN_RSP (reasonCode %s)."), lim_result_code_str(resultCode)); - pSirSmeScanRsp = cdf_mem_malloc(sizeof(tSirSmeScanRsp)); + pSirSmeScanRsp = qdf_mem_malloc(sizeof(tSirSmeScanRsp)); if (NULL == pSirSmeScanRsp) { lim_log(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_SCAN_RSP")); return; } - cdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0); + qdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0); pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP; pSirSmeScanRsp->statusCode = resultCode; @@ -820,7 +820,7 @@ void lim_send_sme_oem_data_rsp(tpAniSirGlobal pMac, uint32_t *pMsgBuf, msgLength = sizeof(tSirOemDataRsp); /* now allocate memory for the char buffer */ - pSirSmeOemDataRsp = cdf_mem_malloc(msgLength); + pSirSmeOemDataRsp = qdf_mem_malloc(msgLength); if (NULL == pSirSmeOemDataRsp) { lim_log(pMac, LOGP, FL @@ -836,11 +836,11 @@ void lim_send_sme_oem_data_rsp(tpAniSirGlobal pMac, uint32_t *pMsgBuf, pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP; #endif pSirSmeOemDataRsp->target_rsp = pMlmOemDataRsp->target_rsp; - cdf_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, + qdf_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE); /* Now free the memory from MLM Rsp Message */ - cdf_mem_free(pMlmOemDataRsp); + qdf_mem_free(pMlmOemDataRsp); mmhMsg.type = eWNI_SME_OEM_DATA_RSP; mmhMsg.bodyptr = pSirSmeOemDataRsp; @@ -928,7 +928,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac, * host triggered disassociation */ - pSirSmeDisassocRsp = cdf_mem_malloc(sizeof(tSirSmeDisassocRsp)); + pSirSmeDisassocRsp = qdf_mem_malloc(sizeof(tSirSmeDisassocRsp)); if (NULL == pSirSmeDisassocRsp) { /* Log error */ lim_log(pMac, LOGP, FL("Memory allocation failed")); @@ -954,7 +954,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac, pBuf += sizeof(tSirResultCodes); /* peerMacAddr */ - cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); /* Clear Station Stats */ @@ -974,7 +974,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac, * frame reception from peer entity or due to * loss of link with peer entity. */ - pSirSmeDisassocInd = cdf_mem_malloc(sizeof(tSirSmeDisassocInd)); + pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd)); if (NULL == pSirSmeDisassocInd) { /* Log error */ lim_log(pMac, LOGP, FL("Memory allocation failed")); @@ -996,10 +996,10 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac, lim_copy_u32(pBuf, reasonCode); pBuf += sizeof(tSirResultCodes); - cdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); - cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */ lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, @@ -1042,7 +1042,7 @@ lim_send_sme_disassoc_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirMsgQ mmhMsg; tSirSmeDisassocInd *pSirSmeDisassocInd; - pSirSmeDisassocInd = cdf_mem_malloc(sizeof(tSirSmeDisassocInd)); + pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd)); if (NULL == pSirSmeDisassocInd) { lim_log(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DISASSOC_IND")); @@ -1057,10 +1057,10 @@ lim_send_sme_disassoc_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, pSirSmeDisassocInd->statusCode = pStaDs->mlmStaContext.disassocReason; pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason; - cdf_mem_copy(pSirSmeDisassocInd->bssid.bytes, psessionEntry->bssId, + qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, pStaDs->staAddr, + qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE); pSirSmeDisassocInd->staId = pStaDs->staIndex; @@ -1098,7 +1098,7 @@ lim_send_sme_deauth_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirMsgQ mmhMsg; tSirSmeDeauthInd *pSirSmeDeauthInd; - pSirSmeDeauthInd = cdf_mem_malloc(sizeof(tSirSmeDeauthInd)); + pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd)); if (NULL == pSirSmeDeauthInd) { lim_log(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DEAUTH_IND ")); @@ -1119,10 +1119,10 @@ lim_send_sme_deauth_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, (tSirResultCodes) pStaDs->mlmStaContext.disassocReason; } /* BSSID */ - cdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, psessionEntry->bssId, + qdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); /* peerMacAddr */ - cdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, pStaDs->staAddr, + qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE); pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason; @@ -1172,7 +1172,7 @@ lim_send_sme_tdls_del_sta_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirMsgQ mmhMsg; tSirTdlsDelStaInd *pSirTdlsDelStaInd; - pSirTdlsDelStaInd = cdf_mem_malloc(sizeof(tSirTdlsDelStaInd)); + pSirTdlsDelStaInd = qdf_mem_malloc(sizeof(tSirTdlsDelStaInd)); if (NULL == pSirTdlsDelStaInd) { lim_log(pMac, LOGP, FL @@ -1187,7 +1187,7 @@ lim_send_sme_tdls_del_sta_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId; /* peerMacAddr */ - cdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr, + qdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr, QDF_MAC_ADDR_SIZE); /* staId */ @@ -1229,7 +1229,7 @@ lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, tpPESession psessionE tSirMsgQ mmhMsg; tSirTdlsDelAllPeerInd *pSirTdlsDelAllPeerInd; - pSirTdlsDelAllPeerInd = cdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd)); + pSirTdlsDelAllPeerInd = qdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd)); if (NULL == pSirTdlsDelAllPeerInd) { lim_log(pMac, LOGP, FL @@ -1278,7 +1278,7 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac, tSirMgmtTxCompletionInd *pSirMgmtTxCompletionInd; pSirMgmtTxCompletionInd = - cdf_mem_malloc(sizeof(tSirMgmtTxCompletionInd)); + qdf_mem_malloc(sizeof(tSirMgmtTxCompletionInd)); if (NULL == pSirMgmtTxCompletionInd) { lim_log(pMac, LOGP, FL @@ -1377,7 +1377,7 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, * Deauthentication response to host triggered * deauthentication. */ - pSirSmeDeauthRsp = cdf_mem_malloc(sizeof(tSirSmeDeauthRsp)); + pSirSmeDeauthRsp = qdf_mem_malloc(sizeof(tSirSmeDeauthRsp)); if (NULL == pSirSmeDeauthRsp) { /* Log error */ lim_log(pMac, LOGP, @@ -1396,7 +1396,7 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, pSirSmeDeauthRsp->transactionId = smetransactionId; pBuf = (uint8_t *) pSirSmeDeauthRsp->peer_macaddr.bytes; - cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr)); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */ lim_diag_event_report(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT, @@ -1412,7 +1412,7 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, * frame reception from peer entity or due to * loss of link with peer entity. */ - pSirSmeDeauthInd = cdf_mem_malloc(sizeof(tSirSmeDeauthInd)); + pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd)); if (NULL == pSirSmeDeauthInd) { /* Log error */ lim_log(pMac, LOGP, @@ -1441,11 +1441,11 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, pBuf += sizeof(tSirResultCodes); /* bssId */ - cdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); + qdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); /* peerMacAddr */ - cdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, peerMacAddr, + qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, peerMacAddr, QDF_MAC_ADDR_SIZE); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */ @@ -1490,7 +1490,7 @@ lim_send_sme_wm_status_change_ntf(tpAniSirGlobal mac_ctx, tSirMsgQ msg; tSirSmeWmStatusChangeNtf *wm_status_change_ntf; - wm_status_change_ntf = cdf_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf)); + wm_status_change_ntf = qdf_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf)); if (NULL == wm_status_change_ntf) { lim_log(mac_ctx, LOGE, FL("Mem Alloc failed - eWNI_SME_WM_STATUS_CHANGE_NTF")); @@ -1512,7 +1512,7 @@ lim_send_sme_wm_status_change_ntf(tpAniSirGlobal mac_ctx, wm_status_change_ntf->sessionId = session_id; if (sizeof(wm_status_change_ntf->statusChangeInfo) >= info_len) { - cdf_mem_copy( + qdf_mem_copy( (uint8_t *) &wm_status_change_ntf->statusChangeInfo, (uint8_t *) status_change_info, info_len); } @@ -1524,7 +1524,7 @@ lim_send_sme_wm_status_change_ntf(tpAniSirGlobal mac_ctx, MTRACE(mac_trace_msg_tx(mac_ctx, session_id, msg.type)); if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(mac_ctx, &msg, ePROT)) { - cdf_mem_free(wm_status_change_ntf); + qdf_mem_free(wm_status_change_ntf); lim_log(mac_ctx, LOGP, FL("lim_sys_process_mmh_msg_api failed")); } @@ -1567,7 +1567,7 @@ lim_send_sme_set_context_rsp(tpAniSirGlobal pMac, tSirMsgQ mmhMsg; tSirSmeSetContextRsp *pSirSmeSetContextRsp; - pSirSmeSetContextRsp = cdf_mem_malloc(sizeof(tSirSmeSetContextRsp)); + pSirSmeSetContextRsp = qdf_mem_malloc(sizeof(tSirSmeSetContextRsp)); if (NULL == pSirSmeSetContextRsp) { /* Log error */ lim_log(pMac, LOGP, @@ -1664,7 +1664,7 @@ lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr */ val = pBssDescr->bssDescription.length + sizeof(uint16_t) + sizeof(uint32_t) + sizeof(uint8_t); - pNewBssInd = cdf_mem_malloc(val); + pNewBssInd = qdf_mem_malloc(val); if (NULL == pNewBssInd) { /* Log error */ lim_log(pMac, LOGP, @@ -1678,7 +1678,7 @@ lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr pNewBssInd->length = (uint16_t) val; pNewBssInd->sessionId = 0; - cdf_mem_copy((uint8_t *) pNewBssInd->bssDescription, + qdf_mem_copy((uint8_t *) pNewBssInd->bssDescription, (uint8_t *) &pBssDescr->bssDescription, pBssDescr->bssDescription.length + sizeof(uint16_t)); @@ -1710,13 +1710,13 @@ lim_send_sme_addts_rsp(tpAniSirGlobal pMac, uint8_t rspReqd, uint32_t status, if (!rspReqd) return; - rsp = cdf_mem_malloc(sizeof(tSirAddtsRsp)); + rsp = qdf_mem_malloc(sizeof(tSirAddtsRsp)); if (NULL == rsp) { lim_log(pMac, LOGP, FL("AllocateMemory failed for ADDTS_RSP")); return; } - cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); + qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); rsp->messageType = eWNI_SME_ADDTS_RSP; rsp->rc = status; rsp->rsp.status = (enum eSirMacStatusCodes)status; @@ -1758,19 +1758,19 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status if (!delts->rspReqd) return; - rsp = cdf_mem_malloc(sizeof(tSirDeltsRsp)); + rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp)); if (NULL == rsp) { /* Log error */ lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP")); return; } - cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); + qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); if (psessionEntry != NULL) { rsp->aid = delts->aid; qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr); - cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req, + qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req, sizeof(tSirDeltsReqInfo)); } @@ -1808,18 +1808,18 @@ lim_send_sme_delts_ind(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, uint16_t ai lim_log(pMac, LOGW, "SendSmeDeltsInd (aid %d, tsid %d, up %d)", aid, delts->tsinfo.traffic.tsid, delts->tsinfo.traffic.userPrio); - rsp = cdf_mem_malloc(sizeof(tSirDeltsRsp)); + rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp)); if (NULL == rsp) { /* Log error */ lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND")); return; } - cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); + qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0); rsp->messageType = eWNI_SME_DELTS_IND; rsp->rc = eSIR_SUCCESS; rsp->aid = aid; - cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) delts, sizeof(*delts)); + qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) delts, sizeof(*delts)); /* Update SME session Id and SME transaction Id */ @@ -1964,16 +1964,16 @@ lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac, tSirMsgQ mmhMsg; tSmeIbssPeerInd *pNewPeerInd; - pNewPeerInd = cdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen); + pNewPeerInd = qdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen); if (NULL == pNewPeerInd) { PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));) return; } - cdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen), + qdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen), 0); - cdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes, + qdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes, peerMacAddr, QDF_MAC_ADDR_SIZE); pNewPeerInd->staId = staIndex; pNewPeerInd->ucastSig = ucastIdx; @@ -1983,7 +1983,7 @@ lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac, pNewPeerInd->sessionId = sessionId; if (beacon != NULL) { - cdf_mem_copy((void *)((uint8_t *) pNewPeerInd + + qdf_mem_copy((void *)((uint8_t *) pNewPeerInd + sizeof(tSmeIbssPeerInd)), (void *)beacon, beaconLen); } @@ -2181,17 +2181,17 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) session_entry->gLimChannelSwitch.ch_width); lim_prepare_for11h_channel_switch(mac_ctx, session_entry); - csa_offload_ind = cdf_mem_malloc(sizeof(tSmeCsaOffloadInd)); + csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd)); if (NULL == csa_offload_ind) { lim_log(mac_ctx, LOGE, FL("memalloc fail eWNI_SME_CSA_OFFLOAD_EVENT")); goto err; } - cdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0); + qdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0); csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT; csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd); - cdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId, + qdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId, QDF_MAC_ADDR_SIZE); mmh_msg.type = eWNI_SME_CSA_OFFLOAD_EVENT; mmh_msg.bodyptr = csa_offload_ind; @@ -2209,7 +2209,7 @@ void lim_handle_csa_offload_msg(tpAniSirGlobal mac_ctx, tpSirMsgQ msg) } err: - cdf_mem_free(csa_params); + qdf_mem_free(csa_params); } /*-------------------------------------------------------------------------- @@ -2278,13 +2278,13 @@ void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMa tSirMsgQ mmhMsg; tSmeMaxAssocInd *pSmeMaxAssocInd; - pSmeMaxAssocInd = cdf_mem_malloc(sizeof(tSmeMaxAssocInd)); + pSmeMaxAssocInd = qdf_mem_malloc(sizeof(tSmeMaxAssocInd)); if (NULL == pSmeMaxAssocInd) { PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));) return; } - cdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0); - cdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes, + 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; pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd); @@ -2375,17 +2375,17 @@ lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal pMac, uint8_t channelId; pSmeSwithChnlParams = (tSwitchChannelParams *) - cdf_mem_malloc(sizeof(tSwitchChannelParams)); + qdf_mem_malloc(sizeof(tSwitchChannelParams)); if (NULL == pSmeSwithChnlParams) { lim_log(pMac, LOGP, FL("AllocateMemory failed for pSmeSwithChnlParams\n")); return; } - cdf_mem_set((void *)pSmeSwithChnlParams, + qdf_mem_set((void *)pSmeSwithChnlParams, sizeof(tSwitchChannelParams), 0); - cdf_mem_copy(pSmeSwithChnlParams, pChnlParams, + qdf_mem_copy(pSmeSwithChnlParams, pChnlParams, sizeof(tSwitchChannelParams)); channelId = pSmeSwithChnlParams->channelNumber; @@ -2476,7 +2476,7 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e psessionEntry->dfsIncludeChanWrapperIe = false; pChanSwTxResponse = (tSirSmeCSAIeTxCompleteRsp *) - cdf_mem_malloc(length); + qdf_mem_malloc(length); if (NULL == pChanSwTxResponse) { lim_log(pMac, LOGP, @@ -2485,7 +2485,7 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e return; } - cdf_mem_set((void *)pChanSwTxResponse, length, 0); + qdf_mem_set((void *)pChanSwTxResponse, length, 0); pChanSwTxResponse->sessionId = psessionEntry->smeSessionId; pChanSwTxResponse->chanSwIeTxStatus = @@ -2503,14 +2503,14 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e /* Done with nss update, send response back to SME */ psessionEntry->gLimOperatingMode.present = 0; beacon_tx_comp_rsp_ptr = (struct sir_beacon_tx_complete_rsp *) - cdf_mem_malloc(sizeof(*beacon_tx_comp_rsp_ptr)); + qdf_mem_malloc(sizeof(*beacon_tx_comp_rsp_ptr)); if (NULL == beacon_tx_comp_rsp_ptr) { lim_log(pMac, LOGP, FL ("AllocateMemory failed for beacon_tx_comp_rsp_ptr")); return; } - cdf_mem_set((void *)beacon_tx_comp_rsp_ptr, + 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; diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index c2e5dc0f4144..7d85ec189f26 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -74,19 +74,19 @@ void pe_init_beacon_params(tpAniSirGlobal pMac, tpPESession psessionEntry) psessionEntry->beaconParams.gHTObssMode = 0; /* Number of legacy STAs associated */ - cdf_mem_set((void *)&psessionEntry->gLim11bParams, + qdf_mem_set((void *)&psessionEntry->gLim11bParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLim11aParams, + qdf_mem_set((void *)&psessionEntry->gLim11aParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLim11gParams, + qdf_mem_set((void *)&psessionEntry->gLim11gParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLimNonGfParams, + qdf_mem_set((void *)&psessionEntry->gLimNonGfParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLimHt20Params, + qdf_mem_set((void *)&psessionEntry->gLimHt20Params, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLimLsigTxopParams, + qdf_mem_set((void *)&psessionEntry->gLimLsigTxopParams, sizeof(tLimProtStaParams), 0); - cdf_mem_set((void *)&psessionEntry->gLimOlbcParams, + qdf_mem_set((void *)&psessionEntry->gLimOlbcParams, sizeof(tLimProtStaParams), 0); } @@ -133,34 +133,34 @@ void pe_reset_protection_callback(void *ptr) pe_session_entry->old_protection_state, current_protection_state); - cdf_mem_zero(&pe_session_entry->gLimOverlap11gParams, + qdf_mem_zero(&pe_session_entry->gLimOverlap11gParams, sizeof(pe_session_entry->gLimOverlap11gParams)); - cdf_mem_zero(&pe_session_entry->gLimOverlap11aParams, + qdf_mem_zero(&pe_session_entry->gLimOverlap11aParams, sizeof(pe_session_entry->gLimOverlap11aParams)); - cdf_mem_zero(&pe_session_entry->gLimOverlapHt20Params, + qdf_mem_zero(&pe_session_entry->gLimOverlapHt20Params, sizeof(pe_session_entry->gLimOverlapHt20Params)); - cdf_mem_zero(&pe_session_entry->gLimOverlapNonGfParams, + qdf_mem_zero(&pe_session_entry->gLimOverlapNonGfParams, sizeof(pe_session_entry->gLimOverlapNonGfParams)); - cdf_mem_zero(&pe_session_entry->gLimOlbcParams, + qdf_mem_zero(&pe_session_entry->gLimOlbcParams, sizeof(pe_session_entry->gLimOlbcParams)); - cdf_mem_zero(&pe_session_entry->beaconParams, + qdf_mem_zero(&pe_session_entry->beaconParams, sizeof(pe_session_entry->beaconParams)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams, sizeof(mac_ctx->lim.gLimOverlap11gParams)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams, sizeof(mac_ctx->lim.gLimOverlap11aParams)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params, + qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params, sizeof(mac_ctx->lim.gLimOverlapHt20Params)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams, sizeof(mac_ctx->lim.gLimOverlapNonGfParams)); old_op_mode = pe_session_entry->htOperMode; pe_session_entry->htOperMode = eSIR_HT_OP_MODE_PURE; - cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); /* index 0, is self node, peers start from 1 */ for (i = 1 ; i <= mac_ctx->lim.gLimAssocStaLimit ; i++) { station_hash_node = dph_get_hash_entry(mac_ctx, i, @@ -181,7 +181,7 @@ void pe_reset_protection_callback(void *ptr) QDF_TRACE_LEVEL_ERROR, FL("protection changed, update beacon template\n")); /* update beacon fix params and send update to FW */ - cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams)); beacon_params.bssIdx = pe_session_entry->bssIdx; beacon_params.fShortPreamble = pe_session_entry->beaconParams.fShortPreamble; @@ -258,20 +258,20 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, } session_ptr = &pMac->lim.gpSession[i]; - cdf_mem_set((void *)session_ptr, sizeof(tPESession), 0); + qdf_mem_set((void *)session_ptr, sizeof(tPESession), 0); /* Allocate space for Station Table for this session. */ session_ptr->dph.dphHashTable.pHashTable = - cdf_mem_malloc(sizeof(tpDphHashNode) * (numSta + 1)); + qdf_mem_malloc(sizeof(tpDphHashNode) * (numSta + 1)); if (NULL == session_ptr->dph.dphHashTable.pHashTable) { lim_log(pMac, LOGE, FL("memory allocate failed!")); return NULL; } session_ptr->dph.dphHashTable.pDphNodeArray = - cdf_mem_malloc(sizeof(tDphHashNode) * (numSta + 1)); + qdf_mem_malloc(sizeof(tDphHashNode) * (numSta + 1)); if (NULL == session_ptr->dph.dphHashTable.pDphNodeArray) { lim_log(pMac, LOGE, FL("memory allocate failed!")); - cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); + qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); session_ptr->dph.dphHashTable. pHashTable = NULL; return NULL; @@ -279,17 +279,17 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, session_ptr->dph.dphHashTable.size = numSta + 1; dph_hash_table_class_init(pMac, &session_ptr->dph.dphHashTable); - session_ptr->gpLimPeerIdxpool = cdf_mem_malloc( + session_ptr->gpLimPeerIdxpool = qdf_mem_malloc( sizeof(*(session_ptr->gpLimPeerIdxpool)) * (numSta + 1)); if (NULL == session_ptr->gpLimPeerIdxpool) { lim_log(pMac, LOGE, FL("memory allocate failed!")); - cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); - cdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray); + qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); + qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray); session_ptr->dph.dphHashTable.pHashTable = NULL; session_ptr->dph.dphHashTable.pDphNodeArray = NULL; return NULL; } - cdf_mem_set(session_ptr->gpLimPeerIdxpool, + qdf_mem_set(session_ptr->gpLimPeerIdxpool, sizeof(*session_ptr->gpLimPeerIdxpool) * (numSta + 1), 0); session_ptr->freePeerIdxHead = 0; @@ -318,7 +318,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, session_ptr->htRecommendedTxWidthSet = 0; session_ptr->htSecondaryChannelOffset = 0; #ifdef FEATURE_WLAN_TDLS - cdf_mem_set(session_ptr->peerAIDBitmap, + qdf_mem_set(session_ptr->peerAIDBitmap, sizeof(session_ptr->peerAIDBitmap), 0); session_ptr->tdls_prohibited = false; session_ptr->tdls_chan_swit_prohibited = false; @@ -334,21 +334,21 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, || eSIR_IBSS_MODE == bssType || eSIR_BTAMP_AP_MODE == bssType) { session_ptr->pSchProbeRspTemplate = - cdf_mem_malloc(SCH_MAX_PROBE_RESP_SIZE); + qdf_mem_malloc(SCH_MAX_PROBE_RESP_SIZE); session_ptr->pSchBeaconFrameBegin = - cdf_mem_malloc(SCH_MAX_BEACON_SIZE); + qdf_mem_malloc(SCH_MAX_BEACON_SIZE); session_ptr->pSchBeaconFrameEnd = - cdf_mem_malloc(SCH_MAX_BEACON_SIZE); + qdf_mem_malloc(SCH_MAX_BEACON_SIZE); if ((NULL == session_ptr->pSchProbeRspTemplate) || (NULL == session_ptr->pSchBeaconFrameBegin) || (NULL == session_ptr->pSchBeaconFrameEnd)) { lim_log(pMac, LOGE, FL("memory allocate failed!")); - cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); - cdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray); - cdf_mem_free(session_ptr->gpLimPeerIdxpool); - cdf_mem_free(session_ptr->pSchProbeRspTemplate); - cdf_mem_free(session_ptr->pSchBeaconFrameBegin); - cdf_mem_free(session_ptr->pSchBeaconFrameEnd); + qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable); + qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray); + qdf_mem_free(session_ptr->gpLimPeerIdxpool); + qdf_mem_free(session_ptr->pSchProbeRspTemplate); + qdf_mem_free(session_ptr->pSchBeaconFrameBegin); + qdf_mem_free(session_ptr->pSchBeaconFrameEnd); session_ptr->dph.dphHashTable.pHashTable = NULL; session_ptr->dph.dphHashTable.pDphNodeArray = NULL; @@ -559,54 +559,54 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) lim_ft_cleanup(mac_ctx, session); #endif if (session->pLimStartBssReq != NULL) { - cdf_mem_free(session->pLimStartBssReq); + qdf_mem_free(session->pLimStartBssReq); session->pLimStartBssReq = NULL; } if (session->pLimJoinReq != NULL) { - cdf_mem_free(session->pLimJoinReq); + qdf_mem_free(session->pLimJoinReq); session->pLimJoinReq = NULL; } if (session->pLimReAssocReq != NULL) { - cdf_mem_free(session->pLimReAssocReq); + qdf_mem_free(session->pLimReAssocReq); session->pLimReAssocReq = NULL; } if (session->pLimMlmJoinReq != NULL) { - cdf_mem_free(session->pLimMlmJoinReq); + qdf_mem_free(session->pLimMlmJoinReq); session->pLimMlmJoinReq = NULL; } if (session->dph.dphHashTable.pHashTable != NULL) { - cdf_mem_free(session->dph.dphHashTable.pHashTable); + qdf_mem_free(session->dph.dphHashTable.pHashTable); session->dph.dphHashTable.pHashTable = NULL; } if (session->dph.dphHashTable.pDphNodeArray != NULL) { - cdf_mem_free(session->dph.dphHashTable.pDphNodeArray); + qdf_mem_free(session->dph.dphHashTable.pDphNodeArray); session->dph.dphHashTable.pDphNodeArray = NULL; } if (session->gpLimPeerIdxpool != NULL) { - cdf_mem_free(session->gpLimPeerIdxpool); + qdf_mem_free(session->gpLimPeerIdxpool); session->gpLimPeerIdxpool = NULL; } if (session->beacon != NULL) { - cdf_mem_free(session->beacon); + qdf_mem_free(session->beacon); session->beacon = NULL; session->bcnLen = 0; } if (session->assocReq != NULL) { - cdf_mem_free(session->assocReq); + qdf_mem_free(session->assocReq); session->assocReq = NULL; session->assocReqLen = 0; } if (session->assocRsp != NULL) { - cdf_mem_free(session->assocRsp); + qdf_mem_free(session->assocRsp); session->assocRsp = NULL; session->assocRspLen = 0; } @@ -620,58 +620,58 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) tmp_ptr = ((tpSirAssocReq) (session->parsedAssocReq[i])); if (tmp_ptr->assocReqFrame) { - cdf_mem_free(tmp_ptr->assocReqFrame); + qdf_mem_free(tmp_ptr->assocReqFrame); tmp_ptr->assocReqFrame = NULL; tmp_ptr->assocReqFrameLength = 0; } - cdf_mem_free(session->parsedAssocReq[i]); + qdf_mem_free(session->parsedAssocReq[i]); session->parsedAssocReq[i] = NULL; } /* Cleanup the whole block */ - cdf_mem_free(session->parsedAssocReq); + qdf_mem_free(session->parsedAssocReq); session->parsedAssocReq = NULL; } if (NULL != session->limAssocResponseData) { - cdf_mem_free(session->limAssocResponseData); + qdf_mem_free(session->limAssocResponseData); session->limAssocResponseData = NULL; } if (NULL != session->pLimMlmReassocRetryReq) { - cdf_mem_free(session->pLimMlmReassocRetryReq); + qdf_mem_free(session->pLimMlmReassocRetryReq); session->pLimMlmReassocRetryReq = NULL; } if (NULL != session->pLimMlmReassocReq) { - cdf_mem_free(session->pLimMlmReassocReq); + qdf_mem_free(session->pLimMlmReassocReq); session->pLimMlmReassocReq = NULL; } if (NULL != session->pSchProbeRspTemplate) { - cdf_mem_free(session->pSchProbeRspTemplate); + qdf_mem_free(session->pSchProbeRspTemplate); session->pSchProbeRspTemplate = NULL; } if (NULL != session->pSchBeaconFrameBegin) { - cdf_mem_free(session->pSchBeaconFrameBegin); + qdf_mem_free(session->pSchBeaconFrameBegin); session->pSchBeaconFrameBegin = NULL; } if (NULL != session->pSchBeaconFrameEnd) { - cdf_mem_free(session->pSchBeaconFrameEnd); + qdf_mem_free(session->pSchBeaconFrameEnd); session->pSchBeaconFrameEnd = NULL; } /* Must free the buffer before peSession invalid */ if (NULL != session->addIeParams.probeRespData_buff) { - cdf_mem_free(session->addIeParams.probeRespData_buff); + qdf_mem_free(session->addIeParams.probeRespData_buff); session->addIeParams.probeRespData_buff = NULL; session->addIeParams.probeRespDataLen = 0; } if (NULL != session->addIeParams.assocRespData_buff) { - cdf_mem_free(session->addIeParams.assocRespData_buff); + qdf_mem_free(session->addIeParams.assocRespData_buff); session->addIeParams.assocRespData_buff = NULL; session->addIeParams.assocRespDataLen = 0; } if (NULL != session->addIeParams.probeRespBCNData_buff) { - cdf_mem_free(session->addIeParams.probeRespBCNData_buff); + qdf_mem_free(session->addIeParams.probeRespBCNData_buff); session->addIeParams.probeRespBCNData_buff = NULL; session->addIeParams.probeRespBCNDataLen = 0; } diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c index 88c021efee9e..fc2686306209 100644 --- a/core/mac/src/pe/lim/lim_sme_req_utils.c +++ b/core/mac/src/pe/lim/lim_sme_req_utils.c @@ -543,7 +543,7 @@ uint8_t lim_is_sme_join_req_valid(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq) Reject Join Req if the Self Mac Address and the Ap's Mac Address is same */ - if (cdf_mem_compare((uint8_t *) pJoinReq->selfMacAddr, + if (!qdf_mem_cmp((uint8_t *) pJoinReq->selfMacAddr, (uint8_t *) pJoinReq->bssDescription.bssId, (uint8_t) (sizeof(tSirMacAddr)))) { /* Log the event */ diff --git a/core/mac/src/pe/lim/lim_timer_utils.c b/core/mac/src/pe/lim/lim_timer_utils.c index 185e6bbdb25e..92fa50434fca 100644 --- a/core/mac/src/pe/lim/lim_timer_utils.c +++ b/core/mac/src/pe/lim/lim_timer_utils.c @@ -300,7 +300,7 @@ uint32_t lim_create_timers(tpAniSirGlobal pMac) lim_log(pMac, LOGP, FL("could not retrieve mac preauth value")); pMac->lim.gLimPreAuthTimerTable.numEntry = cfgValue; pMac->lim.gLimPreAuthTimerTable.pTable = - cdf_mem_malloc(cfgValue * sizeof(tLimPreAuthNode)); + qdf_mem_malloc(cfgValue * sizeof(tLimPreAuthNode)); if (pMac->lim.gLimPreAuthTimerTable.pTable == NULL) { lim_log(pMac, LOGP, FL("AllocateMemory failed!")); @@ -427,7 +427,7 @@ err_timer: tx_timer_delete(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer); if (NULL != pMac->lim.gLimPreAuthTimerTable.pTable) { - cdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable); + qdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable); pMac->lim.gLimPreAuthTimerTable.pTable = NULL; } return TX_TIMER_ERROR; @@ -471,7 +471,8 @@ void lim_timer_handler(void *pMacGlobal, uint32_t param) msg.bodyptr = NULL; msg.bodyval = 0; - if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS) + statusCode = lim_post_msg_api(pMac, &msg); + if (statusCode != eSIR_SUCCESS) lim_log(pMac, LOGE, FL("posting message %X to LIM failed, reason=%d"), msg.type, statusCode); @@ -583,7 +584,7 @@ void lim_assoc_failure_timer_handler(void *mac_global, uint32_t param) FL("Reassoc request retry MAX(%d) reached"), LIM_MAX_REASSOC_RETRY_LIMIT); if (NULL != session->pLimMlmReassocRetryReq) { - cdf_mem_free(session->pLimMlmReassocRetryReq); + qdf_mem_free(session->pLimMlmReassocRetryReq); session->pLimMlmReassocRetryReq = NULL; } } @@ -1274,7 +1275,8 @@ void lim_send_disassoc_frame_threshold_handler(void *pMacGlobal, uint32_t param) msg.bodyval = 0; msg.bodyptr = NULL; - if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS) + statusCode = lim_post_msg_api(pMac, &msg); + if (statusCode != eSIR_SUCCESS) lim_log(pMac, LOGE, FL("posting to LIM failed, reason=%d"), statusCode); @@ -1308,7 +1310,8 @@ void lim_cnf_wait_tmer_handler(void *pMacGlobal, uint32_t param) msg.bodyval = (uint32_t) param; msg.bodyptr = NULL; - if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS) + statusCode = lim_post_msg_api(pMac, &msg); + if (statusCode != eSIR_SUCCESS) lim_log(pMac, LOGE, FL("posting to LIM failed, reason=%d"), statusCode); diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h index 40e91cf1eceb..ed6e61c64ef6 100644 --- a/core/mac/src/pe/lim/lim_types.h +++ b/core/mac/src/pe/lim/lim_types.h @@ -114,11 +114,11 @@ #define LIM_MIN_MEM_ASSOC 4 /* / Verifies whether given mac addr matches the CURRENT Bssid */ -#define IS_CURRENT_BSSID(pMac, addr, psessionEntry) (cdf_mem_compare(addr, \ +#define IS_CURRENT_BSSID(pMac, addr, psessionEntry) (!qdf_mem_cmp(addr, \ psessionEntry->bssId, \ sizeof(psessionEntry->bssId))) /* / Verifies whether given addr matches the REASSOC Bssid */ -#define IS_REASSOC_BSSID(pMac, addr, psessionEntry) (cdf_mem_compare(addr, \ +#define IS_REASSOC_BSSID(pMac, addr, psessionEntry) (!qdf_mem_cmp(addr, \ psessionEntry->limReAssocbssId, \ sizeof(psessionEntry->limReAssocbssId))) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 2e71821d0baf..d25964681a97 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -78,7 +78,7 @@ void lim_delete_dialogue_token_list(tpAniSirGlobal pMac) pCurrNode = pMac->lim.pDialogueTokenHead; pMac->lim.pDialogueTokenHead = pMac->lim.pDialogueTokenHead->next; - cdf_mem_free(pCurrNode); + qdf_mem_free(pCurrNode); pCurrNode = NULL; } pMac->lim.pDialogueTokenTail = NULL; @@ -956,7 +956,7 @@ uint8_t lim_write_deferred_msg_q(tpAniSirGlobal mac_ctx, tpSirMsgQ lim_msg) mac_ctx->lim.gLimDeferredMsgQ.write = 0; /* save the message to the queue and advanced the write pointer */ - cdf_mem_copy((uint8_t *) &mac_ctx->lim.gLimDeferredMsgQ. + qdf_mem_copy((uint8_t *) &mac_ctx->lim.gLimDeferredMsgQ. deferredQueue[mac_ctx->lim.gLimDeferredMsgQ.write++], (uint8_t *) lim_msg, sizeof(tSirMsgQ)); return TX_SUCCESS; @@ -1066,7 +1066,7 @@ void lim_handle_update_olbc_cache(tpAniSirGlobal mac_ctx) return; } - cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); + qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0); beaconParams.bssIdx = psessionEntry->bssIdx; beaconParams.paramChangeBitmap = 0; @@ -1212,7 +1212,7 @@ lim_update_prot_sta_params(tpAniSirGlobal pMac, LOG1); ) - if (cdf_mem_compare + if (!qdf_mem_cmp (psessionEntry->protStaCache[i].addr, peerMacAddr, sizeof(tSirMacAddr))) { PELOG1(lim_log @@ -1236,7 +1236,7 @@ lim_update_prot_sta_params(tpAniSirGlobal pMac, return; } - cdf_mem_copy(psessionEntry->protStaCache[i].addr, + qdf_mem_copy(psessionEntry->protStaCache[i].addr, peerMacAddr, sizeof(tSirMacAddr)); psessionEntry->protStaCache[i].protStaCacheType = protStaCacheType; @@ -1456,7 +1456,7 @@ lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, if (LIM_IS_AP_ROLE(psession_entry) && (psession_entry->gLimNoShortParams. staNoShortCache[i].active) && - (cdf_mem_compare + (!qdf_mem_cmp (psession_entry->gLimNoShortParams. staNoShortCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)))) @@ -1464,7 +1464,7 @@ lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, else if (!LIM_IS_AP_ROLE(psession_entry) && (mac_ctx->lim.gLimNoShortParams. staNoShortCache[i].active) && - (cdf_mem_compare(mac_ctx->lim.gLimNoShortParams. + (!qdf_mem_cmp(mac_ctx->lim.gLimNoShortParams. staNoShortCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)))) @@ -1503,14 +1503,14 @@ lim_update_short_preamble(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, } if (LIM_IS_AP_ROLE(psession_entry)) { - cdf_mem_copy(psession_entry->gLimNoShortParams. + qdf_mem_copy(psession_entry->gLimNoShortParams. staNoShortCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)); psession_entry->gLimNoShortParams.staNoShortCache[i]. active = true; psession_entry->gLimNoShortParams.numNonShortPreambleSta++; } else { - cdf_mem_copy(mac_ctx->lim.gLimNoShortParams. + qdf_mem_copy(mac_ctx->lim.gLimNoShortParams. staNoShortCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)); mac_ctx->lim.gLimNoShortParams.staNoShortCache[i].active = true; @@ -1573,7 +1573,7 @@ lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, if (LIM_IS_AP_ROLE(session_entry) && session_entry->gLimNoShortSlotParams. staNoShortSlotCache[i].active) { - if (cdf_mem_compare( + if (!qdf_mem_cmp( session_entry->gLimNoShortSlotParams. staNoShortSlotCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr))) @@ -1581,7 +1581,7 @@ lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, } else if (!LIM_IS_AP_ROLE(session_entry)) { if (mac_ctx->lim.gLimNoShortSlotParams. staNoShortSlotCache[i].active) { - if (cdf_mem_compare(mac_ctx->lim. + if (!qdf_mem_cmp(mac_ctx->lim. gLimNoShortSlotParams. staNoShortSlotCache[i]. addr, peer_mac_addr, @@ -1625,7 +1625,7 @@ lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, } if (LIM_IS_AP_ROLE(session_entry)) { - cdf_mem_copy(session_entry->gLimNoShortSlotParams. + qdf_mem_copy(session_entry->gLimNoShortSlotParams. staNoShortSlotCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)); session_entry->gLimNoShortSlotParams. @@ -1633,7 +1633,7 @@ lim_update_short_slot_time(tpAniSirGlobal mac_ctx, tSirMacAddr peer_mac_addr, session_entry->gLimNoShortSlotParams. numNonShortSlotSta++; } else { - cdf_mem_copy(mac_ctx->lim.gLimNoShortSlotParams. + qdf_mem_copy(mac_ctx->lim.gLimNoShortSlotParams. staNoShortSlotCache[i].addr, peer_mac_addr, sizeof(tSirMacAddr)); mac_ctx->lim.gLimNoShortSlotParams. @@ -2671,7 +2671,7 @@ void lim_switch_channel_cback(tpAniSirGlobal pMac, QDF_STATUS status, } mmhMsg.type = eWNI_SME_SWITCH_CHL_IND; - pSirSmeSwitchChInd = cdf_mem_malloc(sizeof(tSirSmeSwitchChannelInd)); + pSirSmeSwitchChInd = qdf_mem_malloc(sizeof(tSirSmeSwitchChannelInd)); if (NULL == pSirSmeSwitchChInd) { lim_log(pMac, LOGP, FL("Failed to allocate buffer for buffer descriptor")); @@ -2683,7 +2683,7 @@ void lim_switch_channel_cback(tpAniSirGlobal pMac, QDF_STATUS status, pSirSmeSwitchChInd->newChannelId = psessionEntry->gLimChannelSwitch.primaryChannel; pSirSmeSwitchChInd->sessionId = psessionEntry->smeSessionId; - cdf_mem_copy(pSirSmeSwitchChInd->bssid.bytes, psessionEntry->bssId, + qdf_mem_copy(pSirSmeSwitchChInd->bssid.bytes, psessionEntry->bssId, QDF_MAC_ADDR_SIZE); mmhMsg.bodyptr = pSirSmeSwitchChInd; mmhMsg.bodyval = 0; @@ -5139,14 +5139,14 @@ tSirRetStatus lim_process_hal_ind_messages(tpAniSirGlobal pMac, uint32_t msgId, break; default: - cdf_mem_free(msgParam); + qdf_mem_free(msgParam); lim_log(pMac, LOGP, FL("invalid message id = %d received"), msgId); return eSIR_FAILURE; } if (lim_post_msg_api(pMac, &msg) != eSIR_SUCCESS) { - cdf_mem_free(msgParam); + qdf_mem_free(msgParam); lim_log(pMac, LOGP, FL("lim_post_msg_api failed for msgid = %d"), msg.type); return eSIR_FAILURE; @@ -5302,7 +5302,7 @@ void lim_register_hal_ind_call_back(tpAniSirGlobal pMac) tSirMsgQ msg; tpHalIndCB pHalCB; - pHalCB = cdf_mem_malloc(sizeof(tHalIndCB)); + pHalCB = qdf_mem_malloc(sizeof(tHalIndCB)); if (NULL == pHalCB) { lim_log(pMac, LOGP, FL("AllocateMemory() failed")); return; @@ -5316,7 +5316,7 @@ void lim_register_hal_ind_call_back(tpAniSirGlobal pMac) MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msg.type)); if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msg)) { - cdf_mem_free(pHalCB); + qdf_mem_free(pHalCB); lim_log(pMac, LOGP, FL("wma_post_ctrl_msg() failed")); } @@ -5351,7 +5351,7 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg) if (psessionEntry == NULL) { lim_log(pMac, LOGE, FL("session does not exist for given BssId")); - cdf_mem_free(limMsg->bodyptr); + qdf_mem_free(limMsg->bodyptr); limMsg->bodyptr = NULL; return; } @@ -5376,19 +5376,19 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg) goto error1; } - pDelTsReq = cdf_mem_malloc(sizeof(tSirDeltsReq)); + pDelTsReq = qdf_mem_malloc(sizeof(tSirDeltsReq)); if (NULL == pDelTsReq) { PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));) goto error1; } - cdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0); + qdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0); if (pSta->wmeEnabled) - cdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec), + qdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec), sizeof(tSirMacTspecIE)); else - cdf_mem_copy(&(pDelTsReq->req.tsinfo), + qdf_mem_copy(&(pDelTsReq->req.tsinfo), &(pTspecInfo->tspec.tsinfo), sizeof(tSirMacTSInfo)); @@ -5409,29 +5409,29 @@ void lim_process_del_ts_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg) &pDelTsReq->req.tspec, psessionEntry); /* prepare and send an sme indication to HDD */ - pDelTsReqInfo = cdf_mem_malloc(sizeof(tSirDeltsReqInfo)); + pDelTsReqInfo = qdf_mem_malloc(sizeof(tSirDeltsReqInfo)); if (NULL == pDelTsReqInfo) { PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));) goto error3; } - cdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0); + qdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0); if (pSta->wmeEnabled) - cdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec), + qdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec), sizeof(tSirMacTspecIE)); else - cdf_mem_copy(&(pDelTsReqInfo->tsinfo), + qdf_mem_copy(&(pDelTsReqInfo->tsinfo), &(pTspecInfo->tspec.tsinfo), sizeof(tSirMacTSInfo)); lim_send_sme_delts_ind(pMac, pDelTsReqInfo, pDelTsReq->aid, psessionEntry); error3: - cdf_mem_free(pDelTsReqInfo); + qdf_mem_free(pDelTsReqInfo); error2: - cdf_mem_free(pDelTsReq); + qdf_mem_free(pDelTsReq); error1: - cdf_mem_free(limMsg->bodyptr); + qdf_mem_free(limMsg->bodyptr); limMsg->bodyptr = NULL; return; } @@ -5466,7 +5466,7 @@ lim_post_sm_state_update(tpAniSirGlobal pMac, msgQ.type = WMA_SET_MIMOPS_REQ; /* Allocate for WMA_SET_MIMOPS_REQ */ - pMIMO_PSParams = cdf_mem_malloc(sizeof(tSetMIMOPS)); + pMIMO_PSParams = qdf_mem_malloc(sizeof(tSetMIMOPS)); if (NULL == pMIMO_PSParams) { lim_log(pMac, LOGP, FL(" AllocateMemory failed")); return eSIR_MEM_ALLOC_FAILED; @@ -5476,7 +5476,7 @@ lim_post_sm_state_update(tpAniSirGlobal pMac, pMIMO_PSParams->staIdx = staIdx; pMIMO_PSParams->fsendRsp = true; pMIMO_PSParams->sessionId = sessionId; - cdf_mem_copy(pMIMO_PSParams->peerMac, pPeerStaMac, sizeof(tSirMacAddr)); + qdf_mem_copy(pMIMO_PSParams->peerMac, pPeerStaMac, sizeof(tSirMacAddr)); msgQ.bodyptr = pMIMO_PSParams; msgQ.bodyval = 0; @@ -5490,7 +5490,7 @@ lim_post_sm_state_update(tpAniSirGlobal pMac, FL ("Posting WMA_SET_MIMOPS_REQ to HAL failed! Reason = %d"), retCode); - cdf_mem_free(pMIMO_PSParams); + qdf_mem_free(pMIMO_PSParams); return retCode; } @@ -5536,7 +5536,7 @@ lim_get_b_dfrom_rx_packet(tpAniSirGlobal pMac, void *body, uint32_t **pRxPacketI void lim_resset_scan_channel_info(tpAniSirGlobal pMac) { - cdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0); + qdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0); } /** @@ -5663,16 +5663,16 @@ void lim_frame_transmission_control(tpAniSirGlobal pMac, tLimQuietTxMode type, * Make it to align to 4 byte boundary */ nBytes = (uint8_t) HALMSG_NUMBYTES_STATION_BITMAP(pMac->lim.maxStation); - pTxCtrlMsg = cdf_mem_malloc(sizeof(*pTxCtrlMsg) + nBytes); + pTxCtrlMsg = qdf_mem_malloc(sizeof(*pTxCtrlMsg) + nBytes); if (NULL == pTxCtrlMsg) { lim_log(pMac, LOGP, FL("AllocateMemory() failed")); return; } - cdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0); + qdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0); status = __lim_fill_tx_control_params(pMac, pTxCtrlMsg, type, mode); if (status != QDF_STATUS_SUCCESS) { - cdf_mem_free(pTxCtrlMsg); + qdf_mem_free(pTxCtrlMsg); lim_log(pMac, LOGP, FL("__lim_fill_tx_control_params failed, status = %d"), status); @@ -5686,7 +5686,7 @@ void lim_frame_transmission_control(tpAniSirGlobal pMac, tLimQuietTxMode type, MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type)); if (wma_post_ctrl_msg(pMac, &msgQ) != eSIR_SUCCESS) { - cdf_mem_free(pTxCtrlMsg); + qdf_mem_free(pTxCtrlMsg); lim_log(pMac, LOGP, FL("Posting Message to HAL failed")); return; } @@ -6030,7 +6030,7 @@ void lim_process_add_sta_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ) if (psessionEntry == NULL) { lim_log(pMac, LOGP, FL("Session Does not exist for given sessionID")); - cdf_mem_free(pAddStaParams); + qdf_mem_free(pAddStaParams); return; } psessionEntry->csaOffloadEnable = pAddStaParams->csaOffloadEnable; @@ -6200,7 +6200,7 @@ void lim_handle_defer_msg_error(tpAniSirGlobal pMac, tpSirMsgQ pLimMsg) cds_pkt_return_packet((cds_pkt_t *) pLimMsg->bodyptr); pLimMsg->bodyptr = NULL; } else if (pLimMsg->bodyptr != NULL) { - cdf_mem_free(pLimMsg->bodyptr); + qdf_mem_free(pLimMsg->bodyptr); pLimMsg->bodyptr = NULL; } @@ -6224,15 +6224,15 @@ void lim_diag_event_report(tpAniSirGlobal pMac, uint16_t eventType, tSirMacAddr nullBssid = { 0, 0, 0, 0, 0, 0 }; WLAN_HOST_DIAG_EVENT_DEF(peEvent, host_event_wlan_pe_payload_type); - cdf_mem_set(&peEvent, sizeof(host_event_wlan_pe_payload_type), 0); + qdf_mem_set(&peEvent, sizeof(host_event_wlan_pe_payload_type), 0); if (NULL == pSessionEntry) { - cdf_mem_copy(peEvent.bssid, nullBssid, sizeof(tSirMacAddr)); + qdf_mem_copy(peEvent.bssid, nullBssid, sizeof(tSirMacAddr)); peEvent.sme_state = (uint16_t) pMac->lim.gLimSmeState; peEvent.mlm_state = (uint16_t) pMac->lim.gLimMlmState; } else { - cdf_mem_copy(peEvent.bssid, pSessionEntry->bssId, + qdf_mem_copy(peEvent.bssid, pSessionEntry->bssId, sizeof(tSirMacAddr)); peEvent.sme_state = (uint16_t) pSessionEntry->limSmeState; peEvent.mlm_state = (uint16_t) pSessionEntry->limMlmState; @@ -6291,8 +6291,8 @@ uint8_t lim_build_p2p_ie(tpAniSirGlobal pMac, uint8_t *ie, uint8_t *data, ptr[length++] = SIR_MAC_EID_VENDOR; ptr[length++] = ie_len + SIR_MAC_P2P_OUI_SIZE; - cdf_mem_copy(&ptr[length], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE); - cdf_mem_copy(&ptr[length + SIR_MAC_P2P_OUI_SIZE], data, ie_len); + qdf_mem_copy(&ptr[length], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE); + qdf_mem_copy(&ptr[length + SIR_MAC_P2P_OUI_SIZE], data, ie_len); return ie_len + SIR_P2P_IE_HEADER_LEN; } @@ -6306,14 +6306,14 @@ uint8_t lim_get_noa_attr_stream_in_mult_p2p_ies(tpAniSirGlobal pMac, if ((noaLen <= (SIR_MAX_NOA_ATTR_LEN + SIR_P2P_IE_HEADER_LEN)) && (noaLen >= overFlowLen) && (overFlowLen <= SIR_MAX_NOA_ATTR_LEN)) { - cdf_mem_copy(overFlowP2pStream, + qdf_mem_copy(overFlowP2pStream, noaStream + noaLen - overFlowLen, overFlowLen); noaStream[noaLen - overFlowLen] = SIR_MAC_EID_VENDOR; noaStream[noaLen - overFlowLen + 1] = overFlowLen + SIR_MAC_P2P_OUI_SIZE; - cdf_mem_copy(noaStream + noaLen - overFlowLen + 2, + qdf_mem_copy(noaStream + noaLen - overFlowLen + 2, SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE); - cdf_mem_copy(noaStream + noaLen + 2 + SIR_MAC_P2P_OUI_SIZE - + qdf_mem_copy(noaStream + noaLen + 2 + SIR_MAC_P2P_OUI_SIZE - overFlowLen, overFlowP2pStream, overFlowLen); } @@ -6519,7 +6519,7 @@ bool lim_check_vht_op_mode_change(tpAniSirGlobal pMac, tpPESession psessionEntry tempParam.opMode = chanWidth; tempParam.staId = staId; tempParam.smesessionId = psessionEntry->smeSessionId; - cdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr)); + qdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr)); lim_send_mode_update(pMac, &tempParam, psessionEntry); @@ -6534,7 +6534,7 @@ bool lim_set_nss_change(tpAniSirGlobal pMac, tpPESession psessionEntry, tempParam.rxNss = rxNss; tempParam.staId = staId; tempParam.smesessionId = psessionEntry->smeSessionId; - cdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr)); + qdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr)); lim_send_rx_nss_update(pMac, &tempParam, psessionEntry); @@ -6552,7 +6552,7 @@ bool lim_check_membership_user_position(tpAniSirGlobal pMac, tempParamMembership.membership = membership; tempParamMembership.staId = staId; tempParamMembership.smesessionId = psessionEntry->smeSessionId; - cdf_mem_copy(tempParamMembership.peer_mac, psessionEntry->bssId, + qdf_mem_copy(tempParamMembership.peer_mac, psessionEntry->bssId, sizeof(tSirMacAddr)); lim_set_membership(pMac, &tempParamMembership, psessionEntry); @@ -6560,7 +6560,7 @@ bool lim_check_membership_user_position(tpAniSirGlobal pMac, tempParamUserPosition.userPos = userPosition; tempParamUserPosition.staId = staId; tempParamUserPosition.smesessionId = psessionEntry->smeSessionId; - cdf_mem_copy(tempParamUserPosition.peer_mac, psessionEntry->bssId, + qdf_mem_copy(tempParamUserPosition.peer_mac, psessionEntry->bssId, sizeof(tSirMacAddr)); lim_set_user_pos(pMac, &tempParamUserPosition, psessionEntry); @@ -6690,7 +6690,7 @@ void lim_set_ht_caps(tpAniSirGlobal p_mac, tpPESession p_session_entry, p_ht_cap->lsigTXOPProtection = dot11_ht_cap.lsigTXOPProtection; p_ht_cap->maxRxAMPDUFactor = dot11_ht_cap.maxRxAMPDUFactor; p_ht_cap->mpduDensity = dot11_ht_cap.mpduDensity; - cdf_mem_copy((void *)p_ht_cap->supportedMCSSet, + qdf_mem_copy((void *)p_ht_cap->supportedMCSSet, (void *)(dot11_ht_cap.supportedMCSSet), sizeof(p_ht_cap->supportedMCSSet)); p_ht_cap->pco = dot11_ht_cap.pco; @@ -6821,7 +6821,7 @@ bool lim_validate_received_frame_a1_addr(tpAniSirGlobal mac_ctx, /* just for fail safe, don't handle MC/BC a1 in this routine */ return true; } - if (!cdf_mem_compare(a1, session->selfMacAddr, 6)) { + if (qdf_mem_cmp(a1, session->selfMacAddr, 6)) { lim_log(mac_ctx, LOGE, FL("Invalid A1 address in received frame")); return false; @@ -6842,13 +6842,13 @@ bool lim_validate_received_frame_a1_addr(tpAniSirGlobal mac_ctx, void lim_check_and_reset_protection_params(tpAniSirGlobal mac_ctx) { if (!pe_get_active_session_count(mac_ctx)) { - cdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams, sizeof(mac_ctx->lim.gLimOverlap11gParams)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams, sizeof(mac_ctx->lim.gLimOverlap11aParams)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params, + qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params, sizeof(mac_ctx->lim.gLimOverlapHt20Params)); - cdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams, + qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams, sizeof(mac_ctx->lim.gLimOverlapNonGfParams)); mac_ctx->lim.gHTOperMode = eSIR_HT_OP_MODE_PURE; @@ -6932,7 +6932,7 @@ QDF_STATUS lim_send_ext_cap_ie(tpAniSirGlobal mac_ctx, } /* Allocate memory for the WMI request, and copy the parameter */ - vdev_ie = cdf_mem_malloc(sizeof(*vdev_ie) + num_bytes); + vdev_ie = qdf_mem_malloc(sizeof(*vdev_ie) + num_bytes); if (!vdev_ie) { lim_log(mac_ctx, LOGE, FL("Failed to allocate memory")); return QDF_STATUS_E_NOMEM; @@ -6949,7 +6949,7 @@ QDF_STATUS lim_send_ext_cap_ie(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOG1, FL("%d byte is %02x"), i+1, *temp); vdev_ie->data = (uint8_t *)vdev_ie + sizeof(*vdev_ie); - cdf_mem_copy(vdev_ie->data, ext_cap_data.bytes, num_bytes); + qdf_mem_copy(vdev_ie->data, ext_cap_data.bytes, num_bytes); msg.type = WMA_SET_IE_INFO; msg.bodyptr = vdev_ie; @@ -6959,7 +6959,7 @@ QDF_STATUS lim_send_ext_cap_ie(tpAniSirGlobal mac_ctx, cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { lim_log(mac_ctx, LOGE, FL("Not able to post WMA_SET_IE_INFO to WDA")); - cdf_mem_free(vdev_ie); + qdf_mem_free(vdev_ie); return QDF_STATUS_E_FAILURE; } @@ -6992,7 +6992,7 @@ tSirRetStatus lim_strip_extcap_ie(tpAniSirGlobal mac_ctx, return eSIR_IGNORE_IE; } - tempbuf = cdf_mem_malloc(left); + tempbuf = qdf_mem_malloc(left); if (NULL == tempbuf) { lim_log(mac_ctx, LOGE, FL("Unable to allocate memory")); return eSIR_MEM_ALLOC_FAILED; @@ -7006,28 +7006,28 @@ tSirRetStatus lim_strip_extcap_ie(tpAniSirGlobal mac_ctx, lim_log(mac_ctx, LOGE, FL("Invalid IEs eid = %d elem_len=%d left=%d"), elem_id, elem_len, left); - cdf_mem_free(tempbuf); + qdf_mem_free(tempbuf); return eSIR_FAILURE; } if (!(DOT11F_EID_EXTCAP == elem_id)) { - cdf_mem_copy(tempbuf + templen, &ptr[0], elem_len + 2); + qdf_mem_copy(tempbuf + templen, &ptr[0], elem_len + 2); templen += (elem_len + 2); } else { if (NULL != extracted_ie) { - cdf_mem_set(extracted_ie, + qdf_mem_set(extracted_ie, DOT11F_IE_EXTCAP_MAX_LEN + 2, 0); if (elem_len <= DOT11F_IE_EXTCAP_MAX_LEN) - cdf_mem_copy(extracted_ie, &ptr[0], + qdf_mem_copy(extracted_ie, &ptr[0], elem_len + 2); } } left -= elem_len; ptr += (elem_len + 2); } - cdf_mem_copy(addn_ie, tempbuf, templen); + qdf_mem_copy(addn_ie, tempbuf, templen); *addn_ielen = templen; - cdf_mem_free(tempbuf); + qdf_mem_free(tempbuf); return eSIR_SUCCESS; } @@ -7064,8 +7064,8 @@ void lim_update_extcap_struct(tpAniSirGlobal mac_ctx, return; } - cdf_mem_set((uint8_t *)&out[0], DOT11F_IE_EXTCAP_MAX_LEN, 0); - cdf_mem_copy(&out[0], &buf[2], DOT11F_IE_EXTCAP_MAX_LEN); + qdf_mem_set((uint8_t *)&out[0], DOT11F_IE_EXTCAP_MAX_LEN, 0); + qdf_mem_copy(&out[0], &buf[2], DOT11F_IE_EXTCAP_MAX_LEN); if (DOT11F_PARSE_SUCCESS != dot11f_unpack_ie_ext_cap(mac_ctx, &out[0], DOT11F_IE_EXTCAP_MAX_LEN, dst)) @@ -7091,7 +7091,7 @@ tSirRetStatus lim_strip_extcap_update_struct(tpAniSirGlobal mac_ctx, uint8_t extracted_buff[DOT11F_IE_EXTCAP_MAX_LEN + 2]; tSirRetStatus status; - cdf_mem_set((uint8_t *)&extracted_buff[0], DOT11F_IE_EXTCAP_MAX_LEN + 2, + qdf_mem_set((uint8_t *)&extracted_buff[0], DOT11F_IE_EXTCAP_MAX_LEN + 2, 0); status = lim_strip_extcap_ie(mac_ctx, addn_ie, addn_ielen, extracted_buff); diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c index 05af857782c0..ecad9b163cfd 100644 --- a/core/mac/src/pe/rrm/rrm_api.c +++ b/core/mac/src/pe/rrm/rrm_api.c @@ -156,7 +156,7 @@ rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, PELOGE(lim_log(pMac, LOGE, FL("Invalid parameters"));) return eSIR_FAILURE; } - pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams)); + pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams)); if (NULL == pMaxTxParams) { lim_log(pMac, LOGP, FL("Unable to allocate memory for pMaxTxParams ")); @@ -165,9 +165,9 @@ rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, } /* Allocated memory for pMaxTxParams...will be freed in other module */ pMaxTxParams->power = txPower; - cdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId, + qdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes, + qdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes, pSessionEntry->selfMacAddr, QDF_MAC_ADDR_SIZE); @@ -187,7 +187,7 @@ rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, FL ("Posting WMA_SET_MAX_TX_POWER_REQ to HAL failed, reason=%X"), retCode); - cdf_mem_free(pMaxTxParams); + qdf_mem_free(pMaxTxParams); return retCode; } return retCode; @@ -239,7 +239,7 @@ tSirRetStatus rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ) } } - cdf_mem_free(limMsgQ->bodyptr); + qdf_mem_free(limMsgQ->bodyptr); limMsgQ->bodyptr = NULL; return retCode; } @@ -381,19 +381,19 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac, (pNeighborRep->num_NeighborReport - 1)); /* Prepare the request to send to SME. */ - pSmeNeighborRpt = cdf_mem_malloc(length); + pSmeNeighborRpt = qdf_mem_malloc(length); if (NULL == pSmeNeighborRpt) { PELOGE(lim_log(pMac, LOGP, FL("Unable to allocate memory"));) return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(pSmeNeighborRpt, length, 0); + qdf_mem_set(pSmeNeighborRpt, length, 0); /* Allocated memory for pSmeNeighborRpt...will be freed by other module */ for (i = 0; i < pNeighborRep->num_NeighborReport; i++) { pSmeNeighborRpt->sNeighborBssDescription[i].length = sizeof(tSirNeighborBssDescription); /*+ any optional ies */ - cdf_mem_copy(pSmeNeighborRpt->sNeighborBssDescription[i].bssId, + qdf_mem_copy(pSmeNeighborRpt->sNeighborBssDescription[i].bssId, pNeighborRep->NeighborReport[i].bssid, sizeof(tSirMacAddr)); pSmeNeighborRpt->sNeighborBssDescription[i].bssidInfo.rrmInfo. @@ -436,7 +436,7 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac, pSmeNeighborRpt->length = length; pSmeNeighborRpt->sessionId = pSessionEntry->smeSessionId; pSmeNeighborRpt->numNeighborReports = pNeighborRep->num_NeighborReport; - cdf_mem_copy(pSmeNeighborRpt->bssId, pSessionEntry->bssId, + qdf_mem_copy(pSmeNeighborRpt->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr)); /* Send request to SME. */ @@ -489,12 +489,12 @@ rrm_process_neighbor_report_req(tpAniSirGlobal pMac, lim_log(pMac, LOG1, FL("SSID present = %d "), pNeighborReq->noSSID); - cdf_mem_set(&NeighborReportReq, sizeof(tSirMacNeighborReportReq), 0); + qdf_mem_set(&NeighborReportReq, sizeof(tSirMacNeighborReportReq), 0); NeighborReportReq.dialogToken = ++pMac->rrm.rrmPEContext.DialogToken; NeighborReportReq.ssid_present = !pNeighborReq->noSSID; if (NeighborReportReq.ssid_present) { - cdf_mem_copy(&NeighborReportReq.ssid, &pNeighborReq->ucSSID, + qdf_mem_copy(&NeighborReportReq.ssid, &pNeighborReq->ucSSID, sizeof(tSirMacSSid)); PELOGE(sir_dump_buf (pMac, SIR_LIM_MODULE_ID, LOGE, @@ -601,7 +601,7 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, if (pBeaconReq->measurement_request.Beacon.RequestedInfo.present) { pCurrentReq->request.Beacon.reqIes.pElementIds = - cdf_mem_malloc(sizeof(uint8_t) * + qdf_mem_malloc(sizeof(uint8_t) * pBeaconReq->measurement_request.Beacon. RequestedInfo.num_requested_eids); if (NULL == pCurrentReq->request.Beacon.reqIes.pElementIds) { @@ -615,7 +615,7 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, pCurrentReq->request.Beacon.reqIes.num = pBeaconReq->measurement_request.Beacon.RequestedInfo. num_requested_eids; - cdf_mem_copy(pCurrentReq->request.Beacon.reqIes.pElementIds, + qdf_mem_copy(pCurrentReq->request.Beacon.reqIes.pElementIds, pBeaconReq->measurement_request.Beacon. RequestedInfo.requested_eids, pCurrentReq->request.Beacon.reqIes.num); @@ -631,7 +631,7 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, APChannelReport[num_APChanReport].num_channelList; } /* Prepare the request to send to SME. */ - pSmeBcnReportReq = cdf_mem_malloc(sizeof(tSirBeaconReportReqInd)); + pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd)); if (NULL == pSmeBcnReportReq) { lim_log(pMac, LOGP, FL @@ -641,10 +641,10 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, } - cdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0); + qdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0); /* Allocated memory for pSmeBcnReportReq....will be freed by other modulea */ - cdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId, + qdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr)); pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND; pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd); @@ -659,14 +659,14 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, pSmeBcnReportReq->measurementDuration[0] = SYS_TU_TO_MS(measDuration); pSmeBcnReportReq->fMeasurementtype[0] = pBeaconReq->measurement_request.Beacon.meas_mode; - cdf_mem_copy(pSmeBcnReportReq->macaddrBssid, + qdf_mem_copy(pSmeBcnReportReq->macaddrBssid, pBeaconReq->measurement_request.Beacon.BSSID, sizeof(tSirMacAddr)); if (pBeaconReq->measurement_request.Beacon.SSID.present) { pSmeBcnReportReq->ssId.length = pBeaconReq->measurement_request.Beacon.SSID.num_ssid; - cdf_mem_copy(pSmeBcnReportReq->ssId.ssId, + qdf_mem_copy(pSmeBcnReportReq->ssId.ssId, pBeaconReq->measurement_request.Beacon.SSID.ssid, pSmeBcnReportReq->ssId.length); } @@ -681,7 +681,7 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac, num_APChanReport < pBeaconReq->measurement_request.Beacon.num_APChannelReport; num_APChanReport++) { - cdf_mem_copy(pChanList, + qdf_mem_copy(pChanList, pBeaconReq->measurement_request.Beacon. APChannelReport[num_APChanReport]. channelList, @@ -766,7 +766,7 @@ rrm_fill_beacon_ies(tpAniSirGlobal pMac, lim_log(pMac, LOG3, "Adding Eid %d, len=%d", *pBcnIes, len); - cdf_mem_copy(pIes, pBcnIes, len); + qdf_mem_copy(pIes, pBcnIes, len); pIes += len; *pNumIes += len; count++; @@ -839,7 +839,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal pMac, return eSIR_FAILURE; } - pReport = cdf_mem_malloc(pBcnReport->numBssDesc * + pReport = qdf_mem_malloc(pBcnReport->numBssDesc * sizeof(tSirMacRadioMeasureReport)); if (NULL == pReport) { @@ -850,7 +850,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal pMac, return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_zero(pReport, + qdf_mem_zero(pReport, pBcnReport->numBssDesc * sizeof(tSirMacRadioMeasureReport)); @@ -879,7 +879,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal pMac, pBcnReport-> pBssDescription[bssDescCnt]-> channelId; - cdf_mem_copy(pReport[bssDescCnt].report. + qdf_mem_copy(pReport[bssDescCnt].report. beaconReport.measStartTime, pBcnReport-> pBssDescription @@ -913,7 +913,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal pMac, pBcnReport-> pBssDescription[bssDescCnt]-> parentTSF; - cdf_mem_copy(pReport[bssDescCnt].report. + qdf_mem_copy(pReport[bssDescCnt].report. beaconReport.bssid, pBcnReport-> pBssDescription @@ -1009,7 +1009,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal pMac, } if (NULL != pReport) - cdf_mem_free(pReport); + qdf_mem_free(pReport); return status; } @@ -1021,14 +1021,14 @@ void rrm_process_beacon_request_failure(tpAniSirGlobal pMac, tpSirMacRadioMeasureReport pReport = NULL; tpRRMReq pCurrentReq = pMac->rrm.rrmPEContext.pCurrentReq; - pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); + pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); if (NULL == pReport) { lim_log(pMac, LOGP, FL ("Unable to allocate memory during RRM Req processing")); return; } - cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); + qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); pReport->token = pCurrentReq->token; pReport->type = SIR_MAC_RRM_BEACON_TYPE; @@ -1045,14 +1045,14 @@ void rrm_process_beacon_request_failure(tpAniSirGlobal pMac, (" Beacon request processing failed no report sent with status %d "), status); ); - cdf_mem_free(pReport); + qdf_mem_free(pReport); return; } lim_send_radio_measure_report_action_frame(pMac, pCurrentReq->dialog_token, 1, pReport, peer, pSessionEntry); - cdf_mem_free(pReport); + qdf_mem_free(pReport); lim_log(pMac, LOG3, FL(" Free memory for pReport")); return; } @@ -1091,14 +1091,14 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, if (!pRRMReq->num_MeasurementRequest) { /* No measurement requests.... */ /* */ - pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); + pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); if (NULL == pReport) { lim_log(pMac, LOGP, FL ("Unable to allocate memory during RRM Req processing")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); + qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); PELOGE(lim_log(pMac, LOGE, FL ("No requestIes in the measurement request, sending incapable report")); @@ -1109,7 +1109,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, pRRMReq->DialogToken.token, num_report, pReport, peer, pSessionEntry); - cdf_mem_free(pReport); + qdf_mem_free(pReport); return eSIR_FAILURE; } /* PF Fix */ @@ -1119,14 +1119,14 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, pRRMReq->NumOfRepetitions.repetitions); /* Send a report with incapable bit set. Not supporting repetitions. */ - pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); + pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport)); if (NULL == pReport) { lim_log(pMac, LOGP, FL ("Unable to allocate memory during RRM Req processing")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); + qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0); PELOGE(lim_log(pMac, LOGE, FL(" Allocated memory for pReport"));) pReport->incapable = 1; pReport->type = pRRMReq->MeasurementRequest[0].measurement_type; @@ -1142,7 +1142,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, if (pCurrentReq) { if (pReport == NULL) { /* Allocate memory to send reports for any subsequent requests. */ pReport = - cdf_mem_malloc(sizeof + qdf_mem_malloc(sizeof (tSirMacRadioMeasureReport) * (pRRMReq-> @@ -1154,7 +1154,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, ("Unable to allocate memory during RRM Req processing")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(pReport, + qdf_mem_set(pReport, sizeof (tSirMacRadioMeasureReport) * @@ -1177,17 +1177,17 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, continue; } else { pCurrentReq = - cdf_mem_malloc(sizeof(*pCurrentReq)); + qdf_mem_malloc(sizeof(*pCurrentReq)); if (NULL == pCurrentReq) { lim_log(pMac, LOGP, FL ("Unable to allocate memory during RRM Req processing")); - cdf_mem_free(pReport); + qdf_mem_free(pReport); return eSIR_MEM_ALLOC_FAILED; } lim_log(pMac, LOG3, FL(" Processing Beacon Report request")); - cdf_mem_set(pCurrentReq, sizeof(*pCurrentReq), + qdf_mem_set(pCurrentReq, sizeof(*pCurrentReq), 0); pCurrentReq->dialog_token = pRRMReq->DialogToken.token; @@ -1223,7 +1223,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, /* Send a report with incapabale bit set. */ if (pReport == NULL) { /* Allocate memory to send reports for any subsequent requests. */ pReport = - cdf_mem_malloc(sizeof + qdf_mem_malloc(sizeof (tSirMacRadioMeasureReport) * (pRRMReq-> @@ -1235,7 +1235,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal pMac, ("Unable to allocate memory during RRM Req processing")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set(pReport, + qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport) * (pRRMReq->num_MeasurementRequest - i), 0); @@ -1261,7 +1261,7 @@ end: num_report, pReport, peer, pSessionEntry); - cdf_mem_free(pReport); + qdf_mem_free(pReport); lim_log(pMac, LOG3, FL(" Free memory for pReport")); } return status; @@ -1358,7 +1358,7 @@ tSirRetStatus rrm_initialize(tpAniSirGlobal pMac) pMac->rrm.rrmPEContext.rrmEnable = 0; - cdf_mem_set(pRRMCaps, sizeof(tRRMCaps), 0); + qdf_mem_set(pRRMCaps, sizeof(tRRMCaps), 0); pRRMCaps->LinkMeasurement = 1; pRRMCaps->NeighborRpt = 1; pRRMCaps->BeaconPassive = 1; @@ -1397,12 +1397,12 @@ tSirRetStatus rrm_cleanup(tpAniSirGlobal pMac) if (pMac->rrm.rrmPEContext.pCurrentReq) { if (pMac->rrm.rrmPEContext.pCurrentReq->request.Beacon.reqIes. pElementIds) { - cdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq-> + qdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq-> request.Beacon.reqIes.pElementIds); lim_log(pMac, LOG4, FL(" Free memory for pElementIds")); } - cdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq); + qdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq); lim_log(pMac, LOG4, FL(" Free memory for pCurrentReq")); } @@ -1454,7 +1454,7 @@ void lim_update_rrm_capability(tpAniSirGlobal mac_ctx, tpSirSmeJoinReq join_req) { mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled; - cdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps, + qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps, &join_req->rrm_config.rm_capability, RMENABLEDCAP_MAX_LEN); diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c index 5a6744da8f9f..48d6560be37b 100644 --- a/core/mac/src/pe/sch/sch_api.c +++ b/core/mac/src/pe/sch/sch_api.c @@ -245,7 +245,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload, ("Indicating HAL to copy the beacon template [%d bytes] to memory"), size); - beaconParams = cdf_mem_malloc(sizeof(tSendbeaconParams)); + beaconParams = qdf_mem_malloc(sizeof(tSendbeaconParams)); if (NULL == beaconParams) return eSIR_MEM_ALLOC_FAILED; @@ -255,7 +255,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload, msgQ.reserved = 0; /* Fill in tSendbeaconParams members */ - cdf_mem_copy(beaconParams->bssId, psessionEntry->bssId, + qdf_mem_copy(beaconParams->bssId, psessionEntry->bssId, sizeof(psessionEntry->bssId)); if (LIM_IS_IBSS_ROLE(psessionEntry)) { @@ -271,7 +271,7 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload, sch_log(pMac, LOGE, FL("Invalid p2pIeOffset:[%d]"), pMac->sch.schObject.p2pIeOffset); QDF_ASSERT(0); - cdf_mem_free(beaconParams); + qdf_mem_free(beaconParams); return eSIR_FAILURE; } beaconParams->p2pIeOffset = pMac->sch.schObject.p2pIeOffset; @@ -288,15 +288,15 @@ tSirRetStatus sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload, /* free previous copy of the beacon */ if (psessionEntry->beacon) { - cdf_mem_free(psessionEntry->beacon); + qdf_mem_free(psessionEntry->beacon); } psessionEntry->bcnLen = 0; psessionEntry->beacon = NULL; - psessionEntry->beacon = cdf_mem_malloc(size); + psessionEntry->beacon = qdf_mem_malloc(size); if (psessionEntry->beacon != NULL) { - cdf_mem_copy(psessionEntry->beacon, beaconPayload, size); + qdf_mem_copy(psessionEntry->beacon, beaconPayload, size); psessionEntry->bcnLen = size; } @@ -341,7 +341,7 @@ uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal pMac, uint32_t offset = 0; uint8_t eid = 0xDD; - cdf_mem_copy(addIeWoP2pIe, ptr, left); + qdf_mem_copy(addIeWoP2pIe, ptr, left); *addnIELenWoP2pIe = left; if (addIeWoP2pIe != NULL) { @@ -354,11 +354,11 @@ uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal pMac, return eSIR_FAILURE; } if ((elem_id == eid) && - (cdf_mem_compare(&ptr[2], + (!qdf_mem_cmp(&ptr[2], "\x50\x6f\x9a\x09", 4))) { left -= elem_len; ptr += (elem_len + 2); - cdf_mem_copy(&addIeWoP2pIe[offset], ptr, left); + qdf_mem_copy(&addIeWoP2pIe[offset], ptr, left); *addnIELenWoP2pIe -= (2 + elem_len); } else { left -= elem_len; @@ -418,7 +418,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, * by the FW, may also have P2P IE which will fail * P2P cert case 6.1.3 */ - addIeWoP2pIe = cdf_mem_malloc(psessionEntry->addIeParams. + addIeWoP2pIe = qdf_mem_malloc(psessionEntry->addIeParams. probeRespDataLen); if (NULL == addIeWoP2pIe) { sch_log(pMac, LOGE, @@ -429,19 +429,19 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, retStatus = lim_remove_p2p_ie_from_add_ie(pMac, psessionEntry, addIeWoP2pIe, &addnIELenWoP2pIe); if (retStatus != eSIR_SUCCESS) { - cdf_mem_free(addIeWoP2pIe); + qdf_mem_free(addIeWoP2pIe); return eSIR_FAILURE; } /* Probe rsp IE available */ /*need to check the data length */ addIE = - cdf_mem_malloc(addnIELenWoP2pIe); + qdf_mem_malloc(addnIELenWoP2pIe); if (NULL == addIE) { sch_log(pMac, LOGE, FL ("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 length")); - cdf_mem_free(addIeWoP2pIe); + qdf_mem_free(addIeWoP2pIe); return eSIR_MEM_ALLOC_FAILED; } addnIELen = addnIELenWoP2pIe; @@ -449,11 +449,11 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, if (addnIELen <= WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN && addnIELen && (nBytes + addnIELen) <= SIR_MAX_PACKET_SIZE) { - cdf_mem_copy(addIE, + qdf_mem_copy(addIE, addIeWoP2pIe, addnIELenWoP2pIe); } - cdf_mem_free(addIeWoP2pIe); + qdf_mem_free(addIeWoP2pIe); } if (addnIEPresent) { @@ -463,7 +463,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, addnIEPresent = false; /* Dont include the IE. */ } /* Paranoia: */ - cdf_mem_set(pFrame2Hal, nBytes, 0); + qdf_mem_set(pFrame2Hal, nBytes, 0); /* Next, we fill out the buffer descriptor: */ lim_populate_mac_header(pMac, pFrame2Hal, SIR_MAC_MGMT_FRAME, @@ -486,7 +486,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, FL("Failed to pack a Probe Response (0x%08x)."), nStatus); - cdf_mem_free(addIE); + qdf_mem_free(addIE); return retCode; /* allocated! */ } else if (DOT11F_WARNED(nStatus)) { sch_log(pMac, LOGE, FL("There were warnings while packing a P" @@ -494,14 +494,14 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, } if (addnIEPresent) { - cdf_mem_copy(&pFrame2Hal[nBytes - addnIELen], + qdf_mem_copy(&pFrame2Hal[nBytes - addnIELen], &addIE[0], addnIELen); } /* free the allocated Memory */ - cdf_mem_free(addIE); + qdf_mem_free(addIE); - pprobeRespParams = cdf_mem_malloc(sizeof(tSendProbeRespParams)); + pprobeRespParams = qdf_mem_malloc(sizeof(tSendProbeRespParams)); if (NULL == pprobeRespParams) { sch_log(pMac, LOGE, FL @@ -511,7 +511,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, sir_copy_mac_addr(pprobeRespParams->bssId, psessionEntry->bssId); pprobeRespParams->pProbeRespTemplate = pFrame2Hal; pprobeRespParams->probeRespTemplateLen = nBytes; - cdf_mem_copy(pprobeRespParams->ucProxyProbeReqValidIEBmap, + qdf_mem_copy(pprobeRespParams->ucProxyProbeReqValidIEBmap, IeBitmap, (sizeof(uint32_t) * 8)); msgQ.type = WMA_SEND_PROBE_RSP_TMPL; msgQ.reserved = 0; @@ -525,7 +525,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac, FL ("lim_send_probe_rsp_template_to_hal: FAIL bytes %d retcode[%X]"), nBytes, retCode); - cdf_mem_free(pprobeRespParams); + qdf_mem_free(pprobeRespParams); } else { sch_log(pMac, LOG1, FL @@ -557,7 +557,7 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr, {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, }; - cdf_mem_zero((uint8_t *)&frame, sizeof(tDot11fTimingAdvertisementFrame)); + qdf_mem_zero((uint8_t *)&frame, sizeof(tDot11fTimingAdvertisementFrame)); /* Populate the TA fields */ status = populate_dot11f_timing_advert_frame(mac_ctx, &frame); @@ -578,12 +578,12 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr, } buf_size = sizeof(tSirMacMgmtHdr) + payload_size; - *buf = cdf_mem_malloc(buf_size); + *buf = qdf_mem_malloc(buf_size); if (*buf == NULL) { sch_log(mac_ctx, LOGE, FL("Cannot allocate memory")); return eSIR_FAILURE; } - cdf_mem_zero(*buf, buf_size); + qdf_mem_zero(*buf, buf_size); payload_size = 0; status = dot11f_pack_timing_advertisement_frame(mac_ctx, &frame, @@ -623,6 +623,6 @@ int sch_gen_timing_advert_frame(tpAniSirGlobal mac_ctx, tSirMacAddr self_addr, fail: if (*buf) - cdf_mem_free(*buf); + qdf_mem_free(*buf); return status; } diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c index 28d19414a107..efb73f488d8c 100644 --- a/core/mac/src/pe/sch/sch_beacon_gen.c +++ b/core/mac/src/pe/sch/sch_beacon_gen.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -73,7 +73,7 @@ tSirRetStatus sch_get_p2p_ie_offset(uint8_t *pExtraIe, uint32_t extraIeLen, /* Calculate the P2P IE Offset */ do { if (*pExtraIe == 0xDD) { - if (cdf_mem_compare + if (!qdf_mem_cmp ((void *)(pExtraIe + 2), &p2p_oui, sizeof(p2p_oui))) { status = eSIR_SUCCESS; break; @@ -117,7 +117,7 @@ sch_append_addn_ie(tpAniSirGlobal mac_ctx, tpPESession session, ((len + *num_bytes) <= max_bcn_size))) return status; - cdf_mem_copy(&add_ie[0], session->addIeParams.probeRespBCNData_buff, + qdf_mem_copy(&add_ie[0], session->addIeParams.probeRespBCNData_buff, len); p2p_ie = limGetP2pIEPtr(mac_ctx, &add_ie[0], len); @@ -127,7 +127,7 @@ sch_append_addn_ie(tpAniSirGlobal mac_ctx, tpPESession session, if (noa_len) { if ((noa_len + len) <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN) { - cdf_mem_copy(&add_ie[len], noa_strm, noa_len); + qdf_mem_copy(&add_ie[len], noa_strm, noa_len); len += noa_len; p2p_ie[1] += noa_len; } else { @@ -137,7 +137,7 @@ sch_append_addn_ie(tpAniSirGlobal mac_ctx, tpPESession session, } } if (len <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN) { - cdf_mem_copy(frm, &add_ie[0], len); + qdf_mem_copy(frm, &add_ie[0], len); *num_bytes = *num_bytes + len; } else { sch_log(mac_ctx, LOGW, @@ -177,24 +177,24 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) tSirRetStatus status = eSIR_SUCCESS; bool is_vht_enabled = false; - bcn_1 = cdf_mem_malloc(sizeof(tDot11fBeacon1)); + bcn_1 = qdf_mem_malloc(sizeof(tDot11fBeacon1)); if (NULL == bcn_1) { sch_log(mac_ctx, LOGE, FL("Failed to allocate memory")); return eSIR_MEM_ALLOC_FAILED; } - bcn_2 = cdf_mem_malloc(sizeof(tDot11fBeacon2)); + bcn_2 = qdf_mem_malloc(sizeof(tDot11fBeacon2)); if (NULL == bcn_2) { sch_log(mac_ctx, LOGE, FL("Failed to allocate memory")); - cdf_mem_free(bcn_1); + qdf_mem_free(bcn_1); return eSIR_MEM_ALLOC_FAILED; } - wsc_prb_res = cdf_mem_malloc(sizeof(tDot11fIEWscProbeRes)); + wsc_prb_res = qdf_mem_malloc(sizeof(tDot11fIEWscProbeRes)); if (NULL == wsc_prb_res) { sch_log(mac_ctx, LOGE, FL("Failed to allocate memory")); - cdf_mem_free(bcn_1); - cdf_mem_free(bcn_2); + qdf_mem_free(bcn_1); + qdf_mem_free(bcn_2); return eSIR_MEM_ALLOC_FAILED; } @@ -204,7 +204,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) * First set the fixed fields: * set the TFP headers, set the mac header */ - cdf_mem_set((uint8_t *) &bcn_struct->macHdr, sizeof(tSirMacMgmtHdr), 0); + qdf_mem_set((uint8_t *) &bcn_struct->macHdr, sizeof(tSirMacMgmtHdr), 0); mac = (tpSirMacMgmtHdr) &bcn_struct->macHdr; mac->fc.type = SIR_MAC_MGMT_FRAME; mac->fc.subType = SIR_MAC_MGMT_BEACON; @@ -212,15 +212,15 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) for (i = 0; i < 6; i++) mac->da[i] = 0xff; - cdf_mem_copy(mac->sa, session->selfMacAddr, + qdf_mem_copy(mac->sa, session->selfMacAddr, sizeof(session->selfMacAddr)); - cdf_mem_copy(mac->bssId, session->bssId, sizeof(session->bssId)); + qdf_mem_copy(mac->bssId, session->bssId, sizeof(session->bssId)); mac->fc.fromDS = 0; mac->fc.toDS = 0; /* Now set the beacon body */ - cdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0); + qdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0); /* Skip over the timestamp (it'll be updated later). */ bcn_1->BeaconInterval.interval = @@ -247,11 +247,11 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) if (LIM_IS_AP_ROLE(session)) { /* Initialize the default IE bitmap to zero */ - cdf_mem_set((uint8_t *) &(session->DefProbeRspIeBitmap), + qdf_mem_set((uint8_t *) &(session->DefProbeRspIeBitmap), (sizeof(uint32_t) * 8), 0); /* Initialize the default IE bitmap to zero */ - cdf_mem_set((uint8_t *) &(session->probeRespFrame), + qdf_mem_set((uint8_t *) &(session->probeRespFrame), sizeof(session->probeRespFrame), 0); /* @@ -270,9 +270,9 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) sch_log(mac_ctx, LOGE, FL("Failed to packed a tDot11fBeacon1 (0x%08x.)."), n_status); - cdf_mem_free(bcn_1); - cdf_mem_free(bcn_2); - cdf_mem_free(wsc_prb_res); + qdf_mem_free(bcn_1); + qdf_mem_free(bcn_2); + qdf_mem_free(wsc_prb_res); return eSIR_FAILURE; } else if (DOT11F_WARNED(n_status)) { sch_log(mac_ctx, LOGE, @@ -280,7 +280,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) n_status); } /*changed to correct beacon corruption */ - cdf_mem_set((uint8_t *) bcn_2, sizeof(tDot11fBeacon2), 0); + 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); @@ -443,7 +443,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) set_probe_rsp_ie_bitmap( &session->DefProbeRspIeBitmap[0], SIR_MAC_WPA_EID); - cdf_mem_copy((void *) + qdf_mem_copy((void *) &session->probeRespFrame.WscProbeRes, (void *)wsc_prb_res, sizeof(tDot11fIEWscProbeRes)); @@ -459,9 +459,9 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) sch_log(mac_ctx, LOGE, FL("Failed to packed a tDot11fBeacon2 (0x%08x.)."), n_status); - cdf_mem_free(bcn_1); - cdf_mem_free(bcn_2); - cdf_mem_free(wsc_prb_res); + qdf_mem_free(bcn_1); + qdf_mem_free(bcn_2); + qdf_mem_free(wsc_prb_res); return eSIR_FAILURE; } else if (DOT11F_WARNED(n_status)) { sch_log(mac_ctx, LOGE, @@ -490,9 +490,9 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session) sch_log(mac_ctx, LOG1, FL("Initialized beacon end, offset %d"), session->schBeaconOffsetEnd); mac_ctx->sch.schObject.fBeaconChanged = 1; - cdf_mem_free(bcn_1); - cdf_mem_free(bcn_2); - cdf_mem_free(wsc_prb_res); + qdf_mem_free(bcn_1); + qdf_mem_free(bcn_2); + qdf_mem_free(wsc_prb_res); return eSIR_SUCCESS; } @@ -510,7 +510,7 @@ tSirRetStatus lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMa DefProbeRspIeBitmap = &psessionEntry->DefProbeRspIeBitmap[0]; prb_rsp = &psessionEntry->probeRespFrame; prb_rsp->BeaconInterval = beacon1->BeaconInterval; - cdf_mem_copy((void *)&prb_rsp->Capabilities, + qdf_mem_copy((void *)&prb_rsp->Capabilities, (void *)&beacon1->Capabilities, sizeof(beacon1->Capabilities)); @@ -523,7 +523,7 @@ tSirRetStatus lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMa /* supported rates */ if (beacon1->SuppRates.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_RATESET_EID); - cdf_mem_copy((void *)&prb_rsp->SuppRates, + qdf_mem_copy((void *)&prb_rsp->SuppRates, (void *)&beacon1->SuppRates, sizeof(beacon1->SuppRates)); @@ -532,7 +532,7 @@ tSirRetStatus lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMa if (beacon1->DSParams.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_DS_PARAM_SET_EID); - cdf_mem_copy((void *)&prb_rsp->DSParams, + qdf_mem_copy((void *)&prb_rsp->DSParams, (void *)&beacon1->DSParams, sizeof(beacon1->DSParams)); @@ -551,7 +551,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* country */ if (beacon2->Country.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_COUNTRY_EID); - cdf_mem_copy((void *)&prb_rsp->Country, + qdf_mem_copy((void *)&prb_rsp->Country, (void *)&beacon2->Country, sizeof(beacon2->Country)); @@ -560,7 +560,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->PowerConstraints.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_PWR_CONSTRAINT_EID); - cdf_mem_copy((void *)&prb_rsp->PowerConstraints, + qdf_mem_copy((void *)&prb_rsp->PowerConstraints, (void *)&beacon2->PowerConstraints, sizeof(beacon2->PowerConstraints)); @@ -569,7 +569,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->ChanSwitchAnn.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_CHNL_SWITCH_ANN_EID); - cdf_mem_copy((void *)&prb_rsp->ChanSwitchAnn, + qdf_mem_copy((void *)&prb_rsp->ChanSwitchAnn, (void *)&beacon2->ChanSwitchAnn, sizeof(beacon2->ChanSwitchAnn)); @@ -579,7 +579,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->ext_chan_switch_ann.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_CHNL_EXTENDED_SWITCH_ANN_EID); - cdf_mem_copy((void *)&prb_rsp->ext_chan_switch_ann, + qdf_mem_copy((void *)&prb_rsp->ext_chan_switch_ann, (void *)&beacon2->ext_chan_switch_ann, sizeof(beacon2->ext_chan_switch_ann)); } @@ -588,7 +588,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->SuppOperatingClasses.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_OPERATING_CLASS_EID); - cdf_mem_copy((void *)&prb_rsp->SuppOperatingClasses, + qdf_mem_copy((void *)&prb_rsp->SuppOperatingClasses, (void *)&beacon2->SuppOperatingClasses, sizeof(beacon2->SuppOperatingClasses)); } @@ -597,7 +597,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->QComVendorIE.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_QCOM_VENDOR_EID); - cdf_mem_copy((void *)&prb_rsp->QComVendorIE, + qdf_mem_copy((void *)&prb_rsp->QComVendorIE, (void *)&beacon2->QComVendorIE, sizeof(beacon2->QComVendorIE)); } @@ -606,7 +606,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* ERP information */ if (beacon2->ERPInfo.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_ERP_INFO_EID); - cdf_mem_copy((void *)&prb_rsp->ERPInfo, + qdf_mem_copy((void *)&prb_rsp->ERPInfo, (void *)&beacon2->ERPInfo, sizeof(beacon2->ERPInfo)); @@ -615,7 +615,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->ExtSuppRates.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_EXTENDED_RATE_EID); - cdf_mem_copy((void *)&prb_rsp->ExtSuppRates, + qdf_mem_copy((void *)&prb_rsp->ExtSuppRates, (void *)&beacon2->ExtSuppRates, sizeof(beacon2->ExtSuppRates)); @@ -624,7 +624,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* WPA */ if (beacon2->WPA.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID); - cdf_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA, + qdf_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA, sizeof(beacon2->WPA)); } @@ -632,7 +632,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* RSN */ if (beacon2->RSNOpaque.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_RSN_EID); - cdf_mem_copy((void *)&prb_rsp->RSNOpaque, + qdf_mem_copy((void *)&prb_rsp->RSNOpaque, (void *)&beacon2->RSNOpaque, sizeof(beacon2->RSNOpaque)); } @@ -641,7 +641,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->EDCAParamSet.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_EDCA_PARAM_SET_EID); - cdf_mem_copy((void *)&prb_rsp->EDCAParamSet, + qdf_mem_copy((void *)&prb_rsp->EDCAParamSet, (void *)&beacon2->EDCAParamSet, sizeof(beacon2->EDCAParamSet)); @@ -652,34 +652,34 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, if (beacon2->HTCaps.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_HT_CAPABILITIES_EID); - cdf_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps, + qdf_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps, sizeof(beacon2->HTCaps)); } /* HT Info IE */ if (beacon2->HTInfo.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_HT_INFO_EID); - cdf_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo, + qdf_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo, sizeof(beacon2->HTInfo)); } #ifdef WLAN_FEATURE_11AC if (beacon2->VHTCaps.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_VHT_CAPABILITIES_EID); - cdf_mem_copy((void *)&prb_rsp->VHTCaps, + qdf_mem_copy((void *)&prb_rsp->VHTCaps, (void *)&beacon2->VHTCaps, sizeof(beacon2->VHTCaps)); } if (beacon2->VHTOperation.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_VHT_OPERATION_EID); - cdf_mem_copy((void *)&prb_rsp->VHTOperation, + qdf_mem_copy((void *)&prb_rsp->VHTOperation, (void *)&beacon2->VHTOperation, sizeof(beacon2->VHTOperation)); } if (beacon2->VHTExtBssLoad.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_VHT_EXT_BSS_LOAD_EID); - cdf_mem_copy((void *)&prb_rsp->VHTExtBssLoad, + qdf_mem_copy((void *)&prb_rsp->VHTExtBssLoad, (void *)&beacon2->VHTExtBssLoad, sizeof(beacon2->VHTExtBssLoad)); } @@ -688,14 +688,14 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* WMM IE */ if (beacon2->WMMParams.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID); - cdf_mem_copy((void *)&prb_rsp->WMMParams, + qdf_mem_copy((void *)&prb_rsp->WMMParams, (void *)&beacon2->WMMParams, sizeof(beacon2->WMMParams)); } /* WMM capability - most of the case won't be present */ if (beacon2->WMMCaps.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID); - cdf_mem_copy((void *)&prb_rsp->WMMCaps, + qdf_mem_copy((void *)&prb_rsp->WMMCaps, (void *)&beacon2->WMMCaps, sizeof(beacon2->WMMCaps)); } @@ -703,7 +703,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac, /* Extended Capability */ if (beacon2->ExtCap.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, DOT11F_EID_EXTCAP); - cdf_mem_copy((void *)&prb_rsp->ExtCap, + qdf_mem_copy((void *)&prb_rsp->ExtCap, (void *)&beacon2->ExtCap, sizeof(beacon2->ExtCap)); } @@ -878,8 +878,8 @@ void sch_process_pre_beacon_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg) tpPESession psessionEntry; uint8_t sessionId; - if ((psessionEntry = - pe_find_session_by_bssid(pMac, pMsg->bssId, &sessionId)) == NULL) { + psessionEntry = pe_find_session_by_bssid(pMac, pMsg->bssId, &sessionId); + if (psessionEntry == NULL) { PELOGE(sch_log(pMac, LOGE, FL("session lookup fails"));) goto end; } @@ -945,6 +945,6 @@ void sch_process_pre_beacon_ind(tpAniSirGlobal pMac, tpSirMsgQ limMsg) } end: - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); } diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 10809e6b372f..a8b8ed89ad0f 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -392,7 +392,7 @@ sch_bcn_process_sta_bt_amp_sta(tpAniSirGlobal mac_ctx, return false; beaconParams->bssIdx = *bssIdx; - cdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp, + qdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp, (uint8_t *) bcn->timeStamp, sizeof(uint64_t)); session->lastBeaconDtimCount = bcn->tim.dtimCount; session->lastBeaconDtimPeriod = bcn->tim.dtimPeriod; @@ -727,7 +727,7 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx, #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI int8_t regMax = 0, maxTxPower = 0; #endif - cdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); beaconParams.paramChangeBitmap = 0; if (LIM_IS_IBSS_ROLE(session)) { @@ -863,7 +863,7 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, tpPESession ap_session = NULL; uint8_t i; - cdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams)); + qdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams)); bcn_prm.paramChangeBitmap = 0; mac_ctx->sch.gSchBcnRcvCnt++; /* Convert the beacon frame into a structure */ diff --git a/core/mac/src/sys/common/src/wlan_qct_sys.c b/core/mac/src/sys/common/src/wlan_qct_sys.c index 059dbcdd3aef..aab767f6a159 100644 --- a/core/mac/src/sys/common/src/wlan_qct_sys.c +++ b/core/mac/src/sys/common/src/wlan_qct_sys.c @@ -212,7 +212,7 @@ QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg) QDF_TRACE(QDF_MODULE_ID_SYS, QDF_TRACE_LEVEL_ERROR, FL("Invalid hal")); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; } mac_ctx = PMAC_STRUCT(hHal); @@ -220,19 +220,19 @@ QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg) QDF_TRACE(QDF_MODULE_ID_SYS, QDF_TRACE_LEVEL_ERROR, FL("Invalid mac context")); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; } if (NULL == mac_ctx->ftm_msg_processor_callback) { QDF_TRACE(QDF_MODULE_ID_SYS, QDF_TRACE_LEVEL_ERROR, FL("callback pointer is NULL")); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; } mac_ctx->ftm_msg_processor_callback( (void *)pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; default: @@ -251,7 +251,7 @@ QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg) qdf_status = QDF_STATUS_E_BADMSG; if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } return qdf_status; } @@ -345,7 +345,7 @@ void sys_process_mmh_msg(tpAniSirGlobal pMac, tSirMsgQ *pMsg) * It allocate memory for bodyptr free the mem and return */ if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } } diff --git a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h index ab955b42ff2d..b6109f0d97ac 100644 --- a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h +++ b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h @@ -50,7 +50,7 @@ extern "C" { #include "qdf_mc_timer.h" #include "qdf_types.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" /* Interlocked Compare Exchange related definitions */ 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 02a46f51fb50..387685742f88 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 @@ -120,12 +120,12 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd, */ /* Allocate p_mac */ - p_mac = cdf_mem_malloc(sizeof(tAniSirGlobal)); + p_mac = qdf_mem_malloc(sizeof(tAniSirGlobal)); if (NULL == p_mac) return eSIR_MEM_ALLOC_FAILED; /* Initialize the p_mac structure */ - cdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0); + qdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0); /* * Set various global fields of p_mac here @@ -138,13 +138,13 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd, { /* Call various PE (and other layer init here) */ if (eSIR_SUCCESS != log_init(p_mac)) { - cdf_mem_free(p_mac); + qdf_mem_free(p_mac); return eSIR_FAILURE; } /* Call routine to initialize CFG data structures */ if (eSIR_SUCCESS != cfg_init(p_mac)) { - cdf_mem_free(p_mac); + qdf_mem_free(p_mac); return eSIR_FAILURE; } @@ -158,7 +158,7 @@ tSirRetStatus mac_open(tHalHandle *pHalHandle, tHddHandle hHdd, status = pe_open(p_mac, pMacOpenParms); if (eSIR_SUCCESS != status) { sys_log(p_mac, LOGE, FL("mac_open failure\n")); - cdf_mem_free(p_mac); + qdf_mem_free(p_mac); } return status; @@ -188,7 +188,7 @@ tSirRetStatus mac_close(tHalHandle hHal) log_deinit(pMac); /* Finally, de-allocate the global MAC datastructure: */ - cdf_mem_free(pMac); + qdf_mem_free(pMac); return eSIR_SUCCESS; } diff --git a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c index 97703dc45994..057de0544b15 100644 --- a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c +++ b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c @@ -78,7 +78,7 @@ tSirRetStatus postPTTMsgApi(tpAniSirGlobal pMac, tSirMsgQ *pMsg); tSirRetStatus sys_init_globals(tpAniSirGlobal pMac) { - cdf_mem_set((uint8_t *) &pMac->sys, sizeof(pMac->sys), 0); + qdf_mem_set((uint8_t *) &pMac->sys, sizeof(pMac->sys), 0); pMac->sys.gSysEnableScanMode = 1; pMac->sys.gSysEnableLinkMonitorMode = 0; diff --git a/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h b/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h index 8cc4e9789910..7a155bf8cdee 100644 --- a/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h +++ b/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -45,11 +45,11 @@ /* This controls how the "dot11f" code copies memory */ #define DOT11F_MEMCPY(ctx, dst, src, len) \ - cdf_mem_copy((uint8_t *)(dst), (uint8_t *)(src), (len)) + qdf_mem_copy((uint8_t *)(dst), (uint8_t *)(src), (len)) /* This controls how the "dot11f" code compares memory */ #define DOT11F_MEMCMP(ctx, lhs, rhs, len) \ - (!cdf_mem_compare((uint8_t *)(lhs), (uint8_t *)(rhs), (len))) + (qdf_mem_cmp((uint8_t *)(lhs), (uint8_t *)(rhs), (len))) #if defined(DBG) && (DBG != 0) diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index 0c2038a3aafa..92c4280d8988 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -44,7 +44,7 @@ #include "csr_neighbor_roam.h" #include "csr_internal.h" #include "lim_global.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_trace.h" #include "wma_if.h" 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 30ea1a79bd8d..7a5e691a6859 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 @@ -415,7 +415,7 @@ populate_dot11f_country(tpAniSirGlobal pMac, CFG_GET_STR(nSirStatus, pMac, WNI_CFG_COUNTRY_CODE, code, codelen, 3); - cdf_mem_copy(pDot11f->country, code, codelen); + qdf_mem_copy(pDot11f->country, code, codelen); if (len > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE) { dot11f_log(pMac, LOGE, @@ -425,7 +425,7 @@ populate_dot11f_country(tpAniSirGlobal pMac, } pDot11f->num_triplets = (uint8_t) (len / 3); - cdf_mem_copy((uint8_t *) pDot11f->triplets, temp, len); + qdf_mem_copy((uint8_t *) pDot11f->triplets, temp, len); pDot11f->present = 1; } @@ -619,7 +619,7 @@ populate_dot11f_ext_supp_rates(tpAniSirGlobal pMac, uint8_t nChannelNum, if (POPULATE_DOT11F_RATES_OPERATIONAL == nChannelNum) { if (psessionEntry != NULL) { nRates = psessionEntry->extRateSet.numRates; - cdf_mem_copy(rates, psessionEntry->extRateSet.rate, + qdf_mem_copy(rates, psessionEntry->extRateSet.rate, nRates); } else { dot11f_log(pMac, LOGE, @@ -634,7 +634,7 @@ populate_dot11f_ext_supp_rates(tpAniSirGlobal pMac, uint8_t nChannelNum, if (0 != nRates) { pDot11f->num_rates = (uint8_t) nRates; - cdf_mem_copy(pDot11f->rates, rates, nRates); + qdf_mem_copy(pDot11f->rates, rates, nRates); pDot11f->present = 1; } @@ -663,7 +663,7 @@ populate_dot11f_ext_supp_rates1(tpAniSirGlobal pMac, if (0 != nRates) { pDot11f->num_rates = (uint8_t) nRates; - cdf_mem_copy(pDot11f->rates, rates, nRates); + qdf_mem_copy(pDot11f->rates, rates, nRates); pDot11f->present = 1; } @@ -1582,7 +1582,7 @@ tSirRetStatus populate_dot11f_rsn_opaque(tpAniSirGlobal pMac, if (0 <= idx) { pDot11f->present = 1; pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1]; - cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2, /* EID, len */ + qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2, /* EID, len */ pRsnIe->rsnIEdata[idx + 1]); } } @@ -1633,7 +1633,7 @@ tSirRetStatus populate_dot11f_wapi_opaque(tpAniSirGlobal pMac, if (0 <= idx) { pDot11f->present = 1; pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1]; - cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2, /* EID, len */ + qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2, /* EID, len */ pRsnIe->rsnIEdata[idx + 1]); } } @@ -1651,7 +1651,7 @@ populate_dot11f_ssid(tpAniSirGlobal pMac, pDot11f->present = 1; pDot11f->num_ssid = pInternal->length; if (pInternal->length) { - cdf_mem_copy((uint8_t *) pDot11f->ssid, + qdf_mem_copy((uint8_t *) pDot11f->ssid, (uint8_t *) &pInternal->ssId, pInternal->length); } } /* End populate_dot11f_ssid. */ @@ -1731,7 +1731,7 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac, #endif /* TO SUPPORT BT-AMP */ if (psessionEntry != NULL) { nRates = psessionEntry->rateSet.numRates; - cdf_mem_copy(rates, psessionEntry->rateSet.rate, + qdf_mem_copy(rates, psessionEntry->rateSet.rate, nRates); } else { dot11f_log(pMac, LOGE, @@ -1749,7 +1749,7 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac, if (0 != nRates) { pDot11f->num_rates = (uint8_t) nRates; - cdf_mem_copy(pDot11f->rates, rates, nRates); + qdf_mem_copy(pDot11f->rates, rates, nRates); pDot11f->present = 1; } @@ -1832,18 +1832,18 @@ populate_dot11f_rates_tdls(tpAniSirGlobal p_mac, if (temp_rateset.numRates <= MAX_NUM_SUPPORTED_RATES) { p_supp_rates->num_rates = temp_rateset.numRates; - cdf_mem_copy(p_supp_rates->rates, temp_rateset.rate, + qdf_mem_copy(p_supp_rates->rates, temp_rateset.rate, p_supp_rates->num_rates); p_supp_rates->present = 1; } else { /* Populate extended capability as well */ p_supp_rates->num_rates = MAX_NUM_SUPPORTED_RATES; - cdf_mem_copy(p_supp_rates->rates, temp_rateset.rate, + qdf_mem_copy(p_supp_rates->rates, temp_rateset.rate, p_supp_rates->num_rates); p_supp_rates->present = 1; p_ext_supp_rates->num_rates = temp_rateset.numRates - MAX_NUM_SUPPORTED_RATES; - cdf_mem_copy(p_ext_supp_rates->rates, + qdf_mem_copy(p_ext_supp_rates->rates, (uint8_t *)temp_rateset.rate + MAX_NUM_SUPPORTED_RATES, p_ext_supp_rates->num_rates); @@ -2122,7 +2122,7 @@ tSirRetStatus populate_dot11f_wpa_opaque(tpAniSirGlobal pMac, if (0 <= idx) { pDot11f->present = 1; pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1] - 4; - cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2 + 4, /* EID, len, OUI */ + qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2 + 4, /* EID, len, OUI */ pRsnIe->rsnIEdata[idx + 1] - 4); /* OUI */ } } @@ -2142,7 +2142,7 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac, tDot11fProbeRequest pr; /* Ok, zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pProbeReq, sizeof(tSirProbeReq), 0); + qdf_mem_set((uint8_t *) pProbeReq, sizeof(tSirProbeReq), 0); /* delegate to the framesc-generated code, */ status = dot11f_unpack_probe_request(pMac, pFrame, nFrame, &pr); @@ -2193,7 +2193,7 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac, } if (pr.HTCaps.present) { - cdf_mem_copy(&pProbeReq->HTCaps, &pr.HTCaps, + qdf_mem_copy(&pProbeReq->HTCaps, &pr.HTCaps, sizeof(tDot11fIEHTCaps)); } @@ -2204,7 +2204,7 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac, } #ifdef WLAN_FEATURE_11AC if (pr.VHTCaps.present) { - cdf_mem_copy(&pProbeReq->VHTCaps, &pr.VHTCaps, + qdf_mem_copy(&pProbeReq->VHTCaps, &pr.VHTCaps, sizeof(tDot11fIEVHTCaps)); } #endif @@ -2226,15 +2226,15 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, tDot11fProbeResponse *pr; /* Ok, zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pProbeResp, sizeof(tSirProbeRespBeacon), 0); + qdf_mem_set((uint8_t *) pProbeResp, sizeof(tSirProbeRespBeacon), 0); - pr = cdf_mem_malloc(sizeof(tDot11fProbeResponse)); + pr = qdf_mem_malloc(sizeof(tDot11fProbeResponse)); if (NULL == pr) { lim_log(pMac, LOGE, FL("Failed to allocate memory\n")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0); + qdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0); /* delegate to the framesc-generated code, */ status = dot11f_unpack_probe_response(pMac, pFrame, nFrame, pr); @@ -2246,7 +2246,7 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, PELOG2(sir_dump_buf (pMac, SIR_DBG_MODULE_ID, LOG2, pFrame, nFrame); ) - cdf_mem_free(pr); + qdf_mem_free(pr); return eSIR_FAILURE; } else if (DOT11F_WARNED(status)) { lim_log(pMac, LOGW, @@ -2260,7 +2260,7 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, /* & "transliterate" from a 'tDot11fProbeResponse' to a 'tSirProbeRespBeacon'... */ /* Timestamp */ - cdf_mem_copy((uint8_t *) pProbeResp->timeStamp, + qdf_mem_copy((uint8_t *) pProbeResp->timeStamp, (uint8_t *) &pr->TimeStamp, sizeof(tSirMacTimeStamp)); /* Beacon Interval */ @@ -2332,57 +2332,57 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, if (pr->ChanSwitchAnn.present) { pProbeResp->channelSwitchPresent = 1; - cdf_mem_copy(&pProbeResp->channelSwitchIE, &pr->ChanSwitchAnn, + qdf_mem_copy(&pProbeResp->channelSwitchIE, &pr->ChanSwitchAnn, sizeof(pProbeResp->channelSwitchIE)); } if (pr->ext_chan_switch_ann.present) { pProbeResp->ext_chan_switch_present = 1; - cdf_mem_copy(&pProbeResp->ext_chan_switch, + qdf_mem_copy(&pProbeResp->ext_chan_switch, &pr->ext_chan_switch_ann, sizeof(tDot11fIEext_chan_switch_ann)); } if (pr->SuppOperatingClasses.present) { pProbeResp->supp_operating_class_present = 1; - cdf_mem_copy(&pProbeResp->supp_operating_classes, + qdf_mem_copy(&pProbeResp->supp_operating_classes, &pr->SuppOperatingClasses, sizeof(tDot11fIESuppOperatingClasses)); } if (pr->sec_chan_offset_ele.present) { pProbeResp->sec_chan_offset_present = 1; - cdf_mem_copy(&pProbeResp->sec_chan_offset, + qdf_mem_copy(&pProbeResp->sec_chan_offset, &pr->sec_chan_offset_ele, sizeof(pProbeResp->sec_chan_offset)); } if (pr->TPCReport.present) { pProbeResp->tpcReportPresent = 1; - cdf_mem_copy(&pProbeResp->tpcReport, &pr->TPCReport, + qdf_mem_copy(&pProbeResp->tpcReport, &pr->TPCReport, sizeof(tDot11fIETPCReport)); } if (pr->PowerConstraints.present) { pProbeResp->powerConstraintPresent = 1; - cdf_mem_copy(&pProbeResp->localPowerConstraint, + qdf_mem_copy(&pProbeResp->localPowerConstraint, &pr->PowerConstraints, sizeof(tDot11fIEPowerConstraints)); } if (pr->Quiet.present) { pProbeResp->quietIEPresent = 1; - cdf_mem_copy(&pProbeResp->quietIE, &pr->Quiet, + qdf_mem_copy(&pProbeResp->quietIE, &pr->Quiet, sizeof(tDot11fIEQuiet)); } if (pr->HTCaps.present) { - cdf_mem_copy(&pProbeResp->HTCaps, &pr->HTCaps, + qdf_mem_copy(&pProbeResp->HTCaps, &pr->HTCaps, sizeof(tDot11fIEHTCaps)); } if (pr->HTInfo.present) { - cdf_mem_copy(&pProbeResp->HTInfo, &pr->HTInfo, + qdf_mem_copy(&pProbeResp->HTInfo, &pr->HTInfo, sizeof(tDot11fIEHTInfo)); } @@ -2434,7 +2434,7 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, if (pr->MobilityDomain.present) { /* MobilityDomain */ pProbeResp->mdiePresent = 1; - cdf_mem_copy((uint8_t *) &(pProbeResp->mdie[0]), + qdf_mem_copy((uint8_t *) &(pProbeResp->mdie[0]), (uint8_t *) &(pr->MobilityDomain.MDID), sizeof(uint16_t)); pProbeResp->mdie[2] = @@ -2452,25 +2452,25 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, if (pr->ESEVersion.present) pProbeResp->is_ese_ver_ie_present = 1; if (pr->QBSSLoad.present) { - cdf_mem_copy(&pProbeResp->QBSSLoad, &pr->QBSSLoad, + qdf_mem_copy(&pProbeResp->QBSSLoad, &pr->QBSSLoad, sizeof(tDot11fIEQBSSLoad)); } #endif if (pr->P2PProbeRes.present) { - cdf_mem_copy(&pProbeResp->P2PProbeRes, &pr->P2PProbeRes, + qdf_mem_copy(&pProbeResp->P2PProbeRes, &pr->P2PProbeRes, sizeof(tDot11fIEP2PProbeRes)); } #ifdef WLAN_FEATURE_11AC if (pr->VHTCaps.present) { - cdf_mem_copy(&pProbeResp->VHTCaps, &pr->VHTCaps, + qdf_mem_copy(&pProbeResp->VHTCaps, &pr->VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pr->VHTOperation.present) { - cdf_mem_copy(&pProbeResp->VHTOperation, &pr->VHTOperation, + qdf_mem_copy(&pProbeResp->VHTOperation, &pr->VHTOperation, sizeof(tDot11fIEVHTOperation)); } if (pr->VHTExtBssLoad.present) { - cdf_mem_copy(&pProbeResp->VHTExtBssLoad, &pr->VHTExtBssLoad, + qdf_mem_copy(&pProbeResp->VHTExtBssLoad, &pr->VHTExtBssLoad, sizeof(tDot11fIEVHTExtBssLoad)); } #endif @@ -2483,16 +2483,16 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, pProbeResp->vendor2_ie.sub_type = pr->vendor2_ie.sub_type; } if (pr->vendor2_ie.VHTCaps.present) { - cdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps, + qdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps, &pr->vendor2_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pr->vendor2_ie.VHTOperation.present) { - cdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation, + qdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation, &pr->vendor2_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); } - cdf_mem_free(pr); + qdf_mem_free(pr); return eSIR_SUCCESS; } /* End sir_convert_probe_frame2_struct. */ @@ -2505,14 +2505,14 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, tDot11fAssocRequest *ar; uint32_t status; - ar = cdf_mem_malloc(sizeof(tDot11fAssocRequest)); + ar = qdf_mem_malloc(sizeof(tDot11fAssocRequest)); if (NULL == ar) { lim_log(pMac, LOGE, FL("Failed to allocate memory\n")); return eSIR_MEM_ALLOC_FAILED; } /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0); - cdf_mem_set((uint8_t *) ar, sizeof(tDot11fAssocRequest), 0); + 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); @@ -2524,7 +2524,7 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, PELOG2(sir_dump_buf (pMac, SIR_DBG_MODULE_ID, LOG2, pFrame, nFrame); ) - cdf_mem_free(ar); + qdf_mem_free(ar); return eSIR_FAILURE; } else if (DOT11F_WARNED(status)) { lim_log(pMac, LOGW, @@ -2634,13 +2634,13 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, } if (ar->HTCaps.present) { - cdf_mem_copy(&pAssocReq->HTCaps, &ar->HTCaps, + qdf_mem_copy(&pAssocReq->HTCaps, &ar->HTCaps, sizeof(tDot11fIEHTCaps)); } if (ar->WMMInfoStation.present) { pAssocReq->wmeInfoPresent = 1; - cdf_mem_copy(&pAssocReq->WMMInfoStation, &ar->WMMInfoStation, + qdf_mem_copy(&pAssocReq->WMMInfoStation, &ar->WMMInfoStation, sizeof(tDot11fIEWMMInfoStation)); } @@ -2652,7 +2652,7 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, PELOG2(lim_log (pMac, LOG2, FL("Received Assoc without SSID IE.\n")); ) - cdf_mem_free(ar); + qdf_mem_free(ar); return eSIR_FAILURE; } @@ -2661,18 +2661,18 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, (pMac, LOG2, FL("Received Assoc without supp rate IE.\n")); ) - cdf_mem_free(ar); + qdf_mem_free(ar); return eSIR_FAILURE; } #ifdef WLAN_FEATURE_11AC if (ar->VHTCaps.present) { - cdf_mem_copy(&pAssocReq->VHTCaps, &ar->VHTCaps, + qdf_mem_copy(&pAssocReq->VHTCaps, &ar->VHTCaps, sizeof(tDot11fIEVHTCaps)); lim_log(pMac, LOGW, FL("Received Assoc Req with VHT Cap\n")); lim_log_vht_cap(pMac, &pAssocReq->VHTCaps); } if (ar->OperatingMode.present) { - cdf_mem_copy(&pAssocReq->operMode, &ar->OperatingMode, + qdf_mem_copy(&pAssocReq->operMode, &ar->OperatingMode, sizeof(tDot11fIEOperatingMode)); lim_log(pMac, LOGW, FL("Received Assoc Req with Operating Mode IE\n")); @@ -2681,7 +2681,7 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, #endif if (ar->ExtCap.present) { struct s_ext_cap *ext_cap; - cdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar->ExtCap.bytes, + qdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar->ExtCap.bytes, ar->ExtCap.num_bytes); ext_cap = (struct s_ext_cap *)&pAssocReq->ExtCap.bytes; @@ -2690,7 +2690,7 @@ sir_convert_assoc_req_frame2_struct(tpAniSirGlobal pMac, ext_cap->timing_meas, ext_cap->fine_time_meas_initiator, ext_cap->fine_time_meas_responder); } - cdf_mem_free(ar); + qdf_mem_free(ar); return eSIR_SUCCESS; } /* End sir_convert_assoc_req_frame2_struct. */ @@ -2705,7 +2705,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, uint8_t cnt = 0; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAssocRsp, sizeof(tSirAssocRsp), 0); + qdf_mem_set((uint8_t *) pAssocRsp, sizeof(tSirAssocRsp), 0); /* delegate to the framesc-generated code, */ status = dot11f_unpack_assoc_response(pMac, pFrame, nFrame, &ar); @@ -2792,20 +2792,20 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, if (ar.HTCaps.present) { lim_log(pMac, LOG1, FL("Received Assoc Resp with HT Cap")); - cdf_mem_copy(&pAssocRsp->HTCaps, &ar.HTCaps, + qdf_mem_copy(&pAssocRsp->HTCaps, &ar.HTCaps, sizeof(tDot11fIEHTCaps)); } if (ar.HTInfo.present) { lim_log(pMac, LOG1, FL("Received Assoc Resp with HT Info")); - cdf_mem_copy(&pAssocRsp->HTInfo, &ar.HTInfo, + qdf_mem_copy(&pAssocRsp->HTInfo, &ar.HTInfo, sizeof(tDot11fIEHTInfo)); } #ifdef WLAN_FEATURE_VOWIFI_11R if (ar.MobilityDomain.present) { /* MobilityDomain */ pAssocRsp->mdiePresent = 1; - cdf_mem_copy((uint8_t *) &(pAssocRsp->mdie[0]), + qdf_mem_copy((uint8_t *) &(pAssocRsp->mdie[0]), (uint8_t *) &(ar.MobilityDomain.MDID), sizeof(uint16_t)); pAssocRsp->mdie[2] = @@ -2823,7 +2823,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, ar.FTInfo.R0KH_ID.num_PMK_R0_ID, ar.FTInfo.R0KH_ID.present, ar.FTInfo.R1KH_ID.present); pAssocRsp->ftinfoPresent = 1; - cdf_mem_copy(&pAssocRsp->FTInfo, &ar.FTInfo, + qdf_mem_copy(&pAssocRsp->FTInfo, &ar.FTInfo, sizeof(tDot11fIEFTInfo)); } #endif @@ -2832,7 +2832,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, if (ar.num_RICDataDesc) { for (cnt = 0; cnt < ar.num_RICDataDesc; cnt++) { if (ar.RICDataDesc[cnt].present) { - cdf_mem_copy(&pAssocRsp->RICData[cnt], + qdf_mem_copy(&pAssocRsp->RICData[cnt], &ar.RICDataDesc[cnt], sizeof(tDot11fIERICDataDesc)); } @@ -2846,7 +2846,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, if (ar.num_WMMTSPEC) { pAssocRsp->num_tspecs = ar.num_WMMTSPEC; for (cnt = 0; cnt < ar.num_WMMTSPEC; cnt++) { - cdf_mem_copy(&pAssocRsp->TSPECInfo[cnt], + qdf_mem_copy(&pAssocRsp->TSPECInfo[cnt], &ar.WMMTSPEC[cnt], (sizeof(tDot11fIEWMMTSPEC) * ar.num_WMMTSPEC)); @@ -2856,20 +2856,20 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, if (ar.ESETrafStrmMet.present) { pAssocRsp->tsmPresent = 1; - cdf_mem_copy(&pAssocRsp->tsmIE.tsid, + qdf_mem_copy(&pAssocRsp->tsmIE.tsid, &ar.ESETrafStrmMet.tsid, sizeof(tSirMacESETSMIE)); } #endif #ifdef WLAN_FEATURE_11AC if (ar.VHTCaps.present) { - cdf_mem_copy(&pAssocRsp->VHTCaps, &ar.VHTCaps, + qdf_mem_copy(&pAssocRsp->VHTCaps, &ar.VHTCaps, sizeof(tDot11fIEVHTCaps)); lim_log(pMac, LOG1, FL("Received Assoc Response with VHT Cap")); lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps); } if (ar.VHTOperation.present) { - cdf_mem_copy(&pAssocRsp->VHTOperation, &ar.VHTOperation, + qdf_mem_copy(&pAssocRsp->VHTOperation, &ar.VHTOperation, sizeof(tDot11fIEVHTOperation)); lim_log(pMac, LOG1, FL("Received Assoc Response with VHT Operation")); @@ -2879,7 +2879,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, if (ar.ExtCap.present) { struct s_ext_cap *ext_cap; - cdf_mem_copy(&pAssocRsp->ExtCap.bytes, &ar.ExtCap.bytes, + qdf_mem_copy(&pAssocRsp->ExtCap.bytes, &ar.ExtCap.bytes, ar.ExtCap.num_bytes); ext_cap = (struct s_ext_cap *)&pAssocRsp->ExtCap.bytes; @@ -2905,7 +2905,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, } if (ar.vendor2_ie.VHTCaps.present) { - cdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps, + qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps, &ar.vendor2_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); lim_log(pMac, LOG1, @@ -2913,7 +2913,7 @@ sir_convert_assoc_resp_frame2_struct(tpAniSirGlobal pMac, lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps); } if (ar.vendor2_ie.VHTOperation.present) { - cdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation, + qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation, &ar.vendor2_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); lim_log(pMac, LOG1, @@ -2933,7 +2933,7 @@ sir_convert_reassoc_req_frame2_struct(tpAniSirGlobal pMac, uint32_t status; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0); + qdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0); /* delegate to the framesc-generated code, */ status = dot11f_unpack_re_assoc_request(pMac, pFrame, nFrame, &ar); @@ -3030,13 +3030,13 @@ sir_convert_reassoc_req_frame2_struct(tpAniSirGlobal pMac, } if (ar.HTCaps.present) { - cdf_mem_copy(&pAssocReq->HTCaps, &ar.HTCaps, + qdf_mem_copy(&pAssocReq->HTCaps, &ar.HTCaps, sizeof(tDot11fIEHTCaps)); } if (ar.WMMInfoStation.present) { pAssocReq->wmeInfoPresent = 1; - cdf_mem_copy(&pAssocReq->WMMInfoStation, &ar.WMMInfoStation, + qdf_mem_copy(&pAssocReq->WMMInfoStation, &ar.WMMInfoStation, sizeof(tDot11fIEWMMInfoStation)); } @@ -3080,11 +3080,11 @@ sir_convert_reassoc_req_frame2_struct(tpAniSirGlobal pMac, #ifdef WLAN_FEATURE_11AC if (ar.VHTCaps.present) { - cdf_mem_copy(&pAssocReq->VHTCaps, &ar.VHTCaps, + qdf_mem_copy(&pAssocReq->VHTCaps, &ar.VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (ar.OperatingMode.present) { - cdf_mem_copy(&pAssocReq->operMode, &ar.OperatingMode, + qdf_mem_copy(&pAssocReq->operMode, &ar.OperatingMode, sizeof(tDot11fIEOperatingMode)); lim_log(pMac, LOGW, FL("Received Assoc Req with Operating Mode IE\n")); @@ -3094,7 +3094,7 @@ sir_convert_reassoc_req_frame2_struct(tpAniSirGlobal pMac, if (ar.ExtCap.present) { struct s_ext_cap *ext_cap; - cdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar.ExtCap.bytes, + qdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar.ExtCap.bytes, ar.ExtCap.num_bytes); ext_cap = (struct s_ext_cap *)&pAssocReq->ExtCap.bytes; @@ -3125,9 +3125,9 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, uint8_t *pos = NULL; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) &eseBcnReportMandatoryIe, + qdf_mem_set((uint8_t *) &eseBcnReportMandatoryIe, sizeof(eseBcnReportMandatoryIe), 0); - pBies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + pBies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if (NULL == pBies) { lim_log(pMac, LOGE, FL("Failed to allocate memory\n")); return eSIR_MEM_ALLOC_FAILED; @@ -3139,7 +3139,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, lim_log(pMac, LOGE, FL("Failed to parse Beacon IEs (0x%08x, %d bytes):\n"), status, nPayload); - cdf_mem_free(pBies); + qdf_mem_free(pBies); return eSIR_FAILURE; } else if (DOT11F_WARNED(status)) { lim_log(pMac, LOGW, @@ -3214,16 +3214,16 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, if (pBies->RRMEnabledCap.present) { eseBcnReportMandatoryIe.rrmPresent = 1; - cdf_mem_copy(&eseBcnReportMandatoryIe.rmEnabledCapabilities, + qdf_mem_copy(&eseBcnReportMandatoryIe.rmEnabledCapabilities, &pBies->RRMEnabledCap, sizeof(tDot11fIERRMEnabledCap)); numBytes += 1 + 1 + SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX; } - *outIeBuf = cdf_mem_malloc(numBytes); + *outIeBuf = qdf_mem_malloc(numBytes); if (NULL == *outIeBuf) { lim_log(pMac, LOGP, FL("Memory Allocation failure")); - cdf_mem_free(pBies); + qdf_mem_free(pBies); return eSIR_MEM_ALLOC_FAILED; } pos = *outIeBuf; @@ -3243,7 +3243,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = eseBcnReportMandatoryIe.ssId.length; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) eseBcnReportMandatoryIe.ssId.ssId, eseBcnReportMandatoryIe.ssId.length); pos += eseBcnReportMandatoryIe.ssId.length; @@ -3263,7 +3263,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = eseBcnReportMandatoryIe.supportedRates.numRates; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) eseBcnReportMandatoryIe.supportedRates. rate, eseBcnReportMandatoryIe.supportedRates.numRates); @@ -3284,7 +3284,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = SIR_MAC_FH_PARAM_SET_EID_MAX; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) &eseBcnReportMandatoryIe.fhParamSet, SIR_MAC_FH_PARAM_SET_EID_MAX); pos += SIR_MAC_FH_PARAM_SET_EID_MAX; @@ -3320,7 +3320,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = SIR_MAC_CF_PARAM_SET_EID_MAX; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) &eseBcnReportMandatoryIe.cfParamSet, SIR_MAC_CF_PARAM_SET_EID_MAX); pos += SIR_MAC_CF_PARAM_SET_EID_MAX; @@ -3339,7 +3339,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = SIR_MAC_IBSS_PARAM_SET_EID_MAX; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) &eseBcnReportMandatoryIe.ibssParamSet. atim, SIR_MAC_IBSS_PARAM_SET_EID_MAX); pos += SIR_MAC_IBSS_PARAM_SET_EID_MAX; @@ -3358,7 +3358,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = SIR_MAC_TIM_EID_MIN; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) &eseBcnReportMandatoryIe.tim, SIR_MAC_TIM_EID_MIN); pos += SIR_MAC_TIM_EID_MIN; @@ -3377,7 +3377,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac, pos++; *pos = SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX; pos++; - cdf_mem_copy(pos, + qdf_mem_copy(pos, (uint8_t *) &eseBcnReportMandatoryIe. rmEnabledCapabilities, SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX); @@ -3399,11 +3399,11 @@ err_bcnrep: * that is returning failure.On success, the caller would take * care of freeing up the memory*/ if (retStatus == eSIR_FAILURE) { - cdf_mem_free(*outIeBuf); + qdf_mem_free(*outIeBuf); *outIeBuf = NULL; } - cdf_mem_free(pBies); + qdf_mem_free(pBies); return retStatus; } @@ -3418,9 +3418,9 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, uint32_t status; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0); + qdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0); - pBies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + pBies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if (NULL == pBies) { lim_log(pMac, LOGE, FL("Failed to allocate memory\n")); return eSIR_MEM_ALLOC_FAILED; @@ -3435,7 +3435,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, PELOG2(sir_dump_buf (pMac, SIR_DBG_MODULE_ID, LOG2, pPayload, nPayload); ) - cdf_mem_free(pBies); + qdf_mem_free(pBies); return eSIR_FAILURE; } else if (DOT11F_WARNED(status)) { lim_log(pMac, LOGW, @@ -3492,13 +3492,13 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, /* 11h IEs */ if (pBies->TPCReport.present) { pBeaconStruct->tpcReportPresent = 1; - cdf_mem_copy(&pBeaconStruct->tpcReport, + qdf_mem_copy(&pBeaconStruct->tpcReport, &pBies->TPCReport, sizeof(tDot11fIETPCReport)); } if (pBies->PowerConstraints.present) { pBeaconStruct->powerConstraintPresent = 1; - cdf_mem_copy(&pBeaconStruct->localPowerConstraint, + qdf_mem_copy(&pBeaconStruct->localPowerConstraint, &pBies->PowerConstraints, sizeof(tDot11fIEPowerConstraints)); } @@ -3511,7 +3511,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, pBies->ESETxmitPower.power_limit; } if (pBies->QBSSLoad.present) { - cdf_mem_copy(&pBeaconStruct->QBSSLoad, &pBies->QBSSLoad, + qdf_mem_copy(&pBeaconStruct->QBSSLoad, &pBies->QBSSLoad, sizeof(tDot11fIEQBSSLoad)); } #endif @@ -3530,45 +3530,45 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, if (pBies->ChanSwitchAnn.present) { pBeaconStruct->channelSwitchPresent = 1; - cdf_mem_copy(&pBeaconStruct->channelSwitchIE, + qdf_mem_copy(&pBeaconStruct->channelSwitchIE, &pBies->ChanSwitchAnn, sizeof(pBeaconStruct->channelSwitchIE)); } if (pBies->SuppOperatingClasses.present) { pBeaconStruct->supp_operating_class_present = 1; - cdf_mem_copy(&pBeaconStruct->supp_operating_classes, + qdf_mem_copy(&pBeaconStruct->supp_operating_classes, &pBies->SuppOperatingClasses, sizeof(tDot11fIESuppOperatingClasses)); } if (pBies->ext_chan_switch_ann.present) { pBeaconStruct->ext_chan_switch_present = 1; - cdf_mem_copy(&pBeaconStruct->ext_chan_switch, + qdf_mem_copy(&pBeaconStruct->ext_chan_switch, &pBies->ext_chan_switch_ann, sizeof(tDot11fIEext_chan_switch_ann)); } if (pBies->sec_chan_offset_ele.present) { pBeaconStruct->sec_chan_offset_present = 1; - cdf_mem_copy(&pBeaconStruct->sec_chan_offset, + qdf_mem_copy(&pBeaconStruct->sec_chan_offset, &pBies->sec_chan_offset_ele, sizeof(pBeaconStruct->sec_chan_offset)); } if (pBies->Quiet.present) { pBeaconStruct->quietIEPresent = 1; - cdf_mem_copy(&pBeaconStruct->quietIE, &pBies->Quiet, + qdf_mem_copy(&pBeaconStruct->quietIE, &pBies->Quiet, sizeof(tDot11fIEQuiet)); } if (pBies->HTCaps.present) { - cdf_mem_copy(&pBeaconStruct->HTCaps, &pBies->HTCaps, + qdf_mem_copy(&pBeaconStruct->HTCaps, &pBies->HTCaps, sizeof(tDot11fIEHTCaps)); } if (pBies->HTInfo.present) { - cdf_mem_copy(&pBeaconStruct->HTInfo, &pBies->HTInfo, + qdf_mem_copy(&pBeaconStruct->HTInfo, &pBies->HTInfo, sizeof(tDot11fIEHTInfo)); } @@ -3611,23 +3611,23 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, #ifdef WLAN_FEATURE_11AC if (pBies->VHTCaps.present) { pBeaconStruct->VHTCaps.present = 1; - cdf_mem_copy(&pBeaconStruct->VHTCaps, &pBies->VHTCaps, + qdf_mem_copy(&pBeaconStruct->VHTCaps, &pBies->VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pBies->VHTOperation.present) { pBeaconStruct->VHTOperation.present = 1; - cdf_mem_copy(&pBeaconStruct->VHTOperation, &pBies->VHTOperation, + qdf_mem_copy(&pBeaconStruct->VHTOperation, &pBies->VHTOperation, sizeof(tDot11fIEVHTOperation)); } if (pBies->VHTExtBssLoad.present) { pBeaconStruct->VHTExtBssLoad.present = 1; - cdf_mem_copy(&pBeaconStruct->VHTExtBssLoad, + qdf_mem_copy(&pBeaconStruct->VHTExtBssLoad, &pBies->VHTExtBssLoad, sizeof(tDot11fIEVHTExtBssLoad)); } if (pBies->OperatingMode.present) { pBeaconStruct->OperatingMode.present = 1; - cdf_mem_copy(&pBeaconStruct->OperatingMode, + qdf_mem_copy(&pBeaconStruct->OperatingMode, &pBies->OperatingMode, sizeof(tDot11fIEOperatingMode)); } @@ -3635,7 +3635,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, if (pBies->MobilityDomain.present) { pBeaconStruct->mdiePresent = 1; - cdf_mem_copy(pBeaconStruct->mdie, &pBies->MobilityDomain.MDID, + qdf_mem_copy(pBeaconStruct->mdie, &pBies->MobilityDomain.MDID, SIR_MDIE_SIZE); } @@ -3649,17 +3649,17 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, if (pBies->vendor2_ie.VHTCaps.present) { pBeaconStruct->vendor2_ie.VHTCaps.present = 1; - cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, + qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, &pBies->vendor2_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pBies->vendor2_ie.VHTOperation.present) { pBeaconStruct->vendor2_ie.VHTOperation.present = 1; - cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, + qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, &pBies->vendor2_ie.VHTOperation, sizeof(tDot11fIEVHTOperation)); } - cdf_mem_free(pBies); + qdf_mem_free(pBies); return eSIR_SUCCESS; } /* End sir_parse_beacon_ie. */ @@ -3682,18 +3682,18 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, rfBand = WMA_GET_RX_RFBAND(pFrame); /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0); + qdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0); - pBeacon = cdf_mem_malloc(sizeof(tDot11fBeacon)); + pBeacon = qdf_mem_malloc(sizeof(tDot11fBeacon)); if (NULL == pBeacon) { lim_log(pMac, LOGE, FL("Failed to allocate memory\n")); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0); + qdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0); /* get the MAC address out of the BD, */ - cdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6); + qdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6); /* delegate to the framesc-generated code, */ status = dot11f_unpack_beacon(pMac, pPayload, nPayload, pBeacon); @@ -3704,7 +3704,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, PELOG2(sir_dump_buf (pMac, SIR_DBG_MODULE_ID, LOG2, pPayload, nPayload); ) - cdf_mem_free(pBeacon); + qdf_mem_free(pBeacon); return eSIR_FAILURE; } else if (DOT11F_WARNED(status)) { lim_log(pMac, LOGW, @@ -3717,7 +3717,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, } /* & "transliterate" from a 'tDot11fBeacon' to a 'tSirProbeRespBeacon'... */ /* Timestamp */ - cdf_mem_copy((uint8_t *) pBeaconStruct->timeStamp, + qdf_mem_copy((uint8_t *) pBeaconStruct->timeStamp, (uint8_t *) &pBeacon->TimeStamp, sizeof(tSirMacTimeStamp)); @@ -3807,51 +3807,51 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, if (pBeacon->ChanSwitchAnn.present) { pBeaconStruct->channelSwitchPresent = 1; - cdf_mem_copy(&pBeaconStruct->channelSwitchIE, + qdf_mem_copy(&pBeaconStruct->channelSwitchIE, &pBeacon->ChanSwitchAnn, sizeof(pBeaconStruct->channelSwitchIE)); } if (pBeacon->ext_chan_switch_ann.present) { pBeaconStruct->ext_chan_switch_present = 1; - cdf_mem_copy(&pBeaconStruct->ext_chan_switch, + qdf_mem_copy(&pBeaconStruct->ext_chan_switch, &pBeacon->ext_chan_switch_ann, sizeof(tDot11fIEext_chan_switch_ann)); } if (pBeacon->sec_chan_offset_ele.present) { pBeaconStruct->sec_chan_offset_present = 1; - cdf_mem_copy(&pBeaconStruct->sec_chan_offset, + qdf_mem_copy(&pBeaconStruct->sec_chan_offset, &pBeacon->sec_chan_offset_ele, sizeof(pBeaconStruct->sec_chan_offset)); } if (pBeacon->TPCReport.present) { pBeaconStruct->tpcReportPresent = 1; - cdf_mem_copy(&pBeaconStruct->tpcReport, &pBeacon->TPCReport, + qdf_mem_copy(&pBeaconStruct->tpcReport, &pBeacon->TPCReport, sizeof(tDot11fIETPCReport)); } if (pBeacon->PowerConstraints.present) { pBeaconStruct->powerConstraintPresent = 1; - cdf_mem_copy(&pBeaconStruct->localPowerConstraint, + qdf_mem_copy(&pBeaconStruct->localPowerConstraint, &pBeacon->PowerConstraints, sizeof(tDot11fIEPowerConstraints)); } if (pBeacon->Quiet.present) { pBeaconStruct->quietIEPresent = 1; - cdf_mem_copy(&pBeaconStruct->quietIE, &pBeacon->Quiet, + qdf_mem_copy(&pBeaconStruct->quietIE, &pBeacon->Quiet, sizeof(tDot11fIEQuiet)); } if (pBeacon->HTCaps.present) { - cdf_mem_copy(&pBeaconStruct->HTCaps, &pBeacon->HTCaps, + qdf_mem_copy(&pBeaconStruct->HTCaps, &pBeacon->HTCaps, sizeof(tDot11fIEHTCaps)); } if (pBeacon->HTInfo.present) { - cdf_mem_copy(&pBeaconStruct->HTInfo, &pBeacon->HTInfo, + qdf_mem_copy(&pBeaconStruct->HTInfo, &pBeacon->HTInfo, sizeof(tDot11fIEHTInfo)); } @@ -3908,7 +3908,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, if (pBeacon->MobilityDomain.present) { /* MobilityDomain */ pBeaconStruct->mdiePresent = 1; - cdf_mem_copy((uint8_t *) &(pBeaconStruct->mdie[0]), + qdf_mem_copy((uint8_t *) &(pBeaconStruct->mdie[0]), (uint8_t *) &(pBeacon->MobilityDomain.MDID), sizeof(uint16_t)); pBeaconStruct->mdie[2] = @@ -3926,39 +3926,39 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, if (pBeacon->ESETxmitPower.present) { /* copy ESE TPC info element */ pBeaconStruct->eseTxPwr.present = 1; - cdf_mem_copy(&pBeaconStruct->eseTxPwr, + qdf_mem_copy(&pBeaconStruct->eseTxPwr, &pBeacon->ESETxmitPower, sizeof(tDot11fIEESETxmitPower)); } if (pBeacon->QBSSLoad.present) { - cdf_mem_copy(&pBeaconStruct->QBSSLoad, + qdf_mem_copy(&pBeaconStruct->QBSSLoad, &pBeacon->QBSSLoad, sizeof(tDot11fIEQBSSLoad)); } #endif #ifdef WLAN_FEATURE_11AC if (pBeacon->VHTCaps.present) { - cdf_mem_copy(&pBeaconStruct->VHTCaps, &pBeacon->VHTCaps, + qdf_mem_copy(&pBeaconStruct->VHTCaps, &pBeacon->VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pBeacon->VHTOperation.present) { - cdf_mem_copy(&pBeaconStruct->VHTOperation, + qdf_mem_copy(&pBeaconStruct->VHTOperation, &pBeacon->VHTOperation, sizeof(tDot11fIEVHTOperation)); } if (pBeacon->VHTExtBssLoad.present) { - cdf_mem_copy(&pBeaconStruct->VHTExtBssLoad, + qdf_mem_copy(&pBeaconStruct->VHTExtBssLoad, &pBeacon->VHTExtBssLoad, sizeof(tDot11fIEVHTExtBssLoad)); } if (pBeacon->OperatingMode.present) { - cdf_mem_copy(&pBeaconStruct->OperatingMode, + qdf_mem_copy(&pBeaconStruct->OperatingMode, &pBeacon->OperatingMode, sizeof(tDot11fIEOperatingMode)); } if (pBeacon->WiderBWChanSwitchAnn.present) { pBeaconStruct->WiderBWChanSwitchAnnPresent = 1; - cdf_mem_copy(&pBeaconStruct->WiderBWChanSwitchAnn, + qdf_mem_copy(&pBeaconStruct->WiderBWChanSwitchAnn, &pBeacon->WiderBWChanSwitchAnn, sizeof(tDot11fIEWiderBWChanSwitchAnn)); } @@ -3967,7 +3967,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, /* IBSS Peer Params */ if (pBeacon->IBSSParams.present) { pBeaconStruct->IBSSParams.present = 1; - cdf_mem_copy(&pBeaconStruct->IBSSParams, &pBeacon->IBSSParams, + qdf_mem_copy(&pBeaconStruct->IBSSParams, &pBeacon->IBSSParams, sizeof(tDot11fIEIBSSParams)); } @@ -3986,12 +3986,12 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, ) } if (pBeacon->vendor2_ie.VHTCaps.present) { - cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, + qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps, &pBeacon->vendor2_ie.VHTCaps, sizeof(tDot11fIEVHTCaps)); } if (pBeacon->vendor2_ie.VHTOperation.present) { - cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, + qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation, &pBeacon->VHTOperation, sizeof(tDot11fIEVHTOperation)); } @@ -4007,7 +4007,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ - cdf_mem_free(pBeacon); + qdf_mem_free(pBeacon); return eSIR_SUCCESS; } /* End sir_convert_beacon_frame2_struct. */ @@ -4021,7 +4021,7 @@ sir_convert_auth_frame2_struct(tpAniSirGlobal pMac, uint32_t status; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAuth, sizeof(tSirMacAuthFrameBody), 0); + qdf_mem_set((uint8_t *) pAuth, sizeof(tSirMacAuthFrameBody), 0); /* delegate to the framesc-generated code, */ status = dot11f_unpack_authentication(pMac, pFrame, nFrame, &auth); @@ -4051,7 +4051,7 @@ sir_convert_auth_frame2_struct(tpAniSirGlobal pMac, if (auth.ChallengeText.present) { pAuth->type = SIR_MAC_CHALLENGE_TEXT_EID; pAuth->length = auth.ChallengeText.num_text; - cdf_mem_copy(pAuth->challengeText, auth.ChallengeText.text, + qdf_mem_copy(pAuth->challengeText, auth.ChallengeText.text, auth.ChallengeText.num_text); } @@ -4078,7 +4078,7 @@ sir_convert_addts_req2_struct(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsReqInfo), 0); + qdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsReqInfo), 0); /* delegate to the framesc-generated code, */ switch (*pFrame) { @@ -4219,9 +4219,9 @@ sir_convert_addts_rsp2_struct(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsRspInfo), 0); - cdf_mem_set((uint8_t *) &addts, sizeof(tDot11fAddTSResponse), 0); - cdf_mem_set((uint8_t *) &wmmaddts, sizeof(tDot11fWMMAddTSResponse), 0); + qdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsRspInfo), 0); + qdf_mem_set((uint8_t *) &addts, sizeof(tDot11fAddTSResponse), 0); + qdf_mem_set((uint8_t *) &wmmaddts, sizeof(tDot11fWMMAddTSResponse), 0); /* delegate to the framesc-generated code, */ switch (*pFrame) { @@ -4304,7 +4304,7 @@ sir_convert_addts_rsp2_struct(tpAniSirGlobal pMac, #ifdef FEATURE_WLAN_ESE if (addts.ESETrafStrmMet.present) { pAddTs->tsmPresent = 1; - cdf_mem_copy(&pAddTs->tsmIE.tsid, + qdf_mem_copy(&pAddTs->tsmIE.tsid, &addts.ESETrafStrmMet.tsid, sizeof(tSirMacESETSMIE)); } @@ -4373,7 +4373,7 @@ sir_convert_addts_rsp2_struct(tpAniSirGlobal pMac, #ifdef FEATURE_WLAN_ESE if (wmmaddts.ESETrafStrmMet.present) { pAddTs->tsmPresent = 1; - cdf_mem_copy(&pAddTs->tsmIE.tsid, + qdf_mem_copy(&pAddTs->tsmIE.tsid, &wmmaddts.ESETrafStrmMet.tsid, sizeof(tSirMacESETSMIE)); } @@ -4402,7 +4402,7 @@ sir_convert_delts_req2_struct(tpAniSirGlobal pMac, return eSIR_FAILURE; } /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pDelTs, sizeof(tSirDeltsReqInfo), 0); + qdf_mem_set((uint8_t *) pDelTs, sizeof(tSirDeltsReqInfo), 0); /* delegate to the framesc-generated code, */ switch (*pFrame) { @@ -4515,7 +4515,7 @@ sir_convert_tpc_req_frame2_struct(tpAniSirGlobal pMac, { tDot11fTPCRequest req; uint32_t status; - cdf_mem_set((uint8_t *) pTpcReqFrame, sizeof(tSirMacTpcReqActionFrame), + qdf_mem_set((uint8_t *) pTpcReqFrame, sizeof(tSirMacTpcReqActionFrame), 0); status = dot11f_unpack_tpc_request(pMac, pFrame, nFrame, &req); if (DOT11F_FAILED(status)) { @@ -4560,7 +4560,7 @@ sir_convert_meas_req_frame2_struct(tpAniSirGlobal pMac, uint32_t status; /* Zero-init our [out] parameter, */ - cdf_mem_set((uint8_t *) pMeasReqFrame, + qdf_mem_set((uint8_t *) pMeasReqFrame, sizeof(tpSirMacMeasReqActionFrame), 0); /* delegate to the framesc-generated code, */ @@ -4618,7 +4618,7 @@ sir_convert_meas_req_frame2_struct(tpAniSirGlobal pMac, pMeasReqFrame->measReqIE.measReqField.channelNumber = mr.MeasurementRequest[0].channel_no; - cdf_mem_copy(pMeasReqFrame->measReqIE.measReqField.measStartTime, + qdf_mem_copy(pMeasReqFrame->measReqIE.measReqField.measStartTime, mr.MeasurementRequest[0].meas_start_time, 8); pMeasReqFrame->measReqIE.measReqField.measDuration = @@ -4731,7 +4731,7 @@ tSirRetStatus populate_dot11f_ese_cckm_opaque(tpAniSirGlobal pMac, pDot11f->present = 1; /* Dont include OUI */ pDot11f->num_data = pCCKMie->cckmIEdata[idx + 1] - 4; - cdf_mem_copy(pDot11f->data, pCCKMie->cckmIEdata + idx + 2 + 4, /* EID,len,OUI */ + qdf_mem_copy(pDot11f->data, pCCKMie->cckmIEdata + idx + 2 + 4, /* EID,len,OUI */ pCCKMie->cckmIEdata[idx + 1] - 4); /* Skip OUI */ } } @@ -4744,7 +4744,7 @@ void populate_dot11_tsrsie(tpAniSirGlobal pMac, uint8_t rate_length) { pDot11f->tsid = pOld->tsid; - cdf_mem_copy(pDot11f->tsrates, pOld->rates, rate_length); + qdf_mem_copy(pDot11f->tsrates, pOld->rates, rate_length); pDot11f->num_tsrates = rate_length; pDot11f->present = 1; } @@ -4760,19 +4760,19 @@ populate_dot11f_tclas(tpAniSirGlobal pMac, switch (pDot11f->classifier_type) { case SIR_MAC_TCLASTYPE_ETHERNET: - cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source, + qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source, (uint8_t *) &pOld->tclasParams.eth.srcAddr, 6); - cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest, + qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest, (uint8_t *) &pOld->tclasParams.eth.dstAddr, 6); pDot11f->info.EthParams.type = pOld->tclasParams.eth.type; break; case SIR_MAC_TCLASTYPE_TCPUDPIP: pDot11f->info.IpParams.version = pOld->version; if (SIR_MAC_TCLAS_IPV4 == pDot11f->info.IpParams.version) { - cdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params. + qdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params. source, pOld->tclasParams.ipv4.srcIpAddr, 4); - cdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params. + qdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params. dest, pOld->tclasParams.ipv4.dstIpAddr, 4); pDot11f->info.IpParams.params.IpV4Params.src_port = pOld->tclasParams.ipv4.srcPort; @@ -4785,11 +4785,11 @@ populate_dot11f_tclas(tpAniSirGlobal pMac, pDot11f->info.IpParams.params.IpV4Params.reserved = pOld->tclasParams.ipv4.rsvd; } else { - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.source, (uint8_t *) pOld->tclasParams.ipv6. srcIpAddr, 16); - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.dest, (uint8_t *) pOld->tclasParams.ipv6. dstIpAddr, 16); @@ -4797,7 +4797,7 @@ populate_dot11f_tclas(tpAniSirGlobal pMac, pOld->tclasParams.ipv6.srcPort; pDot11f->info.IpParams.params.IpV6Params.dest_port = pOld->tclasParams.ipv6.dstPort; - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.flow_label, (uint8_t *) pOld->tclasParams.ipv6. flowLabel, 3); @@ -4831,20 +4831,20 @@ populate_dot11f_wmmtclas(tpAniSirGlobal pMac, switch (pDot11f->classifier_type) { case SIR_MAC_TCLASTYPE_ETHERNET: - cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source, + qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source, (uint8_t *) &pOld->tclasParams.eth.srcAddr, 6); - cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest, + qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest, (uint8_t *) &pOld->tclasParams.eth.dstAddr, 6); pDot11f->info.EthParams.type = pOld->tclasParams.eth.type; break; case SIR_MAC_TCLASTYPE_TCPUDPIP: pDot11f->info.IpParams.version = pOld->version; if (SIR_MAC_TCLAS_IPV4 == pDot11f->info.IpParams.version) { - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV4Params.source, (uint8_t *) pOld->tclasParams.ipv4. srcIpAddr, 4); - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV4Params.dest, (uint8_t *) pOld->tclasParams.ipv4. dstIpAddr, 4); @@ -4859,11 +4859,11 @@ populate_dot11f_wmmtclas(tpAniSirGlobal pMac, pDot11f->info.IpParams.params.IpV4Params.reserved = pOld->tclasParams.ipv4.rsvd; } else { - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.source, (uint8_t *) pOld->tclasParams.ipv6. srcIpAddr, 16); - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.dest, (uint8_t *) pOld->tclasParams.ipv6. dstIpAddr, 16); @@ -4871,7 +4871,7 @@ populate_dot11f_wmmtclas(tpAniSirGlobal pMac, pOld->tclasParams.ipv6.srcPort; pDot11f->info.IpParams.params.IpV6Params.dest_port = pOld->tclasParams.ipv6.dstPort; - cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. + qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams. params.IpV6Params.flow_label, (uint8_t *) pOld->tclasParams.ipv6. flowLabel, 3); @@ -5038,7 +5038,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, if (pSirWPSProbeRspIE->FieldPresent & SIR_WPS_PROBRSP_UUIDE_PRESENT) { pDot11f->UUID_E.present = 1; - cdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSProbeRspIE->UUID_E, + qdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSProbeRspIE->UUID_E, WNI_CFG_WPS_UUID_LEN); } else pDot11f->UUID_E.present = 0; @@ -5048,7 +5048,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, pDot11f->Manufacturer.present = 1; pDot11f->Manufacturer.num_name = pSirWPSProbeRspIE->Manufacture.num_name; - cdf_mem_copy(pDot11f->Manufacturer.name, + qdf_mem_copy(pDot11f->Manufacturer.name, pSirWPSProbeRspIE->Manufacture.name, pSirWPSProbeRspIE->Manufacture.num_name); } else @@ -5059,7 +5059,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, pDot11f->ModelName.present = 1; pDot11f->ModelName.num_text = pSirWPSProbeRspIE->ModelName.num_text; - cdf_mem_copy(pDot11f->ModelName.text, + qdf_mem_copy(pDot11f->ModelName.text, pSirWPSProbeRspIE->ModelName.text, pDot11f->ModelName.num_text); } else @@ -5070,7 +5070,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, pDot11f->ModelNumber.present = 1; pDot11f->ModelNumber.num_text = pSirWPSProbeRspIE->ModelNumber.num_text; - cdf_mem_copy(pDot11f->ModelNumber.text, + qdf_mem_copy(pDot11f->ModelNumber.text, pSirWPSProbeRspIE->ModelNumber.text, pDot11f->ModelNumber.num_text); } else @@ -5081,7 +5081,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, pDot11f->SerialNumber.present = 1; pDot11f->SerialNumber.num_text = pSirWPSProbeRspIE->SerialNumber.num_text; - cdf_mem_copy(pDot11f->SerialNumber.text, + qdf_mem_copy(pDot11f->SerialNumber.text, pSirWPSProbeRspIE->SerialNumber.text, pDot11f->SerialNumber.num_text); } else @@ -5090,7 +5090,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, if (pSirWPSProbeRspIE-> FieldPresent & SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT) { pDot11f->PrimaryDeviceType.present = 1; - cdf_mem_copy(pDot11f->PrimaryDeviceType.oui, + qdf_mem_copy(pDot11f->PrimaryDeviceType.oui, pSirWPSProbeRspIE->PrimaryDeviceOUI, sizeof(pSirWPSProbeRspIE->PrimaryDeviceOUI)); pDot11f->PrimaryDeviceType.primary_category = @@ -5105,7 +5105,7 @@ tSirRetStatus populate_dot11f_probe_res_wpsi_es(tpAniSirGlobal pMac, pDot11f->DeviceName.present = 1; pDot11f->DeviceName.num_text = pSirWPSProbeRspIE->DeviceName.num_text; - cdf_mem_copy(pDot11f->DeviceName.text, + qdf_mem_copy(pDot11f->DeviceName.text, pSirWPSProbeRspIE->DeviceName.text, pDot11f->DeviceName.num_text); } else @@ -5218,7 +5218,7 @@ tSirRetStatus populate_dot11f_beacon_wpsi_es(tpAniSirGlobal pMac, if (pSirWPSBeaconIE->FieldPresent & SIR_WPS_BEACON_UUIDE_PRESENT) { pDot11f->UUID_E.present = 1; - cdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSBeaconIE->UUID_E, + qdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSBeaconIE->UUID_E, WNI_CFG_WPS_UUID_LEN); } else pDot11f->UUID_E.present = 0; @@ -5519,7 +5519,7 @@ tSirRetStatus populate_dot11f_beacon_report(tpAniSirGlobal pMac, pDot11f->report.Beacon.regClass = pBeaconReport->regClass; pDot11f->report.Beacon.channel = pBeaconReport->channel; - cdf_mem_copy(pDot11f->report.Beacon.meas_start_time, + qdf_mem_copy(pDot11f->report.Beacon.meas_start_time, pBeaconReport->measStartTime, sizeof(pDot11f->report.Beacon.meas_start_time)); pDot11f->report.Beacon.meas_duration = pBeaconReport->measDuration; @@ -5528,14 +5528,14 @@ tSirRetStatus populate_dot11f_beacon_report(tpAniSirGlobal pMac, !pBeaconReport->bcnProbeRsp; pDot11f->report.Beacon.RCPI = pBeaconReport->rcpi; pDot11f->report.Beacon.RSNI = pBeaconReport->rsni; - cdf_mem_copy(pDot11f->report.Beacon.BSSID, pBeaconReport->bssid, + qdf_mem_copy(pDot11f->report.Beacon.BSSID, pBeaconReport->bssid, sizeof(tSirMacAddr)); pDot11f->report.Beacon.antenna_id = pBeaconReport->antennaId; pDot11f->report.Beacon.parent_TSF = pBeaconReport->parentTSF; if (pBeaconReport->numIes) { pDot11f->report.Beacon.BeaconReportFrmBody.present = 1; - cdf_mem_copy(pDot11f->report.Beacon.BeaconReportFrmBody. + qdf_mem_copy(pDot11f->report.Beacon.BeaconReportFrmBody. reportedFields, pBeaconReport->Ies, pBeaconReport->numIes); pDot11f->report.Beacon.BeaconReportFrmBody.num_reportedFields = @@ -5704,12 +5704,12 @@ tSirRetStatus populate_dot11f_timing_advert_frame(tpAniSirGlobal mac_ctx, WNI_CFG_MAX_TX_POWER_5_LEN); item = WNI_CFG_COUNTRY_CODE; CFG_GET_STR(nSirStatus, mac_ctx, item, code, codelen, 3); - cdf_mem_copy(&frame->Country, code, codelen); + qdf_mem_copy(&frame->Country, code, codelen); if (len > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE) len = MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE; frame->Country.num_triplets = (uint8_t)(len / 3); - cdf_mem_copy((uint8_t *)&frame->Country.triplets, temp, len); + qdf_mem_copy((uint8_t *)&frame->Country.triplets, temp, len); frame->Country.present = 1; /* PowerConstraints */ diff --git a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c index 9b91902ae7de..093e40430ff0 100644 --- a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c +++ b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -44,21 +44,21 @@ void convert_ssid(tpAniSirGlobal pMac, tSirMacSSid *pOld, tDot11fIESSID *pNew) { pOld->length = pNew->num_ssid; - cdf_mem_copy(pOld->ssId, pNew->ssid, pNew->num_ssid); + qdf_mem_copy(pOld->ssId, pNew->ssid, pNew->num_ssid); } void convert_supp_rates(tpAniSirGlobal pMac, tSirMacRateSet *pOld, tDot11fIESuppRates *pNew) { pOld->numRates = pNew->num_rates; - cdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates); + qdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates); } void convert_ext_supp_rates(tpAniSirGlobal pMac, tSirMacRateSet *pOld, tDot11fIEExtSuppRates *pNew) { pOld->numRates = pNew->num_rates; - cdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates); + qdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates); } void convert_qos_caps(tpAniSirGlobal pMac, @@ -101,7 +101,7 @@ tSirRetStatus convert_wpa(tpAniSirGlobal pMac, } pOld->length = (uint8_t) written - 2; - cdf_mem_copy(pOld->info, buffer + 2, pOld->length); + qdf_mem_copy(pOld->info, buffer + 2, pOld->length); return eSIR_SUCCESS; } @@ -116,7 +116,7 @@ tSirRetStatus convert_wpa_opaque(tpAniSirGlobal pMac, pOld->info[1] = 0x50; pOld->info[2] = 0xf2; pOld->info[3] = 0x01; - cdf_mem_copy(pOld->info + 4, pNew->data, pNew->num_data); + qdf_mem_copy(pOld->info + 4, pNew->data, pNew->num_data); return eSIR_SUCCESS; } @@ -129,7 +129,7 @@ tSirRetStatus convert_wapi_opaque(tpAniSirGlobal pMac, /* This is awful, I know, but the old code just rammed the IE into */ /* an opaque array. Note that we need to explicitly add the OUI! */ pOld->length = pNew->num_data; - cdf_mem_copy(pOld->info, pNew->data, pNew->num_data); + qdf_mem_copy(pOld->info, pNew->data, pNew->num_data); return eSIR_SUCCESS; } @@ -149,7 +149,7 @@ tSirRetStatus convert_wsc_opaque(tpAniSirGlobal pMac, pOld->addIEdata[curAddIELen++] = 0x50; pOld->addIEdata[curAddIELen++] = 0xf2; pOld->addIEdata[curAddIELen++] = 0x04; - cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); + qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); return eSIR_SUCCESS; } @@ -168,7 +168,7 @@ tSirRetStatus convert_p2p_opaque(tpAniSirGlobal pMac, pOld->addIEdata[curAddIELen++] = 0x6f; pOld->addIEdata[curAddIELen++] = 0x9A; pOld->addIEdata[curAddIELen++] = 0x09; - cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); + qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); return eSIR_SUCCESS; } @@ -188,7 +188,7 @@ tSirRetStatus convert_wfd_opaque(tpAniSirGlobal pMac, pOld->addIEdata[curAddIELen++] = 0x6f; pOld->addIEdata[curAddIELen++] = 0x9A; pOld->addIEdata[curAddIELen++] = 0x0a; - cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); + qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data); return eSIR_SUCCESS; } @@ -207,7 +207,7 @@ tSirRetStatus convert_rsn(tpAniSirGlobal pMac, } pOld->length = (uint8_t) written - 2; - cdf_mem_copy(pOld->info, buffer + 2, pOld->length); + qdf_mem_copy(pOld->info, buffer + 2, pOld->length); return eSIR_SUCCESS; } @@ -218,7 +218,7 @@ tSirRetStatus convert_rsn_opaque(tpAniSirGlobal pMac, /* This is awful, I know, but the old code just rammed the IE into */ /* an opaque array. */ pOld->length = pNew->num_data; - cdf_mem_copy(pOld->info, pNew->data, pOld->length); + qdf_mem_copy(pOld->info, pNew->data, pOld->length); return eSIR_SUCCESS; } @@ -239,7 +239,7 @@ void convert_supp_channels(tpAniSirGlobal pMac, { pOld->type = 36; pOld->length = (pNew->num_bands * 2); - cdf_mem_copy((uint8_t *) pOld->supportedChannels, + qdf_mem_copy((uint8_t *) pOld->supportedChannels, (uint8_t *) pNew->bands, pOld->length); } @@ -268,7 +268,7 @@ void convert_tim(tpAniSirGlobal pMac, tSirMacTim *pOld, tDot11fIETIM *pNew) pOld->bitmapControl = pNew->bmpctl; pOld->bitmapLength = pNew->num_vbmp; - cdf_mem_copy(pOld->bitmap, pNew->vbmp, pNew->num_vbmp); + qdf_mem_copy(pOld->bitmap, pNew->vbmp, pNew->num_vbmp); } void convert_country(tpAniSirGlobal pMac, @@ -276,7 +276,7 @@ void convert_country(tpAniSirGlobal pMac, { int i; - cdf_mem_copy(pOld->countryString, pNew->country, COUNTRY_STRING_LENGTH); + qdf_mem_copy(pOld->countryString, pNew->country, COUNTRY_STRING_LENGTH); pOld->numIntervals = pNew->num_triplets; @@ -295,7 +295,7 @@ void convert_wmm_params(tpAniSirGlobal pMac, pOld->type = 221; pOld->length = 24; - cdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qosInfo, + qdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qosInfo, 1); pOld->acbe.aci.aifsn = pNew->acbe_aifsn; @@ -342,7 +342,7 @@ void convert_edca_param(tpAniSirGlobal pMac, pOld->type = 12; pOld->length = 20; - cdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qos, 1); + qdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qos, 1); pOld->acbe.aci.aifsn = pNew->acbe_aifsn; pOld->acbe.aci.acm = pNew->acbe_acm; @@ -422,9 +422,9 @@ tSirRetStatus convert_tclas(tpAniSirGlobal pMac, switch (pNew->classifier_type) { case 0: - cdf_mem_copy(pOld->tclasParams.eth.srcAddr, + qdf_mem_copy(pOld->tclasParams.eth.srcAddr, pNew->info.EthParams.source, 6); - cdf_mem_copy(pOld->tclasParams.eth.dstAddr, + qdf_mem_copy(pOld->tclasParams.eth.dstAddr, pNew->info.EthParams.dest, 6); pOld->tclasParams.eth.type = pNew->info.EthParams.type; break; @@ -432,10 +432,10 @@ tSirRetStatus convert_tclas(tpAniSirGlobal pMac, pOld->version = pNew->info.IpParams.version; if (4 == pNew->info.IpParams.version) { pOld->tclasParams.ipv4.version = 4; - cdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr, + qdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr, pNew->info.IpParams.params.IpV4Params. source, 4); - cdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr, + qdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr, pNew->info.IpParams.params.IpV4Params.dest, 4); pOld->tclasParams.ipv4.srcPort = @@ -450,11 +450,11 @@ tSirRetStatus convert_tclas(tpAniSirGlobal pMac, pNew->info.IpParams.params.IpV4Params.reserved; } else if (6 == pNew->info.IpParams.version) { pOld->tclasParams.ipv6.version = 6; - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. srcIpAddr, (uint8_t *) pNew->info.IpParams.params. IpV6Params.source, 16); - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. dstIpAddr, (uint8_t *) pNew->info.IpParams.params. IpV6Params.dest, 16); @@ -462,7 +462,7 @@ tSirRetStatus convert_tclas(tpAniSirGlobal pMac, pNew->info.IpParams.params.IpV6Params.src_port; pOld->tclasParams.ipv6.dstPort = pNew->info.IpParams.params.IpV6Params.dest_port; - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. flowLabel, (uint8_t *) pNew->info.IpParams.params. IpV6Params.flow_label, 3); @@ -526,9 +526,9 @@ tSirRetStatus convert_wmmtclas(tpAniSirGlobal pMac, switch (pNew->classifier_type) { case 0: - cdf_mem_copy(pOld->tclasParams.eth.srcAddr, + qdf_mem_copy(pOld->tclasParams.eth.srcAddr, pNew->info.EthParams.source, 6); - cdf_mem_copy(pOld->tclasParams.eth.dstAddr, + qdf_mem_copy(pOld->tclasParams.eth.dstAddr, pNew->info.EthParams.dest, 6); pOld->tclasParams.eth.type = pNew->info.EthParams.type; break; @@ -536,10 +536,10 @@ tSirRetStatus convert_wmmtclas(tpAniSirGlobal pMac, pOld->version = pNew->info.IpParams.version; if (4 == pNew->info.IpParams.version) { pOld->tclasParams.ipv4.version = 4; - cdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr, + qdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr, pNew->info.IpParams.params.IpV4Params. source, 4); - cdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr, + qdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr, pNew->info.IpParams.params.IpV4Params.dest, 4); pOld->tclasParams.ipv4.srcPort = @@ -554,11 +554,11 @@ tSirRetStatus convert_wmmtclas(tpAniSirGlobal pMac, pNew->info.IpParams.params.IpV4Params.reserved; } else if (6 == pNew->info.IpParams.version) { pOld->tclasParams.ipv6.version = 6; - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. srcIpAddr, (uint8_t *) pNew->info.IpParams.params. IpV6Params.source, 16); - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. dstIpAddr, (uint8_t *) pNew->info.IpParams.params. IpV6Params.dest, 16); @@ -566,7 +566,7 @@ tSirRetStatus convert_wmmtclas(tpAniSirGlobal pMac, pNew->info.IpParams.params.IpV6Params.src_port; pOld->tclasParams.ipv6.dstPort = pNew->info.IpParams.params.IpV6Params.dest_port; - cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. + qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6. flowLabel, (uint8_t *) pNew->info.IpParams.params. IpV6Params.flow_label, 3); @@ -624,8 +624,9 @@ void convert_wmm_schedule(tpAniSirGlobal pMac, } /** - @brief : This functions converts the given buffer till given size to Big endian format assuming the - bus is 32 bit. The size should be four byte aligned. + @brief : This functions converts the given buffer till given size to + Big endian format assuming the bus is 32 bit. The size should + be four byte aligned. @param : ptr to be converted, size @return : void */ @@ -670,11 +671,11 @@ void create_scan_data_null_frame(tpAniSirGlobal pMac, tSirMacMgmtHdr *macMgmtHdr macMgmtHdr->seqControl.fragNum = 0; macMgmtHdr->seqControl.seqNumLo = 0; macMgmtHdr->seqControl.seqNumHi = 2; - cdf_mem_copy((void *)&macMgmtHdr->da, + qdf_mem_copy((void *)&macMgmtHdr->da, (void *)bssid, sizeof(tSirMacAddr)); - cdf_mem_copy((void *)&macMgmtHdr->sa, + qdf_mem_copy((void *)&macMgmtHdr->sa, (void *)selfMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy((void *)&macMgmtHdr->bssId, + qdf_mem_copy((void *)&macMgmtHdr->bssId, (void *)bssid, sizeof(tSirMacAddr)); return; @@ -697,7 +698,7 @@ void create_scan_cts_frame(tpAniSirGlobal pMac, tSirMacMgmtHdr *macMgmtHdr, (uint8_t) (SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff); macMgmtHdr->durationHi = (uint8_t) ((SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff00) >> 8); - cdf_mem_copy((void *)macMgmtHdr->da, (void *)selfMac, + qdf_mem_copy((void *)macMgmtHdr->da, (void *)selfMac, sizeof(tSirMacAddr)); return; @@ -754,9 +755,9 @@ void create_init_scan_raw_frame(tpAniSirGlobal pMac, tSirMacMgmtHdr *macMgmtHdr, macMgmtHdr->seqControl.fragNum = 0; macMgmtHdr->seqControl.seqNumLo = 0; macMgmtHdr->seqControl.seqNumHi = 2; - cdf_mem_copy((void *)&macMgmtHdr->da, (void *)pSta[0].bssId, 6); - cdf_mem_copy(&macMgmtHdr->sa, pSta[0].staAddr, 6); - cdf_mem_copy((void *)&macMgmtHdr->bssId, (void *)pSta[0].bssId, + qdf_mem_copy((void *)&macMgmtHdr->da, (void *)pSta[0].bssId, 6); + qdf_mem_copy(&macMgmtHdr->sa, pSta[0].staAddr, 6); + qdf_mem_copy((void *)&macMgmtHdr->bssId, (void *)pSta[0].bssId, 6); } else if (role == eSYSTEM_AP_ROLE || role == eSYSTEM_STA_IN_IBSS_ROLE) { macMgmtHdr->fc.type = SIR_MAC_CTRL_FRAME; @@ -774,7 +775,7 @@ void create_init_scan_raw_frame(tpAniSirGlobal pMac, tSirMacMgmtHdr *macMgmtHdr, macMgmtHdr->durationHi = (uint8_t) ((SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff00) >> 8); - cdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].staAddr, + qdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].staAddr, 6); } return; @@ -813,9 +814,9 @@ void create_finish_scan_raw_frame(tpAniSirGlobal pMac, tSirMacMgmtHdr *macMgmtHd macMgmtHdr->seqControl.fragNum = 0; macMgmtHdr->seqControl.seqNumLo = 0; macMgmtHdr->seqControl.seqNumHi = 2; - cdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].bssId, 6); - cdf_mem_copy(macMgmtHdr->sa, pSta[0].staAddr, 6); - cdf_mem_copy((void *)macMgmtHdr->bssId, (void *)pSta[0].bssId, + qdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].bssId, 6); + qdf_mem_copy(macMgmtHdr->sa, pSta[0].staAddr, 6); + qdf_mem_copy((void *)macMgmtHdr->bssId, (void *)pSta[0].bssId, 6); } diff --git a/core/sap/dfs/inc/ath_dfs_structs.h b/core/sap/dfs/inc/ath_dfs_structs.h index 8a3e8f853d2f..83c0655262ca 100644 --- a/core/sap/dfs/inc/ath_dfs_structs.h +++ b/core/sap/dfs/inc/ath_dfs_structs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -53,7 +53,7 @@ #ifndef _DFS__STRUCTS_H_ #define _DFS__STRUCTS_H_ -#include <cdf_memory.h> +#include <qdf_mem.h> #ifdef ANDROID #include <linux/string.h> @@ -228,7 +228,7 @@ struct ath_dfs_phyerr_param { static inline void ath_dfs_phyerr_param_copy(struct ath_dfs_phyerr_param *dst, struct ath_dfs_phyerr_param *src) { - cdf_mem_copy(dst, src, sizeof(*dst)); + qdf_mem_copy(dst, src, sizeof(*dst)); } static inline void ath_dfs_phyerr_init_noval(struct ath_dfs_phyerr_param *pe) diff --git a/core/sap/dfs/inc/dfs.h b/core/sap/dfs/inc/dfs.h index a9acc64154b5..a2f9ae28ffc9 100644 --- a/core/sap/dfs/inc/dfs.h +++ b/core/sap/dfs/inc/dfs.h @@ -55,7 +55,7 @@ #include <cds_queue.h> /* TAILQ */ #include <qdf_time.h> #include <qdf_timer.h> -#include <cdf_memory.h> +#include <qdf_mem.h> #include <osdep.h> /*DFS Utility Include END*/ diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 086864b823f4..55f754f5de18 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -194,7 +194,7 @@ QDF_STATUS wlansap_scan_callback(tHalHandle hal_handle, if (sap_ctx->channelList != NULL) { /* Always free up the memory for channel selection whatever * the result */ - cdf_mem_free(sap_ctx->channelList); + qdf_mem_free(sap_ctx->channelList); sap_ctx->channelList = NULL; } #endif @@ -394,7 +394,7 @@ wlansap_pre_start_bss_acs_scan_callback(tHalHandle hal_handle, void *pcontext, * channel selection whatever * the result */ - cdf_mem_free(sap_ctx->channelList); + qdf_mem_free(sap_ctx->channelList); sap_ctx->channelList = NULL; } #endif @@ -745,17 +745,17 @@ wlansap_roam_process_infra_assoc_ind(ptSapContext sap_ctx, roam_result); sap_ctx->nStaWPARSnReqIeLength = csr_roam_info->rsnIELen; if (sap_ctx->nStaWPARSnReqIeLength) - cdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, csr_roam_info->prsnIE, + qdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, csr_roam_info->prsnIE, sap_ctx->nStaWPARSnReqIeLength); #ifdef FEATURE_WLAN_WAPI sap_ctx->nStaWAPIReqIeLength = csr_roam_info->wapiIELen; if (sap_ctx->nStaWAPIReqIeLength) - cdf_mem_copy(sap_ctx->pStaWapiReqIE, csr_roam_info->pwapiIE, + qdf_mem_copy(sap_ctx->pStaWapiReqIE, csr_roam_info->pwapiIE, sap_ctx->nStaWAPIReqIeLength); #endif sap_ctx->nStaAddIeLength = csr_roam_info->addIELen; if (sap_ctx->nStaAddIeLength) - cdf_mem_copy(sap_ctx->pStaAddIE, csr_roam_info->paddIE, + qdf_mem_copy(sap_ctx->pStaAddIE, csr_roam_info->paddIE, sap_ctx->nStaAddIeLength); sap_ctx->SapQosCfg.WmmIsEnabled = csr_roam_info->wmmEnabledSta; /* MAC filtering */ @@ -995,13 +995,13 @@ wlansap_roam_callback(void *ctx, tCsrRoamInfo *csr_roam_info, uint32_t roamId, roam_result); sap_ctx->nStaWPARSnReqIeLength = csr_roam_info->rsnIELen; if (sap_ctx->nStaWPARSnReqIeLength) - cdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, + qdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, csr_roam_info->prsnIE, sap_ctx->nStaWPARSnReqIeLength); sap_ctx->nStaAddIeLength = csr_roam_info->addIELen; if (sap_ctx->nStaAddIeLength) - cdf_mem_copy(sap_ctx->pStaAddIE, + qdf_mem_copy(sap_ctx->pStaAddIE, csr_roam_info->paddIE, sap_ctx->nStaAddIeLength); diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 41f4c63031e4..c06f974d4fda 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -508,13 +508,13 @@ void sap_cleanup_channel_list(void *p_cds_gctx) pSapCtx->SapChnlList.numChannel = 0; if (pSapCtx->SapChnlList.channelList) { - cdf_mem_free(pSapCtx->SapChnlList.channelList); + qdf_mem_free(pSapCtx->SapChnlList.channelList); pSapCtx->SapChnlList.channelList = NULL; } pSapCtx->SapAllChnlList.numChannel = 0; if (pSapCtx->SapAllChnlList.channelList) { - cdf_mem_free(pSapCtx->SapAllChnlList.channelList); + qdf_mem_free(pSapCtx->SapAllChnlList.channelList); pSapCtx->SapAllChnlList.channelList = NULL; } } @@ -607,7 +607,7 @@ bool sap_chan_sel_init(tHalHandle halHandle, /* Allocate memory for weight computation of 2.4GHz */ pSpectCh = - (tSapSpectChInfo *) cdf_mem_malloc((pSpectInfoParams->numSpectChans) + (tSapSpectChInfo *) qdf_mem_malloc((pSpectInfoParams->numSpectChans) * sizeof(*pSpectCh)); if (pSpectCh == NULL) { @@ -616,7 +616,7 @@ bool sap_chan_sel_init(tHalHandle halHandle, return eSAP_FALSE; } - cdf_mem_zero(pSpectCh, + qdf_mem_zero(pSpectCh, (pSpectInfoParams->numSpectChans) * sizeof(*pSpectCh)); /* Initialize the pointers in the DfsParams to the allocated memory */ @@ -1168,7 +1168,7 @@ void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, tSirProbeRespBeacon *pBeaconStruct; tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle; - pBeaconStruct = cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + pBeaconStruct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == pBeaconStruct) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "Unable to allocate memory in sap_compute_spect_weight\n"); @@ -1197,7 +1197,7 @@ void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, (pScanResult->BssDescriptor.length + sizeof(uint16_t) + sizeof(uint32_t) - sizeof(tSirBssDescription)); - cdf_mem_set((uint8_t *) pBeaconStruct, + qdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0); if ((sir_parse_beacon_ie @@ -1315,7 +1315,7 @@ void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, /* ------ Debug Info ------ */ pSpectCh++; } - cdf_mem_free(pBeaconStruct); + qdf_mem_free(pBeaconStruct); } /*========================================================================== @@ -1341,7 +1341,7 @@ void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, void sap_chan_sel_exit(tSapChSelSpectInfo *pSpectInfoParams) { /* Free all the allocated memory */ - cdf_mem_free(pSpectInfoParams->pSpectCh); + qdf_mem_free(pSpectInfoParams->pSpectCh); } /*========================================================================== @@ -1380,11 +1380,11 @@ void sap_sort_chl_weight(tSapChSelSpectInfo *pSpectInfoParams) } } if (minWeightIndex != i) { - cdf_mem_copy(&temp, &pSpectCh[minWeightIndex], + qdf_mem_copy(&temp, &pSpectCh[minWeightIndex], sizeof(*pSpectCh)); - cdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i], + qdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i], sizeof(*pSpectCh)); - cdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh)); + qdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh)); } } } @@ -1875,11 +1875,11 @@ void sap_sort_chl_weight_all(ptSapContext pSapCtx, } } if (minWeightIndex != i) { - cdf_mem_copy(&temp, &pSpectCh[minWeightIndex], + qdf_mem_copy(&temp, &pSpectCh[minWeightIndex], sizeof(*pSpectCh)); - cdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i], + qdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i], sizeof(*pSpectCh)); - cdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh)); + qdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh)); } } #endif diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f2ce213ccb93..e7bcc38cb091 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1406,7 +1406,7 @@ static uint8_t sap_random_channel_sel(ptSapContext sapContext) } /* end of check for NOL or ACS channels */ /* valid_chnl_count now have number of valid channels */ - tmp_ch_lst = cdf_mem_malloc(valid_chnl_count); + tmp_ch_lst = qdf_mem_malloc(valid_chnl_count); if (tmp_ch_lst == NULL) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, FL("sapdfs: memory alloc failed")); @@ -1445,12 +1445,12 @@ static uint8_t sap_random_channel_sel(ptSapContext sapContext) nol, valid_chnl_count, tmp_ch_lst)) { - cdf_mem_free(tmp_ch_lst); + qdf_mem_free(tmp_ch_lst); return target_channel; } #endif - cdf_mem_zero(availableChannels, sizeof(availableChannels)); - cdf_mem_zero(&channelBitmap, sizeof(channelBitmap)); + qdf_mem_zero(availableChannels, sizeof(availableChannels)); + qdf_mem_zero(&channelBitmap, sizeof(channelBitmap)); channelBitmap.chanBondingSet[0].startChannel = 36; channelBitmap.chanBondingSet[1].startChannel = 52; channelBitmap.chanBondingSet[2].startChannel = 100; @@ -1591,7 +1591,7 @@ static uint8_t sap_random_channel_sel(ptSapContext sapContext) break; /* this loop will iterate at max 3 times */ } while (1); - cdf_mem_free(tmp_ch_lst); + qdf_mem_free(tmp_ch_lst); return target_channel; } @@ -2049,7 +2049,7 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context, if (sap_context->acs_cfg->skip_scan_status != eSAP_SKIP_ACS_SCAN) { #endif - cdf_mem_zero(&scan_request, sizeof(scan_request)); + qdf_mem_zero(&scan_request, sizeof(scan_request)); /* * Set scanType to Active scan. FW takes care of using passive @@ -2141,7 +2141,7 @@ QDF_STATUS sap_goto_channel_sel(ptSapContext sap_context, if (sap_context->channelList != NULL) { sap_context->channel = sap_context->channelList[0]; - cdf_mem_free(sap_context-> + qdf_mem_free(sap_context-> channelList); sap_context->channelList = NULL; } @@ -2315,7 +2315,7 @@ sap_goto_starting 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, }; sapContext->key_type = 0x05; sapContext->key_length = 32; - cdf_mem_copy(sapContext->key_material, key_material, sizeof(key_material)); /* Need a key size define */ + qdf_mem_copy(sapContext->key_material, key_material, sizeof(key_material)); /* Need a key size define */ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "In %s", __func__); @@ -2574,14 +2574,14 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, reassoc_complete->staId = csr_roaminfo->staId; reassoc_complete->statusCode = csr_roaminfo->statusCode; reassoc_complete->iesLen = csr_roaminfo->rsnIELen; - cdf_mem_copy(reassoc_complete->ies, csr_roaminfo->prsnIE, + qdf_mem_copy(reassoc_complete->ies, csr_roaminfo->prsnIE, csr_roaminfo->rsnIELen); #ifdef FEATURE_WLAN_WAPI if (csr_roaminfo->wapiIELen) { uint8_t len = reassoc_complete->iesLen; reassoc_complete->iesLen += csr_roaminfo->wapiIELen; - cdf_mem_copy(&reassoc_complete->ies[len], + qdf_mem_copy(&reassoc_complete->ies[len], csr_roaminfo->pwapiIE, csr_roaminfo->wapiIELen); } @@ -2589,7 +2589,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, if (csr_roaminfo->addIELen) { uint8_t len = reassoc_complete->iesLen; reassoc_complete->iesLen += csr_roaminfo->addIELen; - cdf_mem_copy(&reassoc_complete->ies[len], + qdf_mem_copy(&reassoc_complete->ies[len], csr_roaminfo->paddIE, csr_roaminfo->addIELen); } @@ -2646,20 +2646,20 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, sap_ap_event.sapHddEventCode = eSAP_STA_MIC_FAILURE_EVENT; mic_failure = &sap_ap_event.sapevt.sapStationMICFailureEvent; - cdf_mem_copy(&mic_failure->srcMacAddr, + qdf_mem_copy(&mic_failure->srcMacAddr, csr_roaminfo->u.pMICFailureInfo->srcMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(&mic_failure->staMac.bytes, + qdf_mem_copy(&mic_failure->staMac.bytes, csr_roaminfo->u.pMICFailureInfo->taMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(&mic_failure->dstMacAddr.bytes, + qdf_mem_copy(&mic_failure->dstMacAddr.bytes, csr_roaminfo->u.pMICFailureInfo->dstMacAddr, sizeof(tSirMacAddr)); mic_failure->multicast = csr_roaminfo->u.pMICFailureInfo->multicast; mic_failure->IV1 = csr_roaminfo->u.pMICFailureInfo->IV1; mic_failure->keyId = csr_roaminfo->u.pMICFailureInfo->keyId; - cdf_mem_copy(mic_failure->TSC, + qdf_mem_copy(mic_failure->TSC, csr_roaminfo->u.pMICFailureInfo->TSC, SIR_CIPHER_SEQ_CTR_SIZE); break; @@ -2670,7 +2670,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, case eSAP_WPS_PBC_PROBE_REQ_EVENT: sap_ap_event.sapHddEventCode = eSAP_WPS_PBC_PROBE_REQ_EVENT; - cdf_mem_copy(&sap_ap_event.sapevt.sapPBCProbeReqEvent. + qdf_mem_copy(&sap_ap_event.sapevt.sapPBCProbeReqEvent. WPSPBCProbeReq, csr_roaminfo->u.pWPSPBCProbeReq, sizeof(tSirWPSPBCProbeReq)); break; @@ -2700,7 +2700,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, case eSAP_UNKNOWN_STA_JOIN: sap_ap_event.sapHddEventCode = eSAP_UNKNOWN_STA_JOIN; - cdf_mem_copy((void *) sap_ap_event.sapevt.sapUnknownSTAJoin. + qdf_mem_copy((void *) sap_ap_event.sapevt.sapUnknownSTAJoin. macaddr.bytes, (void *) context, QDF_MAC_ADDR_SIZE); break; @@ -2866,7 +2866,7 @@ QDF_STATUS sap_close_session(tHalHandle hHal, } pMac->sap.SapDfsInfo.cac_state = eSAP_DFS_DO_NOT_SKIP_CAC; sap_cac_reset_notify(hHal); - cdf_mem_zero(&pMac->sap, sizeof(pMac->sap)); + qdf_mem_zero(&pMac->sap, sizeof(pMac->sap)); } return qdf_status; @@ -3746,7 +3746,7 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType profile->csrPersona = pconfig_params->persona; profile->disableDFSChSwitch = pconfig_params->disableDFSChSwitch; - cdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId, + qdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId, sizeof(profile->SSIDs.SSIDList[0].SSID.ssId)); /* Flag to not broadcast the SSID information */ @@ -3755,7 +3755,7 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType profile->SSIDs.SSIDList[0].SSID.length = pconfig_params->SSIDinfo.ssid.length; - cdf_mem_copy(&profile->SSIDs.SSIDList[0].SSID.ssId, + qdf_mem_copy(&profile->SSIDs.SSIDList[0].SSID.ssId, pconfig_params->SSIDinfo.ssid.ssId, sizeof(pconfig_params->SSIDinfo.ssid.ssId)); @@ -3805,13 +3805,13 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength; if (pconfig_params->RSNWPAReqIELength) { profile->pRSNReqIE = - cdf_mem_malloc(pconfig_params->RSNWPAReqIELength); + qdf_mem_malloc(pconfig_params->RSNWPAReqIELength); if (NULL == profile->pRSNReqIE) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, " %s Fail to alloc memory", __func__); return eSAP_STATUS_FAILURE; } - cdf_mem_copy(profile->pRSNReqIE, pconfig_params->RSNWPAReqIE, + qdf_mem_copy(profile->pRSNReqIE, pconfig_params->RSNWPAReqIE, pconfig_params->RSNWPAReqIELength); profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength; } @@ -3839,7 +3839,7 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType /* country code */ if (pconfig_params->countryCode[0]) - cdf_mem_copy(profile->countryCode, pconfig_params->countryCode, + qdf_mem_copy(profile->countryCode, pconfig_params->countryCode, WNI_CFG_COUNTRY_CODE_LEN); profile->ieee80211d = pconfig_params->ieee80211d; /* wps config info */ @@ -3891,7 +3891,7 @@ sapconvert_to_csr_profile(tsap_Config_t *pconfig_params, eCsrRoamBssType bssType void sap_free_roam_profile(tCsrRoamProfile *profile) { if (profile->pRSNReqIE) { - cdf_mem_free(profile->pRSNReqIE); + qdf_mem_free(profile->pRSNReqIE); profile->pRSNReqIE = NULL; } } @@ -3911,17 +3911,17 @@ void sap_sort_mac_list(struct qdf_mac_addr *macList, uint8_t size) for (outer = 0; outer < size; outer++) { for (inner = 0; inner < size - 1; inner++) { nRes = - cdf_mem_compare2((macList + inner)->bytes, + qdf_mem_cmp((macList + inner)->bytes, (macList + inner + 1)->bytes, QDF_MAC_ADDR_SIZE); if (nRes > 0) { - cdf_mem_copy(temp.bytes, + qdf_mem_copy(temp.bytes, (macList + inner + 1)->bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy((macList + inner + 1)->bytes, + qdf_mem_copy((macList + inner + 1)->bytes, (macList + inner)->bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy((macList + inner)->bytes, + qdf_mem_copy((macList + inner)->bytes, temp.bytes, QDF_MAC_ADDR_SIZE); } } @@ -3946,7 +3946,7 @@ sap_search_mac_list(struct qdf_mac_addr *macList, while (nStart <= nEnd) { nMiddle = (nStart + nEnd) / 2; nRes = - cdf_mem_compare2(&macList[nMiddle], peerMac, + qdf_mem_cmp(&macList[nMiddle], peerMac, QDF_MAC_ADDR_SIZE); if (0 == nRes) { @@ -3991,18 +3991,18 @@ void sap_add_mac_to_acl(struct qdf_mac_addr *macList, for (i = ((*size) - 1); i >= 0; i--) { nRes = - cdf_mem_compare2(&macList[i], peerMac, QDF_MAC_ADDR_SIZE); + qdf_mem_cmp(&macList[i], peerMac, QDF_MAC_ADDR_SIZE); if (nRes > 0) { /* Move alphabetically greater mac addresses one index down to allow for insertion of new mac in sorted order */ - cdf_mem_copy((macList + i + 1)->bytes, + qdf_mem_copy((macList + i + 1)->bytes, (macList + i)->bytes, QDF_MAC_ADDR_SIZE); } else { break; } } /* This should also take care of if the element is the first to be added in the list */ - cdf_mem_copy((macList + i + 1)->bytes, peerMac, QDF_MAC_ADDR_SIZE); + qdf_mem_copy((macList + i + 1)->bytes, peerMac, QDF_MAC_ADDR_SIZE); /* increment the list size */ (*size)++; } @@ -4030,11 +4030,11 @@ void sap_remove_mac_from_acl(struct qdf_mac_addr *macList, for (i = index; i < ((*size) - 1); i++) { /* Move mac addresses starting from "index" passed one index up to delete the void created by deletion of a mac address in ACL */ - cdf_mem_copy((macList + i)->bytes, (macList + i + 1)->bytes, + qdf_mem_copy((macList + i)->bytes, (macList + i + 1)->bytes, QDF_MAC_ADDR_SIZE); } /* The last space should be made empty since all mac addesses moved one step up */ - cdf_mem_zero((macList + (*size) - 1)->bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_zero((macList + (*size) - 1)->bytes, QDF_MAC_ADDR_SIZE); /* reduce the list size by 1 */ (*size)--; } @@ -4169,7 +4169,7 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx, } /* Allocate the max number of channel supported */ - list = (uint8_t *) cdf_mem_malloc(NUM_5GHZ_CHANNELS + + list = (uint8_t *) qdf_mem_malloc(NUM_5GHZ_CHANNELS + NUM_24GHZ_CHANNELS); if (NULL == list) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, @@ -4266,7 +4266,7 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx, *ch_list = list; } else { *ch_list = NULL; - cdf_mem_free(list); + qdf_mem_free(list); } for (loop_count = 0; loop_count < ch_count; loop_count++) { @@ -4292,12 +4292,12 @@ static QDF_STATUS sap_get5_g_hz_channel_list(ptSapContext sapContext) } if (sapContext->SapAllChnlList.channelList) { - cdf_mem_free(sapContext->SapAllChnlList.channelList); + qdf_mem_free(sapContext->SapAllChnlList.channelList); sapContext->SapAllChnlList.channelList = NULL; } sapContext->SapAllChnlList.channelList = - (tChannelInfo *) cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN * + (tChannelInfo *) qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN * sizeof(tChannelInfo)); if (NULL == sapContext->SapAllChnlList.channelList) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index e14f19edcf75..4cc8d44c556b 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -106,7 +106,7 @@ void *wlansap_open(void *p_cds_gctx) ptSapContext pSapCtx = NULL; /* dynamically allocate the sapContext */ - pSapCtx = (ptSapContext) cdf_mem_malloc(sizeof(tSapContext)); + pSapCtx = (ptSapContext) qdf_mem_malloc(sizeof(tSapContext)); if (NULL == pSapCtx) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, @@ -271,7 +271,7 @@ QDF_STATUS wlansap_close(void *pCtx) /* empty queues/lists/pkts if any */ wlansap_clean_cb(pSapCtx, true); - cdf_mem_free(pSapCtx); + qdf_mem_free(pSapCtx); return QDF_STATUS_SUCCESS; } /* wlansap_close */ @@ -311,7 +311,7 @@ QDF_STATUS wlansap_clean_cb(ptSapContext pSapCtx, uint32_t freeFlag /* 0 / QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "wlansap_clean_cb"); - cdf_mem_zero(pSapCtx, sizeof(tSapContext)); + qdf_mem_zero(pSapCtx, sizeof(tSapContext)); pSapCtx->p_cds_gctx = NULL; @@ -468,9 +468,9 @@ wlansap_set_scan_acs_channel_params(tsap_Config_t *pconfig, psap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1; /* Save a copy to SAP context */ - cdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid, + qdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid, pconfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(psap_ctx->self_mac_addr, + qdf_mem_copy(psap_ctx->self_mac_addr, pconfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE); h_hal = (tHalHandle)CDS_GET_HAL_CB(psap_ctx->p_cds_gctx); @@ -631,13 +631,13 @@ QDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */ /* Set the BSSID to your "self MAC Addr" read the mac address from Configuation ITEM received from HDD */ pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1; - cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid, + qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid, pSapCtx->self_mac_addr, sizeof(struct qdf_mac_addr)); /* Save a copy to SAP context */ - cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid, + qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid, pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(pSapCtx->self_mac_addr, + qdf_mem_copy(pSapCtx->self_mac_addr, pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE); /* copy the configuration items to csrProfile */ @@ -678,11 +678,11 @@ QDF_STATUS wlansap_start_bss(void *pCtx, /* pwextCtx */ /* Copy MAC filtering settings to sap context */ pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl; - cdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac, + qdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac, sizeof(pConfig->accept_mac)); pSapCtx->nAcceptMac = pConfig->num_accept_mac; sap_sort_mac_list(pSapCtx->acceptMacList, pSapCtx->nAcceptMac); - cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac, + qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac, sizeof(pConfig->deny_mac)); pSapCtx->nDenyMac = pConfig->num_deny_mac; sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac); @@ -733,7 +733,7 @@ QDF_STATUS wlansap_set_mac_acl(void *pCtx, /* pwextCtx */ pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl; if (eSAP_DENY_UNLESS_ACCEPTED == pSapCtx->eSapMacAddrAclMode) { - cdf_mem_copy(pSapCtx->acceptMacList, + qdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac, sizeof(pConfig->accept_mac)); pSapCtx->nAcceptMac = pConfig->num_accept_mac; @@ -741,7 +741,7 @@ QDF_STATUS wlansap_set_mac_acl(void *pCtx, /* pwextCtx */ pSapCtx->nAcceptMac); } else if (eSAP_ACCEPT_UNLESS_DENIED == pSapCtx->eSapMacAddrAclMode) { - cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac, + qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac, sizeof(pConfig->deny_mac)); pSapCtx->nDenyMac = pConfig->num_deny_mac; sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac); @@ -994,7 +994,7 @@ QDF_STATUS wlansap_clear_acl(void *pCtx) if (pSapCtx->denyMacList != NULL) { for (i = 0; i < (pSapCtx->nDenyMac - 1); i++) { - cdf_mem_zero((pSapCtx->denyMacList + i)->bytes, + qdf_mem_zero((pSapCtx->denyMacList + i)->bytes, QDF_MAC_ADDR_SIZE); } @@ -1004,7 +1004,7 @@ QDF_STATUS wlansap_clear_acl(void *pCtx) if (pSapCtx->acceptMacList != NULL) { for (i = 0; i < (pSapCtx->nAcceptMac - 1); i++) { - cdf_mem_zero((pSapCtx->acceptMacList + i)->bytes, + qdf_mem_zero((pSapCtx->acceptMacList + i)->bytes, QDF_MAC_ADDR_SIZE); } @@ -1713,7 +1713,7 @@ wlan_sap_getstation_ie_information QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO, FL("WPAIE len : %x"), *len); if ((buf) && (ie_len >= sap_ctx->nStaWPARSnReqIeLength)) { - cdf_mem_copy(buf, + qdf_mem_copy(buf, sap_ctx->pStaWpaRsnReqIE, sap_ctx->nStaWPARSnReqIeLength); QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO, @@ -1764,13 +1764,13 @@ QDF_STATUS wlansap_set_wps_ie(void *pCtx, tSap_WPSIE *pSap_WPSIe) if (sap_acquire_global_lock(pSapCtx) == QDF_STATUS_SUCCESS) { if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_BEACON_IE) { - cdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE, + qdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE, &pSap_WPSIe->sapwpsie. sapWPSBeaconIE, sizeof(tSap_WPSBeaconIE)); } else if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_PROBE_RSP_IE) { - cdf_mem_copy(&pSapCtx->APWPSIEs. + qdf_mem_copy(&pSapCtx->APWPSIEs. SirWPSProbeRspIE, &pSap_WPSIe->sapwpsie. sapWPSProbeRspIE, @@ -1946,7 +1946,7 @@ QDF_STATUS wlansap_set_wparsn_ies } pSapCtx->APWPARSNIEs.length = (uint16_t) WPARSNIEsLen; - cdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs, + qdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs, WPARSNIEsLen); cdf_ret_status = @@ -2686,14 +2686,14 @@ wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, /* initialize the buffer pointer so that pe can copy */ if (additionIELength > 0) { bufferLength = additionIELength; - pBuffer = cdf_mem_malloc(bufferLength); + pBuffer = qdf_mem_malloc(bufferLength); if (NULL == pBuffer) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Could not allocate the buffer ")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pBuffer, pAdditionIEBuffer, bufferLength); + qdf_mem_copy(pBuffer, pAdditionIEBuffer, bufferLength); bufferValid = true; } } @@ -2704,7 +2704,7 @@ wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, pConfig->probeRespBcnIEsLen = bufferLength; pConfig->pProbeRespBcnIEsBuffer = pBuffer; } else { - cdf_mem_free(pConfig->pProbeRespBcnIEsBuffer); + qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer); pConfig->probeRespBcnIEsLen = 0; pConfig->pProbeRespBcnIEsBuffer = NULL; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, @@ -2717,7 +2717,7 @@ wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, pConfig->probeRespIEsBufferLen = bufferLength; pConfig->pProbeRespIEsBuffer = pBuffer; } else { - cdf_mem_free(pConfig->pProbeRespIEsBuffer); + qdf_mem_free(pConfig->pProbeRespIEsBuffer); pConfig->probeRespIEsBufferLen = 0; pConfig->pProbeRespIEsBuffer = NULL; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, @@ -2730,7 +2730,7 @@ wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, pConfig->assocRespIEsLen = bufferLength; pConfig->pAssocRespIEsBuffer = pBuffer; } else { - cdf_mem_free(pConfig->pAssocRespIEsBuffer); + qdf_mem_free(pConfig->pAssocRespIEsBuffer); pConfig->assocRespIEsLen = 0; pConfig->pAssocRespIEsBuffer = NULL; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, @@ -2742,7 +2742,7 @@ wlansap_update_sap_config_add_ie(tsap_Config_t *pConfig, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, FL("No matching buffer type %d"), updateType); if (pBuffer != NULL) - cdf_mem_free(pBuffer); + qdf_mem_free(pBuffer); break; } @@ -2761,21 +2761,21 @@ wlansap_reset_sap_config_add_ie(tsap_Config_t *pConfig, eUpdateIEsType updateTyp switch (updateType) { case eUPDATE_IE_ALL: /*only used to reset */ case eUPDATE_IE_PROBE_RESP: - cdf_mem_free(pConfig->pProbeRespIEsBuffer); + qdf_mem_free(pConfig->pProbeRespIEsBuffer); pConfig->probeRespIEsBufferLen = 0; pConfig->pProbeRespIEsBuffer = NULL; if (eUPDATE_IE_ALL != updateType) break; case eUPDATE_IE_ASSOC_RESP: - cdf_mem_free(pConfig->pAssocRespIEsBuffer); + qdf_mem_free(pConfig->pAssocRespIEsBuffer); pConfig->assocRespIEsLen = 0; pConfig->pAssocRespIEsBuffer = NULL; if (eUPDATE_IE_ALL != updateType) break; case eUPDATE_IE_PROBE_BCN: - cdf_mem_free(pConfig->pProbeRespBcnIEsBuffer); + qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer); pConfig->probeRespBcnIEsLen = 0; pConfig->pProbeRespBcnIEsBuffer = NULL; if (eUPDATE_IE_ALL != updateType) @@ -3105,7 +3105,7 @@ void wlansap_populate_del_sta_params(const uint8_t *mac, if (NULL == mac) qdf_set_macaddr_broadcast(&pDelStaParams->peerMacAddr); else - cdf_mem_copy(pDelStaParams->peerMacAddr.bytes, mac, + qdf_mem_copy(pDelStaParams->peerMacAddr.bytes, mac, QDF_MAC_ADDR_SIZE); if (reason_code == 0) diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h index 04b9be37358e..0f75c43eb56c 100644 --- a/core/sme/inc/sme_inside.h +++ b/core/sme/inc/sme_inside.h @@ -40,7 +40,7 @@ #include "qdf_status.h" #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "sir_api.h" #include "csr_internal.h" diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h index 61f7d82b1061..21a7b78476f8 100644 --- a/core/sme/inc/sme_internal.h +++ b/core/sme/inc/sme_internal.h @@ -40,7 +40,7 @@ #include "qdf_status.h" #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "host_diag_core_event.h" #include "csr_link_list.h" diff --git a/core/sme/inc/sme_power_save.h b/core/sme/inc/sme_power_save.h index 6c3c1450a903..d0649a23d4ed 100644 --- a/core/sme/inc/sme_power_save.h +++ b/core/sme/inc/sme_power_save.h @@ -29,7 +29,7 @@ #define __SME_POWER_SAVE_H #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "ani_system_defs.h" #include "sir_api.h" diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h index 59515080bb95..7b98504b5e81 100644 --- a/core/sme/inc/sme_qos_api.h +++ b/core/sme/inc/sme_qos_api.h @@ -39,7 +39,7 @@ ------------------------------------------------------------------------*/ #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "ani_global.h" #include "sir_api.h" diff --git a/core/sme/inc/sme_qos_internal.h b/core/sme/inc/sme_qos_internal.h index 61570d4c8abd..8682eaa4719d 100644 --- a/core/sme/inc/sme_qos_internal.h +++ b/core/sme/inc/sme_qos_internal.h @@ -39,7 +39,7 @@ ------------------------------------------------------------------------*/ #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "ani_global.h" #include "sir_api.h" diff --git a/core/sme/inc/sme_rrm_api.h b/core/sme/inc/sme_rrm_api.h index 9e8d56f16382..c65fb086ace2 100644 --- a/core/sme/inc/sme_rrm_api.h +++ b/core/sme/inc/sme_rrm_api.h @@ -39,7 +39,7 @@ ------------------------------------------------------------------------*/ #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "ani_global.h" #include "sir_api.h" diff --git a/core/sme/inc/sme_rrm_internal.h b/core/sme/inc/sme_rrm_internal.h index 9814e48a5794..a4eb3b5a3355 100644 --- a/core/sme/inc/sme_rrm_internal.h +++ b/core/sme/inc/sme_rrm_internal.h @@ -39,7 +39,7 @@ ------------------------------------------------------------------------*/ #include "qdf_lock.h" #include "qdf_trace.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "rrm_global.h" diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 6b35228b4efa..fe3bef0060ff 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -214,16 +214,16 @@ static QDF_STATUS sme_process_set_hw_mode_resp(tpAniSirGlobal mac, uint8_t *msg) saved_cmd); } if (saved_cmd->u.roamCmd.pRoamBssEntry) - cdf_mem_free( + qdf_mem_free( saved_cmd->u.roamCmd.pRoamBssEntry); if (saved_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) - cdf_mem_free(saved_cmd->u.scanCmd.u. + qdf_mem_free(saved_cmd->u.scanCmd.u. scanRequest.SSIDs.SSIDList); if (saved_cmd->u.scanCmd.pToRoamProfile) - cdf_mem_free(saved_cmd->u.scanCmd. + qdf_mem_free(saved_cmd->u.scanCmd. pToRoamProfile); if (saved_cmd) { - cdf_mem_free(saved_cmd); + qdf_mem_free(saved_cmd); saved_cmd = NULL; mac->sme.saved_scan_cmd = NULL; } @@ -297,9 +297,9 @@ static void free_sme_cmds(tpAniSirGlobal mac_ctx) return; for (idx = 0; idx < mac_ctx->sme.totalSmeCmd; idx++) - cdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr[idx]); + qdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr[idx]); - cdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr); + qdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr); mac_ctx->sme.pSmeCmdBufAddr = NULL; } @@ -336,14 +336,14 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) /* following pointer contains array of pointers for tSmeCmd* */ sme_cmd_ptr_ary_sz = sizeof(void *) * pMac->sme.totalSmeCmd; - pMac->sme.pSmeCmdBufAddr = cdf_mem_malloc(sme_cmd_ptr_ary_sz); + pMac->sme.pSmeCmdBufAddr = qdf_mem_malloc(sme_cmd_ptr_ary_sz); if (NULL == pMac->sme.pSmeCmdBufAddr) { status = QDF_STATUS_E_NOMEM; goto end; } status = QDF_STATUS_SUCCESS; - cdf_mem_set(pMac->sme.pSmeCmdBufAddr, sme_cmd_ptr_ary_sz, 0); + qdf_mem_set(pMac->sme.pSmeCmdBufAddr, sme_cmd_ptr_ary_sz, 0); for (cmd_idx = 0; cmd_idx < pMac->sme.totalSmeCmd; cmd_idx++) { /* * Since total size of all commands together can be huge chunk @@ -355,7 +355,7 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) * freeing up of all SME CMDs with just a for loop. */ pMac->sme.pSmeCmdBufAddr[cmd_idx] = - cdf_mem_malloc(sizeof(tSmeCmd)); + qdf_mem_malloc(sizeof(tSmeCmd)); if (NULL == pMac->sme.pSmeCmdBufAddr[cmd_idx]) { status = QDF_STATUS_E_NOMEM; free_sme_cmds(pMac); @@ -369,7 +369,7 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) /* This timer is only to debug the active list command timeout */ cmdTimeoutTimer = - (qdf_mc_timer_t *) cdf_mem_malloc(sizeof(qdf_mc_timer_t)); + (qdf_mc_timer_t *) qdf_mem_malloc(sizeof(qdf_mc_timer_t)); if (cmdTimeoutTimer) { pMac->sme.smeCmdActiveList.cmdTimeoutTimer = cmdTimeoutTimer; qdf_status = @@ -380,7 +380,7 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "Init Timer fail for active list command process time out"); - cdf_mem_free(pMac->sme.smeCmdActiveList. + qdf_mem_free(pMac->sme.smeCmdActiveList. cmdTimeoutTimer); pMac->sme.smeCmdActiveList.cmdTimeoutTimer = NULL; } else { @@ -433,7 +433,7 @@ void purge_sme_session_cmd_list(tpAniSirGlobal pMac, uint32_t sessionId, tSmeCmd *pCommand; tDblLinkList localList; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return; @@ -474,7 +474,7 @@ static QDF_STATUS free_sme_cmd_list(tpAniSirGlobal pMac) /*destroy active list command time out timer */ qdf_mc_timer_destroy(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); - cdf_mem_free(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); + qdf_mem_free(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); pMac->sme.smeCmdActiveList.cmdTimeoutTimer = NULL; status = qdf_mutex_acquire(&pMac->sme.lkSmeGlobalLock); @@ -615,11 +615,11 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) /* memset to zero */ if (pRetCmd) { - cdf_mem_set((uint8_t *)&pRetCmd->command, + qdf_mem_set((uint8_t *)&pRetCmd->command, sizeof(pRetCmd->command), 0); - cdf_mem_set((uint8_t *)&pRetCmd->sessionId, + qdf_mem_set((uint8_t *)&pRetCmd->sessionId, sizeof(pRetCmd->sessionId), 0); - cdf_mem_set((uint8_t *)&pRetCmd->u, sizeof(pRetCmd->u), 0); + qdf_mem_set((uint8_t *)&pRetCmd->u, sizeof(pRetCmd->u), 0); } return pRetCmd; @@ -1285,10 +1285,10 @@ QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlmReq) } /* End of for () */ /* Copying back the valid channel list to plm struct */ - cdf_mem_set((void *)pPlmReq->plmChList, + qdf_mem_set((void *)pPlmReq->plmChList, pPlmReq->plmNumCh, 0); if (valid_count) - cdf_mem_copy(pPlmReq->plmChList, ch_list, + qdf_mem_copy(pPlmReq->plmChList, ch_list, valid_count); /* All are invalid channels, FW need to send the PLM * report with "incapable" bit set. @@ -1424,25 +1424,25 @@ QDF_STATUS sme_update_roam_params(tHalHandle hal, roam_params_dst->is_5g_pref_enabled = true; break; case REASON_ROAM_SET_SSID_ALLOWED: - cdf_mem_set(&roam_params_dst->ssid_allowed_list, 0, + qdf_mem_set(&roam_params_dst->ssid_allowed_list, 0, sizeof(tSirMacSSid) * MAX_SSID_ALLOWED_LIST); roam_params_dst->num_ssid_allowed_list = roam_params_src.num_ssid_allowed_list; for (i = 0; i < roam_params_dst->num_ssid_allowed_list; i++) { roam_params_dst->ssid_allowed_list[i].length = roam_params_src.ssid_allowed_list[i].length; - cdf_mem_copy(roam_params_dst->ssid_allowed_list[i].ssId, + qdf_mem_copy(roam_params_dst->ssid_allowed_list[i].ssId, roam_params_src.ssid_allowed_list[i].ssId, roam_params_dst->ssid_allowed_list[i].length); } break; case REASON_ROAM_SET_FAVORED_BSSID: - cdf_mem_set(&roam_params_dst->bssid_favored, 0, + qdf_mem_set(&roam_params_dst->bssid_favored, 0, sizeof(tSirMacAddr) * MAX_BSSID_FAVORED); roam_params_dst->num_bssid_favored = roam_params_src.num_bssid_favored; for (i = 0; i < roam_params_dst->num_bssid_favored; i++) { - cdf_mem_copy(&roam_params_dst->bssid_favored[i], + qdf_mem_copy(&roam_params_dst->bssid_favored[i], &roam_params_src.bssid_favored[i], sizeof(tSirMacAddr)); roam_params_dst->bssid_favored_factor[i] = @@ -1450,7 +1450,7 @@ QDF_STATUS sme_update_roam_params(tHalHandle hal, } break; case REASON_ROAM_SET_BLACKLIST_BSSID: - cdf_mem_set(&roam_params_dst->bssid_avoid_list, 0, + qdf_mem_set(&roam_params_dst->bssid_avoid_list, 0, QDF_MAC_ADDR_SIZE * MAX_BSSID_AVOID_LIST); roam_params_dst->num_bssid_avoid_list = roam_params_src.num_bssid_avoid_list; @@ -1733,7 +1733,7 @@ static QDF_STATUS sme_handle_scan_req(tpAniSirGlobal mac_ctx, FL("scan request failed. session_id %d"), session_id); } csr_scan_free_request(mac_ctx, scan_msg->scan_param); - cdf_mem_free(scan_msg->scan_param); + qdf_mem_free(scan_msg->scan_param); return status; } @@ -1993,11 +1993,11 @@ QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, } /* Store the info in RRM context */ - cdf_mem_copy(&pSmeRrmContext->eseBcnReqInfo, pEseBcnReq, + qdf_mem_copy(&pSmeRrmContext->eseBcnReqInfo, pEseBcnReq, sizeof(tCsrEseBeaconReq)); /* Prepare the request to send to SME. */ - pSmeBcnReportReq = cdf_mem_malloc(sizeof(tSirBeaconReportReqInd)); + pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd)); if (NULL == pSmeBcnReportReq) { sms_log(pMac, LOGP, "Memory Allocation Failure!!! ESE BcnReq Ind to SME"); @@ -2007,11 +2007,11 @@ QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, pSmeRrmContext->eseBcnReqInProgress = true; sms_log(pMac, LOGE, "Sending Beacon Report Req to SME"); - cdf_mem_zero(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd)); + qdf_mem_zero(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd)); pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND; pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd); - cdf_mem_copy(pSmeBcnReportReq->bssId, + qdf_mem_copy(pSmeBcnReportReq->bssId, pSession->connectedProfile.bssid.bytes, sizeof(tSirMacAddr)); pSmeBcnReportReq->channelInfo.channelNum = 255; @@ -2057,7 +2057,7 @@ static void sme_process_fw_mem_dump_rsp(tpAniSirGlobal mac_ctx, cds_msg_t *msg) if (mac_ctx->sme.fw_dump_callback) mac_ctx->sme.fw_dump_callback(mac_ctx->hHdd, (struct fw_dump_rsp *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); } } #else @@ -2165,14 +2165,14 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(pMac, LOGW, FL("Locking failed, bailing out")); if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); return status; } if (!SME_IS_START(pMac)) { sms_log(pMac, LOGW, FL("message type %d in stop state ignored"), pMsg->type); if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); goto release_lock; } switch (pMsg->type) { @@ -2181,7 +2181,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("LFR3: Rcvd eWNI_SME_HO_FAIL_IND")); csr_process_ho_fail_ind(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #endif case eWNI_PMC_SMPS_STATE_IND: @@ -2201,7 +2201,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) #ifndef WLAN_MDM_CODE_REDUCTION_OPT status = sme_qos_msg_processor(pMac, pMsg->type, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); #endif } else { sms_log(pMac, LOGE, FL("Empty message for %d"), @@ -2218,7 +2218,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_rrm_msg_processor(pMac, pMsg->type, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2230,7 +2230,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_OEM_DATA_RSP: if (pMsg->bodyptr) { status = sme_handle_oem_data_rsp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2242,7 +2242,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = csr_process_add_sta_session_rsp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2252,7 +2252,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = csr_process_del_sta_session_rsp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2261,7 +2261,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_REMAIN_ON_CHN_RSP: if (pMsg->bodyptr) { status = sme_remain_on_chn_rsp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2270,7 +2270,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_REMAIN_ON_CHN_RDY_IND: if (pMsg->bodyptr) { status = sme_remain_on_chn_ready(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2279,7 +2279,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_ACTION_FRAME_SEND_CNF: if (pMsg->bodyptr) { status = sme_send_action_cnf(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2290,7 +2290,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_preferred_network_found_ind((void *)pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2301,7 +2301,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_handle_change_country_code((void *)pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2311,7 +2311,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_handle_generic_change_country_code( (void *)pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2320,7 +2320,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_SCAN_CMD: if (pMsg->bodyptr) { status = sme_handle_scan_req(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2329,7 +2329,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_ROC_CMD: if (pMsg->bodyptr) { status = sme_handle_roc_req(hHal, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2353,7 +2353,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = tdls_msg_processor(pMac, pMsg->type, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2364,7 +2364,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_UNPROT_MGMT_FRM_IND: if (pMsg->bodyptr) { sme_unprotected_mgmt_frm_ind(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2375,7 +2375,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_TSM_IE_IND: if (pMsg->bodyptr) { sme_tsm_ie_ind(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2385,13 +2385,13 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_ROAM_SCAN_OFFLOAD_RSP: status = csr_roam_offload_scan_rsp_hdlr((void *)pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #ifdef WLAN_FEATURE_GTK_OFFLOAD case eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP: if (pMsg->bodyptr) { sme_process_get_gtk_info_rsp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2403,14 +2403,14 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_LPHB_IND: if (pMac->sme.pLphbIndCb) pMac->sme.pLphbIndCb(pMac->hHdd, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #endif /* FEATURE_WLAN_LPHB */ case eWNI_SME_READY_TO_SUSPEND_IND: if (pMsg->bodyptr) { sme_process_ready_to_suspend(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2420,7 +2420,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_READY_TO_EXTWOW_IND: if (pMsg->bodyptr) { sme_process_ready_to_ext_wow(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2436,7 +2436,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.pChAvoidNotificationCb(pMac->hHdd, pMsg->bodyptr); } - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #endif /* FEATURE_WLAN_CH_AVOID */ #ifdef FEATURE_WLAN_AUTO_SHUTDOWN @@ -2446,20 +2446,20 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) FL("Auto shutdown notification")); pMac->sme.pAutoShutdownNotificationCb(); } - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #endif case eWNI_SME_DFS_RADAR_FOUND: case eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND: status = dfs_msg_processor(pMac, pMsg->type, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_CHANNEL_CHANGE_RSP: if (pMsg->bodyptr) { status = sme_process_channel_change_resp(pMac, pMsg->type, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2469,7 +2469,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) case eWNI_SME_STATS_EXT_EVENT: if (pMsg->bodyptr) { status = sme_stats_ext_event(hHal, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2481,19 +2481,19 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) pMac->sme.pLinkSpeedIndCb(pMsg->bodyptr, pMac->sme.pLinkSpeedCbContext); if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_CSA_OFFLOAD_EVENT: if (pMsg->bodyptr) { csr_scan_flush_bss_entry(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } break; #ifdef WLAN_FEATURE_NAN case eWNI_SME_NAN_EVENT: if (pMsg->bodyptr) { sme_nan_event(hHal, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } break; #endif /* WLAN_FEATURE_NAN */ @@ -2509,7 +2509,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) } pMac->sme.linkStatusCallback = NULL; pMac->sme.linkStatusContext = NULL; - cdf_mem_free(pLinkStatus); + qdf_mem_free(pLinkStatus); } break; } @@ -2529,7 +2529,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) (pSnrReq->snr, pSnrReq->staId, pSnrReq->pDevContext); } - cdf_mem_free(pSnrReq); + qdf_mem_free(pSnrReq); } break; } @@ -2544,7 +2544,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) FL("callback not registered to process %d"), pMsg->type); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_EPNO_NETWORK_FOUND_IND: if (pMac->sme.pExtScanIndCb) @@ -2556,7 +2556,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) FL("callback not registered to process %d"), pMsg->type); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; #endif case eWNI_SME_FW_DUMP_IND: @@ -2566,7 +2566,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_process_set_hw_mode_resp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2576,7 +2576,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_process_hw_mode_trans_ind(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2586,7 +2586,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) if (pMsg->bodyptr) { status = sme_process_nss_update_resp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2603,7 +2603,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) } pMac->sme.ocb_set_config_callback = NULL; pMac->sme.ocb_set_config_context = NULL; - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_OCB_GET_TSF_TIMER_RSP: if (pMac->sme.ocb_get_tsf_timer_callback) { @@ -2616,7 +2616,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) } pMac->sme.ocb_get_tsf_timer_callback = NULL; pMac->sme.ocb_get_tsf_timer_context = NULL; - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_DCC_GET_STATS_RSP: if (pMac->sme.dcc_get_stats_callback) { @@ -2629,7 +2629,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) } pMac->sme.dcc_get_stats_callback = NULL; pMac->sme.dcc_get_stats_context = NULL; - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_DCC_UPDATE_NDL_RSP: if (pMac->sme.dcc_update_ndl_callback) { @@ -2642,7 +2642,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) } pMac->sme.dcc_update_ndl_callback = NULL; pMac->sme.dcc_update_ndl_context = NULL; - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_DCC_STATS_EVENT: if (pMac->sme.dcc_stats_event_callback) { @@ -2653,13 +2653,13 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sms_log(pMac, LOGE, FL( "Message error. The callback is NULL.")); } - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; case eWNI_SME_SET_DUAL_MAC_CFG_RESP: if (pMsg->bodyptr) { status = sme_process_dual_mac_config_resp(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2671,7 +2671,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) break; case eWNI_SME_EXT_CHANGE_CHANNEL_IND: status = sme_extended_change_channel_ind(pMac, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); break; default: @@ -2680,7 +2680,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) /* CSR */ if (pMsg->bodyptr) { status = csr_msg_processor(hHal, pMsg->bodyptr); - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } else { sms_log(pMac, LOGE, FL("Empty message for %d"), pMsg->type); @@ -2689,7 +2689,7 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg) sms_log(pMac, LOGW, FL("Unknown message type %d"), pMsg->type); if (pMsg->bodyptr) - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } } /* switch */ release_lock: @@ -2772,7 +2772,7 @@ void sme_free_msg(tHalHandle hHal, cds_msg_t *pMsg) { if (pMsg) { if (pMsg->bodyptr) { - cdf_mem_free(pMsg->bodyptr); + qdf_mem_free(pMsg->bodyptr); } } @@ -2958,7 +2958,7 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, return status; } sms_log(mac_ctx, LOG1, FL(" called")); - scan_msg = cdf_mem_malloc(sizeof(struct ani_scan_req)); + scan_msg = qdf_mem_malloc(sizeof(struct ani_scan_req)); if (NULL == scan_msg) { sms_log(mac_ctx, LOGE, " scan_req: failed to allocate mem for msg"); @@ -2970,12 +2970,12 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, scan_msg->session_id = session_id; scan_msg->callback = callback; scan_msg->ctx = ctx; - scan_msg->scan_param = cdf_mem_malloc(sizeof(tCsrScanRequest)); + scan_msg->scan_param = qdf_mem_malloc(sizeof(tCsrScanRequest)); if (NULL == scan_msg->scan_param) { sms_log(mac_ctx, LOGE, "scan_req:failed to allocate mem for scanreq"); sme_release_global_lock(&mac_ctx->sme); - cdf_mem_free(scan_msg); + qdf_mem_free(scan_msg); return QDF_STATUS_E_NOMEM; } csr_scan_copy_request(mac_ctx, scan_msg->scan_param, scan_req); @@ -2988,8 +2988,8 @@ QDF_STATUS sme_scan_request(tHalHandle hal, uint8_t session_id, sms_log(mac_ctx, LOGE, " sme_scan_req failed to post msg"); csr_scan_free_request(mac_ctx, scan_msg->scan_param); - cdf_mem_free(scan_msg->scan_param); - cdf_mem_free(scan_msg); + qdf_mem_free(scan_msg->scan_param); + qdf_mem_free(scan_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac_ctx->sme); @@ -3054,14 +3054,14 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hal_handle, FL("mac_ctx is NULL")); return QDF_STATUS_E_FAILURE; } - scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == scan_filter) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("scan_filter mem alloc failed")); return QDF_STATUS_E_FAILURE; } else { - cdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0); - cdf_mem_set(&first_ap_profile, sizeof(tSirBssDescription), 0); + qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(&first_ap_profile, sizeof(tSirBssDescription), 0); if (NULL == profile) { scan_filter->EncryptionType.numEntries = 1; @@ -3088,7 +3088,7 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hal_handle, } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Preparing the profile filter failed")); - cdf_mem_free(scan_filter); + qdf_mem_free(scan_filter); return QDF_STATUS_E_FAILURE; } } @@ -3131,7 +3131,7 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hal_handle, status = QDF_STATUS_E_FAILURE; } - cdf_mem_free(scan_filter); + qdf_mem_free(scan_filter); return status; } @@ -4200,7 +4200,7 @@ QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam) sme_release_global_lock(&pMac->sme); return status; } - cdf_mem_copy(&pParam->rrmConfig, + qdf_mem_copy(&pParam->rrmConfig, &pMac->rrm.rrmSmeContext.rrmConfig, sizeof(pMac->rrm.rrmSmeContext.rrmConfig)); sme_release_global_lock(&pMac->sme); @@ -4497,13 +4497,13 @@ QDF_STATUS sme_wow_add_pattern(tHalHandle hal, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_WOWL_ADDBCAST_PATTERN, session_id, 0)); - ptrn = cdf_mem_malloc(sizeof(*ptrn)); + ptrn = qdf_mem_malloc(sizeof(*ptrn)); if (NULL == ptrn) { sms_log(pMac, LOGP, FL("Fail to allocate memory for WoWLAN Add Bcast Pattern ")); return QDF_STATUS_E_NOMEM; } - (void)cdf_mem_copy(ptrn, pattern, sizeof(*ptrn)); + (void)qdf_mem_copy(ptrn, pattern, sizeof(*ptrn)); msg_q.type = WMA_WOW_ADD_PTRN; msg_q.reserved = 0; @@ -4538,13 +4538,13 @@ QDF_STATUS sme_wow_delete_pattern(tHalHandle hal, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_WOWL_DELBCAST_PATTERN, sessionId, 0)); - delete_ptrn = cdf_mem_malloc(sizeof(*delete_ptrn)); + delete_ptrn = qdf_mem_malloc(sizeof(*delete_ptrn)); if (NULL == delete_ptrn) { sms_log(pMac, LOGP, FL("Fail to allocate memory for WoWLAN Delete Bcast Pattern ")); return QDF_STATUS_E_NOMEM; } - (void)cdf_mem_copy(delete_ptrn, pattern, sizeof(*delete_ptrn)); + (void)qdf_mem_copy(delete_ptrn, pattern, sizeof(*delete_ptrn)); msg_q.type = WMA_WOW_DEL_PTRN; msg_q.reserved = 0; msg_q.bodyptr = delete_ptrn; @@ -4876,7 +4876,7 @@ QDF_STATUS sme_get_link_status(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - pMsg = cdf_mem_malloc(sizeof(tAniGetLinkStatus)); + pMsg = qdf_mem_malloc(sizeof(tAniGetLinkStatus)); if (NULL == pMsg) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for link status", @@ -4899,7 +4899,7 @@ QDF_STATUS sme_get_link_status(tHalHandle hHal, (cds_mq_post_message(QDF_MODULE_ID_WMA, &cds_message))) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post LINK STATUS MSG fail", __func__); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); pMac->sme.linkStatusContext = NULL; pMac->sme.linkStatusCallback = NULL; status = QDF_STATUS_E_FAILURE; @@ -5031,7 +5031,7 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, return status; } - pMsg = cdf_mem_malloc(sizeof(tAniChangeCountryCodeReq)); + pMsg = qdf_mem_malloc(sizeof(tAniChangeCountryCodeReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, " csrChangeCountryCode: failed to allocate mem for req"); @@ -5041,7 +5041,7 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, pMsg->msgType = eWNI_SME_CHANGE_COUNTRY_CODE; pMsg->msgLen = (uint16_t) sizeof(tAniChangeCountryCodeReq); - cdf_mem_copy(pMsg->countryCode, pCountry, 3); + qdf_mem_copy(pMsg->countryCode, pCountry, 3); pMsg->countryFromUserSpace = countryFromUserSpace; pMsg->sendRegHint = sendRegHint; pMsg->changeCCCallback = callback; @@ -5056,7 +5056,7 @@ QDF_STATUS sme_change_country_code(tHalHandle hHal, cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(pMac, LOGE, " sme_change_country_code failed to post msg to self "); - cdf_mem_free((void *)pMsg); + qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } sms_log(pMac, LOG1, FL(" returned")); @@ -5101,7 +5101,7 @@ QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { sms_log(pMac, LOG1, FL(" called")); - pMsg = cdf_mem_malloc(sizeof(tAniGenericChangeCountryCodeReq)); + pMsg = qdf_mem_malloc(sizeof(tAniGenericChangeCountryCodeReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, @@ -5113,7 +5113,7 @@ QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, pMsg->msgType = eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE; pMsg->msgLen = (uint16_t) sizeof(tAniGenericChangeCountryCodeReq); - cdf_mem_copy(pMsg->countryCode, pCountry, 2); + qdf_mem_copy(pMsg->countryCode, pCountry, 2); pMsg->countryCode[2] = ' '; msg.type = eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE; @@ -5124,7 +5124,7 @@ QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(pMac, LOGE, "sme_generic_change_country_code failed to post msg to self"); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); status = QDF_STATUS_E_FAILURE; } sms_log(pMac, LOG1, FL(" returned")); @@ -5174,7 +5174,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, return QDF_STATUS_E_FAILURE; } - pMsg = (tAniDHCPInd *) cdf_mem_malloc(sizeof(tAniDHCPInd)); + pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd)); if (NULL == pMsg) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for dhcp start", @@ -5185,7 +5185,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, pMsg->msgType = WMA_DHCP_START_IND; pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd); pMsg->device_mode = device_mode; - cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, + qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, QDF_MAC_ADDR_SIZE); qdf_copy_macaddr(&pMsg->peerMacAddr, &pSession->connectedProfile.bssid); @@ -5198,7 +5198,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post DHCP Start MSG fail", __func__); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); @@ -5244,7 +5244,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, return QDF_STATUS_E_FAILURE; } - pMsg = (tAniDHCPInd *) cdf_mem_malloc(sizeof(tAniDHCPInd)); + pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd)); if (NULL == pMsg) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for dhcp stop", @@ -5256,7 +5256,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, pMsg->msgType = WMA_DHCP_STOP_IND; pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd); pMsg->device_mode = device_mode; - cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, + qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, QDF_MAC_ADDR_SIZE); qdf_copy_macaddr(&pMsg->peerMacAddr, &pSession->connectedProfile.bssid); @@ -5269,7 +5269,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post DHCP Stop MSG fail", __func__); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); status = QDF_STATUS_E_FAILURE; } @@ -5801,7 +5801,7 @@ QDF_STATUS sme_set_gtk_offload(tHalHandle hHal, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(*request_buf)); + request_buf = qdf_mem_malloc(sizeof(*request_buf)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for GTK offload request")); @@ -5820,7 +5820,7 @@ QDF_STATUS sme_set_gtk_offload(tHalHandle hHal, (cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post SIR_HAL_SET_GTK_OFFLOAD message to HAL")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -5854,7 +5854,7 @@ QDF_STATUS sme_get_gtk_offload(tHalHandle hHal, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(*request_buf)); + request_buf = qdf_mem_malloc(sizeof(*request_buf)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for Get GTK offload request")); @@ -5887,7 +5887,7 @@ QDF_STATUS sme_get_gtk_offload(tHalHandle hHal, (cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_GTK_OFFLOAD_GETINFO_REQ message to WMA")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -5918,7 +5918,7 @@ QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t session_id, FL("Session not Found")); return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirKeepAliveReq)); + request_buf = qdf_mem_malloc(sizeof(tSirKeepAliveReq)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for keep alive request")); @@ -5926,7 +5926,7 @@ QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t session_id, } qdf_copy_macaddr(&request->bssid, &pSession->connectedProfile.bssid); - cdf_mem_copy(request_buf, request, sizeof(tSirKeepAliveReq)); + qdf_mem_copy(request_buf, request, sizeof(tSirKeepAliveReq)); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_LOW, "buff TP %d input TP %d ", request_buf->timePeriod, @@ -5940,7 +5940,7 @@ QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t session_id, cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_SET_KEEP_ALIVE message to WMA")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -6064,14 +6064,14 @@ QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal, if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&mac_ctx->sme)) { - msg = cdf_mem_malloc(sizeof(*msg)); + msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) { sms_log(mac_ctx, LOGE, FL("Not able to allocate memory for eWNI_SME_REGISTER_MGMT_FRAME_CB")); sme_release_global_lock(&mac_ctx->sme); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(msg, sizeof(*msg), 0); + qdf_mem_set(msg, sizeof(*msg), 0); msg->message_type = eWNI_SME_REGISTER_MGMT_FRAME_CB; msg->length = sizeof(*msg); @@ -6125,18 +6125,18 @@ QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId, len = sizeof(tSirRegisterMgmtFrame) + matchLen; - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set(pMsg, len, 0); + qdf_mem_set(pMsg, len, 0); pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ; pMsg->length = len; pMsg->sessionId = sessionId; pMsg->registerFrame = true; pMsg->frameType = frameType; pMsg->matchLen = matchLen; - cdf_mem_copy(pMsg->matchData, matchData, matchLen); + qdf_mem_copy(pMsg->matchData, matchData, matchLen); status = cds_send_mb_message_to_mac(pMsg); } sme_release_global_lock(&pMac->sme); @@ -6187,17 +6187,17 @@ QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId, len = sizeof(tSirRegisterMgmtFrame) + matchLen; - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set(pMsg, len, 0); + qdf_mem_set(pMsg, len, 0); pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ; pMsg->length = len; pMsg->registerFrame = false; pMsg->frameType = frameType; pMsg->matchLen = matchLen; - cdf_mem_copy(pMsg->matchData, matchData, matchLen); + qdf_mem_copy(pMsg->matchData, matchData, matchLen); status = cds_send_mb_message_to_mac(pMsg); } sme_release_global_lock(&pMac->sme); @@ -6247,7 +6247,7 @@ QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id, status = sme_acquire_global_lock(&mac_ctx->sme); sms_log(mac_ctx, LOG1, FL(" called")); - roc_msg = cdf_mem_malloc(sizeof(struct ani_roc_req)); + roc_msg = qdf_mem_malloc(sizeof(struct ani_roc_req)); if (NULL == roc_msg) { sms_log(mac_ctx, LOGE, " scan_req: failed to allocate mem for msg"); @@ -6271,7 +6271,7 @@ QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id, cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(mac_ctx, LOGE, " sme_scan_req failed to post msg"); - cdf_mem_free(roc_msg); + qdf_mem_free(roc_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac_ctx->sme); @@ -6328,11 +6328,11 @@ QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe, uint32_t p2pIeLength) status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { if (NULL != pMac->p2pContext.probeRspIe) { - cdf_mem_free(pMac->p2pContext.probeRspIe); + qdf_mem_free(pMac->p2pContext.probeRspIe); pMac->p2pContext.probeRspIeLength = 0; } - pMac->p2pContext.probeRspIe = cdf_mem_malloc(p2pIeLength); + pMac->p2pContext.probeRspIe = qdf_mem_malloc(p2pIeLength); if (NULL == pMac->p2pContext.probeRspIe) { sms_log(pMac, LOGE, "%s: Unable to allocate P2P IE", __func__); @@ -6344,7 +6344,7 @@ QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe, uint32_t p2pIeLength) sir_dump_buf(pMac, SIR_LIM_MODULE_ID, LOG2, pMac->p2pContext.probeRspIe, pMac->p2pContext.probeRspIeLength); - cdf_mem_copy((uint8_t *) pMac->p2pContext.probeRspIe, + qdf_mem_copy((uint8_t *) pMac->p2pContext.probeRspIe, p2pIe, p2pIeLength); } @@ -6584,7 +6584,7 @@ QDF_STATUS sme_configure_ext_wow(tHalHandle hHal, QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); cds_msg_t cds_message; - tpSirExtWoWParams MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr)); + tpSirExtWoWParams MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr)); if (!MsgPtr) return QDF_STATUS_E_NOMEM; @@ -6599,21 +6599,21 @@ QDF_STATUS sme_configure_ext_wow(tHalHandle hHal, if (QDF_IS_STATUS_SUCCESS(status)) { /* serialize the req through MC thread */ - cdf_mem_copy(MsgPtr, wlanExtParams, sizeof(*MsgPtr)); + qdf_mem_copy(MsgPtr, wlanExtParams, sizeof(*MsgPtr)); cds_message.bodyptr = MsgPtr; cds_message.type = WMA_WLAN_EXT_WOW; qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { pMac->readyToExtWoWCallback = NULL; pMac->readyToExtWoWContext = NULL; - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { pMac->readyToExtWoWCallback = NULL; pMac->readyToExtWoWContext = NULL; - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); } return status; @@ -6642,7 +6642,7 @@ QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal, QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); cds_msg_t cds_message; - tpSirAppType1Params MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr)); + tpSirAppType1Params MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr)); if (!MsgPtr) return QDF_STATUS_E_NOMEM; @@ -6654,17 +6654,17 @@ QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { /* serialize the req through MC thread */ - cdf_mem_copy(MsgPtr, wlanAppType1Params, sizeof(*MsgPtr)); + qdf_mem_copy(MsgPtr, wlanAppType1Params, sizeof(*MsgPtr)); cds_message.bodyptr = MsgPtr; cds_message.type = WMA_WLAN_SET_APP_TYPE1_PARAMS; qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); } return status; @@ -6693,7 +6693,7 @@ QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal, QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); cds_msg_t cds_message; - tpSirAppType2Params MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr)); + tpSirAppType2Params MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr)); if (!MsgPtr) return QDF_STATUS_E_NOMEM; @@ -6705,17 +6705,17 @@ QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { /* serialize the req through MC thread */ - cdf_mem_copy(MsgPtr, wlanAppType2Params, sizeof(*MsgPtr)); + qdf_mem_copy(MsgPtr, wlanAppType2Params, sizeof(*MsgPtr)); cds_message.bodyptr = MsgPtr; cds_message.type = WMA_WLAN_SET_APP_TYPE2_PARAMS; qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { - cdf_mem_free(MsgPtr); + qdf_mem_free(MsgPtr); } return status; @@ -6899,7 +6899,7 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg) if (pPrefNetworkFoundInd->ssId.length > 0) { ssIdLength = CSR_MIN(SIR_MAC_MAX_SSID_LENGTH, pPrefNetworkFoundInd->ssId.length); - cdf_mem_copy(dumpSsId, pPrefNetworkFoundInd->ssId.ssId, + qdf_mem_copy(dumpSsId, pPrefNetworkFoundInd->ssId.ssId, ssIdLength); dumpSsId[ssIdLength] = 0; sms_log(pMac, LOG2, "%s:SSID=%s frame length %d", @@ -6995,8 +6995,8 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) * if the reset Supplicant country code command is triggered, * enable 11D, reset the country code and return */ - if (true == - cdf_mem_compare(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) { + if (true != + qdf_mem_cmp(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) { pMac->roam.configParam.Is11dSupportEnabled = pMac->roam.configParam.Is11dSupportEnabledOriginal; @@ -7004,7 +7004,7 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) /* read the country code and use it */ if (QDF_IS_STATUS_SUCCESS(qdf_status)) { - cdf_mem_copy(pMsg->countryCode, + qdf_mem_copy(pMsg->countryCode, default_country, WNI_CFG_COUNTRY_CODE_LEN); } else { @@ -7019,7 +7019,7 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) sms_log(pMac, LOG1, FL("Set default country code (%c%c) as invalid country received"), pMsg->countryCode[0], pMsg->countryCode[1]); - cdf_mem_copy(pMac->scan.countryCode11d, + qdf_mem_copy(pMac->scan.countryCode11d, pMsg->countryCode, WNI_CFG_COUNTRY_CODE_LEN); } else { @@ -7044,7 +7044,7 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) } /* overwrite the defualt country code */ - cdf_mem_copy(pMac->scan.countryCodeDefault, + qdf_mem_copy(pMac->scan.countryCodeDefault, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); /* Get Domain ID from country code */ @@ -7076,9 +7076,9 @@ QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac, void *pMsgBuf) sms_log(pMac, LOGW, FL ("Clearing currentCountryBssid, countryCode11d")); - cdf_mem_zero(&pMac->scan.currentCountryBssid, + qdf_mem_zero(&pMac->scan.currentCountryBssid, sizeof(struct qdf_mac_addr)); - cdf_mem_zero(pMac->scan.countryCode11d, + qdf_mem_zero(pMac->scan.countryCode11d, sizeof(pMac->scan.countryCode11d)); } } @@ -7153,12 +7153,12 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, /* if Supplicant country code has priority, disable 11d */ if (!is_11d_country && supplicant_priority) mac_ctx->roam.configParam.Is11dSupportEnabled = false; - cdf_mem_copy(mac_ctx->scan.countryCodeCurrent, msg->countryCode, + qdf_mem_copy(mac_ctx->scan.countryCodeCurrent, msg->countryCode, WNI_CFG_COUNTRY_CODE_LEN); status = wma_set_reg_domain(mac_ctx, reg_domain_id); if (false == is_11d_country) { /* overwrite the defualt country code */ - cdf_mem_copy(mac_ctx->scan.countryCodeDefault, + qdf_mem_copy(mac_ctx->scan.countryCodeDefault, mac_ctx->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); /* set to default domain ID */ @@ -7176,9 +7176,9 @@ sme_handle_generic_change_country_code(tpAniSirGlobal mac_ctx, if (!supplicant_priority && (false == is_11d_country)) { sms_log(mac_ctx, LOGW, FL("Clearing currentCountryBssid, countryCode11d")); - cdf_mem_zero(&mac_ctx->scan.currentCountryBssid, + qdf_mem_zero(&mac_ctx->scan.currentCountryBssid, sizeof(struct qdf_mac_addr)); - cdf_mem_zero(mac_ctx->scan.countryCode11d, + qdf_mem_zero(mac_ctx->scan.countryCode11d, sizeof(mac_ctx->scan.countryCode11d)); } } @@ -7288,7 +7288,7 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirRcvFltMcAddrList)); + request_buf = qdf_mem_malloc(sizeof(tSirRcvFltMcAddrList)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to " @@ -7301,11 +7301,11 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Ignoring the " "indication as we are not connected", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(request_buf, pMulticastAddrs, + qdf_mem_copy(request_buf, pMulticastAddrs, sizeof(tSirRcvFltMcAddrList)); qdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr); @@ -7320,7 +7320,7 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, "%s: Not able to " "post WMA_8023_MULTICAST_LIST message to WMA", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -7344,7 +7344,7 @@ QDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal, allocSize = sizeof(tSirRcvPktFilterCfgType); - request_buf = cdf_mem_malloc(allocSize); + request_buf = qdf_mem_malloc(allocSize); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -7357,7 +7357,7 @@ QDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal, if (NULL == pSession) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Session Not found ", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -7365,7 +7365,7 @@ QDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal, &pSession->selfMacAddr); qdf_copy_macaddr(&pRcvPktFilterCfg->bssid, &pSession->connectedProfile.bssid); - cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize); + qdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize); msg.type = WMA_RECEIVE_FILTER_SET_FILTER_REQ; msg.reserved = 0; @@ -7416,7 +7416,7 @@ QDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal, "%s: Not able to post " "WMA_RECEIVE_FILTER_SET_FILTER message to WMA", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -7441,7 +7441,7 @@ QDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirRcvFltPktClearParam)); + request_buf = qdf_mem_malloc(sizeof(tSirRcvFltPktClearParam)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for Receive Filter " @@ -7454,7 +7454,7 @@ QDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal, qdf_copy_macaddr(&pRcvFltPktClearParam->bssid, &pSession->connectedProfile.bssid); - cdf_mem_copy(request_buf, pRcvFltPktClearParam, + qdf_mem_copy(request_buf, pRcvFltPktClearParam, sizeof(tSirRcvFltPktClearParam)); msg.type = WMA_RECEIVE_FILTER_CLEAR_FILTER_REQ; @@ -7465,7 +7465,7 @@ QDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal, "%s: Not able to post " "WMA_RECEIVE_FILTER_CLEAR_FILTER message to WMA", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -7561,7 +7561,7 @@ QDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t dB) tpMaxTxPowerPerBandParams pMaxTxPowerPerBandParams = NULL; pMaxTxPowerPerBandParams = - cdf_mem_malloc(sizeof(tMaxTxPowerPerBandParams)); + qdf_mem_malloc(sizeof(tMaxTxPowerPerBandParams)); if (NULL == pMaxTxPowerPerBandParams) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s:Not able to allocate memory for pMaxTxPowerPerBandParams", @@ -7580,7 +7580,7 @@ QDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t dB) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s:Not able to post WMA_SET_MAX_TX_POWER_PER_BAND_REQ", __func__); - cdf_mem_free(pMaxTxPowerPerBandParams); + qdf_mem_free(pMaxTxPowerPerBandParams); return QDF_STATUS_E_FAILURE; } @@ -7609,7 +7609,7 @@ QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid, MTRACE(qdf_trace(QDF_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_SET_MAXTXPOW, NO_SESSION, 0)); - pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams)); + pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams)); if (NULL == pMaxTxParams) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for pMaxTxParams", @@ -7629,7 +7629,7 @@ QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_SET_MAX_TX_POWER_REQ message to WMA", __func__); - cdf_mem_free(pMaxTxParams); + qdf_mem_free(pMaxTxParams); return QDF_STATUS_E_FAILURE; } @@ -7651,14 +7651,14 @@ QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr) cds_msg_t msg; tSirMacAddr *pBaseMacAddr; - pBaseMacAddr = cdf_mem_malloc(sizeof(tSirMacAddr)); + pBaseMacAddr = qdf_mem_malloc(sizeof(tSirMacAddr)); if (NULL == pBaseMacAddr) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for pBaseMacAddr")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(*pBaseMacAddr, customMacAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(*pBaseMacAddr, customMacAddr, sizeof(tSirMacAddr)); msg.type = SIR_HAL_SET_BASE_MACADDR_IND; msg.reserved = 0; @@ -7668,7 +7668,7 @@ QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL ("Not able to post SIR_HAL_SET_BASE_MACADDR_IND message to WMA")); - cdf_mem_free(pBaseMacAddr); + qdf_mem_free(pBaseMacAddr); return QDF_STATUS_E_FAILURE; } @@ -7703,7 +7703,7 @@ QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId, return QDF_STATUS_E_FAILURE; } - pTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams)); + pTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams)); if (NULL == pTxParams) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for pTxParams", @@ -7722,7 +7722,7 @@ QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: failed to post WMA_SET_TX_POWER_REQ to WMA", __func__); - cdf_mem_free(pTxParams); + qdf_mem_free(pTxParams); return QDF_STATUS_E_FAILURE; } @@ -7765,11 +7765,11 @@ QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId, uint8_t ssidHidden) /* Create the message and send to lim */ len = sizeof(tSirUpdateParams); - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set(pMsg, sizeof(tSirUpdateParams), 0); + qdf_mem_set(pMsg, sizeof(tSirUpdateParams), 0); pMsg->messageType = eWNI_SME_HIDE_SSID_REQ; pMsg->length = len; /* Data starts from here */ @@ -7805,7 +7805,7 @@ QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel, uint16_t tmMod if (QDF_IS_STATUS_SUCCESS(status)) { setTmLevelReq = (tAniSetTmLevelReq *) - cdf_mem_malloc(sizeof(tAniSetTmLevelReq)); + qdf_mem_malloc(sizeof(tAniSetTmLevelReq)); if (NULL == setTmLevelReq) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for sme_set_tm_level", @@ -7824,7 +7824,7 @@ QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel, uint16_t tmMod if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post Set TM Level MSG fail", __func__); - cdf_mem_free(setTmLevelReq); + qdf_mem_free(setTmLevelReq); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); @@ -9636,7 +9636,7 @@ QDF_STATUS sme_send_tdls_mgmt_frame(tHalHandle hHal, uint8_t sessionId, sessionId, statusCode)); status = sme_acquire_global_lock(&pMac->sme); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_copy(sendTdlsReq.peerMac, peerMac, sizeof(tSirMacAddr)); + qdf_mem_copy(sendTdlsReq.peerMac, peerMac, sizeof(tSirMacAddr)); sendTdlsReq.frameType = frame_type; sendTdlsReq.buf = buf; sendTdlsReq.len = len; @@ -9833,7 +9833,7 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal, status = sme_acquire_global_lock(&pMac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) return status; - pTdlsPeerStateParams = cdf_mem_malloc(sizeof(*pTdlsPeerStateParams)); + pTdlsPeerStateParams = qdf_mem_malloc(sizeof(*pTdlsPeerStateParams)); if (NULL == pTdlsPeerStateParams) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("failed to allocate mem for tdls peer state param")); @@ -9841,8 +9841,8 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal, return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pTdlsPeerStateParams, sizeof(*pTdlsPeerStateParams)); - cdf_mem_copy(&pTdlsPeerStateParams->peerMacAddr, + qdf_mem_zero(pTdlsPeerStateParams, sizeof(*pTdlsPeerStateParams)); + qdf_mem_copy(&pTdlsPeerStateParams->peerMacAddr, &peerStateParams->peerMacAddr, sizeof(tSirMacAddr)); pTdlsPeerStateParams->vdevId = peerStateParams->vdevId; pTdlsPeerStateParams->peerState = peerStateParams->peerState; @@ -9875,7 +9875,7 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("invalid peer state param (%d)"), peerStateParams->peerState); - cdf_mem_free(pTdlsPeerStateParams); + qdf_mem_free(pTdlsPeerStateParams); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -9933,7 +9933,7 @@ QDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal, qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { - cdf_mem_free(pTdlsPeerStateParams); + qdf_mem_free(pTdlsPeerStateParams); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); @@ -9964,14 +9964,14 @@ QDF_STATUS sme_send_tdls_chan_switch_req(tHalHandle hal, status = sme_acquire_global_lock(&mac->sme); if (QDF_STATUS_SUCCESS != status) return status; - chan_switch_params = cdf_mem_malloc(sizeof(*chan_switch_params)); + chan_switch_params = qdf_mem_malloc(sizeof(*chan_switch_params)); if (NULL == chan_switch_params) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("fail to alloc mem for tdls chan switch param")); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(chan_switch_params, sizeof(*chan_switch_params)); + qdf_mem_zero(chan_switch_params, sizeof(*chan_switch_params)); switch (ch_switch_params->tdls_off_ch_mode) { case ENABLE_CHANSWITCH: @@ -9986,12 +9986,12 @@ QDF_STATUS sme_send_tdls_chan_switch_req(tHalHandle hal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("invalid off channel command (%d)"), ch_switch_params->tdls_off_ch_mode); - cdf_mem_free(chan_switch_params); + qdf_mem_free(chan_switch_params); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&chan_switch_params->peer_mac_addr, + qdf_mem_copy(&chan_switch_params->peer_mac_addr, &ch_switch_params->peer_mac_addr, sizeof(tSirMacAddr)); chan_switch_params->vdev_id = ch_switch_params->vdev_id; chan_switch_params->tdls_off_ch = ch_switch_params->tdls_off_channel; @@ -10015,7 +10015,7 @@ QDF_STATUS sme_send_tdls_chan_switch_req(tHalHandle hal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Message Post failed status=%d"), qdf_status); - cdf_mem_free(chan_switch_params); + qdf_mem_free(chan_switch_params); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -10346,7 +10346,7 @@ QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, uint8_t session_id, status = sme_acquire_global_lock(&pMac->sme); if (QDF_STATUS_SUCCESS == status) { - request_buf = cdf_mem_malloc(sizeof(*request_buf)); + request_buf = qdf_mem_malloc(sizeof(*request_buf)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for \ @@ -10367,7 +10367,7 @@ QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_IPA_OFFLOAD_\ ENABLE_DISABLE message to WMA")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -10485,7 +10485,7 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOG1, FL("enter")); - req_msg = cdf_mem_malloc(sizeof(*req_msg)); + req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { sms_log(mac, LOGE, FL("memory allocation failed")); return QDF_STATUS_E_NOMEM; @@ -10498,7 +10498,7 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -10510,7 +10510,7 @@ sme_add_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } sme_release_global_lock(&mac->sme); return status; @@ -10534,7 +10534,7 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOG1, FL("enter")); - req_msg = cdf_mem_malloc(sizeof(*req_msg)); + req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { sms_log(mac, LOGE, FL("memory allocation failed")); return QDF_STATUS_E_NOMEM; @@ -10547,7 +10547,7 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -10559,7 +10559,7 @@ sme_del_periodic_tx_ptrn(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } sme_release_global_lock(&mac->sme); return status; @@ -10629,7 +10629,7 @@ static struct sir_ocb_config *sme_copy_sir_ocb_config( src->dcc_ndl_chan_list_len + src->dcc_ndl_active_state_list_len; - dst = cdf_mem_malloc(length); + dst = qdf_mem_malloc(length); if (!dst) return NULL; @@ -10639,19 +10639,19 @@ static struct sir_ocb_config *sme_copy_sir_ocb_config( cursor += sizeof(*dst); dst->channels = cursor; cursor += src->channel_count * sizeof(*src->channels); - cdf_mem_copy(dst->channels, src->channels, + qdf_mem_copy(dst->channels, src->channels, src->channel_count * sizeof(*src->channels)); dst->schedule = cursor; cursor += src->schedule_size * sizeof(*src->schedule); - cdf_mem_copy(dst->schedule, src->schedule, + qdf_mem_copy(dst->schedule, src->schedule, src->schedule_size * sizeof(*src->schedule)); dst->dcc_ndl_chan_list = cursor; cursor += src->dcc_ndl_chan_list_len; - cdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list, + qdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list, src->dcc_ndl_chan_list_len); dst->dcc_ndl_active_state_list = cursor; cursor += src->dcc_ndl_active_state_list_len; - cdf_mem_copy(dst->dcc_ndl_active_state_list, + qdf_mem_copy(dst->dcc_ndl_active_state_list, src->dcc_ndl_active_state_list, src->dcc_ndl_active_state_list_len); return dst; @@ -10709,7 +10709,7 @@ QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, FL("Error posting message to WDA: %d"), status); pMac->sme.ocb_set_config_callback = callback; pMac->sme.ocb_set_config_context = context; - cdf_mem_free(msg_body); + qdf_mem_free(msg_body); goto end; } @@ -10738,7 +10738,7 @@ QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc) if (!QDF_IS_STATUS_SUCCESS(status)) return status; - sme_utc = cdf_mem_malloc(sizeof(*sme_utc)); + sme_utc = qdf_mem_malloc(sizeof(*sme_utc)); if (!sme_utc) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Malloc failed")); @@ -10754,7 +10754,7 @@ QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc) if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post message to WDA")); - cdf_mem_free(utc); + qdf_mem_free(utc); goto end; } @@ -10785,7 +10785,7 @@ QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal, if (!QDF_IS_STATUS_SUCCESS(status)) return status; - buf = cdf_mem_malloc(sizeof(*sme_timing_advert) + + buf = qdf_mem_malloc(sizeof(*sme_timing_advert) + timing_advert->template_length); if (!buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -10797,7 +10797,7 @@ QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal, sme_timing_advert = (struct sir_ocb_timing_advert *)buf; *sme_timing_advert = *timing_advert; sme_timing_advert->template_value = buf + sizeof(*sme_timing_advert); - cdf_mem_copy(sme_timing_advert->template_value, + qdf_mem_copy(sme_timing_advert->template_value, timing_advert->template_value, timing_advert->template_length); msg.type = WMA_OCB_START_TIMING_ADVERT_CMD; @@ -10836,7 +10836,7 @@ QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal, if (!QDF_IS_STATUS_SUCCESS(status)) return status; - sme_timing_advert = cdf_mem_malloc(sizeof(*timing_advert)); + sme_timing_advert = qdf_mem_malloc(sizeof(*timing_advert)); if (!sme_timing_advert) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for stop TA")); @@ -10908,7 +10908,7 @@ QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, return status; /* Allocate memory for the WMI request, and copy the parameter */ - msg_body = cdf_mem_malloc(sizeof(*msg_body)); + msg_body = qdf_mem_malloc(sizeof(*msg_body)); if (!msg_body) { status = QDF_STATUS_E_NOMEM; goto end; @@ -10929,7 +10929,7 @@ QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, FL("Error posting message to WDA: %d"), status); pMac->sme.ocb_get_tsf_timer_callback = NULL; pMac->sme.ocb_get_tsf_timer_context = NULL; - cdf_mem_free(msg_body); + qdf_mem_free(msg_body); goto end; } @@ -10963,7 +10963,7 @@ QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, return status; /* Allocate memory for the WMI request, and copy the parameter */ - msg_body = cdf_mem_malloc(sizeof(*msg_body) + + msg_body = qdf_mem_malloc(sizeof(*msg_body) + request->request_array_len); if (!msg_body) { status = QDF_STATUS_E_NOMEM; @@ -10971,7 +10971,7 @@ QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, } *msg_body = *request; msg_body->request_array = (void *)msg_body + sizeof(*msg_body); - cdf_mem_copy(msg_body->request_array, request->request_array, + qdf_mem_copy(msg_body->request_array, request->request_array, request->request_array_len); msg.type = WMA_DCC_GET_STATS_CMD; @@ -10987,7 +10987,7 @@ QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, FL("Error posting message to WDA: %d"), status); pMac->sme.dcc_get_stats_callback = callback; pMac->sme.dcc_get_stats_context = context; - cdf_mem_free(msg_body); + qdf_mem_free(msg_body); goto end; } @@ -11018,7 +11018,7 @@ QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, if (!QDF_IS_STATUS_SUCCESS(status)) return status; - request = cdf_mem_malloc(sizeof(struct sir_dcc_clear_stats)); + request = qdf_mem_malloc(sizeof(struct sir_dcc_clear_stats)); if (!request) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory")); @@ -11026,7 +11026,7 @@ QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, goto end; } - cdf_mem_zero(request, sizeof(*request)); + qdf_mem_zero(request, sizeof(*request)); request->vdev_id = vdev_id; request->dcc_stats_bitmap = dcc_stats_bitmap; @@ -11037,7 +11037,7 @@ QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post msg to WDA")); - cdf_mem_free(request); + qdf_mem_free(request); goto end; } @@ -11071,7 +11071,7 @@ QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, return status; /* Allocate memory for the WMI request, and copy the parameter */ - msg_body = cdf_mem_malloc(sizeof(*msg_body) + + msg_body = qdf_mem_malloc(sizeof(*msg_body) + request->dcc_ndl_chan_list_len + request->dcc_ndl_active_state_list_len); if (!msg_body) { @@ -11086,9 +11086,9 @@ QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, msg_body->dcc_ndl_chan_list = (void *)msg_body + sizeof(*msg_body); msg_body->dcc_ndl_active_state_list = msg_body->dcc_ndl_chan_list + request->dcc_ndl_chan_list_len; - cdf_mem_copy(msg_body->dcc_ndl_chan_list, request->dcc_ndl_chan_list, + qdf_mem_copy(msg_body->dcc_ndl_chan_list, request->dcc_ndl_chan_list, request->dcc_ndl_active_state_list_len); - cdf_mem_copy(msg_body->dcc_ndl_active_state_list, + qdf_mem_copy(msg_body->dcc_ndl_active_state_list, request->dcc_ndl_active_state_list, request->dcc_ndl_active_state_list_len); @@ -11105,7 +11105,7 @@ QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, FL("Error posting message to WDA: %d"), status); pMac->sme.dcc_update_ndl_callback = NULL; pMac->sme.dcc_update_ndl_context = NULL; - cdf_mem_free(msg_body); + qdf_mem_free(msg_body); goto end; } @@ -11236,7 +11236,7 @@ QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value) return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirModemPowerStateInd)); + request_buf = qdf_mem_malloc(sizeof(tSirModemPowerStateInd)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for MODEM POWER STATE IND", @@ -11254,7 +11254,7 @@ QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_MODEM_POWER_STATE_IND message" " to WMA", __func__); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -11275,7 +11275,7 @@ QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, return QDF_STATUS_E_FAILURE; } - pHtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode)); + pHtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode)); if (NULL == pHtOpMode) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to allocate memory for setting OP mode", @@ -11300,7 +11300,7 @@ QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, } pHtOpMode->staId = staId, - cdf_mem_copy(pHtOpMode->peer_mac, macAddrSTA.bytes, + qdf_mem_copy(pHtOpMode->peer_mac, macAddrSTA.bytes, sizeof(tSirMacAddr)); pHtOpMode->smesessionId = sessionId; @@ -11312,7 +11312,7 @@ QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_UPDATE_OP_MODE message" " to WMA", __func__); - cdf_mem_free(pHtOpMode); + qdf_mem_free(pHtOpMode); return QDF_STATUS_E_FAILURE; } @@ -11508,7 +11508,7 @@ QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, tpAniSirGlobal pMac = PMAC_STRUCT(hHal); QDF_STATUS status; cds_msg_t msg; - tSirRateUpdateInd *rate_upd = cdf_mem_malloc(sizeof(tSirRateUpdateInd)); + tSirRateUpdateInd *rate_upd = qdf_mem_malloc(sizeof(tSirRateUpdateInd)); if (rate_upd == NULL) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -11538,7 +11538,7 @@ QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, __func__); sme_release_global_lock(&pMac->sme); - cdf_mem_free(rate_upd); + qdf_mem_free(rate_upd); return QDF_STATUS_E_FAILURE; } @@ -11637,7 +11637,7 @@ QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_val) status = sme_acquire_global_lock(&pMac->sme); if (QDF_STATUS_SUCCESS == status) { auto_sh_cmd = (tSirAutoShutdownCmdParams *) - cdf_mem_malloc(sizeof(tSirAutoShutdownCmdParams)); + qdf_mem_malloc(sizeof(tSirAutoShutdownCmdParams)); if (auto_sh_cmd == NULL) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s Request Buffer Alloc Fail", __func__); @@ -11654,7 +11654,7 @@ QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_val) if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post Auto shutdown MSG fail", __func__); - cdf_mem_free(auto_sh_cmd); + qdf_mem_free(auto_sh_cmd); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -11715,7 +11715,7 @@ QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal) status = sme_acquire_global_lock(&pMac->sme); if (QDF_STATUS_SUCCESS == status) { cauReq = (tSirChAvoidUpdateReq *) - cdf_mem_malloc(sizeof(tSirChAvoidUpdateReq)); + qdf_mem_malloc(sizeof(tSirChAvoidUpdateReq)); if (NULL == cauReq) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "%s Request Buffer Alloc Fail", __func__); @@ -11733,7 +11733,7 @@ QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Post Ch Avoid Update MSG fail", __func__); - cdf_mem_free(cauReq); + qdf_mem_free(cauReq); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } @@ -11763,7 +11763,7 @@ QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type) uint32_t *val; tpAniSirGlobal mac_ptr = PMAC_STRUCT(hal); - val = cdf_mem_malloc(sizeof(*val)); + val = qdf_mem_malloc(sizeof(*val)); if (NULL == val || NULL == mac_ptr) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Invalid pointer", __func__); @@ -11781,7 +11781,7 @@ QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WDA_SET_MAS_ENABLE_DISABLE to WMA!", __func__); - cdf_mem_free(val); + qdf_mem_free(val); return QDF_STATUS_E_FAILURE; } @@ -11804,7 +11804,7 @@ QDF_STATUS sme_set_mas(uint32_t val) cds_msg_t msg; uint32_t *ptr_val; - ptr_val = cdf_mem_malloc(sizeof(*ptr_val)); + ptr_val = qdf_mem_malloc(sizeof(*ptr_val)); if (NULL == ptr_val) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: could not allocate ptr_val", __func__); @@ -11822,7 +11822,7 @@ QDF_STATUS sme_set_mas(uint32_t val) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WDA_SET_MAS_ENABLE_DISABLE to WMA!", __func__); - cdf_mem_free(ptr_val); + qdf_mem_free(ptr_val); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; @@ -11872,7 +11872,7 @@ QDF_STATUS sme_process_channel_change_resp(tpAniSirGlobal pMac, proam_info.channelChangeRespEvent = (tSirChanChangeResponse *) - cdf_mem_malloc(sizeof(tSirChanChangeResponse)); + qdf_mem_malloc(sizeof(tSirChanChangeResponse)); if (NULL == proam_info.channelChangeRespEvent) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, @@ -11910,7 +11910,7 @@ QDF_STATUS sme_process_channel_change_resp(tpAniSirGlobal pMac, sms_log(pMac, LOGE, "Invalid Channel Change Resp Message: %d\n", status); } - cdf_mem_free(proam_info.channelChangeRespEvent); + qdf_mem_free(proam_info.channelChangeRespEvent); return status; } @@ -11976,14 +11976,14 @@ QDF_STATUS sme_init_thermal_info(tHalHandle hHal, tSmeThermalParams thermalParam cds_msg_t msg; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - pWmaParam = (t_thermal_mgmt *) cdf_mem_malloc(sizeof(t_thermal_mgmt)); + pWmaParam = (t_thermal_mgmt *) qdf_mem_malloc(sizeof(t_thermal_mgmt)); if (NULL == pWmaParam) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: could not allocate tThermalMgmt", __func__); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero((void *)pWmaParam, sizeof(t_thermal_mgmt)); + qdf_mem_zero((void *)pWmaParam, sizeof(t_thermal_mgmt)); pWmaParam->thermalMgmtEnabled = thermalParam.smeThermalMgmtEnabled; pWmaParam->throttlePeriod = thermalParam.smeThrottlePeriod; @@ -12013,14 +12013,14 @@ QDF_STATUS sme_init_thermal_info(tHalHandle hHal, tSmeThermalParams thermalParam QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_SET_THERMAL_INFO_CMD to WMA!", __func__); - cdf_mem_free(pWmaParam); + qdf_mem_free(pWmaParam); sme_release_global_lock(&pMac->sme); return QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); return QDF_STATUS_SUCCESS; } - cdf_mem_free(pWmaParam); + qdf_mem_free(pWmaParam); return QDF_STATUS_E_FAILURE; } @@ -12055,7 +12055,7 @@ QDF_STATUS sme_set_thermal_level(tHalHandle hal, uint8_t level) QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&pMac->sme)) { - cdf_mem_set(&msg, sizeof(msg), 0); + qdf_mem_set(&msg, sizeof(msg), 0); msg.type = WMA_SET_THERMAL_LEVEL; msg.bodyval = level; @@ -12088,7 +12088,7 @@ QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx) tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tSirTxPowerLimit *tx_power_limit; - tx_power_limit = cdf_mem_malloc(sizeof(*tx_power_limit)); + tx_power_limit = qdf_mem_malloc(sizeof(*tx_power_limit)); if (!tx_power_limit) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Memory allocation for TxPowerLimit failed!", @@ -12110,7 +12110,7 @@ QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx) "%s: not able to post WMA_TX_POWER_LIMIT", __func__); status = QDF_STATUS_E_FAILURE; - cdf_mem_free(tx_power_limit); + qdf_mem_free(tx_power_limit); } sme_release_global_lock(&pMac->sme); } @@ -12151,13 +12151,13 @@ QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, tpDisableIntraBssFwd pSapDisableIntraFwd = NULL; /* Prepare the request to send to SME. */ - pSapDisableIntraFwd = cdf_mem_malloc(sizeof(tDisableIntraBssFwd)); + pSapDisableIntraFwd = qdf_mem_malloc(sizeof(tDisableIntraBssFwd)); if (NULL == pSapDisableIntraFwd) { sms_log(pMac, LOGP, "Memory Allocation Failure!!! %s", __func__); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pSapDisableIntraFwd, sizeof(tDisableIntraBssFwd)); + qdf_mem_zero(pSapDisableIntraFwd, sizeof(tDisableIntraBssFwd)); pSapDisableIntraFwd->sessionId = sessionId; pSapDisableIntraFwd->disableintrabssfwd = disablefwd; @@ -12170,7 +12170,7 @@ QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { status = QDF_STATUS_E_FAILURE; - cdf_mem_free(pSapDisableIntraFwd); + qdf_mem_free(pSapDisableIntraFwd); } sme_release_global_lock(&pMac->sme); } @@ -12214,17 +12214,17 @@ QDF_STATUS sme_stats_ext_request(uint8_t session_id, tpStatsExtRequestReq input) size_t data_len; data_len = sizeof(tStatsExtRequest) + input->request_data_len; - data = cdf_mem_malloc(data_len); + data = qdf_mem_malloc(data_len); if (data == NULL) { return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(data, data_len); + qdf_mem_zero(data, data_len); data->vdev_id = session_id; data->request_data_len = input->request_data_len; if (input->request_data_len) { - cdf_mem_copy(data->request_data, + qdf_mem_copy(data->request_data, input->request_data, input->request_data_len); } @@ -12236,7 +12236,7 @@ QDF_STATUS sme_stats_ext_request(uint8_t session_id, tpStatsExtRequestReq input) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_STATS_EXT_REQUEST message to WMA", __func__); - cdf_mem_free(data); + qdf_mem_free(data); return QDF_STATUS_E_FAILURE; } @@ -12903,13 +12903,13 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, sms_log(mac, LOG1, FL("enter")); len = sizeof(*req_msg) + (input->num_networks * sizeof(struct wifi_epno_network)); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); req_msg->num_networks = input->num_networks; req_msg->request_id = input->request_id; req_msg->session_id = input->session_id; @@ -12921,7 +12921,7 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, input->networks[i].auth_bit_field; req_msg->networks[i].ssid.length = input->networks[i].ssid.length; - cdf_mem_copy(req_msg->networks[i].ssid.ssId, + qdf_mem_copy(req_msg->networks[i].ssid.ssId, input->networks[i].ssid.ssId, req_msg->networks[i].ssid.length); } @@ -12931,7 +12931,7 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -12943,7 +12943,7 @@ QDF_STATUS sme_set_epno_list(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -12972,26 +12972,26 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, sms_log(mac, LOG1, FL("enter")); len = sizeof(*req_msg) + (input->num_networks * sizeof(struct wifi_passpoint_network)); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); req_msg->num_networks = input->num_networks; req_msg->request_id = input->request_id; req_msg->session_id = input->session_id; for (i = 0; i < req_msg->num_networks; i++) { req_msg->networks[i].id = input->networks[i].id; - cdf_mem_copy(req_msg->networks[i].realm, + qdf_mem_copy(req_msg->networks[i].realm, input->networks[i].realm, strlen(input->networks[i].realm) + 1); - cdf_mem_copy(req_msg->networks[i].plmn, + qdf_mem_copy(req_msg->networks[i].plmn, input->networks[i].plmn, SIR_PASSPOINT_PLMN_LEN); - cdf_mem_copy(req_msg->networks[i].roaming_consortium_ids, + qdf_mem_copy(req_msg->networks[i].roaming_consortium_ids, input->networks[i].roaming_consortium_ids, sizeof(req_msg->networks[i].roaming_consortium_ids)); } @@ -13001,7 +13001,7 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -13013,7 +13013,7 @@ QDF_STATUS sme_set_passpoint_list(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -13036,13 +13036,13 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, struct wifi_passpoint_req *req_msg; sms_log(mac, LOG1, FL("enter")); - req_msg = cdf_mem_malloc(sizeof(*req_msg)); + req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, sizeof(*req_msg)); + qdf_mem_zero(req_msg, sizeof(*req_msg)); req_msg->request_id = input->request_id; req_msg->session_id = input->session_id; @@ -13051,7 +13051,7 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -13063,7 +13063,7 @@ QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -13086,9 +13086,9 @@ sme_set_ssid_hotlist(tHalHandle hal, cds_msg_t cds_message; struct sir_set_ssid_hotlist_request *set_req; - set_req = cdf_mem_malloc(sizeof(*set_req)); + set_req = qdf_mem_malloc(sizeof(*set_req)); if (!set_req) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_FAILURE; } @@ -13101,14 +13101,14 @@ sme_set_ssid_hotlist(tHalHandle hal, status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message); sme_release_global_lock(&mac->sme); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(set_req); + qdf_mem_free(set_req); status = QDF_STATUS_E_FAILURE; } } else { sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(set_req); + qdf_mem_free(set_req); status = QDF_STATUS_E_FAILURE; } return status; @@ -13157,7 +13157,7 @@ QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, "stopReq = %u", pclearStatsReq->stopReq); - clear_stats_req = cdf_mem_malloc(sizeof(*clear_stats_req)); + clear_stats_req = qdf_mem_malloc(sizeof(*clear_stats_req)); if (!clear_stats_req) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13177,14 +13177,14 @@ QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: not able to post WMA_LL_STATS_CLEAR_REQ", __func__); - cdf_mem_free(clear_stats_req); + qdf_mem_free(clear_stats_req); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: " "sme_acquire_global_lock error", __func__); - cdf_mem_free(clear_stats_req); + qdf_mem_free(clear_stats_req); status = QDF_STATUS_E_FAILURE; } @@ -13213,7 +13213,7 @@ QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal, tSirLLStatsSetReq *psetStatsReq " Aggressive Stats Collections = %u", psetStatsReq->aggressiveStatisticsGathering); - set_stats_req = cdf_mem_malloc(sizeof(*set_stats_req)); + set_stats_req = qdf_mem_malloc(sizeof(*set_stats_req)); if (!set_stats_req) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13233,14 +13233,14 @@ QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal, tSirLLStatsSetReq *psetStatsReq QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: not able to post WMA_LL_STATS_SET_REQ", __func__); - cdf_mem_free(set_stats_req); + qdf_mem_free(set_stats_req); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: " "sme_acquire_global_lock error", __func__); - cdf_mem_free(set_stats_req); + qdf_mem_free(set_stats_req); status = QDF_STATUS_E_FAILURE; } @@ -13269,7 +13269,7 @@ QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal, tSirLLStatsGetReq *pgetStatsReq QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, "Stats Type = %u", pgetStatsReq->paramIdMask); - get_stats_req = cdf_mem_malloc(sizeof(*get_stats_req)); + get_stats_req = qdf_mem_malloc(sizeof(*get_stats_req)); if (!get_stats_req) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13290,7 +13290,7 @@ QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal, tSirLLStatsGetReq *pgetStatsReq "%s: not able to post WMA_LL_STATS_GET_REQ", __func__); - cdf_mem_free(get_stats_req); + qdf_mem_free(get_stats_req); status = QDF_STATUS_E_FAILURE; } @@ -13298,7 +13298,7 @@ QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal, tSirLLStatsGetReq *pgetStatsReq } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: " "sme_acquire_global_lock error", __func__); - cdf_mem_free(get_stats_req); + qdf_mem_free(get_stats_req); status = QDF_STATUS_E_FAILURE; } @@ -13565,7 +13565,7 @@ QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal, QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - pSmeDhcpSrvInfo = cdf_mem_malloc(sizeof(*pSmeDhcpSrvInfo)); + pSmeDhcpSrvInfo = qdf_mem_malloc(sizeof(*pSmeDhcpSrvInfo)); if (!pSmeDhcpSrvInfo) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13587,14 +13587,14 @@ QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post WMA_SET_DHCP_SERVER_OFFLOAD_CMD to WMA!", __func__); - cdf_mem_free(pSmeDhcpSrvInfo); + qdf_mem_free(pSmeDhcpSrvInfo); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: sme_acquire_global_lock error!", __func__); - cdf_mem_free(pSmeDhcpSrvInfo); + qdf_mem_free(pSmeDhcpSrvInfo); } return status; @@ -13618,7 +13618,7 @@ QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type, cds_msg_t cds_message; tSirLedFlashingReq *ledflashing; - ledflashing = cdf_mem_malloc(sizeof(*ledflashing)); + ledflashing = qdf_mem_malloc(sizeof(*ledflashing)); if (!ledflashing) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL @@ -13731,7 +13731,7 @@ QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, tpAniSirGlobal mac = PMAC_STRUCT(hal); struct sir_stats_avg_factor *stats_factor; - stats_factor = cdf_mem_malloc(sizeof(*stats_factor)); + stats_factor = qdf_mem_malloc(sizeof(*stats_factor)); if (!stats_factor) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13756,7 +13756,7 @@ QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post SIR_HAL_CONFIG_STATS_FACTOR to WMA!", __func__); - cdf_mem_free(stats_factor); + qdf_mem_free(stats_factor); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -13764,7 +13764,7 @@ QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: sme_acquire_global_lock error!", __func__); - cdf_mem_free(stats_factor); + qdf_mem_free(stats_factor); } return status; @@ -13788,7 +13788,7 @@ QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, tpAniSirGlobal mac = PMAC_STRUCT(hal); struct sir_guard_time_request *g_time; - g_time = cdf_mem_malloc(sizeof(*g_time)); + g_time = qdf_mem_malloc(sizeof(*g_time)); if (!g_time) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -13813,7 +13813,7 @@ QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post SIR_HAL_CONFIG_GUARD_TIME to WMA!", __func__); - cdf_mem_free(g_time); + qdf_mem_free(g_time); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -13821,7 +13821,7 @@ QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: sme_acquire_global_lock error!", __func__); - cdf_mem_free(g_time); + qdf_mem_free(g_time); } return status; @@ -13845,7 +13845,7 @@ QDF_STATUS sme_configure_modulated_dtim(tHalHandle h_hal, uint8_t session_id, tpAniSirGlobal mac = PMAC_STRUCT(h_hal); wma_cli_set_cmd_t *iwcmd; - iwcmd = cdf_mem_malloc(sizeof(*iwcmd)); + iwcmd = qdf_mem_malloc(sizeof(*iwcmd)); if (NULL == iwcmd) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL, @@ -13857,7 +13857,7 @@ QDF_STATUS sme_configure_modulated_dtim(tHalHandle h_hal, uint8_t session_id, if (QDF_STATUS_SUCCESS == status) { - cdf_mem_zero((void *)iwcmd, sizeof(*iwcmd)); + qdf_mem_zero((void *)iwcmd, sizeof(*iwcmd)); iwcmd->param_value = modulated_dtim; iwcmd->param_vdev_id = session_id; iwcmd->param_id = GEN_PARAM_MODULATED_DTIM; @@ -13871,7 +13871,7 @@ QDF_STATUS sme_configure_modulated_dtim(tHalHandle h_hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post GEN_PARAM_DYNAMIC_DTIM to WMA!", __func__); - cdf_mem_free(iwcmd); + qdf_mem_free(iwcmd); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -13879,7 +13879,7 @@ QDF_STATUS sme_configure_modulated_dtim(tHalHandle h_hal, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: sme_acquire_global_lock error!", __func__); - cdf_mem_free(iwcmd); + qdf_mem_free(iwcmd); } return status; @@ -13905,13 +13905,13 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, uint32_t len; len = sizeof(*req_msg); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); req_msg->verbose_level = start_log.verbose_level; req_msg->flag = start_log.flag; @@ -13922,7 +13922,7 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -13934,7 +13934,7 @@ QDF_STATUS sme_wifi_start_logger(tHalHandle hal, sms_log(mac, LOGE, FL("vos_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -14236,7 +14236,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, struct rssi_monitor_req *req_msg; sms_log(mac, LOG1, FL("enter")); - req_msg = cdf_mem_malloc(sizeof(*req_msg)); + req_msg = qdf_mem_malloc(sizeof(*req_msg)); if (!req_msg) { sms_log(mac, LOGE, FL("memory allocation failed")); return QDF_STATUS_E_NOMEM; @@ -14249,7 +14249,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, sms_log(mac, LOGE, FL("sme_acquire_global_lock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -14261,7 +14261,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, sms_log(mac, LOGE, FL("cds_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } sme_release_global_lock(&mac->sme); @@ -14289,13 +14289,13 @@ QDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req) struct fw_dump_seg_req seg_req; int loop; - send_req = cdf_mem_malloc(sizeof(*send_req)); + send_req = qdf_mem_malloc(sizeof(*send_req)); if (!send_req) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Memory allocation failed for WDA_FW_MEM_DUMP")); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(send_req, recvd_req, sizeof(*send_req)); + qdf_mem_copy(send_req, recvd_req, sizeof(*send_req)); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, FL("request_id:%d num_seg:%d"), @@ -14325,14 +14325,14 @@ QDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req) if (QDF_STATUS_SUCCESS != qdf_status) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_FW_MEM_DUMP")); - cdf_mem_free(send_req); + qdf_mem_free(send_req); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&pMac->sme); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Failed to acquire SME Global Lock")); - cdf_mem_free(send_req); + qdf_mem_free(send_req); status = QDF_STATUS_E_FAILURE; } @@ -14364,13 +14364,13 @@ QDF_STATUS sme_soc_set_pcl(tHalHandle hal, len = sizeof(*req_msg); - req_msg = cdf_mem_malloc(len); + req_msg = qdf_mem_malloc(len); if (!req_msg) { - sms_log(mac, LOGE, FL("cdf_mem_malloc failed")); + sms_log(mac, LOGE, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(req_msg, len); + qdf_mem_zero(req_msg, len); for (i = 0; i < msg.pcl_len; i++) req_msg->pcl_list[i] = msg.pcl_list[i]; @@ -14382,7 +14382,7 @@ QDF_STATUS sme_soc_set_pcl(tHalHandle hal, sms_log(mac, LOGE, FL("sme_AcquireGlobalLock failed!(status=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -14394,7 +14394,7 @@ QDF_STATUS sme_soc_set_pcl(tHalHandle hal, sms_log(mac, LOGE, FL("vos_mq_post_message failed!(err=%d)"), status); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac->sme); @@ -14568,7 +14568,7 @@ QDF_STATUS sme_gateway_param_update(tHalHandle Hal, cds_msg_t cds_message; struct gateway_param_update_req *request_buf; - request_buf = cdf_mem_malloc(sizeof(*request_buf)); + request_buf = qdf_mem_malloc(sizeof(*request_buf)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for gw param update request")); @@ -14584,7 +14584,7 @@ QDF_STATUS sme_gateway_param_update(tHalHandle Hal, if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_GW_PARAM_UPDATE_REQ message to HAL")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -14831,7 +14831,7 @@ QDF_STATUS sme_send_egap_conf_params(uint32_t enable, uint32_t inactivity_time, QDF_STATUS status; struct egap_conf_params *egap_params; - egap_params = cdf_mem_malloc(sizeof(*egap_params)); + egap_params = qdf_mem_malloc(sizeof(*egap_params)); if (NULL == egap_params) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: fail to alloc egap_params", __func__); @@ -14850,7 +14850,7 @@ QDF_STATUS sme_send_egap_conf_params(uint32_t enable, uint32_t inactivity_time, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post msg to WMA!", __func__); - cdf_mem_free(egap_params); + qdf_mem_free(egap_params); } return status; } diff --git a/core/sme/src/common/sme_ft_api.c b/core/sme/src/common/sme_ft_api.c index 3b9aba549253..adbb1aa273c6 100644 --- a/core/sme/src/common/sme_ft_api.c +++ b/core/sme/src/common/sme_ft_api.c @@ -40,10 +40,10 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId) if (NULL != pSession) { /* Clean up the context */ - cdf_mem_set(&pSession->ftSmeContext, sizeof(tftSMEContext), 0); + qdf_mem_set(&pSession->ftSmeContext, sizeof(tftSMEContext), 0); pSession->ftSmeContext.pUsrCtx = - cdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx)); + qdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx)); if (NULL == pSession->ftSmeContext.pUsrCtx) { sms_log(pMac, LOGE, FL("Memory allocation failure")); @@ -63,7 +63,7 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId) sms_log(pMac, LOGE, FL ("Preauth Reassoc interval Timer allocation failed")); - cdf_mem_free(pSession->ftSmeContext.pUsrCtx); + qdf_mem_free(pSession->ftSmeContext.pUsrCtx); pSession->ftSmeContext.pUsrCtx = NULL; return; } @@ -102,7 +102,7 @@ void sme_ft_close(tHalHandle hHal, uint32_t sessionId) sms_log(pMac, LOG1, FL ("Freeing ftSmeContext.pUsrCtx and setting to NULL")); - cdf_mem_free(pSession->ftSmeContext.pUsrCtx); + qdf_mem_free(pSession->ftSmeContext.pUsrCtx); pSession->ftSmeContext.pUsrCtx = NULL; } } @@ -165,13 +165,13 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id, if ((session->ftSmeContext.auth_ft_ies) && (session->ftSmeContext.auth_ft_ies_length)) { /* Free the one we recvd last from supplicant */ - cdf_mem_free(session->ftSmeContext.auth_ft_ies); + qdf_mem_free(session->ftSmeContext.auth_ft_ies); session->ftSmeContext.auth_ft_ies_length = 0; session->ftSmeContext.auth_ft_ies = NULL; } /* Save the FT IEs */ session->ftSmeContext.auth_ft_ies = - cdf_mem_malloc(ft_ies_length); + qdf_mem_malloc(ft_ies_length); if (NULL == session->ftSmeContext.auth_ft_ies) { sms_log(mac_ctx, LOGE, FL("Mem alloc failed for auth_ft_ies")); @@ -179,7 +179,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id, return; } session->ftSmeContext.auth_ft_ies_length = ft_ies_length; - cdf_mem_copy((uint8_t *)session->ftSmeContext.auth_ft_ies, + qdf_mem_copy((uint8_t *)session->ftSmeContext.auth_ft_ies, ft_ies, ft_ies_length); session->ftSmeContext.FTState = eFT_AUTH_REQ_READY; @@ -215,12 +215,12 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id, if ((session->ftSmeContext.reassoc_ft_ies) && (session->ftSmeContext.reassoc_ft_ies_length)) { /* Free the one we recvd last from supplicant */ - cdf_mem_free(session->ftSmeContext.reassoc_ft_ies); + qdf_mem_free(session->ftSmeContext.reassoc_ft_ies); session->ftSmeContext.reassoc_ft_ies_length = 0; } /* Save the FT IEs */ session->ftSmeContext.reassoc_ft_ies = - cdf_mem_malloc(ft_ies_length); + qdf_mem_malloc(ft_ies_length); if (NULL == session->ftSmeContext.reassoc_ft_ies) { sms_log(mac_ctx, LOGE, FL("Mem alloc fail for reassoc_ft_ie")); @@ -229,7 +229,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id, } session->ftSmeContext.reassoc_ft_ies_length = ft_ies_length; - cdf_mem_copy((uint8_t *)session->ftSmeContext.reassoc_ft_ies, + qdf_mem_copy((uint8_t *)session->ftSmeContext.reassoc_ft_ies, ft_ies, ft_ies_length); session->ftSmeContext.FTState = eFT_SET_KEY_WAIT; @@ -280,11 +280,11 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id, } msglen = sizeof(tSirFTUpdateKeyInfo); - msg = cdf_mem_malloc(msglen); + msg = qdf_mem_malloc(msglen); if (NULL == msg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(msg, msglen, 0); + qdf_mem_set(msg, msglen, 0); msg->messageType = eWNI_SME_FT_UPDATE_KEY; msg->length = msglen; @@ -297,13 +297,13 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id, keymaterial->key[0].unicast = (uint8_t) true; keymaterial->key[0].keyDirection = ftkey_info->keyDirection; - cdf_mem_copy(&keymaterial->key[0].keyRsc, + qdf_mem_copy(&keymaterial->key[0].keyRsc, ftkey_info->keyRsc, CSR_MAX_RSC_LEN); keymaterial->key[0].paeRole = ftkey_info->paeRole; keymaterial->key[0].keyLength = ftkey_info->keyLength; if (ftkey_info->keyLength && ftkey_info->Key) { - cdf_mem_copy(&keymaterial->key[0].key, ftkey_info->Key, + qdf_mem_copy(&keymaterial->key[0].key, ftkey_info->Key, ftkey_info->keyLength); if (ftkey_info->keyLength == 16) { sms_log(mac_ctx, LOG1, @@ -457,11 +457,11 @@ void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId, } /* hdd needs to pack the bssid also along with the */ /* auth response to supplicant */ - cdf_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId, + qdf_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId, QDF_MAC_ADDR_SIZE); /* Copy the auth resp FTIEs */ - cdf_mem_copy(&(ft_ies[QDF_MAC_ADDR_SIZE]), + qdf_mem_copy(&(ft_ies[QDF_MAC_ADDR_SIZE]), pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies, pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length); @@ -507,7 +507,7 @@ void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies, return; } - cdf_mem_copy(ric_ies, + qdf_mem_copy(ric_ies, pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies, pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies_length); @@ -559,7 +559,7 @@ void sme_ft_reset(tHalHandle hHal, uint32_t sessionId) sms_log(pMac, LOG1, FL("Free FT Auth IE %p and set to NULL"), pSession->ftSmeContext.auth_ft_ies); - cdf_mem_free(pSession->ftSmeContext.auth_ft_ies); + qdf_mem_free(pSession->ftSmeContext.auth_ft_ies); pSession->ftSmeContext.auth_ft_ies = NULL; } pSession->ftSmeContext.auth_ft_ies_length = 0; @@ -568,7 +568,7 @@ void sme_ft_reset(tHalHandle hHal, uint32_t sessionId) sms_log(pMac, LOG1, FL("Free FT Reassoc IE %p and set to NULL"), pSession->ftSmeContext.reassoc_ft_ies); - cdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies); + qdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies); pSession->ftSmeContext.reassoc_ft_ies = NULL; } pSession->ftSmeContext.reassoc_ft_ies_length = 0; @@ -577,13 +577,13 @@ void sme_ft_reset(tHalHandle hHal, uint32_t sessionId) sms_log(pMac, LOG1, FL("Free FtPreAuthRsp %p and set to NULL"), pSession->ftSmeContext.psavedFTPreAuthRsp); - cdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp); + qdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp); pSession->ftSmeContext.psavedFTPreAuthRsp = NULL; } pSession->ftSmeContext.setFTPreAuthState = false; pSession->ftSmeContext.setFTPTKState = false; - cdf_mem_zero(pSession->ftSmeContext.preAuthbssId, + qdf_mem_zero(pSession->ftSmeContext.preAuthbssId, QDF_MAC_ADDR_SIZE); pSession->ftSmeContext.FTState = eFT_START_READY; } diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index 78ccd346e5a4..784270996a6f 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -28,7 +28,7 @@ #include "sme_power_save.h" #include "sme_power_save_api.h" #include "sms_debug.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_types.h" #include "wma_types.h" #include "wmm_apsd.h" @@ -56,7 +56,7 @@ QDF_STATUS sme_post_ps_msg_to_wma(uint16_t type, void *body) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Posting message %d failed", __func__, type); - cdf_mem_free(body); + qdf_mem_free(body); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; @@ -75,7 +75,7 @@ QDF_STATUS sme_ps_enable_ps_req_params(tpAniSirGlobal mac_ctx, struct sEnablePsParams *enable_ps_req_params; QDF_STATUS status = QDF_STATUS_SUCCESS; - enable_ps_req_params = cdf_mem_malloc(sizeof(*enable_ps_req_params)); + enable_ps_req_params = qdf_mem_malloc(sizeof(*enable_ps_req_params)); if (NULL == enable_ps_req_params) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed for enable_ps_req_params")); @@ -105,7 +105,7 @@ QDF_STATUS sme_ps_disable_ps_req_params(tpAniSirGlobal mac_ctx, struct sDisablePsParams *disable_ps_req_params; QDF_STATUS status = QDF_STATUS_SUCCESS; - disable_ps_req_params = cdf_mem_malloc(sizeof(*disable_ps_req_params)); + disable_ps_req_params = qdf_mem_malloc(sizeof(*disable_ps_req_params)); if (NULL == disable_ps_req_params) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed for sDisablePsParams")); @@ -142,7 +142,7 @@ QDF_STATUS sme_ps_enable_uapsd_req_params(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_SUCCESS; enable_uapsd_req_params = - cdf_mem_malloc(sizeof(*enable_uapsd_req_params)); + qdf_mem_malloc(sizeof(*enable_uapsd_req_params)); if (NULL == enable_uapsd_req_params) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed for enable_uapsd_req_params")); @@ -209,7 +209,7 @@ QDF_STATUS sme_ps_disable_uapsd_req_params(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_SUCCESS; disable_uapsd_req_params = - cdf_mem_malloc(sizeof(*disable_uapsd_req_params)); + qdf_mem_malloc(sizeof(*disable_uapsd_req_params)); if (NULL == disable_uapsd_req_params) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed for disable_uapsd_req_params")); @@ -245,13 +245,13 @@ QDF_STATUS sme_ps_enter_wowl_req_params(tpAniSirGlobal mac_ctx, sme_wowl_params = &ps_global_info->ps_params[session_id].wowl_enter_params; - hal_wowl_params = cdf_mem_malloc(sizeof(*hal_wowl_params)); + hal_wowl_params = qdf_mem_malloc(sizeof(*hal_wowl_params)); if (NULL == hal_wowl_params) { sms_log(mac_ctx, LOGP, FL("Fail to allocate memory for Enter Wowl Request")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set((uint8_t *) hal_wowl_params, sizeof(*hal_wowl_params), 0); + qdf_mem_set((uint8_t *) hal_wowl_params, sizeof(*hal_wowl_params), 0); /* fill in the message field */ hal_wowl_params->ucMagicPktEnable = sme_wowl_params->ucMagicPktEnable; @@ -337,7 +337,7 @@ QDF_STATUS sme_ps_enter_wowl_req_params(tpAniSirGlobal mac_ctx, end: if (hal_wowl_params != NULL) - cdf_mem_free(hal_wowl_params); + qdf_mem_free(hal_wowl_params); return QDF_STATUS_E_FAILURE; } @@ -352,13 +352,13 @@ QDF_STATUS sme_ps_exit_wowl_req_params(tpAniSirGlobal mac_ctx, uint32_t session_id) { struct sSirHalWowlExitParams *hal_wowl_msg; - hal_wowl_msg = cdf_mem_malloc(sizeof(*hal_wowl_msg)); + hal_wowl_msg = qdf_mem_malloc(sizeof(*hal_wowl_msg)); if (NULL == hal_wowl_msg) { sms_log(mac_ctx, LOGP, FL("Fail to allocate memory for WoWLAN Add Bcast Pattern ")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set((uint8_t *) hal_wowl_msg, + qdf_mem_set((uint8_t *) hal_wowl_msg, sizeof(*hal_wowl_msg), 0); hal_wowl_msg->sessionId = session_id; @@ -369,7 +369,7 @@ QDF_STATUS sme_ps_exit_wowl_req_params(tpAniSirGlobal mac_ctx, return QDF_STATUS_SUCCESS; } if (hal_wowl_msg != NULL) - cdf_mem_free(hal_wowl_msg); + qdf_mem_free(hal_wowl_msg); return QDF_STATUS_E_FAILURE; } @@ -647,13 +647,13 @@ sme_populate_mac_header(tpAniSirGlobal mac_ctx, mac_hdr->fc.subType = sub_type; /* Prepare Address 1 */ - cdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr, + qdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr, sizeof(tSirMacAddr)); sir_copy_mac_addr(mac_hdr->sa, self_mac_addr); /* Prepare Address 3 */ - cdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr, + qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr, sizeof(tSirMacAddr)); return status_code; } /*** sme_populate_mac_header() ***/ @@ -676,7 +676,7 @@ sme_prepare_probe_req_template(tpAniSirGlobal mac_ctx, * and then hand it off to 'dot11f_pack_probe_request' (for * serialization). We start by zero-initializing the structure: */ - cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); + qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); populate_dot11f_supp_rates(mac_ctx, channel_num, &pr.SuppRates, NULL); @@ -714,7 +714,7 @@ sme_prepare_probe_req_template(tpAniSirGlobal mac_ctx, bytes = payload + sizeof(tSirMacMgmtHdr); /* Prepare outgoing frame */ - cdf_mem_set(frame, bytes, 0); + qdf_mem_set(frame, bytes, 0); /* Next, we fill out the buffer descriptor: */ sir_status = sme_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME, @@ -815,14 +815,14 @@ QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirPNOScanReq)); + request_buf = qdf_mem_malloc(sizeof(tSirPNOScanReq)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for PNO request")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(request_buf, request, sizeof(tSirPNOScanReq)); + qdf_mem_copy(request_buf, request, sizeof(tSirPNOScanReq)); /*Must translate the mode first */ uc_dot11_mode = (uint8_t) csr_translate_to_wni_cfg_dot11_mode(mac_ctx, @@ -847,7 +847,7 @@ QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx, ((request_buf->us24GProbeTemplateLen + request->us24GProbeTemplateLen) < SIR_PNO_MAX_PB_REQ_SIZE)) { - cdf_mem_copy((uint8_t *) &request_buf-> + qdf_mem_copy((uint8_t *) &request_buf-> p24GProbeTemplate + request_buf->us24GProbeTemplateLen, (uint8_t *) &request->p24GProbeTemplate, @@ -880,7 +880,7 @@ QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx, ((request_buf->us5GProbeTemplateLen + request->us5GProbeTemplateLen) < SIR_PNO_MAX_PB_REQ_SIZE)) { - cdf_mem_copy((uint8_t *) &request_buf-> + qdf_mem_copy((uint8_t *) &request_buf-> p5GProbeTemplate + request_buf->us5GProbeTemplateLen, (uint8_t *) &request->p5GProbeTemplate, @@ -935,7 +935,7 @@ QDF_STATUS sme_set_ps_preferred_network_list(tHalHandle hal_ctx, (cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_SET_PNO_REQ message to WMA")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -982,7 +982,7 @@ QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx, return QDF_STATUS_E_FAILURE; } - request_buf = cdf_mem_malloc(sizeof(tSirHostOffloadReq)); + 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")); @@ -991,7 +991,7 @@ QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx, qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid); - cdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq)); + qdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq)); msg.type = WMA_SET_HOST_OFFLOAD; msg.reserved = 0; @@ -1000,7 +1000,7 @@ QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx, cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post WMA_SET_HOST_OFFLOAD msg to WMA")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } @@ -1033,7 +1033,7 @@ QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx, qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid); - request_buf = cdf_mem_malloc(sizeof(*request_buf)); + request_buf = qdf_mem_malloc(sizeof(*request_buf)); if (NULL == request_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to allocate memory for NS offload request")); @@ -1048,7 +1048,7 @@ QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx, cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Not able to post SIR_HAL_SET_HOST_OFFLOAD message to HAL")); - cdf_mem_free(request_buf); + qdf_mem_free(request_buf); return QDF_STATUS_E_FAILURE; } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 8c2c4bbdf82f..1cf113a3af69 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -287,7 +287,7 @@ void csr_init_operating_classes(tHalHandle hHal); static void csr_roam_init_globals(tpAniSirGlobal pMac) { if (pMac) { - cdf_mem_zero(&csr_roam_roam_session, sizeof(csr_roam_roam_session)); + qdf_mem_zero(&csr_roam_roam_session, sizeof(csr_roam_roam_session)); pMac->roam.roamSession = csr_roam_roam_session; } return; @@ -365,9 +365,9 @@ QDF_STATUS csr_init_chan_list(tpAniSirGlobal mac, uint8_t *alpha2) } mac->scan.domainIdDefault = reg_id; mac->scan.domainIdCurrent = mac->scan.domainIdDefault; - cdf_mem_copy(mac->scan.countryCodeCurrent, + qdf_mem_copy(mac->scan.countryCodeCurrent, mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN); - cdf_mem_copy(mac->scan.countryCodeElected, + qdf_mem_copy(mac->scan.countryCodeElected, mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN); status = csr_get_channel_and_power_list(mac); csr_clear_votes_for_country_info(mac); @@ -405,17 +405,17 @@ QDF_STATUS csr_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode) pMac->scan.domainIdDefault = regId; pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault; /* Clear CC field */ - cdf_mem_set(pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN, 0); + qdf_mem_set(pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN, 0); /* Copy 2 or 3 bytes country code */ - cdf_mem_copy(pMac->scan.countryCodeDefault, apCntryCode, + qdf_mem_copy(pMac->scan.countryCodeDefault, apCntryCode, cntryCodeLength); /* If 2 bytes country code, 3rd byte must be filled with space */ if ((WNI_CFG_COUNTRY_CODE_LEN - 1) == cntryCodeLength) { - cdf_mem_set(pMac->scan.countryCodeDefault + 2, 1, 0x20); + qdf_mem_set(pMac->scan.countryCodeDefault + 2, 1, 0x20); } - cdf_mem_copy(pMac->scan.countryCodeCurrent, + qdf_mem_copy(pMac->scan.countryCodeCurrent, pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN); status = csr_get_channel_and_power_list(pMac); return status; @@ -426,7 +426,7 @@ QDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam) QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); uint8_t index = 0; - cdf_mem_copy(pParam->Csr11dinfo.countryCode, + qdf_mem_copy(pParam->Csr11dinfo.countryCode, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); for (index = 0; index < pMac->scan.base_channels.numChannels; index++) { @@ -454,7 +454,7 @@ QDF_STATUS csr_close(tpAniSirGlobal pMac) csr_ll_close(&pMac->roam.peStatsReqList); csr_ll_close(&pMac->roam.roamCmdPendingList); if (pMac->sme.saved_scan_cmd) { - cdf_mem_free(pMac->sme.saved_scan_cmd); + qdf_mem_free(pMac->sme.saved_scan_cmd); pMac->sme.saved_scan_cmd = NULL; } /* DeInit Globals */ @@ -505,7 +505,7 @@ void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, return; tmp_list = (tSirUpdateChanParam *) - cdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel); + qdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel); if (tmp_list == NULL) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed")); return; @@ -515,7 +515,7 @@ void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, for (i = 0; i < num_channel; i++) { if (CDS_IS_CHANNEL_5GHZ(chan_list[i].chanId) && !CDS_IS_DFS_CH(chan_list[i].chanId)) { - cdf_mem_copy(&tmp_list[j++], + qdf_mem_copy(&tmp_list[j++], &chan_list[i], sizeof(tSirUpdateChanParam)); chan_list[i].chanId = INVALID_CHANNEL_ID; } @@ -524,7 +524,7 @@ void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, /* next copy DFS channels (remaining channels in 5G) */ for (i = 0; i < num_channel; i++) { if (CDS_IS_CHANNEL_5GHZ(chan_list[i].chanId)) { - cdf_mem_copy(&tmp_list[j++], &chan_list[i], + qdf_mem_copy(&tmp_list[j++], &chan_list[i], sizeof(tSirUpdateChanParam)); chan_list[i].chanId = INVALID_CHANNEL_ID; } @@ -533,7 +533,7 @@ void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, /* next copy 2G channels */ for (i = 0; i < num_channel; i++) { if (CDS_IS_CHANNEL_24GHZ(chan_list[i].chanId)) { - cdf_mem_copy(&tmp_list[j++], &chan_list[i], + qdf_mem_copy(&tmp_list[j++], &chan_list[i], sizeof(tSirUpdateChanParam)); chan_list[i].chanId = INVALID_CHANNEL_ID; } @@ -542,15 +542,15 @@ void csr_roam_arrange_ch_list(tpAniSirGlobal mac_ctx, /* copy rest of the channels in same order to tmp list */ for (i = 0; i < num_channel; i++) { if (chan_list[i].chanId != INVALID_CHANNEL_ID) { - cdf_mem_copy(&tmp_list[j++], &chan_list[i], + qdf_mem_copy(&tmp_list[j++], &chan_list[i], sizeof(tSirUpdateChanParam)); chan_list[i].chanId = INVALID_CHANNEL_ID; } } /* copy tmp list to original channel list buffer */ - cdf_mem_copy(chan_list, tmp_list, + qdf_mem_copy(chan_list, tmp_list, sizeof(tSirUpdateChanParam) * num_channel); - cdf_mem_free(tmp_list); + qdf_mem_free(tmp_list); } /** @@ -589,15 +589,15 @@ void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx, buf_size = sizeof(tSirUpdateChanList) + (sizeof(tSirUpdateChanParam) * num_channel); - chan_list_greedy = cdf_mem_malloc(buf_size); - chan_list_non_greedy = cdf_mem_malloc(buf_size); + 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; } - cdf_mem_zero(chan_list_greedy, buf_size); - cdf_mem_zero(chan_list_non_greedy, buf_size); + qdf_mem_zero(chan_list_greedy, buf_size); + qdf_mem_zero(chan_list_non_greedy, buf_size); /* * fixed_greedy_chan_list is an evaluated channel list based on most of * the enterprise wifi deployments and the order of the channels @@ -619,7 +619,7 @@ void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx, } } if (!match_found) { - cdf_mem_copy( + qdf_mem_copy( &chan_list_non_greedy->chanParam[num_non_greedy_chan], &chan_list->chanParam[i], sizeof(tSirUpdateChanParam)); @@ -637,7 +637,7 @@ void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx, for (j = 0; j < num_channel; j++) { if (fixed_greedy_chan_list[i] == chan_list->chanParam[j].chanId) { - cdf_mem_copy( + qdf_mem_copy( &chan_list_greedy->chanParam[num_greedy_chan], &chan_list->chanParam[j], sizeof(tSirUpdateChanParam)); @@ -656,21 +656,21 @@ void csr_roam_sort_channel_for_early_stop(tpAniSirGlobal mac_ctx, } /* Copy the Greedy channels first */ i = 0; - cdf_mem_copy(&chan_list->chanParam[i], + qdf_mem_copy(&chan_list->chanParam[i], &chan_list_greedy->chanParam[i], num_greedy_chan * sizeof(tSirUpdateChanParam)); /* Copy the remaining Non Greedy channels */ i = num_greedy_chan; j = 0; - cdf_mem_copy(&chan_list->chanParam[i], + qdf_mem_copy(&chan_list->chanParam[i], &chan_list_non_greedy->chanParam[j], num_non_greedy_chan * sizeof(tSirUpdateChanParam)); /* Update channel list for 5g preference and allow DFS roam */ csr_roam_arrange_ch_list(mac_ctx, chan_list->chanParam, num_channel); scan_list_sort_error: - cdf_mem_free(chan_list_greedy); - cdf_mem_free(chan_list_non_greedy); + qdf_mem_free(chan_list_greedy); + qdf_mem_free(chan_list_non_greedy); } QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac) @@ -696,13 +696,13 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac) (sizeof(tSirUpdateChanParam) * (numChan)); csr_init_operating_classes((tHalHandle) pMac); - pChanList = (tSirUpdateChanList *) cdf_mem_malloc(bufLen); + pChanList = (tSirUpdateChanList *) qdf_mem_malloc(bufLen); if (!pChanList) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, "Failed to allocate memory for tSirUpdateChanList"); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pChanList, bufLen); + qdf_mem_zero(pChanList, bufLen); for (i = 0; i < pScan->base_channels.numChannels; i++) { /* Scan is not performed on DSRC channels*/ @@ -768,7 +768,7 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac) if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL, "%s: Failed to post msg to WMA", __func__); - cdf_mem_free(pChanList); + qdf_mem_free(pChanList); return QDF_STATUS_E_FAILURE; } @@ -1000,9 +1000,9 @@ QDF_STATUS csr_roam_copy_connect_profile(tpAniSirGlobal pMac, size = pSession->pConnectBssDesc->length + sizeof(pSession->pConnectBssDesc->length); if (size) { - pProfile->pBssDesc = cdf_mem_malloc(size); + pProfile->pBssDesc = qdf_mem_malloc(size); if (NULL != pProfile->pBssDesc) { - cdf_mem_copy(pProfile->pBssDesc, + qdf_mem_copy(pProfile->pBssDesc, pSession->pConnectBssDesc, size); status = QDF_STATUS_SUCCESS; @@ -1019,9 +1019,9 @@ QDF_STATUS csr_roam_copy_connect_profile(tpAniSirGlobal pMac, pProfile->BSSType = connected_prof->BSSType; pProfile->operationChannel = connected_prof->operationChannel; pProfile->CBMode = connected_prof->CBMode; - cdf_mem_copy(&pProfile->bssid, &connected_prof->bssid, + qdf_mem_copy(&pProfile->bssid, &connected_prof->bssid, sizeof(struct qdf_mac_addr)); - cdf_mem_copy(&pProfile->SSID, &connected_prof->SSID, + qdf_mem_copy(&pProfile->SSID, &connected_prof->SSID, sizeof(tSirMacSSid)); if (connected_prof->MDID.mdiePresent) { pProfile->MDID.mdiePresent = 1; @@ -1034,11 +1034,11 @@ QDF_STATUS csr_roam_copy_connect_profile(tpAniSirGlobal pMac, #ifdef FEATURE_WLAN_ESE pProfile->isESEAssoc = connected_prof->isESEAssoc; if (csr_is_auth_type_ese(connected_prof->AuthType)) { - cdf_mem_copy(pProfile->eseCckmInfo.krk, + qdf_mem_copy(pProfile->eseCckmInfo.krk, connected_prof->eseCckmInfo.krk, SIR_KRK_KEY_LEN); #ifdef WLAN_FEATURE_ROAM_OFFLOAD - cdf_mem_copy(pProfile->eseCckmInfo.btk, + qdf_mem_copy(pProfile->eseCckmInfo.btk, connected_prof->eseCckmInfo.btk, SIR_BTK_KEY_LEN); #endif @@ -1076,10 +1076,10 @@ QDF_STATUS csr_roam_get_connect_profile(tpAniSirGlobal pMac, uint32_t sessionId, void csr_roam_free_connect_profile(tCsrRoamConnectedProfile *profile) { if (profile->pBssDesc) - cdf_mem_free(profile->pBssDesc); + qdf_mem_free(profile->pBssDesc); if (profile->pAddIEAssoc) - cdf_mem_free(profile->pAddIEAssoc); - cdf_mem_set(profile, sizeof(tCsrRoamConnectedProfile), 0); + qdf_mem_free(profile->pAddIEAssoc); + qdf_mem_set(profile, sizeof(tCsrRoamConnectedProfile), 0); profile->AuthType = eCSR_AUTH_TYPE_UNKNOWN; } @@ -1089,7 +1089,7 @@ static QDF_STATUS csr_roam_free_connected_info(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; if (pConnectedInfo->pbFrames) { - cdf_mem_free(pConnectedInfo->pbFrames); + qdf_mem_free(pConnectedInfo->pbFrames); pConnectedInfo->pbFrames = NULL; } pConnectedInfo->nBeaconLength = 0; @@ -1131,7 +1131,7 @@ void csr_release_command_wm_status_change(tpAniSirGlobal pMac, tSmeCmd *pCommand void csr_reinit_set_key_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) { - cdf_mem_set(&pCommand->u.setKeyCmd, sizeof(tSetKeyCmd), 0); + qdf_mem_set(&pCommand->u.setKeyCmd, sizeof(tSetKeyCmd), 0); } void csr_release_command_set_key(tpAniSirGlobal pMac, tSmeCmd *pCommand) @@ -1393,7 +1393,7 @@ QDF_STATUS csr_flush_roam_scan_roam_channel_list(tpAniSirGlobal pMac, if (NULL != pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList) { - cdf_mem_free(pNeighborRoamInfo->roamChannelInfo. + qdf_mem_free(pNeighborRoamInfo->roamChannelInfo. currentChannelListInfo.ChannelList); pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList = NULL; @@ -1416,7 +1416,7 @@ QDF_STATUS csr_flush_cfg_bg_scan_roam_channel_list(tpAniSirGlobal pMac, /* Free up the memory first (if required) */ if (NULL != pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) { - cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. + qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = 0; @@ -1440,7 +1440,7 @@ QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac, pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = numChannels; pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = - cdf_mem_malloc(pNeighborRoamInfo->cfgParams.channelInfo. + qdf_mem_malloc(pNeighborRoamInfo->cfgParams.channelInfo. numOfChannels); if (NULL == pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) { @@ -1451,7 +1451,7 @@ QDF_STATUS csr_create_bg_scan_roam_channel_list(tpAniSirGlobal pMac, } /* Update the roam global structure */ - cdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList, + qdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList, pChannelList, pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels); return status; @@ -1547,25 +1547,25 @@ QDF_STATUS csr_create_roam_scan_channel_list(tpAniSirGlobal pMac, outNumChannels, tmpChannelList, &outNumChannels); - cdf_mem_copy(ChannelList, tmpChannelList, outNumChannels); + qdf_mem_copy(ChannelList, tmpChannelList, outNumChannels); } /* Prepare final roam scan channel list */ if (outNumChannels) { /* Clear the channel list first */ if (NULL != currChannelListInfo->ChannelList) { - cdf_mem_free(currChannelListInfo->ChannelList); + qdf_mem_free(currChannelListInfo->ChannelList); currChannelListInfo->ChannelList = NULL; currChannelListInfo->numOfChannels = 0; } currChannelListInfo->ChannelList - = cdf_mem_malloc(outNumChannels * sizeof(uint8_t)); + = 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"); currChannelListInfo->numOfChannels = 0; return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(currChannelListInfo->ChannelList, + qdf_mem_copy(currChannelListInfo->ChannelList, ChannelList, outNumChannels); } return status; @@ -1911,7 +1911,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, csr_init_channel_power_list(pMac, &pParam->Csr11dinfo); } - cdf_mem_copy(&pMac->roam.configParam.csr11rConfig, + qdf_mem_copy(&pMac->roam.configParam.csr11rConfig, &pParam->csr11rConfig, sizeof(tCsr11rConfigParams)); sms_log(pMac, LOG1, "IsFTResourceReqSupp = %d", @@ -1940,7 +1940,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pMac->roam.configParam.isEseIniFeatureEnabled = pParam->isEseIniFeatureEnabled; #endif - cdf_mem_copy(&pMac->roam.configParam.neighborRoamConfig, + qdf_mem_copy(&pMac->roam.configParam.neighborRoamConfig, &pParam->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams)); sms_log(pMac, LOG1, "nNeighborScanTimerPerioid = %d", @@ -2177,7 +2177,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->fEnableMCCMode = cfg_params->fenableMCCMode; pParam->fAllowMCCGODiffBI = cfg_params->fAllowMCCGODiffBI; pParam->scanCfgAgingTime = pMac->scan.scanResultCfgAgingTime; - cdf_mem_copy(&pParam->neighborRoamConfig, + qdf_mem_copy(&pParam->neighborRoamConfig, &cfg_params->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams)); #ifdef WLAN_FEATURE_11AC @@ -2191,7 +2191,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->ignore_peer_erp_info = cfg_params->ignore_peer_erp_info; pParam->enable2x2 = cfg_params->enable2x2; #endif - cdf_mem_copy(&cfg_params->csr11rConfig, &pParam->csr11rConfig, + qdf_mem_copy(&cfg_params->csr11rConfig, &pParam->csr11rConfig, sizeof(tCsr11rConfigParams)); pParam->isFastTransitionEnabled = cfg_params->isFastTransitionEnabled; pParam->RoamRssiDiff = cfg_params->RoamRssiDiff; @@ -2208,7 +2208,7 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) #ifdef FEATURE_WLAN_ESE pParam->isEseIniFeatureEnabled = cfg_params->isEseIniFeatureEnabled; #endif - cdf_mem_copy(&pParam->neighborRoamConfig, + qdf_mem_copy(&pParam->neighborRoamConfig, &cfg_params->neighborRoamConfig, sizeof(tCsrNeighborRoamConfigParams)); sms_log(pMac, LOG1, @@ -2396,7 +2396,7 @@ void csr_prune_ch_list(tCsrChannel *ch_lst, bool is_24_GHz) } /* * Cleanup the rest of channels. Note we only need to clean up the - * channels if we had to trim the list. Calling cdf_mem_set() with a 0 + * channels if we had to trim the list. Calling qdf_mem_set() with a 0 * size is going to throw asserts on the debug builds so let's be a bit * smarter about that. Zero out the reset of the channels only if we * need to. The amount of memory to clear is the number of channesl that @@ -2404,7 +2404,7 @@ void csr_prune_ch_list(tCsrChannel *ch_lst, bool is_24_GHz) * channel in the structure. */ if (ch_lst->numChannels > num_channels) { - cdf_mem_set(&ch_lst->channelList[num_channels], + qdf_mem_set(&ch_lst->channelList[num_channels], sizeof(ch_lst->channelList[0]) * (ch_lst->numChannels - num_channels), 0); } @@ -2570,7 +2570,7 @@ static QDF_STATUS csr_init11d_info(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo) ps11dinfo->Channels.numChannels)) { pMac->scan.base_channels.numChannels = ps11dinfo->Channels.numChannels; - cdf_mem_copy(pMac->scan.base_channels.channelList, + qdf_mem_copy(pMac->scan.base_channels.channelList, ps11dinfo->Channels.channelList, ps11dinfo->Channels.numChannels); } else { @@ -2579,21 +2579,21 @@ static QDF_STATUS csr_init11d_info(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo) } /* legacy maintenance */ - cdf_mem_copy(pMac->scan.countryCodeDefault, ps11dinfo->countryCode, + qdf_mem_copy(pMac->scan.countryCodeDefault, ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN); /* Tush: at csropen get this initialized with default, during csr reset if this */ /* already set with some value no need initilaize with default again */ if (0 == pMac->scan.countryCodeCurrent[0]) { - cdf_mem_copy(pMac->scan.countryCodeCurrent, + qdf_mem_copy(pMac->scan.countryCodeCurrent, ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN); } /* need to add the max power channel list */ pChanInfo = - cdf_mem_malloc(sizeof(tSirMacChanInfo) * + qdf_mem_malloc(sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN); if (pChanInfo != NULL) { - cdf_mem_set(pChanInfo, + qdf_mem_set(pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN, 0); @@ -2616,7 +2616,7 @@ static QDF_STATUS csr_init11d_info(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo) sizeof(tSirMacChanInfo), pChanInfoStart); } - cdf_mem_free(pChanInfoStart); + qdf_mem_free(pChanInfoStart); } /* Only apply them to CFG when not in STOP state. Otherwise they will be applied later */ if (QDF_IS_STATUS_SUCCESS(status)) { @@ -2652,10 +2652,10 @@ QDF_STATUS csr_init_channel_power_list(tpAniSirGlobal pMac, tCsr11dinfo *ps11din } pChanInfo = - cdf_mem_malloc(sizeof(tSirMacChanInfo) * + qdf_mem_malloc(sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN); if (pChanInfo != NULL) { - cdf_mem_set(pChanInfo, + qdf_mem_set(pChanInfo, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN, 0); pChanInfoStart = pChanInfo; @@ -2678,7 +2678,7 @@ QDF_STATUS csr_init_channel_power_list(tpAniSirGlobal pMac, tCsr11dinfo *ps11din sizeof(tSirMacChanInfo), pChanInfoStart); } - cdf_mem_free(pChanInfoStart); + qdf_mem_free(pChanInfoStart); } return QDF_STATUS_SUCCESS; @@ -2694,7 +2694,7 @@ void csr_roam_remove_duplicate_command(tpAniSirGlobal pMac, uint32_t sessionId, tSmeCmd *pDupCommand; tDblLinkList localList; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return; @@ -2719,7 +2719,7 @@ void csr_roam_remove_duplicate_command(tpAniSirGlobal pMac, uint32_t sessionId, * suffice as pCommand will always be NULL for STA * scenarios */ - (cdf_mem_compare + (!qdf_mem_cmp (pDupCommand->u.roamCmd.peerMac, pCommand->u.roamCmd.peerMac, QDF_MAC_ADDR_SIZE)) @@ -2842,7 +2842,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, sms_log(pMac, LOGW, FL("Assoc complete result=%d status=%d reason=%d"), u2, pRoamInfo->statusCode, pRoamInfo->reasonCode); - beacon_ies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + beacon_ies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if ((NULL != beacon_ies) && (NULL != pRoamInfo->pBssDesc)) { status = csr_parse_bss_description_ies( (tHalHandle) pMac, pRoamInfo->pBssDesc, @@ -2874,7 +2874,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, pRoamInfo->chan_info.reg_info_2 = (csr_get_cfg_max_tx_power(pMac, pRoamInfo->chan_info.chan_id) << 8); - cdf_mem_free(beacon_ies); + qdf_mem_free(beacon_ies); } else if ((u1 == eCSR_ROAM_FT_REASSOC_FAILED) && (pSession->bRefAssocStartCnt)) { /* @@ -2916,7 +2916,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, * eCSR_ROAM_DISASSOCIATED, */ #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR - cdf_mem_set(&connectionStatus, + qdf_mem_set(&connectionStatus, sizeof(host_event_wlan_status_payload_type), 0); if ((eCSR_ROAM_ASSOCIATION_COMPLETION == u1) @@ -2944,18 +2944,18 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, connectionStatus.encryptionType = (uint8_t) diag_enc_type_from_csr_type( pRoamInfo->u.pConnectedProfile->EncryptionType); - cdf_mem_copy(connectionStatus.ssid, + qdf_mem_copy(connectionStatus.ssid, pRoamInfo->u.pConnectedProfile->SSID.ssId, 6); connectionStatus.reason = eCSR_REASON_UNSPECIFIED; - cdf_mem_copy(&pMac->sme.eventPayload, &connectionStatus, + qdf_mem_copy(&pMac->sme.eventPayload, &connectionStatus, sizeof(host_event_wlan_status_payload_type)); WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS); } if ((eCSR_ROAM_MIC_ERROR_IND == u1) || (eCSR_ROAM_RESULT_MIC_FAILURE == u2)) { - cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, + qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, sizeof(host_event_wlan_status_payload_type)); if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac, WNI_CFG_CURRENT_RSSI, &rssi))) @@ -2967,7 +2967,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, EVENT_WLAN_STATUS); } if (eCSR_ROAM_RESULT_FORCED == u2) { - cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, + qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, sizeof(host_event_wlan_status_payload_type)); if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac, WNI_CFG_CURRENT_RSSI, &rssi))) @@ -2979,7 +2979,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, EVENT_WLAN_STATUS); } if (eCSR_ROAM_RESULT_DISASSOC_IND == u2) { - cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, + qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, sizeof(host_event_wlan_status_payload_type)); if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac, WNI_CFG_CURRENT_RSSI, &rssi))) @@ -2995,7 +2995,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, EVENT_WLAN_STATUS); } if (eCSR_ROAM_RESULT_DEAUTH_IND == u2) { - cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, + qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload, sizeof(host_event_wlan_status_payload_type)); if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac, WNI_CFG_CURRENT_RSSI, &rssi))) @@ -3055,7 +3055,7 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId, pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs. bssid); } else if (pSession->pConnectBssDesc) { - cdf_mem_copy(&bssId.bytes, pSession->pConnectBssDesc->bssId, + qdf_mem_copy(&bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } @@ -3114,7 +3114,7 @@ QDF_STATUS csr_roam_issue_disassociate_sta_cmd(tpAniSirGlobal pMac, pCommand->command = eSmeCommandRoam; pCommand->sessionId = (uint8_t) sessionId; pCommand->u.roamCmd.roamReason = eCsrForcedDisassocSta; - cdf_mem_copy(pCommand->u.roamCmd.peerMac, pPeerMacAddr, 6); + qdf_mem_copy(pCommand->u.roamCmd.peerMac, pPeerMacAddr, 6); pCommand->u.roamCmd.reason = (tSirMacReasonCodes) reason; status = csr_queue_sme_command(pMac, pCommand, false); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -3153,7 +3153,7 @@ QDF_STATUS csr_roam_issue_deauth_sta_cmd(tpAniSirGlobal pMac, pCommand->command = eSmeCommandRoam; pCommand->sessionId = (uint8_t) sessionId; pCommand->u.roamCmd.roamReason = eCsrForcedDeauthSta; - cdf_mem_copy(pCommand->u.roamCmd.peerMac, + qdf_mem_copy(pCommand->u.roamCmd.peerMac, pDelStaParams->peerMacAddr.bytes, sizeof(tSirMacAddr)); pCommand->u.roamCmd.reason = @@ -3177,14 +3177,14 @@ csr_send_mb_tkip_counter_measures_req_msg(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeTkipCntrMeasReq *pMsg; do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeTkipCntrMeasReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeTkipCntrMeasReq)); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) break; - cdf_mem_set(pMsg, sizeof(tSirSmeTkipCntrMeasReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeTkipCntrMeasReq), 0); pMsg->messageType = eWNI_SME_TKIP_CNTR_MEAS_REQ; pMsg->length = sizeof(tSirSmeTkipCntrMeasReq); pMsg->sessionId = sessionId; @@ -3209,7 +3209,7 @@ csr_roam_issue_tkip_counter_measures(tpAniSirGlobal pMac, uint32_t sessionId, return status; } if (pSession->pConnectBssDesc) { - cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, + qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { sms_log(pMac, LOGE, @@ -3239,7 +3239,7 @@ csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, return status; } if (pSession->pConnectBssDesc) { - cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, + qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { sms_log(pMac, LOGE, @@ -3273,7 +3273,7 @@ csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessionId, return status; } if (pSession->pConnectBssDesc) { - cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, + qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } else { sms_log(pMac, LOGE, @@ -3303,7 +3303,7 @@ QDF_STATUS csr_roam_issue_deauth(tpAniSirGlobal pMac, uint32_t sessionId, } if (pSession->pConnectBssDesc) { - cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, + qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); } sms_log(pMac, LOG2, "CSR Attempting to Deauth Bssid= " MAC_ADDRESS_STR, @@ -3352,12 +3352,12 @@ QDF_STATUS csr_roam_save_connected_bss_desc(tpAniSirGlobal pMac, uint32_t sessio } } if (NULL == pSession->pConnectBssDesc) { - pSession->pConnectBssDesc = cdf_mem_malloc(size); + pSession->pConnectBssDesc = qdf_mem_malloc(size); } if (NULL == pSession->pConnectBssDesc) status = QDF_STATUS_E_NOMEM; else - cdf_mem_copy(pSession->pConnectBssDesc, pBssDesc, size); + qdf_mem_copy(pSession->pConnectBssDesc, pBssDesc, size); } return status; } @@ -3373,13 +3373,13 @@ QDF_STATUS csr_roam_prepare_bss_config(tpAniSirGlobal pMac, if (pIes == NULL) return QDF_STATUS_E_FAILURE; - cdf_mem_copy(&pBssConfig->BssCap, &pBssDesc->capabilityInfo, + qdf_mem_copy(&pBssConfig->BssCap, &pBssDesc->capabilityInfo, sizeof(tSirMacCapabilityInfo)); /* get qos */ pBssConfig->qosType = csr_get_qo_s_from_bss_desc(pMac, pBssDesc, pIes); /* get SSID */ if (pIes->SSID.present) { - cdf_mem_copy(&pBssConfig->SSID.ssId, pIes->SSID.ssid, + qdf_mem_copy(&pBssConfig->SSID.ssId, pIes->SSID.ssid, pIes->SSID.num_ssid); pBssConfig->SSID.length = pIes->SSID.num_ssid; } else @@ -3501,7 +3501,7 @@ static QDF_STATUS csr_roam_prepare_bss_config_from_profile(tpAniSirGlobal pMac, pBssConfig->SSID.length = 0; if (pProfile->SSIDs.numOfSSIDs) { /* only use the first one */ - cdf_mem_copy(&pBssConfig->SSID, + qdf_mem_copy(&pBssConfig->SSID, &pProfile->SSIDs.SSIDList[0].SSID, sizeof(tSirMacSSid)); } else { @@ -3616,7 +3616,7 @@ static QDF_STATUS csr_roam_get_qos_info_from_bss(tpAniSirGlobal pMac, } while (0); if (NULL != pIes) { - cdf_mem_free(pIes); + qdf_mem_free(pIes); } return status; @@ -3668,7 +3668,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, * clear those that are not present in this profile. */ if (pProfile->Keys.KeyLength[0]) { - cdf_mem_copy(Key0, + qdf_mem_copy(Key0, pProfile->Keys.KeyMaterial[0], WNI_CFG_WEP_KEY_LENGTH_5); Key0Length = WNI_CFG_WEP_KEY_LENGTH_5; @@ -3677,7 +3677,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[1]) { - cdf_mem_copy(Key1, + qdf_mem_copy(Key1, pProfile->Keys.KeyMaterial[1], WNI_CFG_WEP_KEY_LENGTH_5); Key1Length = WNI_CFG_WEP_KEY_LENGTH_5; @@ -3686,7 +3686,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[2]) { - cdf_mem_copy(Key2, + qdf_mem_copy(Key2, pProfile->Keys.KeyMaterial[2], WNI_CFG_WEP_KEY_LENGTH_5); Key2Length = WNI_CFG_WEP_KEY_LENGTH_5; @@ -3695,7 +3695,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[3]) { - cdf_mem_copy(Key3, + qdf_mem_copy(Key3, pProfile->Keys.KeyMaterial[3], WNI_CFG_WEP_KEY_LENGTH_5); Key3Length = WNI_CFG_WEP_KEY_LENGTH_5; @@ -3719,7 +3719,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, * those that are not present in this profile. */ if (pProfile->Keys.KeyLength[0]) { - cdf_mem_copy(Key0, + qdf_mem_copy(Key0, pProfile->Keys.KeyMaterial[0], WNI_CFG_WEP_KEY_LENGTH_13); Key0Length = WNI_CFG_WEP_KEY_LENGTH_13; @@ -3728,7 +3728,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[1]) { - cdf_mem_copy(Key1, + qdf_mem_copy(Key1, pProfile->Keys.KeyMaterial[1], WNI_CFG_WEP_KEY_LENGTH_13); Key1Length = WNI_CFG_WEP_KEY_LENGTH_13; @@ -3737,7 +3737,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[2]) { - cdf_mem_copy(Key2, + qdf_mem_copy(Key2, pProfile->Keys.KeyMaterial[2], WNI_CFG_WEP_KEY_LENGTH_13); Key2Length = WNI_CFG_WEP_KEY_LENGTH_13; @@ -3746,7 +3746,7 @@ void csr_set_cfg_privacy(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, } if (pProfile->Keys.KeyLength[3]) { - cdf_mem_copy(Key3, + qdf_mem_copy(Key3, pProfile->Keys.KeyMaterial[3], WNI_CFG_WEP_KEY_LENGTH_13); Key3Length = WNI_CFG_WEP_KEY_LENGTH_13; @@ -3852,8 +3852,8 @@ static QDF_STATUS csr_get_rate_set(tpAniSirGlobal pMac, eCsrCfgDot11Mode cfgDot11Mode; uint8_t *pDstRate; uint16_t rateBitmap = 0; - cdf_mem_set(pOpRateSet, sizeof(tSirMacRateSet), 0); - cdf_mem_set(pExRateSet, sizeof(tSirMacRateSet), 0); + qdf_mem_set(pOpRateSet, sizeof(tSirMacRateSet), 0); + qdf_mem_set(pExRateSet, sizeof(tSirMacRateSet), 0); QDF_ASSERT(pIes != NULL); if (NULL == pIes) { @@ -4057,7 +4057,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, OperationalRatesLength = DefaultSupportedRates11a.supportedRateSet.numRates * sizeof(*DefaultSupportedRates11a.supportedRateSet.rate); - cdf_mem_copy(OperationalRates, + qdf_mem_copy(OperationalRates, DefaultSupportedRates11a.supportedRateSet.rate, OperationalRatesLength); @@ -4068,7 +4068,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, ProprietaryOperationalRatesLength = DefaultSupportedPropRates.numPropRates * sizeof(*DefaultSupportedPropRates.propRate); - cdf_mem_copy(ProprietaryOperationalRates, + qdf_mem_copy(ProprietaryOperationalRates, DefaultSupportedPropRates.propRate, ProprietaryOperationalRatesLength); } else { @@ -4080,7 +4080,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, OperationalRatesLength = DefaultSupportedRates11b.supportedRateSet.numRates * sizeof(*DefaultSupportedRates11b.supportedRateSet.rate); - cdf_mem_copy(OperationalRates, + qdf_mem_copy(OperationalRates, DefaultSupportedRates11b.supportedRateSet.rate, OperationalRatesLength); /* Nothing in the Extended rate set. */ @@ -4094,7 +4094,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, OperationalRatesLength = DefaultSupportedRates11b.supportedRateSet.numRates * sizeof(*DefaultSupportedRates11b.supportedRateSet.rate); - cdf_mem_copy(OperationalRates, + qdf_mem_copy(OperationalRates, DefaultSupportedRates11b.supportedRateSet.rate, OperationalRatesLength); @@ -4102,7 +4102,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, ExtendedOperationalRatesLength = DefaultSupportedRates11a.supportedRateSet.numRates * sizeof(*DefaultSupportedRates11a.supportedRateSet.rate); - cdf_mem_copy(ExtendedOperationalRates, + qdf_mem_copy(ExtendedOperationalRates, DefaultSupportedRates11a.supportedRateSet.rate, ExtendedOperationalRatesLength); @@ -4111,7 +4111,7 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac, ProprietaryOperationalRatesLength = DefaultSupportedPropRates.numPropRates * sizeof(*DefaultSupportedPropRates.propRate); - cdf_mem_copy(ProprietaryOperationalRates, + qdf_mem_copy(ProprietaryOperationalRates, DefaultSupportedPropRates.propRate, ProprietaryOperationalRatesLength); } else { @@ -4225,7 +4225,7 @@ QDF_STATUS csr_roam_set_bss_config_cfg(tpAniSirGlobal pMac, uint32_t sessionId, } else { /* Let's also update the below to make sure we don't update CC while */ /* connected to an AP which is advertising some CC */ - cdf_mem_copy(pMac->scan.currentCountryBssid.bytes, + qdf_mem_copy(pMac->scan.currentCountryBssid.bytes, pBssDesc->bssId, sizeof(tSirMacAddr)); } @@ -4300,11 +4300,11 @@ QDF_STATUS csr_roam_stop_network(tpAniSirGlobal pMac, uint32_t sessionId, return QDF_STATUS_E_FAILURE; } - pBssConfig = cdf_mem_malloc(sizeof(tBssConfigParam)); + pBssConfig = qdf_mem_malloc(sizeof(tBssConfigParam)); if (NULL == pBssConfig) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0); + qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0); status = csr_roam_prepare_bss_config(pMac, pProfile, pBssDesc, pBssConfig, pIes); if (QDF_IS_STATUS_SUCCESS(status)) { @@ -4364,7 +4364,7 @@ QDF_STATUS csr_roam_stop_network(tpAniSirGlobal pMac, uint32_t sessionId, is11rRoamingFlag); } } /* Success getting BSS config info */ - cdf_mem_free(pBssConfig); + qdf_mem_free(pBssConfig); return status; } @@ -4392,7 +4392,7 @@ static eCsrJoinState csr_roam_state_for_same_profile(tpAniSirGlobal mac_ctx, profile)) return eCsrReassocToSelfNoCapChange; /* The key changes */ - cdf_mem_set(&bssConfig, sizeof(bssConfig), 0); + qdf_mem_set(&bssConfig, sizeof(bssConfig), 0); status = csr_roam_prepare_bss_config(mac_ctx, profile, bss_descr, &bssConfig, ies_local); if (QDF_IS_STATUS_SUCCESS(status)) { @@ -4487,7 +4487,7 @@ eCsrJoinState csr_roam_join(tpAniSirGlobal pMac, uint32_t sessionId, } if (pIesLocal && !pScanResult->pvIes) - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); return eRoamState; } @@ -4496,7 +4496,7 @@ QDF_STATUS csr_roam_should_roam(tpAniSirGlobal pMac, uint32_t sessionId, { QDF_STATUS status = QDF_STATUS_SUCCESS; tCsrRoamInfo roamInfo; - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.pBssDesc = pBssDesc; status = csr_roam_call_callback(pMac, sessionId, &roamInfo, roamId, @@ -4681,7 +4681,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, csr_set_abort_roaming_command(mac_ctx, cmd); return; } - cdf_mem_set(roam_info_ptr, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(roam_info_ptr, sizeof(tCsrRoamInfo), 0); if (!scan_result) cmd->u.roamCmd.roamProfile.uapsd_mask = 0; else @@ -4711,7 +4711,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, cmd->u.roamCmd.roamProfile.uapsd_mask = 0; } if (ies_local && !result->pvIes) - cdf_mem_free(ies_local); + qdf_mem_free(ies_local); roam_info_ptr->pProfile = profile; session->bRefAssocStartCnt++; csr_roam_call_callback(mac_ctx, session_id, roam_info_ptr, @@ -4825,8 +4825,8 @@ static eCsrJoinState csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, return eCsrStopRoaming; } - cdf_mem_set(&roam_info, sizeof(roam_info), 0); - cdf_mem_copy(&roam_info.bssid, &session->joinFailStatusCode.bssId, + qdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_copy(&roam_info.bssid, &session->joinFailStatusCode.bssId, sizeof(tSirMacAddr)); /* * When handling AP's capability change, continue to associate @@ -5069,7 +5069,7 @@ static QDF_STATUS csr_roam_trigger_reassociate(tpAniSirGlobal mac_ctx, csr_release_command_roam(mac_ctx, cmd); } - cdf_mem_free(pIes); + qdf_mem_free(pIes); pIes = NULL; } } else { @@ -5182,9 +5182,9 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) /* Remember the roaming profile */ csr_free_roam_profile(pMac, sessionId); pSession->pCurRoamProfile = - cdf_mem_malloc(sizeof(tCsrRoamProfile)); + qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (NULL != pSession->pCurRoamProfile) { - cdf_mem_set(pSession->pCurRoamProfile, + qdf_mem_set(pSession->pCurRoamProfile, sizeof(tCsrRoamProfile), 0); csr_roam_copy_profile(pMac, pSession->pCurRoamProfile, @@ -5212,7 +5212,7 @@ void csr_reinit_preauth_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) pCommand->u.roamCmd.pLastRoamBss = NULL; pCommand->u.roamCmd.pRoamBssEntry = NULL; /* Because u.roamCmd is union and share with scanCmd and StatusChange */ - cdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0); + qdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0); } void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) @@ -5228,12 +5228,12 @@ void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) } pCommand->u.roamCmd.pRoamBssEntry = NULL; /* Because u.roamCmd is union and share with scanCmd and StatusChange */ - cdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0); + qdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0); } void csr_reinit_wm_status_change_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) { - cdf_mem_set(&pCommand->u.wmStatusChangeCmd, sizeof(tWmStatusChangeCmd), + qdf_mem_set(&pCommand->u.wmStatusChangeCmd, sizeof(tWmStatusChangeCmd), 0); } @@ -5291,7 +5291,7 @@ void csr_reset_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId) sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); return; } - cdf_mem_set(&(pSession->PmkidCandidateInfo[0]), + qdf_mem_set(&(pSession->PmkidCandidateInfo[0]), sizeof(tPmkidCandidateInfo) * CSR_MAX_PMKID_ALLOWED, 0); pSession->NumPmkidCandidate = 0; } @@ -5304,7 +5304,7 @@ void csr_reset_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId) sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); return; } - cdf_mem_set(&(pSession->BkidCandidateInfo[0]), + qdf_mem_set(&(pSession->BkidCandidateInfo[0]), sizeof(tBkidCandidateInfo) * CSR_MAX_BKID_ALLOWED, 0); pSession->NumBkidCandidate = 0; } @@ -5355,41 +5355,41 @@ static QDF_STATUS csr_roam_save_params(tpAniSirGlobal mac_ctx, nIeLen += 2 + rsnie->pmkid_count * 4; /* nIeLen doesn't count EID and length fields */ - session_ptr->pWpaRsnRspIE = cdf_mem_malloc(nIeLen + 2); + session_ptr->pWpaRsnRspIE = qdf_mem_malloc(nIeLen + 2); if (NULL == session_ptr->pWpaRsnRspIE) return QDF_STATUS_E_NOMEM; - cdf_mem_set(session_ptr->pWpaRsnRspIE, + qdf_mem_set(session_ptr->pWpaRsnRspIE, nIeLen + 2, 0); session_ptr->pWpaRsnRspIE[0] = DOT11F_EID_RSN; session_ptr->pWpaRsnRspIE[1] = (uint8_t) nIeLen; /* copy upto akm_suites */ pIeBuf = session_ptr->pWpaRsnRspIE + 2; - cdf_mem_copy(pIeBuf, &rsnie->version, + qdf_mem_copy(pIeBuf, &rsnie->version, sizeof(rsnie->version)); pIeBuf += sizeof(rsnie->version); - cdf_mem_copy(pIeBuf, &rsnie->gp_cipher_suite, + qdf_mem_copy(pIeBuf, &rsnie->gp_cipher_suite, sizeof(rsnie->gp_cipher_suite)); pIeBuf += sizeof(rsnie->gp_cipher_suite); - cdf_mem_copy(pIeBuf, &rsnie->pwise_cipher_suite_count, + qdf_mem_copy(pIeBuf, &rsnie->pwise_cipher_suite_count, sizeof(rsnie->pwise_cipher_suite_count)); pIeBuf += sizeof(rsnie->pwise_cipher_suite_count); if (rsnie->pwise_cipher_suite_count) { /* copy pwise_cipher_suites */ - cdf_mem_copy(pIeBuf, rsnie->pwise_cipher_suites, + qdf_mem_copy(pIeBuf, rsnie->pwise_cipher_suites, rsnie->pwise_cipher_suite_count * 4); pIeBuf += rsnie->pwise_cipher_suite_count * 4; } - cdf_mem_copy(pIeBuf, &rsnie->akm_suite_count, 2); + qdf_mem_copy(pIeBuf, &rsnie->akm_suite_count, 2); pIeBuf += 2; if (rsnie->akm_suite_count) { /* copy akm_suites */ - cdf_mem_copy(pIeBuf, rsnie->akm_suites, + qdf_mem_copy(pIeBuf, rsnie->akm_suites, rsnie->akm_suite_count * 4); pIeBuf += rsnie->akm_suite_count * 4; } /* copy the rest */ - cdf_mem_copy(pIeBuf, rsnie->akm_suites + + qdf_mem_copy(pIeBuf, rsnie->akm_suites + rsnie->akm_suite_count * 4, 2 + rsnie->pmkid_count * 4); session_ptr->nWpaRsnRspIeLength = nIeLen + 2; @@ -5408,19 +5408,19 @@ static QDF_STATUS csr_roam_save_params(tpAniSirGlobal mac_ctx, * we always "send" zero, so just remove it. This is * consistent with our assumptions in the frames * compiler; nIeLen doesn't count EID & length fields */ - session_ptr->pWpaRsnRspIE = cdf_mem_malloc(nIeLen + 2); + session_ptr->pWpaRsnRspIE = qdf_mem_malloc(nIeLen + 2); if (NULL == session_ptr->pWpaRsnRspIE) return QDF_STATUS_E_NOMEM; session_ptr->pWpaRsnRspIE[0] = DOT11F_EID_WPA; session_ptr->pWpaRsnRspIE[1] = (uint8_t) nIeLen; pIeBuf = session_ptr->pWpaRsnRspIE + 2; /* Copy WPA OUI */ - cdf_mem_copy(pIeBuf, &csr_wpa_oui[1], 4); + qdf_mem_copy(pIeBuf, &csr_wpa_oui[1], 4); pIeBuf += 4; - cdf_mem_copy(pIeBuf, &wpaie->version, + qdf_mem_copy(pIeBuf, &wpaie->version, 8 + wpaie->unicast_cipher_count * 4); pIeBuf += 8 + wpaie->unicast_cipher_count * 4; - cdf_mem_copy(pIeBuf, &wpaie->auth_suite_count, + qdf_mem_copy(pIeBuf, &wpaie->auth_suite_count, 2 + wpaie->auth_suite_count * 4); pIeBuf += wpaie->auth_suite_count * 4; session_ptr->nWpaRsnRspIeLength = nIeLen + 2; @@ -5443,48 +5443,48 @@ static QDF_STATUS csr_roam_save_params(tpAniSirGlobal mac_ctx, /* nIeLen doesn't count EID and length fields */ session_ptr->pWapiRspIE = - cdf_mem_malloc(nIeLen + 2); + qdf_mem_malloc(nIeLen + 2); if (NULL == session_ptr->pWapiRspIE) return QDF_STATUS_E_NOMEM; session_ptr->pWapiRspIE[0] = DOT11F_EID_WAPI; session_ptr->pWapiRspIE[1] = (uint8_t) nIeLen; pIeBuf = session_ptr->pWapiRspIE + 2; /* copy upto akm_suite_count */ - cdf_mem_copy(pIeBuf, &wapi_ie->version, 2); + qdf_mem_copy(pIeBuf, &wapi_ie->version, 2); pIeBuf += 4; if (wapi_ie->akm_suite_count) { /* copy akm_suites */ - cdf_mem_copy(pIeBuf, + qdf_mem_copy(pIeBuf, wapi_ie->akm_suites, wapi_ie->akm_suite_count * 4); pIeBuf += wapi_ie->akm_suite_count * 4; } - cdf_mem_copy(pIeBuf, + qdf_mem_copy(pIeBuf, &wapi_ie->unicast_cipher_suite_count, 2); pIeBuf += 2; if (wapi_ie->unicast_cipher_suite_count) { uint16_t suite_size = wapi_ie->unicast_cipher_suite_count * 4; /* copy pwise_cipher_suites */ - cdf_mem_copy(pIeBuf, + qdf_mem_copy(pIeBuf, wapi_ie->unicast_cipher_suites, suite_size); pIeBuf += suite_size; } /* gp_cipher_suite */ - cdf_mem_copy(pIeBuf, + qdf_mem_copy(pIeBuf, wapi_ie->multicast_cipher_suite, 4); pIeBuf += 4; /* preauth + reserved */ - cdf_mem_copy(pIeBuf, + qdf_mem_copy(pIeBuf, wapi_ie->multicast_cipher_suite + 4, 2); pIeBuf += 2; if (wapi_ie->bkid_count) { /* bkid_count */ - cdf_mem_copy(pIeBuf, &wapi_ie->bkid_count, 2); + qdf_mem_copy(pIeBuf, &wapi_ie->bkid_count, 2); pIeBuf += 2; /* copy akm_suites */ - cdf_mem_copy(pIeBuf, wapi_ie->bkid, + qdf_mem_copy(pIeBuf, wapi_ie->bkid, wapi_ie->bkid_count * 4); pIeBuf += wapi_ie->bkid_count * 4; } @@ -5534,7 +5534,7 @@ static QDF_STATUS csr_roam_save_security_rsp_ie(tpAniSirGlobal pMac, pIes, pIesLocal); if (!pIes) /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } } return status; @@ -5658,7 +5658,7 @@ void csr_roam_synch_clean_up (tpAniSirGlobal mac, uint8_t session_id) "%s: Roam Synch Failed, Clean Up", __func__); session->roam_synch_in_progress = false; - roam_offload_failed = cdf_mem_malloc( + 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, @@ -5676,7 +5676,7 @@ void csr_roam_synch_clean_up (tpAniSirGlobal mac, uint8_t session_id) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "%s: Unable to post WMA_ROAM_OFFLOAD_SYNCH_FAIL to WMA", __func__); - cdf_mem_free(roam_offload_failed); + qdf_mem_free(roam_offload_failed); } } #endif @@ -5755,12 +5755,12 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, case eCsrSmeIssuedDisassocForHandoff: csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE, session_id); - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.pBssDesc = cmd->u.roamCmd.pLastRoamBss; roam_info.pProfile = &cmd->u.roamCmd.roamProfile; roam_info.statusCode = session->joinFailStatusCode.statusCode; roam_info.reasonCode = session->joinFailStatusCode.reasonCode; - cdf_mem_copy(&roam_info.bssid, + qdf_mem_copy(&roam_info.bssid, &session->joinFailStatusCode.bssId, sizeof(struct qdf_mac_addr)); @@ -5881,7 +5881,7 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, CSR_IS_INFRA_AP(&session->connectedProfile)) { roam_info.u.pConnectedProfile = &session->connectedProfile; - cdf_mem_copy(roam_info.peerMac.bytes, + qdf_mem_copy(roam_info.peerMac.bytes, cmd->u.roamCmd.peerMac, sizeof(tSirMacAddr)); roam_info.reasonCode = eCSR_ROAM_RESULT_FORCED; @@ -5953,7 +5953,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, sms_log(mac_ctx, LOG2, FL("receives start BSS ok indication")); status = QDF_STATUS_E_FAILURE; start_bss_rsp = (tSirSmeStartBssRsp *) context; - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); if (CSR_IS_IBSS(profile)) session->connectState = eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED; else if (CSR_IS_INFRA_AP(profile)) @@ -5986,11 +5986,11 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, if (bss_desc) { csr_roam_save_connected_infomation(mac_ctx, session_id, profile, bss_desc, ies_ptr); - cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, + qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, sizeof(struct qdf_mac_addr)); } /* We are done with the IEs so free it */ - cdf_mem_free(ies_ptr); + qdf_mem_free(ies_ptr); #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR WLAN_HOST_DIAG_LOG_ALLOC(ibss_log, host_log_ibss_pkt_type, LOG_WLAN_IBSS_C); @@ -6008,7 +6008,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, WLAN_IBSS_EVENT_JOIN_IBSS_RSP; } if (bss_desc) { - cdf_mem_copy(ibss_log->bssid.bytes, + qdf_mem_copy(ibss_log->bssid.bytes, bss_desc->bssId, QDF_MAC_ADDR_SIZE); ibss_log->operatingChannel = bss_desc->channelId; @@ -6064,13 +6064,13 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, * start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS * will trigger the connection start indication in Vista */ - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.statusCode = session->joinFailStatusCode.statusCode; roam_info.reasonCode = session->joinFailStatusCode.reasonCode; /* We start the IBSS (didn't find any matched IBSS out there) */ roam_info.pBssDesc = bss_desc; roam_info.staId = (uint8_t) start_bss_rsp->staId; - cdf_mem_copy(roam_info.bssid.bytes, bss_desc->bssId, + qdf_mem_copy(roam_info.bssid.bytes, bss_desc->bssId, sizeof(struct qdf_mac_addr)); if (!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) && (csr_is_concurrent_session_running(mac_ctx))) { @@ -6133,17 +6133,17 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, else ind_qos = SME_QOS_CSR_ASSOC_COMPLETE; sms_log(mac_ctx, LOGW, FL("receives association indication")); - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); /* always free the memory here */ if (session->pWpaRsnRspIE) { session->nWpaRsnRspIeLength = 0; - cdf_mem_free(session->pWpaRsnRspIE); + qdf_mem_free(session->pWpaRsnRspIE); session->pWpaRsnRspIE = NULL; } #ifdef FEATURE_WLAN_WAPI if (session->pWapiRspIE) { session->nWapiRspIeLength = 0; - cdf_mem_free(session->pWapiRspIE); + qdf_mem_free(session->pWapiRspIE); session->pWapiRspIE = NULL; } #endif /* FEATURE_WLAN_WAPI */ @@ -6170,7 +6170,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, cmd->u.roamCmd.roamReason)) { bss_desc = session->pConnectBssDesc; if (bss_desc) - cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, + qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, sizeof(struct qdf_mac_addr)); } else { if (cmd->u.roamCmd.pRoamBssEntry) { @@ -6180,7 +6180,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, bss_desc = &scan_res->Result.BssDescriptor; ies_ptr = (tDot11fBeaconIEs *) (scan_res->Result.pvIes); - cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, + qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId, sizeof(struct qdf_mac_addr)); } } @@ -6334,10 +6334,10 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, #endif if (len) { session->connectedInfo.pbFrames = - cdf_mem_malloc(len); + qdf_mem_malloc(len); if (session->connectedInfo.pbFrames != NULL) { - cdf_mem_copy( + qdf_mem_copy( session->connectedInfo.pbFrames, join_rsp->frames, len); session->connectedInfo.nAssocReqLength = @@ -6463,13 +6463,13 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, roam_info.roamSynchInProgress = 1; roam_info.synchAuthStatus = roam_offload_params->authStatus; - cdf_mem_copy(roam_info.kck, + qdf_mem_copy(roam_info.kck, roam_offload_params->kck, SIR_KCK_KEY_LEN); - cdf_mem_copy(roam_info.kek, + qdf_mem_copy(roam_info.kek, roam_offload_params->kek, SIR_KEK_KEY_LEN); - cdf_mem_copy(roam_info.replay_ctr, + qdf_mem_copy(roam_info.replay_ctr, roam_offload_params->replay_ctr, SIR_REPLAY_CTR_LEN); QDF_TRACE(QDF_MODULE_ID_SME, @@ -6571,7 +6571,7 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, } else { bss_desc = NULL; } - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.pBssDesc = bss_desc; csr_roam_call_callback(mac_ctx, session_id, &roam_info, cmd->u.roamCmd.roamId, roam_status, @@ -6588,10 +6588,10 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, session_id); csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE, session_id); - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.pBssDesc = session->pConnectBssDesc; if (roam_info.pBssDesc) - cdf_mem_copy(&roam_info.bssid, + qdf_mem_copy(&roam_info.bssid, &roam_info.pBssDesc->bssId, sizeof(struct qdf_mac_addr)); /* @@ -6608,7 +6608,7 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, /* No message to PE */ sms_log(mac_ctx, LOGW, FL("receives silently stop roaming indication")); - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); /* to aviod resetting the substate to NONE */ mac_ctx->roam.curState[session_id] = eCSR_ROAMING_STATE_JOINED; @@ -6618,7 +6618,7 @@ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, */ roam_info.pBssDesc = session->pConnectBssDesc; if (roam_info.pBssDesc) - cdf_mem_copy(&roam_info.bssid, + qdf_mem_copy(&roam_info.bssid, &roam_info.pBssDesc->bssId, sizeof(struct qdf_mac_addr)); roam_info.statusCode = session->joinFailStatusCode.statusCode; @@ -6669,96 +6669,96 @@ QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; uint32_t size = 0; - cdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0); if (pSrcProfile->BSSIDs.numOfBSSIDs) { size = sizeof(struct qdf_mac_addr) * pSrcProfile->BSSIDs.numOfBSSIDs; - pDstProfile->BSSIDs.bssid = cdf_mem_malloc(size); + pDstProfile->BSSIDs.bssid = qdf_mem_malloc(size); if (NULL == pDstProfile->BSSIDs.bssid) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->BSSIDs.numOfBSSIDs = pSrcProfile->BSSIDs.numOfBSSIDs; - cdf_mem_copy(pDstProfile->BSSIDs.bssid, + qdf_mem_copy(pDstProfile->BSSIDs.bssid, pSrcProfile->BSSIDs.bssid, size); } if (pSrcProfile->SSIDs.numOfSSIDs) { size = sizeof(tCsrSSIDInfo) * pSrcProfile->SSIDs.numOfSSIDs; - pDstProfile->SSIDs.SSIDList = cdf_mem_malloc(size); + pDstProfile->SSIDs.SSIDList = qdf_mem_malloc(size); if (NULL == pDstProfile->SSIDs.SSIDList) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->SSIDs.numOfSSIDs = pSrcProfile->SSIDs.numOfSSIDs; - cdf_mem_copy(pDstProfile->SSIDs.SSIDList, + qdf_mem_copy(pDstProfile->SSIDs.SSIDList, pSrcProfile->SSIDs.SSIDList, size); } if (pSrcProfile->nWPAReqIELength) { pDstProfile->pWPAReqIE = - cdf_mem_malloc(pSrcProfile->nWPAReqIELength); + qdf_mem_malloc(pSrcProfile->nWPAReqIELength); if (NULL == pDstProfile->pWPAReqIE) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->nWPAReqIELength = pSrcProfile->nWPAReqIELength; - cdf_mem_copy(pDstProfile->pWPAReqIE, pSrcProfile->pWPAReqIE, + qdf_mem_copy(pDstProfile->pWPAReqIE, pSrcProfile->pWPAReqIE, pSrcProfile->nWPAReqIELength); } if (pSrcProfile->nRSNReqIELength) { pDstProfile->pRSNReqIE = - cdf_mem_malloc(pSrcProfile->nRSNReqIELength); + qdf_mem_malloc(pSrcProfile->nRSNReqIELength); if (NULL == pDstProfile->pRSNReqIE) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->nRSNReqIELength = pSrcProfile->nRSNReqIELength; - cdf_mem_copy(pDstProfile->pRSNReqIE, pSrcProfile->pRSNReqIE, + qdf_mem_copy(pDstProfile->pRSNReqIE, pSrcProfile->pRSNReqIE, pSrcProfile->nRSNReqIELength); } #ifdef FEATURE_WLAN_WAPI if (pSrcProfile->nWAPIReqIELength) { pDstProfile->pWAPIReqIE = - cdf_mem_malloc(pSrcProfile->nWAPIReqIELength); + qdf_mem_malloc(pSrcProfile->nWAPIReqIELength); if (NULL == pDstProfile->pWAPIReqIE) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->nWAPIReqIELength = pSrcProfile->nWAPIReqIELength; - cdf_mem_copy(pDstProfile->pWAPIReqIE, pSrcProfile->pWAPIReqIE, + qdf_mem_copy(pDstProfile->pWAPIReqIE, pSrcProfile->pWAPIReqIE, pSrcProfile->nWAPIReqIELength); } #endif /* FEATURE_WLAN_WAPI */ if (pSrcProfile->nAddIEScanLength) { pDstProfile->pAddIEScan = - cdf_mem_malloc(pSrcProfile->nAddIEScanLength); + qdf_mem_malloc(pSrcProfile->nAddIEScanLength); if (NULL == pDstProfile->pAddIEScan) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->nAddIEScanLength = pSrcProfile->nAddIEScanLength; - cdf_mem_copy(pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan, + qdf_mem_copy(pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan, pSrcProfile->nAddIEScanLength); } if (pSrcProfile->nAddIEAssocLength) { pDstProfile->pAddIEAssoc = - cdf_mem_malloc(pSrcProfile->nAddIEAssocLength); + qdf_mem_malloc(pSrcProfile->nAddIEAssocLength); if (NULL == pDstProfile->pAddIEAssoc) { status = QDF_STATUS_E_NOMEM; goto end; } pDstProfile->nAddIEAssocLength = pSrcProfile->nAddIEAssocLength; - cdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc, + qdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc, pSrcProfile->nAddIEAssocLength); } if (pSrcProfile->ChannelInfo.ChannelList) { pDstProfile->ChannelInfo.ChannelList = - cdf_mem_malloc(pSrcProfile->ChannelInfo. + qdf_mem_malloc(pSrcProfile->ChannelInfo. numOfChannels); if (NULL == pDstProfile->ChannelInfo.ChannelList) { status = QDF_STATUS_E_NOMEM; @@ -6766,7 +6766,7 @@ QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, } pDstProfile->ChannelInfo.numOfChannels = pSrcProfile->ChannelInfo.numOfChannels; - cdf_mem_copy(pDstProfile->ChannelInfo.ChannelList, + qdf_mem_copy(pDstProfile->ChannelInfo.ChannelList, pSrcProfile->ChannelInfo.ChannelList, pSrcProfile->ChannelInfo.numOfChannels); } @@ -6818,7 +6818,7 @@ QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, pDstProfile->wps_state = pSrcProfile->wps_state; pDstProfile->ieee80211d = pSrcProfile->ieee80211d; pDstProfile->sap_dot11mc = pSrcProfile->sap_dot11mc; - cdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, + qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, sizeof(pDstProfile->Keys)); #ifdef WLAN_FEATURE_11W pDstProfile->MFPEnabled = pSrcProfile->MFPEnabled; @@ -6830,7 +6830,7 @@ QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, pDstProfile->MDID.mobilityDomain = pSrcProfile->MDID.mobilityDomain; } - cdf_mem_copy(&pDstProfile->addIeParams, &pSrcProfile->addIeParams, + qdf_mem_copy(&pDstProfile->addIeParams, &pSrcProfile->addIeParams, sizeof(tSirAddIeParams)); end: if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -6848,9 +6848,9 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pSrcProfile = &pMac->roam.roamSession[sessionId].connectedProfile; - cdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0); - pDstProfile->BSSIDs.bssid = cdf_mem_malloc(sizeof(struct qdf_mac_addr)); + pDstProfile->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr)); if (NULL == pDstProfile->BSSIDs.bssid) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, @@ -6864,7 +6864,7 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, if (pSrcProfile->SSID.ssId) { pDstProfile->SSIDs.SSIDList = - cdf_mem_malloc(sizeof(tCsrSSIDInfo)); + qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (NULL == pDstProfile->SSIDs.SSIDList) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, @@ -6878,12 +6878,12 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, pSrcProfile->handoffPermitted; pDstProfile->SSIDs.SSIDList[0].ssidHidden = pSrcProfile->ssidHidden; - cdf_mem_copy(&pDstProfile->SSIDs.SSIDList[0].SSID, + qdf_mem_copy(&pDstProfile->SSIDs.SSIDList[0].SSID, &pSrcProfile->SSID, sizeof(tSirMacSSid)); } if (pSrcProfile->nAddIEAssocLength) { pDstProfile->pAddIEAssoc = - cdf_mem_malloc(pSrcProfile->nAddIEAssocLength); + qdf_mem_malloc(pSrcProfile->nAddIEAssocLength); if (NULL == pDstProfile->pAddIEAssoc) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, @@ -6891,10 +6891,10 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, goto end; } pDstProfile->nAddIEAssocLength = pSrcProfile->nAddIEAssocLength; - cdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc, + qdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc, pSrcProfile->nAddIEAssocLength); } - pDstProfile->ChannelInfo.ChannelList = cdf_mem_malloc(1); + pDstProfile->ChannelInfo.ChannelList = qdf_mem_malloc(1); if (NULL == pDstProfile->ChannelInfo.ChannelList) { status = QDF_STATUS_E_NOMEM; goto end; @@ -6916,7 +6916,7 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac, pSrcProfile->mcEncryptionType; pDstProfile->BSSType = pSrcProfile->BSSType; pDstProfile->CBMode = pSrcProfile->CBMode; - cdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, + qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, sizeof(pDstProfile->Keys)); if (pSrcProfile->MDID.mdiePresent) { pDstProfile->MDID.mdiePresent = 1; @@ -7194,13 +7194,13 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, #ifdef FEATURE_WLAN_BTAMP_UT_RF pSession->maxRetryCount = CSR_JOIN_MAX_RETRY_COUNT; #endif - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) { status = QDF_STATUS_E_NOMEM; goto end; } - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); /* Try to connect to any BSS */ if (NULL == pProfile) { @@ -7217,7 +7217,7 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, if (pRoamId) *pRoamId = roamId; if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); goto end; } @@ -7246,7 +7246,7 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, } csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); goto end; } status = csr_scan_get_result(pMac, pScanFilter, &hBSSList); @@ -7323,7 +7323,7 @@ error: */ csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); end: /* tell the caller if we fail to trigger a join request */ if (fCallCallback) { @@ -7382,7 +7382,7 @@ csr_roam_reassoc(tpAniSirGlobal mac_ctx, uint32_t session_id, */ sms_log(mac_ctx, LOG1, FL("SSID mismatch")); } - } else if (!cdf_mem_compare(&mod_fields, + } else if (qdf_mem_cmp(&mod_fields, &session->connectedProfile.modifyProfileFields, sizeof(tCsrRoamModifyProfileFields))) { fCallCallback = false; @@ -7431,22 +7431,22 @@ QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac, uint32_t sessionId) csr_scan_abort_mac_scan_not_for_connect(pMac, sessionId); /* We have to make a copy of pCurRoamProfile because it * will be free inside csr_roam_issue_connect */ - pProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile)); + pProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (NULL == pProfile) { status = QDF_STATUS_E_NOMEM; goto end; } - cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); status = csr_roam_copy_profile(pMac, pProfile, pSession->pCurRoamProfile); if (!QDF_IS_STATUS_SUCCESS(status)) goto end; - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) { status = QDF_STATUS_E_NOMEM; goto end; } - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); status = csr_roam_prepare_filter_from_profile(pMac, pProfile, pScanFilter); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -7480,11 +7480,11 @@ QDF_STATUS csr_roam_join_last_profile(tpAniSirGlobal pMac, uint32_t sessionId) end: if (pScanFilter) { csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); } if (NULL != pProfile) { csr_release_profile(pMac, pProfile); - cdf_mem_free(pProfile); + qdf_mem_free(pProfile); } return status; } @@ -7817,11 +7817,11 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, } pConnectProfile = &pSession->connectedProfile; if (pConnectProfile->pAddIEAssoc) { - cdf_mem_free(pConnectProfile->pAddIEAssoc); + qdf_mem_free(pConnectProfile->pAddIEAssoc); pConnectProfile->pAddIEAssoc = NULL; } if (!pSession->roam_synch_in_progress) { - cdf_mem_set(&pSession->connectedProfile, + qdf_mem_set(&pSession->connectedProfile, sizeof(tCsrRoamConnectedProfile), 0); pConnectProfile->AuthType = pProfile->negotiatedAuthType; pConnectProfile->AuthInfo = pProfile->AuthType; @@ -7835,11 +7835,11 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, pConnectProfile->BSSType = pProfile->BSSType; pConnectProfile->modifyProfileFields.uapsd_mask = pProfile->uapsd_mask; - cdf_mem_copy(&pConnectProfile->Keys, &pProfile->Keys, + qdf_mem_copy(&pConnectProfile->Keys, &pProfile->Keys, sizeof(tCsrKeys)); if (pProfile->nAddIEAssocLength) { pConnectProfile->pAddIEAssoc = - cdf_mem_malloc(pProfile->nAddIEAssocLength); + qdf_mem_malloc(pProfile->nAddIEAssocLength); if (NULL == pConnectProfile->pAddIEAssoc) status = QDF_STATUS_E_NOMEM; else @@ -7851,7 +7851,7 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, } pConnectProfile->nAddIEAssocLength = pProfile->nAddIEAssocLength; - cdf_mem_copy(pConnectProfile->pAddIEAssoc, + qdf_mem_copy(pConnectProfile->pAddIEAssoc, pProfile->pAddIEAssoc, pProfile->nAddIEAssocLength); } @@ -7890,7 +7890,7 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, if (QDF_IS_STATUS_SUCCESS(status)) { if (pIesTemp->SSID.present) { pConnectProfile->SSID.length = pIesTemp->SSID.num_ssid; - cdf_mem_copy(pConnectProfile->SSID.ssId, + qdf_mem_copy(pConnectProfile->SSID.ssId, pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid); } @@ -7914,7 +7914,7 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, if (NULL == pIes) { /* Free memory if it allocated locally */ - cdf_mem_free(pIesTemp); + qdf_mem_free(pIesTemp); } } /* Save Qos connection */ @@ -7927,9 +7927,9 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, for (index = 0; index < pProfile->SSIDs.numOfSSIDs; index++) { if ((pProfile->SSIDs.SSIDList[index].SSID.length == pConnectProfile->SSID.length) - && cdf_mem_compare(pProfile->SSIDs.SSIDList[index].SSID. + && (!qdf_mem_cmp(pProfile->SSIDs.SSIDList[index].SSID. ssId, pConnectProfile->SSID.ssId, - pConnectProfile->SSID.length)) { + pConnectProfile->SSID.length))) { pConnectProfile->handoffPermitted = pProfile->SSIDs.SSIDList[index].handoffPermitted; break; @@ -8151,7 +8151,7 @@ void csr_roam_reissue_roam_command(tpAniSirGlobal pMac) } return; } - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.pBssDesc = pCommand->u.roamCmd.pLastRoamBss; roamInfo.statusCode = pSession->joinFailStatusCode.statusCode; roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode; @@ -8525,7 +8525,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, } if (!scan_result->Result.pvIes) { /* Locally allocated */ - cdf_mem_free(local_ies); + qdf_mem_free(local_ies); } } @@ -8571,7 +8571,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(tpAniSirGlobal pMac, pSmeJoinRsp->statusCode)) { /* Inform HDD to turn off FT flag in HDD */ if (pNeighborRoamInfo) { - cdf_mem_zero(&roamInfo, sizeof(tCsrRoamInfo)); + qdf_mem_zero(&roamInfo, sizeof(tCsrRoamInfo)); csr_roam_call_callback(pMac, pSmeJoinRsp->sessionId, &roamInfo, roamId, @@ -8698,16 +8698,16 @@ csr_post_roam_failure(tpAniSirGlobal mac_ctx, if (scan_filter) { csr_free_scan_filter(mac_ctx, scan_filter); - cdf_mem_free(scan_filter); + qdf_mem_free(scan_filter); } if (cur_roam_profile) - cdf_mem_free(cur_roam_profile); + qdf_mem_free(cur_roam_profile); #ifdef WLAN_FEATURE_ROAM_OFFLOAD csr_roam_synch_clean_up(mac_ctx, session_id); #endif /* Inform the upper layers that the reassoc failed */ - cdf_mem_zero(roam_info, sizeof(tCsrRoamInfo)); + qdf_mem_zero(roam_info, sizeof(tCsrRoamInfo)); csr_roam_call_callback(mac_ctx, session_id, roam_info, 0, eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS); /* @@ -8744,12 +8744,12 @@ csr_check_profile_in_scan_cache(tpAniSirGlobal mac_ctx, tScanResultHandle *hBSSList) { QDF_STATUS status; - *scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + *scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == *scan_filter) { sms_log(mac_ctx, LOGE, FL("alloc for ScanFilter failed.")); return false; } - cdf_mem_set(*scan_filter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(*scan_filter, sizeof(tCsrScanResultFilter), 0); (*scan_filter)->scan_filter_for_roam = 1; status = csr_roam_prepare_filter_from_profile(mac_ctx, &neighbor_roam_info->csrNeighborRoamProfile, @@ -8847,7 +8847,7 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, * Copy the connected profile to apply the same for this * connection as well */ - pCurRoamProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile)); + pCurRoamProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (pCurRoamProfile != NULL) { /* * notify sub-modules like QoS etc. that handoff @@ -8856,7 +8856,7 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, sme_qos_csr_event_ind(pMac, sessionId, SME_QOS_CSR_HANDOFF_ASSOC_REQ, NULL); - cdf_mem_set(pCurRoamProfile, sizeof(tCsrRoamProfile), + qdf_mem_set(pCurRoamProfile, sizeof(tCsrRoamProfile), 0); csr_roam_copy_profile(pMac, pCurRoamProfile, pSession->pCurRoamProfile); @@ -8871,9 +8871,9 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac, status); csr_release_profile(pMac, pCurRoamProfile); - cdf_mem_free(pCurRoamProfile); + qdf_mem_free(pCurRoamProfile); csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return; } @@ -9042,7 +9042,7 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) pIbssPeerInd = (tSmeIbssPeerInd *) pSmeRsp; sms_log(pMac, LOGE, FL("Peer departed ntf from LIM in joining state")); - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.staId = (uint8_t) pIbssPeerInd->staId; roamInfo.ucastSig = (uint8_t) pIbssPeerInd->ucastSig; roamInfo.bcastSig = (uint8_t) pIbssPeerInd->bcastSig; @@ -9095,7 +9095,7 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) sms_log(pMac, LOG1, FL ("ASSOCIATION confirmation can be given to upper layer ")); - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; pUpperLayerAssocCnf = (tSirSmeAssocIndToUpperLayerCnf *) pMsgBuf; @@ -9131,17 +9131,17 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf) (uint8_t) pUpperLayerAssocCnf->addIE.length; pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata; - cdf_mem_copy(pRoamInfo->peerMac.bytes, + qdf_mem_copy(pRoamInfo->peerMac.bytes, pUpperLayerAssocCnf->peerMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(&pRoamInfo->bssid, + qdf_mem_copy(&pRoamInfo->bssid, pUpperLayerAssocCnf->bssId, sizeof(struct qdf_mac_addr)); pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta; pRoamInfo->timingMeasCap = pUpperLayerAssocCnf->timingMeasCap; - cdf_mem_copy(&pRoamInfo->chan_info, + qdf_mem_copy(&pRoamInfo->chan_info, &pUpperLayerAssocCnf->chan_info, sizeof(tSirSmeChanInfo)); if (CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile)) { @@ -9192,14 +9192,14 @@ QDF_STATUS csr_roam_issue_set_context_req(tpAniSirGlobal pMac, tCsrRoamSetKey setKey; setKey.encType = EncryptType; setKey.keyDirection = aniKeyDirection; - cdf_mem_copy(&setKey.peerMac, bssId, sizeof(struct qdf_mac_addr)); + qdf_mem_copy(&setKey.peerMac, bssId, sizeof(struct qdf_mac_addr)); /* 0 for supplicant */ setKey.paeRole = paeRole; /* Key index */ setKey.keyId = keyId; setKey.keyLength = keyLength; if (keyLength) { - cdf_mem_copy(setKey.Key, pKey, keyLength); + qdf_mem_copy(setKey.Key, pKey, keyLength); } status = csr_roam_issue_set_key_command(pMac, sessionId, &setKey, 0); @@ -9239,7 +9239,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, } set_key_cmd->u.setKeyCmd.keyLength = CSR_WEP40_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_WEP40_KEY_LEN); } *enqueue_cmd = true; @@ -9257,7 +9257,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, } set_key_cmd->u.setKeyCmd.keyLength = CSR_WEP104_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_WEP104_KEY_LEN); } *enqueue_cmd = true; @@ -9271,7 +9271,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, return QDF_STATUS_E_INVAL; } set_key_cmd->u.setKeyCmd.keyLength = CSR_TKIP_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_TKIP_KEY_LEN); *enqueue_cmd = true; break; @@ -9284,7 +9284,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, return QDF_STATUS_E_INVAL; } set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_AES_KEY_LEN); *enqueue_cmd = true; break; @@ -9298,7 +9298,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, return QDF_STATUS_E_INVAL; } set_key_cmd->u.setKeyCmd.keyLength = CSR_WAPI_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_WAPI_KEY_LEN); if (session->pCurRoamProfile) { session->pCurRoamProfile->negotiatedUCEncryptionType = @@ -9322,7 +9322,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, set_key->keyLength); return QDF_STATUS_E_INVAL; } - cdf_mem_copy(session->eseCckmInfo.krk, set_key->Key, + qdf_mem_copy(session->eseCckmInfo.krk, set_key->Key, CSR_KRK_KEY_LEN); session->eseCckmInfo.reassoc_req_num = 1; session->eseCckmInfo.krk_plumbed = true; @@ -9337,7 +9337,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, set_key->keyLength); return QDF_STATUS_E_INVAL; } - cdf_mem_copy(session->eseCckmInfo.btk, set_key->Key, + qdf_mem_copy(session->eseCckmInfo.btk, set_key->Key, SIR_BTK_KEY_LEN); break; #endif @@ -9353,7 +9353,7 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session, return QDF_STATUS_E_INVAL; } set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_KEY_LEN; - cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, + qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key, CSR_AES_KEY_LEN); *enqueue_cmd = true; break; @@ -9389,7 +9389,7 @@ static QDF_STATUS csr_roam_issue_set_key_command(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL(" fail to get command buffer")); return QDF_STATUS_E_RESOURCES; } - cdf_mem_zero(pCommand, sizeof(tSmeCmd)); + qdf_mem_zero(pCommand, sizeof(tSmeCmd)); pCommand->command = eSmeCommandSetKey; pCommand->sessionId = (uint8_t) sessionId; /* @@ -9413,7 +9413,7 @@ static QDF_STATUS csr_roam_issue_set_key_command(tpAniSirGlobal pMac, /* 0 for supplicant */ pCommand->u.setKeyCmd.paeRole = pSetKey->paeRole; pCommand->u.setKeyCmd.keyId = pSetKey->keyId; - cdf_mem_copy(pCommand->u.setKeyCmd.keyRsc, pSetKey->keyRsc, + qdf_mem_copy(pCommand->u.setKeyCmd.keyRsc, pSetKey->keyRsc, CSR_MAX_RSC_LEN); /* * Always put set key to the head of the Q because it is the @@ -9461,7 +9461,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma } if (eSIR_ED_NONE != edType) { - cdf_mem_set(&setKeyEvent, + qdf_mem_set(&setKeyEvent, sizeof(host_event_wlan_security_payload_type), 0); if (qdf_is_macaddr_group(&pCommand->u.setKeyCmd.peermac)) { setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_REQ; @@ -9482,7 +9482,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma connectedProfile. mcEncryptionType); } - cdf_mem_copy(setKeyEvent.bssid, + qdf_mem_copy(setKeyEvent.bssid, pSession->connectedProfile.bssid.bytes, QDF_MAC_ADDR_SIZE); if (CSR_IS_ENC_TYPE_STATIC(pCommand->u.setKeyCmd.encType)) { @@ -9585,13 +9585,13 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, if (profile->BSSIDs.numOfBSSIDs) { size = sizeof(struct qdf_mac_addr) * profile->BSSIDs.numOfBSSIDs; - scan_fltr->BSSIDs.bssid = cdf_mem_malloc(size); + scan_fltr->BSSIDs.bssid = qdf_mem_malloc(size); if (NULL == scan_fltr->BSSIDs.bssid) { status = QDF_STATUS_E_NOMEM; goto free_filter; } scan_fltr->BSSIDs.numOfBSSIDs = profile->BSSIDs.numOfBSSIDs; - cdf_mem_copy(scan_fltr->BSSIDs.bssid, + qdf_mem_copy(scan_fltr->BSSIDs.bssid, profile->BSSIDs.bssid, size); } @@ -9606,7 +9606,7 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, roam_params->num_ssid_allowed_list; size = sizeof(tCsrSSIDInfo) * scan_fltr->SSIDs.numOfSSIDs; - scan_fltr->SSIDs.SSIDList = cdf_mem_malloc(size); + scan_fltr->SSIDs.SSIDList = qdf_mem_malloc(size); if (NULL == scan_fltr->SSIDs.SSIDList) status = QDF_STATUS_E_FAILURE; else @@ -9616,7 +9616,7 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, for (i = 0; i < roam_params->num_ssid_allowed_list; i++) { - cdf_mem_copy((void *) + qdf_mem_copy((void *) scan_fltr->SSIDs.SSIDList[i].SSID.ssId, roam_params->ssid_allowed_list[i].ssId, roam_params->ssid_allowed_list[i].length); @@ -9629,12 +9629,12 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, } else { size = sizeof(tCsrSSIDInfo) * profile->SSIDs.numOfSSIDs; - scan_fltr->SSIDs.SSIDList = cdf_mem_malloc(size); + scan_fltr->SSIDs.SSIDList = qdf_mem_malloc(size); if (NULL == scan_fltr->SSIDs.SSIDList) { status = QDF_STATUS_E_NOMEM; goto free_filter; } - cdf_mem_copy(scan_fltr->SSIDs.SSIDList, + qdf_mem_copy(scan_fltr->SSIDs.SSIDList, profile->SSIDs.SSIDList, size); } } @@ -9646,7 +9646,7 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, } else if (profile_ch_info->numOfChannels) { fltr_ch_info->numOfChannels = 0; fltr_ch_info->ChannelList = - cdf_mem_malloc(sizeof(*(fltr_ch_info->ChannelList)) * + qdf_mem_malloc(sizeof(*(fltr_ch_info->ChannelList)) * profile_ch_info->numOfChannels); if (NULL == fltr_ch_info->ChannelList) { status = QDF_STATUS_E_NOMEM; @@ -9699,7 +9699,7 @@ csr_roam_prepare_filter_from_profile(tpAniSirGlobal mac_ctx, * This causes the matching function to use countryCode as one * of the criteria. */ - cdf_mem_copy(scan_fltr->countryCode, profile->countryCode, + qdf_mem_copy(scan_fltr->countryCode, profile->countryCode, WNI_CFG_COUNTRY_CODE_LEN); } if (profile->MDID.mdiePresent) { @@ -9748,12 +9748,12 @@ bool csr_roam_issue_wm_status_change(tpAniSirGlobal pMac, uint32_t sessionId, pCommand->sessionId = (uint8_t) sessionId; pCommand->u.wmStatusChangeCmd.Type = Type; if (eCsrDisassociated == Type) { - cdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u. + qdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u. DisassocIndMsg, pSmeRsp, sizeof(pCommand->u.wmStatusChangeCmd.u. DisassocIndMsg)); } else { - cdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u. + qdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u. DeauthIndMsg, pSmeRsp, sizeof(pCommand->u.wmStatusChangeCmd.u. DeauthIndMsg)); @@ -9868,12 +9868,12 @@ void csr_tsm_stats_rsp_processor(tpAniSirGlobal pMac, void *pMsg) pDevContext); reqBkp->tsmStatsCallback = NULL; } - cdf_mem_free(reqBkp); + qdf_mem_free(reqBkp); pTsmStatsRsp->tsmStatsReq = NULL; } else { sms_log(pMac, LOGE, FL("reqBkp is NULL")); if (NULL != reqBkp) { - cdf_mem_free(reqBkp); + qdf_mem_free(reqBkp); pTsmStatsRsp->tsmStatsReq = NULL; } } @@ -9926,14 +9926,14 @@ static QDF_STATUS csr_send_reset_ap_caps_changed(tpAniSirGlobal pMac, /* Create the message and send to lim */ len = sizeof(tSirResetAPCapsChange); - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0); + qdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0); pMsg->messageType = eWNI_SME_RESET_AP_CAPS_CHANGED; pMsg->length = len; qdf_copy_macaddr(&pMsg->bssId, bssId); @@ -9956,7 +9956,7 @@ csr_roam_chk_lnk_assoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo *roam_info_ptr = NULL; tSirSmeAssocInd *pAssocInd; tCsrRoamInfo roam_info; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sms_log(mac_ctx, LOG1, FL("Receive WNI_SME_ASSOC_IND from SME")); pAssocInd = (tSirSmeAssocInd *) msg_ptr; @@ -9989,15 +9989,15 @@ csr_roam_chk_lnk_assoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) #endif roam_info_ptr->addIELen = (uint8_t) pAssocInd->addIE.length; roam_info_ptr->paddIE = pAssocInd->addIE.addIEdata; - cdf_mem_copy(roam_info_ptr->peerMac.bytes, + qdf_mem_copy(roam_info_ptr->peerMac.bytes, pAssocInd->peerMacAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(roam_info_ptr->bssid.bytes, + qdf_mem_copy(roam_info_ptr->bssid.bytes, pAssocInd->bssId, sizeof(struct qdf_mac_addr)); roam_info_ptr->wmmEnabledSta = pAssocInd->wmmEnabledSta; roam_info_ptr->timingMeasCap = pAssocInd->timingMeasCap; - cdf_mem_copy(&roam_info_ptr->chan_info, + qdf_mem_copy(&roam_info_ptr->chan_info, &pAssocInd->chan_info, sizeof(tSirSmeChanInfo)); if (CSR_IS_INFRA_AP(roam_info_ptr->u.pConnectedProfile)) { @@ -10053,7 +10053,7 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) * the WmStatusChange requests is pushed and processed */ pDisassocInd = (tSirSmeDisassocInd *) msg_ptr; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); status = csr_roam_get_session_id_from_bssid(mac_ctx, &pDisassocInd->bssid, &sessionId); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -10127,7 +10127,7 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) cmd.command = eSmeCommandRoam; cmd.sessionId = (uint8_t) sessionId; cmd.u.roamCmd.roamReason = eCsrForcedDeauthSta; - cdf_mem_copy(cmd.u.roamCmd.peerMac, + qdf_mem_copy(cmd.u.roamCmd.peerMac, pDisassocInd->peer_macaddr.bytes, QDF_MAC_ADDR_SIZE); csr_roam_remove_duplicate_command(mac_ctx, sessionId, &cmd, @@ -10145,7 +10145,7 @@ csr_roam_chk_lnk_deauth_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tSirSmeDeauthInd *pDeauthInd; tCsrRoamInfo roam_info; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sms_log(mac_ctx, LOG1, FL("DEAUTHENTICATION Indication from MAC")); pDeauthInd = (tpSirSmeDeauthInd) msg_ptr; status = csr_roam_get_session_id_from_bssid(mac_ctx, @@ -10247,7 +10247,7 @@ csr_roam_chk_lnk_deauth_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tSirSmeDeauthRsp *pDeauthRsp = (tSirSmeDeauthRsp *) msg_ptr; tCsrRoamInfo roam_info; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sms_log(mac_ctx, LOGW, FL("eWNI_SME_DEAUTH_RSP from SME")); sessionId = pDeauthRsp->sessionId; if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId)) @@ -10281,7 +10281,7 @@ csr_roam_chk_lnk_disassoc_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) */ tSirSmeDisassocRsp *pDisassocRsp = (tSirSmeDisassocRsp *) msg_ptr; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sms_log(mac_ctx, LOGW, FL("eWNI_SME_DISASSOC_RSP from SME ")); sessionId = pDisassocRsp->sessionId; if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId)) @@ -10312,7 +10312,7 @@ csr_roam_diag_mic_fail(tpAniSirGlobal mac_ctx, uint32_t sessionId) sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId); return; } - cdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), + qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), 0); secEvent.eventId = WLAN_SECURITY_EVENT_MIC_ERROR; secEvent.encryptionModeMulticast = @@ -10324,7 +10324,7 @@ csr_roam_diag_mic_fail(tpAniSirGlobal mac_ctx, uint32_t sessionId) secEvent.authMode = (uint8_t) diag_auth_type_from_csr_type( session->connectedProfile.AuthType); - cdf_mem_copy(secEvent.bssid, session->connectedProfile.bssid.bytes, + qdf_mem_copy(secEvent.bssid, session->connectedProfile.bssid.bytes, QDF_MAC_ADDR_SIZE); WLAN_HOST_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY); } @@ -10340,11 +10340,11 @@ csr_roam_chk_lnk_mic_fail_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tpSirSmeMicFailureInd pMicInd = (tpSirSmeMicFailureInd) msg_ptr; eCsrRoamResult result = eCSR_ROAM_RESULT_MIC_ERROR_UNICAST; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); status = csr_roam_get_session_id_from_bssid(mac_ctx, &pMicInd->bssId, &sessionId); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.u.pMICFailureInfo = &pMicInd->info; roam_info_ptr = &roam_info; if (pMicInd->info.multicast) @@ -10367,13 +10367,13 @@ csr_roam_chk_lnk_pbs_probe_req_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tCsrRoamInfo roam_info; tpSirSmeProbeReqInd pProbeReqInd = (tpSirSmeProbeReqInd) msg_ptr; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sms_log(mac_ctx, LOG1, FL("WPS PBC Probe request Indication from SME")); status = csr_roam_get_session_id_from_bssid(mac_ctx, &pProbeReqInd->bssid, &sessionId); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0); roam_info.u.pWPSPBCProbeReq = &pProbeReqInd->WPSPBCProbeReq; csr_roam_call_callback(mac_ctx, sessionId, &roam_info, 0, eCSR_ROAM_WPS_PBC_PROBE_REQ_IND, @@ -10396,7 +10396,7 @@ csr_roam_diag_joined_new_bss(tpAniSirGlobal mac_ctx, if (pNewBss) { qdf_copy_macaddr(&pIbssLog->bssid, &pNewBss->bssId); if (pNewBss->ssId.length) - cdf_mem_copy(pIbssLog->ssid, pNewBss->ssId.ssId, + qdf_mem_copy(pIbssLog->ssid, pNewBss->ssId.ssId, pNewBss->ssId.length); pIbssLog->operatingChannel = pNewBss->channelNumber; } @@ -10425,7 +10425,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, tSirSmeNewBssInfo *pNewBss; eRoamCmdStatus roamStatus = eCSR_ROAM_FAILED; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); pStatusChangeMsg = (tSirSmeWmStatusChangeNtf *) msg_ptr; switch (pStatusChangeMsg->statusChangeCode) { case eSIR_SME_IBSS_ACTIVE: @@ -10440,7 +10440,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, } session->connectState = eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED; if (session->pConnectBssDesc) { - cdf_mem_copy(&roam_info.bssid, + qdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); roam_info.u.pConnectedProfile = @@ -10503,12 +10503,12 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx, } result = eCSR_ROAM_RESULT_IBSS_COALESCED; roamStatus = eCSR_ROAM_IBSS_IND; - cdf_mem_copy(&roam_info.bssid, &pNewBss->bssId, + qdf_mem_copy(&roam_info.bssid, &pNewBss->bssId, sizeof(struct qdf_mac_addr)); roam_info_ptr = &roam_info; /* This BSSID is the real BSSID, save it */ if (session->pConnectBssDesc) - cdf_mem_copy(session->pConnectBssDesc->bssId, + qdf_mem_copy(session->pConnectBssDesc->bssId, &pNewBss->bssId, sizeof(struct qdf_mac_addr)); break; @@ -10589,7 +10589,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) } #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */ - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); sessionId = csr_find_ibss_session(mac_ctx); if (CSR_SESSION_ID_INVALID == sessionId) return; @@ -10607,10 +10607,10 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) goto callback_and_free; } qdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr); - cdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId, + qdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId, sizeof(struct qdf_mac_addr)); if (pIbssPeerInd->mesgLen > sizeof(tSmeIbssPeerInd)) { - roam_info.pbFrames = cdf_mem_malloc((pIbssPeerInd->mesgLen - + roam_info.pbFrames = qdf_mem_malloc((pIbssPeerInd->mesgLen - sizeof(tSmeIbssPeerInd))); if (NULL == roam_info.pbFrames) { status = QDF_STATUS_E_NOMEM; @@ -10618,7 +10618,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) status = QDF_STATUS_SUCCESS; roam_info.nBeaconLength = pIbssPeerInd->mesgLen - sizeof(tSmeIbssPeerInd); - cdf_mem_copy(roam_info.pbFrames, + qdf_mem_copy(roam_info.pbFrames, ((uint8_t *) pIbssPeerInd) + sizeof(tSmeIbssPeerInd), roam_info.nBeaconLength); @@ -10626,17 +10626,17 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) roam_info.staId = (uint8_t) pIbssPeerInd->staId; roam_info.ucastSig = (uint8_t) pIbssPeerInd->ucastSig; roam_info.bcastSig = (uint8_t) pIbssPeerInd->bcastSig; - roam_info.pBssDesc = cdf_mem_malloc( + roam_info.pBssDesc = qdf_mem_malloc( session->pConnectBssDesc->length); if (NULL == roam_info.pBssDesc) { status = QDF_STATUS_E_NOMEM; if (roam_info.pbFrames) - cdf_mem_free(roam_info.pbFrames); + qdf_mem_free(roam_info.pbFrames); if (roam_info.pBssDesc) - cdf_mem_free(roam_info.pBssDesc); + qdf_mem_free(roam_info.pBssDesc); } else { status = QDF_STATUS_SUCCESS; - cdf_mem_copy(roam_info.pBssDesc, + qdf_mem_copy(roam_info.pBssDesc, session->pConnectBssDesc, session->pConnectBssDesc->length); roam_info_ptr = &roam_info; @@ -10663,9 +10663,9 @@ callback_and_free: eCSR_ROAM_RESULT_IBSS_NEW_PEER); if (roam_info_ptr) { if (roam_info.pbFrames) - cdf_mem_free(roam_info.pbFrames); + qdf_mem_free(roam_info.pbFrames); if (roam_info.pBssDesc) - cdf_mem_free(roam_info.pBssDesc); + qdf_mem_free(roam_info.pBssDesc); } } @@ -10681,7 +10681,7 @@ csr_roam_chk_lnk_ibss_peer_departed_ind(tpAniSirGlobal mac_ctx, sms_log(mac_ctx, LOGE, FL("IBSS peer ind. message is NULL")); return; } - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); pIbssPeerInd = (tSmeIbssPeerInd *) msg_ptr; sessionId = csr_find_ibss_session(mac_ctx); if (CSR_SESSION_ID_INVALID != sessionId) { @@ -10721,7 +10721,7 @@ csr_roam_diag_set_ctx_rsp(tpAniSirGlobal mac_ctx, if (eCSR_ENCRYPT_TYPE_NONE == session->connectedProfile.EncryptionType) return; - cdf_mem_set(&setKeyEvent, + qdf_mem_set(&setKeyEvent, sizeof(host_event_wlan_security_payload_type), 0); if (qdf_is_macaddr_group(&pRsp->peer_macaddr)) setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_RSP; @@ -10733,7 +10733,7 @@ csr_roam_diag_set_ctx_rsp(tpAniSirGlobal mac_ctx, setKeyEvent.encryptionModeUnicast = (uint8_t) diag_enc_type_from_csr_type( session->connectedProfile.EncryptionType); - cdf_mem_copy(setKeyEvent.bssid, session->connectedProfile.bssid.bytes, + qdf_mem_copy(setKeyEvent.bssid, session->connectedProfile.bssid.bytes, QDF_MAC_ADDR_SIZE); setKeyEvent.authMode = (uint8_t) diag_auth_type_from_csr_type( @@ -10757,7 +10757,7 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tSirSmeSetContextRsp *pRsp = (tSirSmeSetContextRsp *) msg_ptr; tListElem *entry; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); entry = csr_ll_peek_head(&mac_ctx->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (!entry) { @@ -10799,7 +10799,7 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) */ if (qdf_is_macaddr_broadcast(&pRsp->peer_macaddr)) { tpSirSetActiveModeSetBncFilterReq pMsg; - pMsg = cdf_mem_malloc( + pMsg = qdf_mem_malloc( sizeof(tSirSetActiveModeSetBncFilterReq)); pMsg->messageType = eWNI_SME_SET_BCN_FILTER_REQ; pMsg->length = sizeof(uint8_t); @@ -10853,7 +10853,7 @@ csr_roam_chk_lnk_max_assoc_exceeded(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) tSmeMaxAssocInd *pSmeMaxAssocInd; tCsrRoamInfo roam_info; - cdf_mem_set(&roam_info, sizeof(roam_info), 0); + qdf_mem_set(&roam_info, sizeof(roam_info), 0); pSmeMaxAssocInd = (tSmeMaxAssocInd *) msg_ptr; sms_log(mac_ctx, LOG1, FL("max assoc have been reached, new peer cannot be accepted")); @@ -11337,7 +11337,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, fToRoam = false; } /* prepare to tell HDD to disconnect */ - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.statusCode = (tSirResultCodes) pSession->roamingStatusCode; roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode; if (eWNI_SME_DISASSOC_IND == type) { @@ -11375,7 +11375,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, eCsrLostlinkRoamingDeauth : eCsrLostlinkRoamingDisassoc); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); /* For IBSS, we need to give some more info to HDD */ if (csr_is_bss_type_ibss (pSession->connectedProfile.BSSType)) { @@ -11853,7 +11853,7 @@ int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel) } else return maxTxPwr; - pCountryInfo = cdf_mem_malloc(cfgLength); + pCountryInfo = qdf_mem_malloc(cfgLength); if (NULL == pCountryInfo) status = QDF_STATUS_E_NOMEM; else @@ -11882,7 +11882,7 @@ int8_t csr_get_cfg_max_tx_power(tpAniSirGlobal pMac, uint8_t channel) error: if (NULL != pCountryInfo) - cdf_mem_free(pCountryInfo); + qdf_mem_free(pCountryInfo); return maxTxPwr; } @@ -12053,11 +12053,11 @@ bool csr_is_same_profile(tpAniSirGlobal pMac, if (!(pProfile1 && pProfile2)) return fCheck; - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) return fCheck; - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); status = csr_roam_prepare_filter_from_profile(pMac, pProfile2, pScanFilter); if (!(QDF_IS_STATUS_SUCCESS(status))) @@ -12095,7 +12095,7 @@ bool csr_is_same_profile(tpAniSirGlobal pMac, fCheck = true; free_scan_filter: csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return fCheck; } @@ -12127,7 +12127,7 @@ bool csr_roam_is_same_profile_keys(tpAniSirGlobal pMac, if (pConnProfile->Keys.KeyLength[i] != pProfile2->Keys.KeyLength[i]) break; - if (!cdf_mem_compare(&pConnProfile->Keys.KeyMaterial[i], + if (qdf_mem_cmp(&pConnProfile->Keys.KeyMaterial[i], &pProfile2->Keys.KeyMaterial[i], pProfile2->Keys.KeyLength[i])) { break; @@ -12273,7 +12273,7 @@ csr_populate_basic_rates(tSirMacRateSet *rate_set, bool type, bool masked) if (type == true) { rate_set->numRates = 8; - cdf_mem_copy(rate_set->rate, ofdm_rates, sizeof(ofdm_rates)); + qdf_mem_copy(rate_set->rate, ofdm_rates, sizeof(ofdm_rates)); if (masked) { rate_set->rate[0] |= CSR_DOT11_BASIC_RATE_MASK; rate_set->rate[2] |= CSR_DOT11_BASIC_RATE_MASK; @@ -12281,7 +12281,7 @@ csr_populate_basic_rates(tSirMacRateSet *rate_set, bool type, bool masked) } } else { rate_set->numRates = 4; - cdf_mem_copy(rate_set->rate, cck_rates, sizeof(cck_rates)); + qdf_mem_copy(rate_set->rate, cck_rates, sizeof(cck_rates)); if (masked) { rate_set->rate[0] |= CSR_DOT11_BASIC_RATE_MASK; rate_set->rate[1] |= CSR_DOT11_BASIC_RATE_MASK; @@ -12440,7 +12440,7 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, pParam->sirNwType = pBssDesc->nwType; pParam->cbMode = PHY_SINGLE_CHANNEL_CENTERED; pParam->operationChn = pBssDesc->channelId; - cdf_mem_copy(&pParam->bssid, pBssDesc->bssId, sizeof(struct qdf_mac_addr)); + qdf_mem_copy(&pParam->bssid, pBssDesc->bssId, sizeof(struct qdf_mac_addr)); if (!pIes) { pParam->ssId.length = 0; @@ -12457,7 +12457,7 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, pIes->SuppRates.num_rates); pIes->SuppRates.num_rates = SIR_MAC_RATESET_EID_MAX; } - cdf_mem_copy(pParam->operationalRateSet.rate, + qdf_mem_copy(pParam->operationalRateSet.rate, pIes->SuppRates.rates, sizeof(*pIes->SuppRates.rates) * pIes->SuppRates.num_rates); @@ -12470,14 +12470,14 @@ csr_roam_get_bss_start_parms_from_bss_desc(tpAniSirGlobal pMac, pIes->ExtSuppRates.num_rates); pIes->ExtSuppRates.num_rates = SIR_MAC_RATESET_EID_MAX; } - cdf_mem_copy(pParam->extendedRateSet.rate, + qdf_mem_copy(pParam->extendedRateSet.rate, pIes->ExtSuppRates.rates, sizeof(*pIes->ExtSuppRates.rates) * pIes->ExtSuppRates.num_rates); } if (pIes->SSID.present) { pParam->ssId.length = pIes->SSID.num_ssid; - cdf_mem_copy(pParam->ssId.ssId, pIes->SSID.ssid, + qdf_mem_copy(pParam->ssId.ssId, pIes->SSID.ssid, pParam->ssId.length); } pParam->cbMode = csr_get_cb_mode_from_ies(pMac, pParam->operationChn, @@ -12524,13 +12524,13 @@ QDF_STATUS csr_roam_issue_start_bss(tpAniSirGlobal pMac, uint32_t sessionId, if (pBssDesc) { pIbssLog->eventId = WLAN_IBSS_EVENT_JOIN_IBSS_REQ; - cdf_mem_copy(pIbssLog->bssid.bytes, + qdf_mem_copy(pIbssLog->bssid.bytes, pBssDesc->bssId, QDF_MAC_ADDR_SIZE); } else { pIbssLog->eventId = WLAN_IBSS_EVENT_START_IBSS_REQ; } - cdf_mem_copy(pIbssLog->ssid, pParam->ssId.ssId, + qdf_mem_copy(pIbssLog->ssid, pParam->ssId.ssId, pParam->ssId.length); if (pProfile->ChannelInfo.numOfChannels == 0) { pIbssLog->channelSetting = AUTO_PICK; @@ -12627,16 +12627,16 @@ static void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId, csr_roam_get_bss_start_parms(pMac, pProfile, &pSession->bssParams); /* Use the first SSID */ if (pProfile->SSIDs.numOfSSIDs) - cdf_mem_copy(&pSession->bssParams.ssId, + qdf_mem_copy(&pSession->bssParams.ssId, pProfile->SSIDs.SSIDList, sizeof(tSirMacSSid)); if (pProfile->BSSIDs.numOfBSSIDs) /* Use the first BSSID */ - cdf_mem_copy(&pSession->bssParams.bssid, + qdf_mem_copy(&pSession->bssParams.bssid, pProfile->BSSIDs.bssid, sizeof(struct qdf_mac_addr)); else - cdf_mem_set(&pSession->bssParams.bssid, + qdf_mem_set(&pSession->bssParams.bssid, sizeof(struct qdf_mac_addr), 0); } Channel = pSession->bssParams.operationChn; @@ -12698,13 +12698,13 @@ static QDF_STATUS csr_roam_start_ibss(tpAniSirGlobal pMac, uint32_t sessionId, } else { tBssConfigParam *pBssConfig; - pBssConfig = cdf_mem_malloc(sizeof(tBssConfigParam)); + pBssConfig = qdf_mem_malloc(sizeof(tBssConfigParam)); if (NULL == pBssConfig) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0); + qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0); /* there is no Bss description before we start an IBSS so we need to adopt */ /* all Bss configuration parameters from the Profile. */ status = @@ -12726,7 +12726,7 @@ static QDF_STATUS csr_roam_start_ibss(tpAniSirGlobal pMac, uint32_t sessionId, false); } - cdf_mem_free(pBssConfig); + qdf_mem_free(pBssConfig); } /* Allocate memory */ } @@ -12752,7 +12752,7 @@ static void csr_roam_update_connected_profile_from_new_bss(tpAniSirGlobal pMac, pSession->connectedProfile.operationChannel = pNewBss->channelNumber; /* move the BSSId from the BSS description into the connected state information. */ - cdf_mem_copy(&pSession->connectedProfile.bssid.bytes, + qdf_mem_copy(&pSession->connectedProfile.bssid.bytes, &(pNewBss->bssId), sizeof(struct qdf_mac_addr)); } return; @@ -12767,7 +12767,7 @@ QDF_STATUS csr_roam_set_psk_pmk(tpAniSirGlobal pMac, uint32_t sessionId, sms_log(pMac, LOGE, FL("session %d not found"), sessionId); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk)); + qdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk)); pSession->pmk_len = pmk_len; return QDF_STATUS_SUCCESS; } @@ -12779,7 +12779,7 @@ csr_roam_diag_set_pmkid(tCsrRoamSession *pSession) { WLAN_HOST_DIAG_EVENT_DEF(secEvent, host_event_wlan_security_payload_type); - cdf_mem_set(&secEvent, + qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), 0); secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_UPDATE; secEvent.encryptionModeMulticast = @@ -12788,7 +12788,7 @@ csr_roam_diag_set_pmkid(tCsrRoamSession *pSession) secEvent.encryptionModeUnicast = (uint8_t) diag_enc_type_from_csr_type( pSession->connectedProfile.EncryptionType); - cdf_mem_copy(secEvent.bssid, + qdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes, QDF_MAC_ADDR_SIZE); secEvent.authMode = (uint8_t) diag_auth_type_from_csr_type( @@ -12823,7 +12823,7 @@ csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, if (update_entire_cache) { if (numItems && pPMKIDCache) { pSession->NumPmkidCache = (uint16_t) numItems; - cdf_mem_copy(pSession->PmkidCacheInfo, pPMKIDCache, + qdf_mem_copy(pSession->PmkidCacheInfo, pPMKIDCache, sizeof(tPmkidCacheInfo) * numItems); pSession->curr_cache_idx = (uint16_t)numItems; } @@ -12841,7 +12841,7 @@ csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, qdf_copy_macaddr( &pSession->PmkidCacheInfo[pSession->curr_cache_idx].BSSID, &pmksa->BSSID); - cdf_mem_copy( + qdf_mem_copy( pSession->PmkidCacheInfo[pSession->curr_cache_idx].PMKID, pmksa->PMKID, CSR_RSN_PMKID_SIZE); @@ -12882,7 +12882,7 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, if (flush_cache) { /* Flush the entire cache */ - cdf_mem_zero(pSession->PmkidCacheInfo, + qdf_mem_zero(pSession->PmkidCacheInfo, sizeof(tPmkidCacheInfo) * CSR_MAX_PMKID_ALLOWED); pSession->NumPmkidCache = 0; pSession->curr_cache_idx = 0; @@ -12891,12 +12891,12 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, /* !flush_cache - so look up in the cache */ for (Index = 0; Index < CSR_MAX_PMKID_ALLOWED; Index++) { - if (cdf_mem_compare(pSession->PmkidCacheInfo[Index].BSSID.bytes, + if (!qdf_mem_cmp(pSession->PmkidCacheInfo[Index].BSSID.bytes, pBSSId, QDF_MAC_ADDR_SIZE)) { fMatchFound = 1; /* Clear this - the matched entry */ - cdf_mem_zero(&pSession->PmkidCacheInfo[Index], + qdf_mem_zero(&pSession->PmkidCacheInfo[Index], sizeof(tPmkidCacheInfo)); break; } @@ -12912,23 +12912,23 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, curr_idx = pSession->curr_cache_idx; if (Index < curr_idx) { for (i = Index; i < (curr_idx - 1); i++) { - cdf_mem_copy(&pSession->PmkidCacheInfo[i], + qdf_mem_copy(&pSession->PmkidCacheInfo[i], &pSession->PmkidCacheInfo[i + 1], sizeof(tPmkidCacheInfo)); } pSession->curr_cache_idx--; - cdf_mem_zero(&pSession->PmkidCacheInfo + qdf_mem_zero(&pSession->PmkidCacheInfo [pSession->curr_cache_idx], sizeof(tPmkidCacheInfo)); } else if (Index > curr_idx) { for (i = Index; i > (curr_idx); i--) { - cdf_mem_copy(&pSession->PmkidCacheInfo[i], + qdf_mem_copy(&pSession->PmkidCacheInfo[i], &pSession->PmkidCacheInfo[i - 1], sizeof(tPmkidCacheInfo)); } - cdf_mem_zero(&pSession->PmkidCacheInfo + qdf_mem_zero(&pSession->PmkidCacheInfo [pSession->curr_cache_idx], sizeof(tPmkidCacheInfo)); } @@ -12982,7 +12982,7 @@ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, /* Fill the valid entries */ pmksa = &pSession->PmkidCacheInfo[i]; if (!qdf_is_macaddr_zero(&pmksa->BSSID)) { - cdf_mem_copy(pPmkidCache, pmksa, + qdf_mem_copy(pPmkidCache, pmksa, sizeof(tPmkidCacheInfo)); pPmkidCache++; j++; @@ -13010,7 +13010,7 @@ QDF_STATUS csr_roam_get_wpa_rsn_req_ie(tpAniSirGlobal pMac, uint32_t sessionId, *pLen = pSession->nWpaRsnReqIeLength; if (pBuf) { if (len >= pSession->nWpaRsnReqIeLength) { - cdf_mem_copy(pBuf, pSession->pWpaRsnReqIE, + qdf_mem_copy(pBuf, pSession->pWpaRsnReqIE, pSession->nWpaRsnReqIeLength); status = QDF_STATUS_SUCCESS; } @@ -13036,7 +13036,7 @@ QDF_STATUS csr_roam_get_wpa_rsn_rsp_ie(tpAniSirGlobal pMac, uint32_t sessionId, *pLen = pSession->nWpaRsnRspIeLength; if (pBuf) { if (len >= pSession->nWpaRsnRspIeLength) { - cdf_mem_copy(pBuf, pSession->pWpaRsnRspIE, + qdf_mem_copy(pBuf, pSession->pWpaRsnRspIE, pSession->nWpaRsnRspIeLength); status = QDF_STATUS_SUCCESS; } @@ -13063,7 +13063,7 @@ QDF_STATUS csr_roam_get_wapi_req_ie(tpAniSirGlobal pMac, uint32_t sessionId, *pLen = pSession->nWapiReqIeLength; if (pBuf) { if (len >= pSession->nWapiReqIeLength) { - cdf_mem_copy(pBuf, pSession->pWapiReqIE, + qdf_mem_copy(pBuf, pSession->pWapiReqIE, pSession->nWapiReqIeLength); status = QDF_STATUS_SUCCESS; } @@ -13089,7 +13089,7 @@ QDF_STATUS csr_roam_get_wapi_rsp_ie(tpAniSirGlobal pMac, uint32_t sessionId, *pLen = pSession->nWapiRspIeLength; if (pBuf) { if (len >= pSession->nWapiRspIeLength) { - cdf_mem_copy(pBuf, pSession->pWapiRspIE, + qdf_mem_copy(pBuf, pSession->pWapiRspIE, pSession->nWapiRspIeLength); status = QDF_STATUS_SUCCESS; } @@ -13134,29 +13134,29 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, * Prepare the filter. Only fill in the necessary fields. Not all fields * are needed */ - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); - pScanFilter->BSSIDs.bssid = cdf_mem_malloc(sizeof(struct qdf_mac_addr)); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + pScanFilter->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr)); if (NULL == pScanFilter->BSSIDs.bssid) { - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pScanFilter->BSSIDs.bssid, + qdf_mem_copy(pScanFilter->BSSIDs.bssid, &pConnProfile->bssid, sizeof(struct qdf_mac_addr)); pScanFilter->BSSIDs.numOfBSSIDs = 1; if (!csr_is_nullssid(pConnProfile->SSID.ssId, pConnProfile->SSID.length)) { - pScanFilter->SSIDs.SSIDList = cdf_mem_malloc( + pScanFilter->SSIDs.SSIDList = qdf_mem_malloc( sizeof(tCsrSSIDInfo)); if (NULL == pScanFilter->SSIDs.SSIDList) { csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(&pScanFilter->SSIDs.SSIDList[0].SSID, + qdf_mem_copy(&pScanFilter->SSIDs.SSIDList[0].SSID, &pConnProfile->SSID, sizeof(tSirMacSSid)); } pScanFilter->authType.numEntries = 1; @@ -13194,7 +13194,7 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, * need to free the IEs since it is allocated * by csr_match_bss */ - cdf_mem_free(pIes); + qdf_mem_free(pIes); } if (fMatch) { /* We found the one */ @@ -13209,7 +13209,7 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, } /* while */ csr_ll_unlock(&pMac->scan.scanResultList); csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } @@ -13246,7 +13246,7 @@ static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId, QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } - cdf_mem_set(&bssConfig, sizeof(tBssConfigParam), 0); + qdf_mem_set(&bssConfig, sizeof(tBssConfigParam), 0); /* Assume HDD provide bssid in profile */ qdf_copy_macaddr(&pSession->bssParams.bssid, pProfile->BSSIDs.bssid); @@ -13259,9 +13259,9 @@ static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId, /* Save profile for late use */ csr_free_roam_profile(pMac, sessionId); pSession->pCurRoamProfile = - cdf_mem_malloc(sizeof(tCsrRoamProfile)); + qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (pSession->pCurRoamProfile != NULL) { - cdf_mem_set(pSession->pCurRoamProfile, + qdf_mem_set(pSession->pCurRoamProfile, sizeof(tCsrRoamProfile), 0); csr_roam_copy_profile(pMac, pSession->pCurRoamProfile, @@ -13372,7 +13372,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, do { pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS; pSession->joinFailStatusCode.reasonCode = 0; - cdf_mem_copy(&pSession->joinFailStatusCode.bssId, + qdf_mem_copy(&pSession->joinFailStatusCode.bssId, &pBssDescription->bssId, sizeof(tSirMacAddr)); /* * the tSirSmeJoinReq which includes a single @@ -13393,25 +13393,25 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, */ sizeof(tCsrWpaIe) + sizeof(tCsrWpaAuthIe) + sizeof(uint16_t); - csr_join_req = cdf_mem_malloc(msgLen); + csr_join_req = qdf_mem_malloc(msgLen); if (NULL == csr_join_req) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) break; - cdf_mem_set(csr_join_req, msgLen, 0); + qdf_mem_set(csr_join_req, msgLen, 0); csr_join_req->messageType = messageType; csr_join_req->length = msgLen; csr_join_req->sessionId = (uint8_t) sessionId; csr_join_req->transactionId = 0; if (pIes->SSID.present && pIes->SSID.num_ssid) { csr_join_req->ssId.length = pIes->SSID.num_ssid; - cdf_mem_copy(&csr_join_req->ssId.ssId, pIes->SSID.ssid, + qdf_mem_copy(&csr_join_req->ssId.ssId, pIes->SSID.ssid, pIes->SSID.num_ssid); } else csr_join_req->ssId.length = 0; - cdf_mem_copy(&csr_join_req->selfMacAddr, &pSession->selfMacAddr, + qdf_mem_copy(&csr_join_req->selfMacAddr, &pSession->selfMacAddr, sizeof(tSirMacAddr)); sms_log(pMac, LOGE, "Connecting to ssid:%.*s bssid: " @@ -13462,7 +13462,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (OpRateSet.numRates) { csr_join_req->operationalRateSet.numRates = OpRateSet.numRates; - cdf_mem_copy(&csr_join_req->operationalRateSet. + qdf_mem_copy(&csr_join_req->operationalRateSet. rate, OpRateSet.rate, OpRateSet.numRates); } else @@ -13472,7 +13472,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (ExRateSet.numRates) { csr_join_req->extendedRateSet.numRates = ExRateSet.numRates; - cdf_mem_copy(&csr_join_req->extendedRateSet. + qdf_mem_copy(&csr_join_req->extendedRateSet. rate, ExRateSet.rate, ExRateSet.numRates); } else @@ -13522,11 +13522,11 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (ieLen > pSession->nWapiReqIeLength) { if (pSession->pWapiReqIE && pSession->nWapiReqIeLength) { - cdf_mem_free(pSession-> + qdf_mem_free(pSession-> pWapiReqIE); } pSession->pWapiReqIE = - cdf_mem_malloc(ieLen); + qdf_mem_malloc(ieLen); if (NULL == pSession->pWapiReqIE) status = QDF_STATUS_E_NOMEM; else @@ -13535,10 +13535,10 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, break; } pSession->nWapiReqIeLength = ieLen; - cdf_mem_copy(pSession->pWapiReqIE, wpaRsnIE, + qdf_mem_copy(pSession->pWapiReqIE, wpaRsnIE, ieLen); csr_join_req->rsnIE.length = ieLen; - cdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata, + qdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata, wpaRsnIE, ieLen); } else /* should be WPA/WPA2 otherwise */ #endif /* FEATURE_WLAN_WAPI */ @@ -13547,11 +13547,11 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (ieLen > pSession->nWpaRsnReqIeLength) { if (pSession->pWpaRsnReqIE && pSession->nWpaRsnReqIeLength) { - cdf_mem_free(pSession-> + qdf_mem_free(pSession-> pWpaRsnReqIE); } pSession->pWpaRsnReqIE = - cdf_mem_malloc(ieLen); + qdf_mem_malloc(ieLen); if (NULL == pSession->pWpaRsnReqIE) status = QDF_STATUS_E_NOMEM; else @@ -13560,23 +13560,23 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, break; } pSession->nWpaRsnReqIeLength = ieLen; - cdf_mem_copy(pSession->pWpaRsnReqIE, wpaRsnIE, + qdf_mem_copy(pSession->pWpaRsnReqIE, wpaRsnIE, ieLen); csr_join_req->rsnIE.length = ieLen; - cdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata, + qdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata, wpaRsnIE, ieLen); } } else { /* free whatever old info */ pSession->nWpaRsnReqIeLength = 0; if (pSession->pWpaRsnReqIE) { - cdf_mem_free(pSession->pWpaRsnReqIE); + qdf_mem_free(pSession->pWpaRsnReqIE); pSession->pWpaRsnReqIE = NULL; } #ifdef FEATURE_WLAN_WAPI pSession->nWapiReqIeLength = 0; if (pSession->pWapiReqIE) { - cdf_mem_free(pSession->pWapiReqIE); + qdf_mem_free(pSession->pWapiReqIE); pSession->pWapiReqIE = NULL; } #endif /* FEATURE_WLAN_WAPI */ @@ -13591,7 +13591,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, /* Insert the CCKM IE into the join request */ #ifdef FEATURE_WLAN_ESE_UPLOAD ieLen = pSession->suppCckmIeInfo.cckmIeLen; - cdf_mem_copy((void *)(wpaRsnIE), + qdf_mem_copy((void *)(wpaRsnIE), pSession->suppCckmIeInfo.cckmIe, ieLen); #endif /* FEATURE_WLAN_ESE_UPLOAD */ @@ -13607,7 +13607,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, * buffer (wpaRsnIE) */ csr_join_req->cckmIE.length = ieLen; - cdf_mem_copy(&csr_join_req->cckmIE.cckmIEdata, + qdf_mem_copy(&csr_join_req->cckmIE.cckmIEdata, wpaRsnIE, ieLen); } else csr_join_req->cckmIE.length = 0; @@ -13619,9 +13619,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (ieLen > pSession->nAddIEScanLength) { if (pSession->pAddIEScan && pSession->nAddIEScanLength) { - cdf_mem_free(pSession->pAddIEScan); + qdf_mem_free(pSession->pAddIEScan); } - pSession->pAddIEScan = cdf_mem_malloc(ieLen); + pSession->pAddIEScan = qdf_mem_malloc(ieLen); if (NULL == pSession->pAddIEScan) status = QDF_STATUS_E_NOMEM; else @@ -13630,15 +13630,15 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, break; } pSession->nAddIEScanLength = ieLen; - cdf_mem_copy(pSession->pAddIEScan, pProfile->pAddIEScan, + qdf_mem_copy(pSession->pAddIEScan, pProfile->pAddIEScan, ieLen); csr_join_req->addIEScan.length = ieLen; - cdf_mem_copy(&csr_join_req->addIEScan.addIEdata, + qdf_mem_copy(&csr_join_req->addIEScan.addIEdata, pProfile->pAddIEScan, ieLen); } else { pSession->nAddIEScanLength = 0; if (pSession->pAddIEScan) { - cdf_mem_free(pSession->pAddIEScan); + qdf_mem_free(pSession->pAddIEScan); pSession->pAddIEScan = NULL; } csr_join_req->addIEScan.length = 0; @@ -13649,9 +13649,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (ieLen > pSession->nAddIEAssocLength) { if (pSession->pAddIEAssoc && pSession->nAddIEAssocLength) { - cdf_mem_free(pSession->pAddIEAssoc); + qdf_mem_free(pSession->pAddIEAssoc); } - pSession->pAddIEAssoc = cdf_mem_malloc(ieLen); + pSession->pAddIEAssoc = qdf_mem_malloc(ieLen); if (NULL == pSession->pAddIEAssoc) status = QDF_STATUS_E_NOMEM; else @@ -13660,15 +13660,15 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, break; } pSession->nAddIEAssocLength = ieLen; - cdf_mem_copy(pSession->pAddIEAssoc, + qdf_mem_copy(pSession->pAddIEAssoc, pProfile->pAddIEAssoc, ieLen); csr_join_req->addIEAssoc.length = ieLen; - cdf_mem_copy(&csr_join_req->addIEAssoc.addIEdata, + qdf_mem_copy(&csr_join_req->addIEAssoc.addIEdata, pProfile->pAddIEAssoc, ieLen); } else { pSession->nAddIEAssocLength = 0; if (pSession->pAddIEAssoc) { - cdf_mem_free(pSession->pAddIEAssoc); + qdf_mem_free(pSession->pAddIEAssoc); pSession->pAddIEAssoc = NULL; } csr_join_req->addIEAssoc.length = 0; @@ -13746,8 +13746,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, * ESE-Tspec IEs in the ASSOC request is presently not * supported. so nullify the TSPEC parameters */ - cdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0); - cdf_mem_copy(&csr_join_req->eseTspecInfo, + qdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0); + qdf_mem_copy(&csr_join_req->eseTspecInfo, &eseTspec, sizeof(tESETspecInfo)); } else if (eWNI_SME_REASSOC_REQ == messageType) { if ((csr_is_profile_ese(pProfile) || @@ -13756,7 +13756,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, eCSR_AUTH_TYPE_OPEN_SYSTEM))) && (ese_config)) { tESETspecInfo eseTspec; - cdf_mem_set(&eseTspec, sizeof(tESETspecInfo), + qdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0); eseTspec.numTspecs = sme_qos_ese_retrieve_tspec_info(pMac, @@ -13766,7 +13766,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->eseTspecInfo.numTspecs = eseTspec.numTspecs; if (eseTspec.numTspecs) { - cdf_mem_copy(&csr_join_req->eseTspecInfo + qdf_mem_copy(&csr_join_req->eseTspecInfo .tspec[0], &eseTspec.tspec[0], (eseTspec.numTspecs * @@ -13779,9 +13779,9 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, * presently not supported. so nullify the TSPEC * parameters */ - cdf_mem_set(&eseTspec, sizeof(tESETspecInfo), + qdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0); - cdf_mem_copy(&csr_join_req->eseTspecInfo, + qdf_mem_copy(&csr_join_req->eseTspecInfo, &eseTspec, sizeof(tESETspecInfo)); } @@ -13813,7 +13813,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, (&pIes->Country.triplets[0])); csr_apply_power2_current(pMac); } - cdf_mem_copy(&csr_join_req->htConfig, + qdf_mem_copy(&csr_join_req->htConfig, &pSession->htConfig, sizeof(tSirHTConfig)); #ifdef WLAN_FEATURE_11AC csr_join_req->txBFIniFeatureEnabled = @@ -13870,7 +13870,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->isOSENConnection = false; /* Fill rrm config parameters */ - cdf_mem_copy(&csr_join_req->rrm_config, + qdf_mem_copy(&csr_join_req->rrm_config, &pMac->rrm.rrmSmeContext.rrmConfig, sizeof(struct rrm_config_param)); @@ -13907,7 +13907,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, csr_join_req->uapsdPerAcBitmask = (uint8_t)pProfile->uapsd_mask; /* Move the entire BssDescription into the join request. */ - cdf_mem_copy(&csr_join_req->bssDescription, pBssDescription, + qdf_mem_copy(&csr_join_req->bssDescription, pBssDescription, pBssDescription->length + sizeof(pBssDescription->length)); @@ -13987,7 +13987,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, /* Clean up the memory in case of any failure */ if (!QDF_IS_STATUS_SUCCESS(status) && (NULL != csr_join_req)) - cdf_mem_free(csr_join_req); + qdf_mem_free(csr_join_req); return status; } @@ -14002,27 +14002,27 @@ QDF_STATUS csr_send_mb_disassoc_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (!CSR_IS_SESSION_VALID(pMac, sessionId)) return QDF_STATUS_E_FAILURE; - pMsg = cdf_mem_malloc(sizeof(tSirSmeDisassocReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeDisassocReq)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeDisassocReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeDisassocReq), 0); pMsg->messageType = eWNI_SME_DISASSOC_REQ; pMsg->length = sizeof(tSirSmeDisassocReq); pMsg->sessionId = sessionId; pMsg->transactionId = 0; if ((pSession->pCurRoamProfile != NULL) && (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) { - cdf_mem_copy(&pMsg->bssid.bytes, + qdf_mem_copy(&pMsg->bssid.bytes, &pSession->selfMacAddr, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&pMsg->peer_macaddr.bytes, + qdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE); } else { - cdf_mem_copy(&pMsg->bssid.bytes, + qdf_mem_copy(&pMsg->bssid.bytes, bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&pMsg->peer_macaddr.bytes, + qdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE); } pMsg->reasonCode = reasonCode; @@ -14050,17 +14050,17 @@ csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeGetAssocSTAsReq *pMsg; - pMsg = cdf_mem_malloc(sizeof(*pMsg)); + pMsg = qdf_mem_malloc(sizeof(*pMsg)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; pMsg->messageType = eWNI_SME_GET_ASSOC_STAS_REQ; qdf_copy_macaddr(&pMsg->bssid, &bssid); pMsg->modId = modId; - cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *)); - cdf_mem_copy(pMsg->pSapEventCallback, + qdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *)); + qdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback, sizeof(void *)); - cdf_mem_copy(pMsg->pAssocStasArray, pAssocStasBuf, sizeof(void *)); + qdf_mem_copy(pMsg->pAssocStasArray, pAssocStasBuf, sizeof(void *)); pMsg->length = sizeof(*pMsg); status = cds_send_mb_message_to_mac(pMsg); @@ -14077,17 +14077,17 @@ csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, uint32_t sessionId, tSirSmeGetWPSPBCSessionsReq *pMsg; do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeGetWPSPBCSessionsReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeGetWPSPBCSessionsReq)); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) break; - cdf_mem_set(pMsg, sizeof(tSirSmeGetWPSPBCSessionsReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeGetWPSPBCSessionsReq), 0); pMsg->messageType = eWNI_SME_GET_WPSPBC_SESSION_REQ; - cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *)); - cdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback, + qdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *)); + qdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback, sizeof(void *)); qdf_copy_macaddr(&pMsg->bssid, &bssid); qdf_copy_macaddr(&pMsg->remove_mac, &remove_mac); @@ -14117,13 +14117,13 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessi /* Create the message and send to lim */ len = sizeof(tSirChangeBIParams); - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(pMsg, sizeof(tSirChangeBIParams), 0); + qdf_mem_set(pMsg, sizeof(tSirChangeBIParams), 0); pMsg->messageType = eWNI_SME_CHNG_MCC_BEACON_INTERVAL; pMsg->length = len; @@ -14159,13 +14159,13 @@ QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId, /* Create the message and send to lim */ len = sizeof(tSirSetHT2040Mode); - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_set(pMsg, sizeof(tSirSetHT2040Mode), 0); + qdf_mem_set(pMsg, sizeof(tSirSetHT2040Mode), 0); pMsg->messageType = eWNI_SME_SET_HT_2040_MODE; pMsg->length = len; @@ -14193,11 +14193,11 @@ QDF_STATUS csr_send_mb_deauth_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if (!CSR_IS_SESSION_VALID(pMac, sessionId)) return QDF_STATUS_E_FAILURE; - pMsg = cdf_mem_malloc(sizeof(tSirSmeDeauthReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeDeauthReq)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeDeauthReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeDeauthReq), 0); pMsg->messageType = eWNI_SME_DEAUTH_REQ; pMsg->length = sizeof(tSirSmeDeauthReq); pMsg->sessionId = sessionId; @@ -14205,16 +14205,16 @@ QDF_STATUS csr_send_mb_deauth_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, if ((pSession->pCurRoamProfile != NULL) && (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) { - cdf_mem_copy(&pMsg->bssid, + qdf_mem_copy(&pMsg->bssid, &pSession->selfMacAddr, QDF_MAC_ADDR_SIZE); } else { - cdf_mem_copy(&pMsg->bssid, + qdf_mem_copy(&pMsg->bssid, bssId, QDF_MAC_ADDR_SIZE); } /* Set the peer MAC address before sending the message to LIM */ - cdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE); pMsg->reasonCode = reasonCode; return cds_send_mb_message_to_mac(pMsg); @@ -14226,14 +14226,14 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeDisassocCnf *pMsg; do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeDisassocCnf)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeDisassocCnf)); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) break; - cdf_mem_set(pMsg, sizeof(tSirSmeDisassocCnf), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeDisassocCnf), 0); pMsg->messageType = eWNI_SME_DISASSOC_CNF; pMsg->statusCode = eSIR_SME_SUCCESS; pMsg->length = sizeof(tSirSmeDisassocCnf); @@ -14241,14 +14241,14 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac, &pDisassocInd->peer_macaddr); status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); break; } qdf_copy_macaddr(&pMsg->bssid, &pDisassocInd->bssid); status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); break; } @@ -14263,28 +14263,28 @@ QDF_STATUS csr_send_mb_deauth_cnf_msg(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeDeauthCnf *pMsg; do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeDeauthCnf)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeDeauthCnf)); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) break; - cdf_mem_set(pMsg, sizeof(tSirSmeDeauthCnf), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeDeauthCnf), 0); pMsg->messageType = eWNI_SME_DEAUTH_CNF; pMsg->statusCode = eSIR_SME_SUCCESS; pMsg->length = sizeof(tSirSmeDeauthCnf); qdf_copy_macaddr(&pMsg->bssid, &pDeauthInd->bssid); status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); break; } qdf_copy_macaddr(&pMsg->peer_macaddr, &pDeauthInd->peer_macaddr); status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); break; } status = cds_send_mb_message_to_mac(pMsg); @@ -14302,10 +14302,10 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocIn FL("Posting eWNI_SME_ASSOC_CNF to LIM.HalStatus :%d"), Halstatus); do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeAssocCnf)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocCnf)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeAssocCnf), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeAssocCnf), 0); pMsg->messageType = eWNI_SME_ASSOC_CNF; pMsg->length = sizeof(tSirSmeAssocCnf); if (QDF_IS_STATUS_SUCCESS(Halstatus)) @@ -14313,15 +14313,15 @@ QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocIn else pMsg->statusCode = eSIR_SME_ASSOC_REFUSED; /* bssId */ - cdf_mem_copy(pMsg->bssid.bytes, pAssocInd->bssId, + qdf_mem_copy(pMsg->bssid.bytes, pAssocInd->bssId, QDF_MAC_ADDR_SIZE); /* peerMacAddr */ - cdf_mem_copy(pMsg->peer_macaddr.bytes, pAssocInd->peerMacAddr, + qdf_mem_copy(pMsg->peer_macaddr.bytes, pAssocInd->peerMacAddr, QDF_MAC_ADDR_SIZE); /* aid */ pMsg->aid = pAssocInd->aid; /* alternateBssId */ - cdf_mem_copy(pMsg->alternate_bssid.bytes, pAssocInd->bssId, + qdf_mem_copy(pMsg->alternate_bssid.bytes, pAssocInd->bssId, QDF_MAC_ADDR_SIZE); /* alternateChannelId */ pMsg->alternateChannelId = 11; @@ -14342,10 +14342,10 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac, tSirResultCodes statusCode; uint16_t wTmp; do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeAssocIndToUpperLayerCnf)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocIndToUpperLayerCnf)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeAssocIndToUpperLayerCnf), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeAssocIndToUpperLayerCnf), 0); pMsg->messageType = eWNI_SME_UPPER_LAYER_ASSOC_CNF; pMsg->length = sizeof(tSirSmeAssocIndToUpperLayerCnf); @@ -14357,22 +14357,22 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac, statusCode = eSIR_SME_SUCCESS; else statusCode = eSIR_SME_ASSOC_REFUSED; - cdf_mem_copy(pBuf, &statusCode, sizeof(tSirResultCodes)); + qdf_mem_copy(pBuf, &statusCode, sizeof(tSirResultCodes)); pBuf += sizeof(tSirResultCodes); /* bssId */ - cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId, + qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); /* peerMacAddr */ - cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->peerMacAddr, + qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->peerMacAddr, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); /* StaId */ wTmp = pAssocInd->staId; - cdf_mem_copy(pBuf, &wTmp, sizeof(uint16_t)); + qdf_mem_copy(pBuf, &wTmp, sizeof(uint16_t)); pBuf += sizeof(uint16_t); /* alternateBssId */ - cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId, + qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId, sizeof(tSirMacAddr)); pBuf += sizeof(tSirMacAddr); /* alternateChannelId */ @@ -14383,17 +14383,17 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac, *pBuf = pAssocInd->wmmEnabledSta; pBuf += sizeof(uint8_t); /* RSN IE */ - cdf_mem_copy((tSirRSNie *) pBuf, &pAssocInd->rsnIE, + qdf_mem_copy((tSirRSNie *) pBuf, &pAssocInd->rsnIE, sizeof(tSirRSNie)); pBuf += sizeof(tSirRSNie); #ifdef FEATURE_WLAN_WAPI /* WAPI IE */ - cdf_mem_copy((tSirWAPIie *) pBuf, &pAssocInd->wapiIE, + qdf_mem_copy((tSirWAPIie *) pBuf, &pAssocInd->wapiIE, sizeof(tSirWAPIie)); pBuf += sizeof(tSirWAPIie); #endif /* Additional IE */ - cdf_mem_copy((void *)pBuf, &pAssocInd->addIE, + qdf_mem_copy((void *)pBuf, &pAssocInd->addIE, sizeof(tSirAddie)); pBuf += sizeof(tSirAddie); /* reassocReq */ @@ -14402,7 +14402,7 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac, /* timingMeasCap */ *pBuf = pAssocInd->timingMeasCap; pBuf += sizeof(uint8_t); - cdf_mem_copy((void *)pBuf, &pAssocInd->chan_info, + qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info, sizeof(tSirSmeChanInfo)); msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF; msgQ.bodyptr = pMsg; @@ -14438,10 +14438,10 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac, */ msgLen = sizeof(struct sSirSmeSetContextReq); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, msgLen, 0); + qdf_mem_set(pMsg, msgLen, 0); pMsg->messageType = eWNI_SME_SETCONTEXT_REQ; pMsg->length = msgLen; pMsg->sessionId = (uint8_t) sessionId; @@ -14467,13 +14467,13 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac, pMsg->keyMaterial.key[0].keyId = keyId; pMsg->keyMaterial.key[0].unicast = fUnicast; pMsg->keyMaterial.key[0].keyDirection = aniKeyDirection; - cdf_mem_copy(pMsg->keyMaterial.key[0].keyRsc, + qdf_mem_copy(pMsg->keyMaterial.key[0].keyRsc, pKeyRsc, CSR_MAX_RSC_LEN); /* 0 is Supplicant */ pMsg->keyMaterial.key[0].paeRole = paeRole; pMsg->keyMaterial.key[0].keyLength = keyLength; if (keyLength && pKey) { - cdf_mem_copy(pMsg->keyMaterial.key[0].key, + qdf_mem_copy(pMsg->keyMaterial.key[0].key, pKey, keyLength); sms_log(pMac, LOG1, FL("SME set keyIndx (%d) encType (%d) key"), @@ -14502,11 +14502,11 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS; pSession->joinFailStatusCode.reasonCode = 0; - pMsg = cdf_mem_malloc(sizeof(tSirSmeStartBssReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeStartBssReq)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeStartBssReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeStartBssReq), 0); pMsg->messageType = eWNI_SME_START_BSS_REQ; pMsg->sessionId = sessionId; pMsg->length = sizeof(tSirSmeStartBssReq); @@ -14534,7 +14534,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId } else { sms_log(pMac, LOGE, FL("****Start BSS failed persona already exists***")); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return QDF_STATUS_E_FAILURE; } pMsg->beaconInterval = wTmp; @@ -14545,7 +14545,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId pMsg->cc_switch_mode = pMac->roam.configParam.cc_switch_mode; #endif pMsg->bssType = csr_translate_bsstype_to_mac_type(bssType); - cdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId)); + qdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId)); pMsg->channelId = pParam->operationChn; /* What should we really do for the cbmode. */ pMsg->cbMode = (ePhyChanBondState) pParam->cbMode; @@ -14577,24 +14577,24 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId #endif if (pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata)) { - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return QDF_STATUS_E_INVAL; } pMsg->rsnIE.length = pParam->nRSNIELength; - cdf_mem_copy(pMsg->rsnIE.rsnIEdata, + qdf_mem_copy(pMsg->rsnIE.rsnIEdata, pParam->pRSNIE, pParam->nRSNIELength); pMsg->nwType = (tSirNwType)pParam->sirNwType; - cdf_mem_copy(&pMsg->operationalRateSet, + qdf_mem_copy(&pMsg->operationalRateSet, &pParam->operationalRateSet, sizeof(tSirMacRateSet)); - cdf_mem_copy(&pMsg->extendedRateSet, + qdf_mem_copy(&pMsg->extendedRateSet, &pParam->extendedRateSet, sizeof(tSirMacRateSet)); - cdf_mem_copy(&pMsg->htConfig, + qdf_mem_copy(&pMsg->htConfig, &pSession->htConfig, sizeof(tSirHTConfig)); - cdf_mem_copy(&pMsg->addIeParams, + qdf_mem_copy(&pMsg->addIeParams, &pParam->addIeParams, sizeof(pParam->addIeParams)); pMsg->obssEnabled = pMac->roam.configParam.obssEnabled; @@ -14613,10 +14613,10 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId) return QDF_STATUS_E_FAILURE; } - pMsg = cdf_mem_malloc(sizeof(tSirSmeStopBssReq)); + pMsg = qdf_mem_malloc(sizeof(tSirSmeStopBssReq)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirSmeStopBssReq), 0); + qdf_mem_set(pMsg, sizeof(tSirSmeStopBssReq), 0); pMsg->messageType = eWNI_SME_STOP_BSS_REQ; pMsg->sessionId = sessionId; pMsg->length = sizeof(tSirSmeStopBssReq); @@ -14634,7 +14634,7 @@ QDF_STATUS csr_reassoc(tpAniSirGlobal pMac, uint32_t sessionId, uint32_t roamId = 0; tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if ((csr_is_conn_state_connected(pMac, sessionId)) && - (fForce || (!cdf_mem_compare(&pModProfileFields, + (fForce || (qdf_mem_cmp(&pModProfileFields, &pSession->connectedProfile. modifyProfileFields, sizeof(tCsrRoamModifyProfileFields))))) { @@ -14657,7 +14657,7 @@ static QDF_STATUS csr_roam_session_opened(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; tCsrRoamInfo roamInfo; - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); status = csr_roam_call_callback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_SESSION_OPENED, eCSR_ROAM_RESULT_NONE); @@ -14696,13 +14696,13 @@ QDF_STATUS csr_process_add_sta_session_rsp(tpAniSirGlobal pMac, uint8_t *pMsg) (WMI_VDEV_TYPE_AP == rsp->type && WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE == rsp->sub_type))) { sms_log(pMac, LOG1, FL("send SET IE msg to PE")); - msg = cdf_mem_malloc(sizeof(*msg)); + msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) { sms_log(pMac, LOGE, FL("Memory allocation failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(msg, sizeof(*msg), 0); + qdf_mem_set(msg, sizeof(*msg), 0); msg->msg_type = eWNI_SME_SET_IE_REQ; msg->session_id = rsp->session_id; msg->length = sizeof(*msg); @@ -14735,7 +14735,7 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac, uint32_t sessi } else { pCommand->command = eSmeCommandAddStaSession; pCommand->sessionId = (uint8_t) sessionId; - cdf_mem_copy(pCommand->u.addStaSessionCmd.selfMacAddr, + qdf_mem_copy(pCommand->u.addStaSessionCmd.selfMacAddr, sessionMacAddr, sizeof(tSirMacAddr)); pCommand->u.addStaSessionCmd.currDeviceMode = pMac->sme.currDeviceMode; @@ -14761,7 +14761,7 @@ QDF_STATUS csr_process_add_sta_session_command(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_E_NOMEM; tSirMsgQ msg; - add_sta_self_req = cdf_mem_malloc(sizeof(struct add_sta_self_params)); + add_sta_self_req = qdf_mem_malloc(sizeof(struct add_sta_self_params)); if (NULL == add_sta_self_req) { lim_log(pMac, LOGP, FL @@ -14769,7 +14769,7 @@ QDF_STATUS csr_process_add_sta_session_command(tpAniSirGlobal pMac, return status; } - cdf_mem_copy(add_sta_self_req->self_mac_addr, pAddStaReq->selfMacAddr, + qdf_mem_copy(add_sta_self_req->self_mac_addr, pAddStaReq->selfMacAddr, sizeof(tSirMacAddr)); add_sta_self_req->curr_device_mode = pAddStaReq->currDeviceMode; add_sta_self_req->session_id = sessionId; @@ -14790,7 +14790,7 @@ QDF_STATUS csr_process_add_sta_session_command(tpAniSirGlobal pMac, if (status != QDF_STATUS_SUCCESS) { lim_log(pMac, LOGP, FL("wma_post_ctrl_msg failed")); - cdf_mem_free(add_sta_self_req); + qdf_mem_free(add_sta_self_req); add_sta_self_req = NULL; } return status; @@ -14830,7 +14830,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac, pSession->callback = callback; pSession->pContext = pContext; - cdf_mem_copy(&pSession->selfMacAddr, pSelfMacAddr, + qdf_mem_copy(&pSession->selfMacAddr, pSelfMacAddr, sizeof(struct qdf_mac_addr)); *pbSessionId = (uint8_t) i; status = @@ -14958,7 +14958,7 @@ QDF_STATUS csr_issue_del_sta_for_session_req(tpAniSirGlobal pMac, uint32_t sessi pCommand->sessionId = (uint8_t) sessionId; pCommand->u.delStaSessionCmd.callback = callback; pCommand->u.delStaSessionCmd.pContext = pContext; - cdf_mem_copy(pCommand->u.delStaSessionCmd.selfMacAddr, + qdf_mem_copy(pCommand->u.delStaSessionCmd.selfMacAddr, sessionMacAddr, sizeof(tSirMacAddr)); status = csr_queue_sme_command(pMac, pCommand, true); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -14976,14 +14976,14 @@ QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal pMac, struct del_sta_self_params *del_sta_self_req; tSirMsgQ msg; QDF_STATUS status = QDF_STATUS_E_FAILURE; - del_sta_self_req = cdf_mem_malloc(sizeof(struct del_sta_self_params)); + del_sta_self_req = qdf_mem_malloc(sizeof(struct del_sta_self_params)); if (NULL == del_sta_self_req) { lim_log(pMac, LOGP, FL(" mem alloc failed for tDelStaSelfParams")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(del_sta_self_req->self_mac_addr, + qdf_mem_copy(del_sta_self_req->self_mac_addr, pCommand->u.delStaSessionCmd.selfMacAddr, sizeof(tSirMacAddr)); @@ -14999,7 +14999,7 @@ QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal pMac, status = wma_post_ctrl_msg(pMac, &msg); if (status != QDF_STATUS_SUCCESS) { sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed")); - cdf_mem_free(del_sta_self_req); + qdf_mem_free(del_sta_self_req); } return status; } @@ -15011,7 +15011,7 @@ static void purge_csr_session_cmd_list(tpAniSirGlobal pMac, uint32_t sessionId) tSmeCmd *pCommand; tDblLinkList localList; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return; @@ -15112,36 +15112,36 @@ static void csr_init_session(tpAniSirGlobal pMac, uint32_t sessionId) csr_roam_free_connected_info(pMac, &pSession->connectedInfo); csr_free_connect_bss_desc(pMac, sessionId); csr_scan_enable(pMac); - cdf_mem_set(&pSession->selfMacAddr, sizeof(struct qdf_mac_addr), 0); + qdf_mem_set(&pSession->selfMacAddr, sizeof(struct qdf_mac_addr), 0); if (pSession->pWpaRsnReqIE) { - cdf_mem_free(pSession->pWpaRsnReqIE); + qdf_mem_free(pSession->pWpaRsnReqIE); pSession->pWpaRsnReqIE = NULL; } pSession->nWpaRsnReqIeLength = 0; if (pSession->pWpaRsnRspIE) { - cdf_mem_free(pSession->pWpaRsnRspIE); + qdf_mem_free(pSession->pWpaRsnRspIE); pSession->pWpaRsnRspIE = NULL; } pSession->nWpaRsnRspIeLength = 0; #ifdef FEATURE_WLAN_WAPI if (pSession->pWapiReqIE) { - cdf_mem_free(pSession->pWapiReqIE); + qdf_mem_free(pSession->pWapiReqIE); pSession->pWapiReqIE = NULL; } pSession->nWapiReqIeLength = 0; if (pSession->pWapiRspIE) { - cdf_mem_free(pSession->pWapiRspIE); + qdf_mem_free(pSession->pWapiRspIE); pSession->pWapiRspIE = NULL; } pSession->nWapiRspIeLength = 0; #endif /* FEATURE_WLAN_WAPI */ if (pSession->pAddIEScan) { - cdf_mem_free(pSession->pAddIEScan); + qdf_mem_free(pSession->pAddIEScan); pSession->pAddIEScan = NULL; } pSession->nAddIEScanLength = 0; if (pSession->pAddIEAssoc) { - cdf_mem_free(pSession->pAddIEAssoc); + qdf_mem_free(pSession->pAddIEAssoc); pSession->pAddIEAssoc = NULL; } pSession->nAddIEAssocLength = 0; @@ -15310,7 +15310,7 @@ void csr_roam_pe_stats_timer_handler(void *pv) ("csr_roam_pe_stats_timer_handler:failed to destroy hPeStatsTimer timer")); } /* Free the entry */ - cdf_mem_free(pPeStatsReqListEntry); + qdf_mem_free(pPeStatsReqListEntry); pPeStatsReqListEntry = NULL; } else { if (!pPeStatsReqListEntry->rspPending) { @@ -15376,7 +15376,7 @@ QDF_STATUS csr_send_mb_stats_req_msg(tpAniSirGlobal pMac, uint32_t statsMask, { tAniGetPEStatsReq *pMsg; QDF_STATUS status = QDF_STATUS_SUCCESS; - pMsg = cdf_mem_malloc(sizeof(tAniGetPEStatsReq)); + pMsg = qdf_mem_malloc(sizeof(tAniGetPEStatsReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, FL("Failed to allocate mem for stats req ")); return QDF_STATUS_E_NOMEM; @@ -15415,28 +15415,28 @@ csr_update_stats(tpAniSirGlobal mac, uint8_t stats_type, switch (stats_type) { case eCsrSummaryStats: sms_log(mac, LOG2, FL("summary stats")); - cdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats, + qdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats, sizeof(tCsrSummaryStatsInfo)); *stats += sizeof(tCsrSummaryStatsInfo); *length -= sizeof(tCsrSummaryStatsInfo); break; case eCsrGlobalClassAStats: sms_log(mac, LOG2, FL("ClassA stats")); - cdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats, + qdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats, sizeof(tCsrGlobalClassAStatsInfo)); *stats += sizeof(tCsrGlobalClassAStatsInfo); *length -= sizeof(tCsrGlobalClassAStatsInfo); break; case eCsrGlobalClassBStats: sms_log(mac, LOG2, FL("ClassB stats")); - cdf_mem_copy((uint8_t *) &mac->roam.classBStatsInfo, *stats, + qdf_mem_copy((uint8_t *) &mac->roam.classBStatsInfo, *stats, sizeof(tCsrGlobalClassBStatsInfo)); *stats += sizeof(tCsrGlobalClassBStatsInfo); *length -= sizeof(tCsrGlobalClassBStatsInfo); break; case eCsrGlobalClassCStats: sms_log(mac, LOG2, FL("ClassC stats")); - cdf_mem_copy((uint8_t *) &mac->roam.classCStatsInfo, *stats, + qdf_mem_copy((uint8_t *) &mac->roam.classCStatsInfo, *stats, sizeof(tCsrGlobalClassCStatsInfo)); *stats += sizeof(tCsrGlobalClassCStatsInfo); *length -= sizeof(tCsrGlobalClassCStatsInfo); @@ -15444,7 +15444,7 @@ csr_update_stats(tpAniSirGlobal mac, uint8_t stats_type, case eCsrPerStaStats: sms_log(mac, LOG2, FL("PerSta stats")); if (CSR_MAX_STA > sme_stats_rsp->staId) { - cdf_mem_copy( + qdf_mem_copy( &mac->roam.perStaStatsInfo[sme_stats_rsp->staId], *stats, sizeof(tCsrPerStaStatsInfo)); } else { @@ -15704,7 +15704,7 @@ tCsrStatsClientReqInfo *csr_roam_insert_entry_into_list(tpAniSirGlobal pMac, /* callback update it */ if (NULL == csr_roam_checkn_update_client_req_list(pMac, pStaEntry, true)) { - pNewStaEntry = cdf_mem_malloc(sizeof(tCsrStatsClientReqInfo)); + pNewStaEntry = qdf_mem_malloc(sizeof(tCsrStatsClientReqInfo)); if (NULL == pNewStaEntry) { sms_log(pMac, LOGW, "csr_roam_insert_entry_into_list: couldn't allocate memory for the " @@ -15734,7 +15734,7 @@ tCsrPeStatsReqInfo *csr_roam_insert_entry_into_pe_stats_req_list(tpAniSirGlobal pStaEntry) { tCsrPeStatsReqInfo *pNewStaEntry = NULL; - pNewStaEntry = cdf_mem_malloc(sizeof(tCsrPeStatsReqInfo)); + pNewStaEntry = qdf_mem_malloc(sizeof(tCsrPeStatsReqInfo)); if (NULL == pNewStaEntry) { sms_log(pMac, LOGW, "csr_roam_insert_entry_into_pe_stats_req_list: couldn't allocate memory for the " @@ -15775,7 +15775,7 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; } - pMsg = cdf_mem_malloc(sizeof(tAniGetRssiReq)); + pMsg = qdf_mem_malloc(sizeof(tAniGetRssiReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, " csr_get_rssi: failed to allocate mem for req "); @@ -15799,7 +15799,7 @@ QDF_STATUS csr_get_rssi(tpAniSirGlobal pMac, msg.reserved = 0; if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(pMac, LOGE, " csr_get_rssi failed to post msg to self "); - cdf_mem_free((void *)pMsg); + qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } sms_log(pMac, LOG2, FL("returned")); @@ -15818,7 +15818,7 @@ QDF_STATUS csr_get_snr(tpAniSirGlobal pMac, sms_log(pMac, LOG2, FL("called")); - pMsg = (tAniGetSnrReq *) cdf_mem_malloc(sizeof(tAniGetSnrReq)); + pMsg = (tAniGetSnrReq *) qdf_mem_malloc(sizeof(tAniGetSnrReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, "%s: failed to allocate mem for req", __func__); @@ -15839,7 +15839,7 @@ QDF_STATUS csr_get_snr(tpAniSirGlobal pMac, if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(pMac, LOGE, "%s failed to post msg to self", __func__); - cdf_mem_free((void *)pMsg); + qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } @@ -15856,7 +15856,7 @@ QDF_STATUS csr_get_tsm_stats(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; tAniGetTsmStatsReq *pMsg = NULL; - pMsg = cdf_mem_malloc(sizeof(tAniGetTsmStatsReq)); + pMsg = qdf_mem_malloc(sizeof(tAniGetTsmStatsReq)); if (!pMsg) { sms_log(pMac, LOGE, "csr_get_tsm_stats: failed to allocate mem for req"); @@ -16173,13 +16173,13 @@ csr_roam_scan_offload_populate_mac_header(tpAniSirGlobal pMac, pMacHdr->fc.subType = subType; /* Prepare Address 1 */ - cdf_mem_copy((uint8_t *) pMacHdr->da, (uint8_t *) peerAddr, + qdf_mem_copy((uint8_t *) pMacHdr->da, (uint8_t *) peerAddr, sizeof(tSirMacAddr)); sir_copy_mac_addr(pMacHdr->sa, selfMacAddr); /* Prepare Address 3 */ - cdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) peerAddr, + qdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) peerAddr, sizeof(tSirMacAddr)); return statusCode; } /*** csr_roam_scan_offload_populate_mac_header() ***/ @@ -16200,7 +16200,7 @@ csr_roam_scan_offload_prepare_probe_req_template(tpAniSirGlobal pMac, tSirMacAddr bssId = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); + qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0); populate_dot11f_supp_rates(pMac, nChannelNum, &pr.SuppRates, NULL); @@ -16236,7 +16236,7 @@ csr_roam_scan_offload_prepare_probe_req_template(tpAniSirGlobal pMac, nBytes = nPayload + sizeof(tSirMacMgmtHdr); /* Prepare outgoing frame */ - cdf_mem_set(pFrame, nBytes, 0); + qdf_mem_set(pFrame, nBytes, 0); nSirStatus = csr_roam_scan_offload_populate_mac_header(pMac, pFrame, @@ -16297,13 +16297,13 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx, tSirRoamOffloadScanReq *req_buf, tCsrRoamSession *session) { - cdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk, + qdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk, sizeof(req_buf->PSK_PMK)); req_buf->pmk_len = session->pmk_len; QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "LFR3: PMK Length = %d", req_buf->pmk_len); req_buf->R0KH_ID_Length = session->ftSmeContext.r0kh_id_len; - cdf_mem_copy(req_buf->R0KH_ID, + qdf_mem_copy(req_buf->R0KH_ID, session->ftSmeContext.r0kh_id, req_buf->R0KH_ID_Length); req_buf->Prefer5GHz = mac_ctx->roam.configParam.nRoamPrefer5GHz; @@ -16319,9 +16319,9 @@ csr_update_roam_scan_offload_request(tpAniSirGlobal mac_ctx, } #ifdef FEATURE_WLAN_ESE if (csr_is_auth_type_ese(req_buf->ConnectedNetwork.authentication)) { - cdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk, + qdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk, SIR_KRK_KEY_LEN); - cdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk, + qdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk, SIR_BTK_KEY_LEN); } #endif @@ -16590,13 +16590,13 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, || (roam_info->isESEAssoc == false); #endif /* FEATURE_WLAN_ESE */ - req_buf = cdf_mem_malloc(sizeof(tSirRoamOffloadScanReq)); + req_buf = qdf_mem_malloc(sizeof(tSirRoamOffloadScanReq)); if (NULL == req_buf) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("Mem alloc for roam scan offload req failed.")); return NULL; } - cdf_mem_zero(req_buf, sizeof(tSirRoamOffloadScanReq)); + qdf_mem_zero(req_buf, sizeof(tSirRoamOffloadScanReq)); req_buf->Command = command; /* * If command is STOP, then pass down ScanOffloadEnabled as Zero. This @@ -16618,12 +16618,12 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, req_buf->RoamScanOffloadEnabled = mac_ctx->roam.configParam.isRoamOffloadScanEnabled; } - cdf_mem_copy(req_buf->ConnectedNetwork.currAPbssid, + qdf_mem_copy(req_buf->ConnectedNetwork.currAPbssid, roam_info->currAPbssid.bytes, sizeof(struct qdf_mac_addr)); req_buf->ConnectedNetwork.ssId.length = mac_ctx->roam.roamSession[session_id]. connectedProfile.SSID.length; - cdf_mem_copy(req_buf->ConnectedNetwork.ssId.ssId, + qdf_mem_copy(req_buf->ConnectedNetwork.ssId.ssId, mac_ctx->roam.roamSession[session_id]. connectedProfile.SSID.ssId, req_buf->ConnectedNetwork.ssId.length); @@ -16684,7 +16684,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, status = csr_fetch_ch_lst_from_ini(mac_ctx, roam_info, req_buf); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(req_buf); + qdf_mem_free(req_buf); return NULL; } } else { @@ -16720,7 +16720,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, /* Maintain the Valid Channels List */ status = csr_fetch_valid_ch_lst(mac_ctx, req_buf); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(req_buf); + qdf_mem_free(req_buf); return NULL; } @@ -16784,7 +16784,7 @@ csr_create_roam_scan_offload_request(tpAniSirGlobal mac_ctx, /* Roam Offload piggybacks upon the Roam Scan offload command. */ if (req_buf->RoamOffloadEnabled) csr_update_roam_scan_offload_request(mac_ctx, req_buf, session); - cdf_mem_copy(&req_buf->roam_params, + qdf_mem_copy(&req_buf->roam_params, &mac_ctx->roam.configParam.roam_params, sizeof(req_buf->roam_params)); #endif @@ -16809,9 +16809,9 @@ static void check_allowed_ssid_list(tSirRoamOffloadScanReq *req_buffer, for (i = 0; i < roam_params->num_ssid_allowed_list; i++) { if ((roam_params->ssid_allowed_list[i].length == req_buffer->ConnectedNetwork.ssId.length) && - cdf_mem_compare(roam_params->ssid_allowed_list[i].ssId, + (!qdf_mem_cmp(roam_params->ssid_allowed_list[i].ssId, req_buffer->ConnectedNetwork.ssId.ssId, - roam_params->ssid_allowed_list[i].length)) { + roam_params->ssid_allowed_list[i].length))) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "Whitelist contains connected profile SSID"); match = true; @@ -16829,7 +16829,7 @@ static void check_allowed_ssid_list(tSirRoamOffloadScanReq *req_buffer, "Adding Connected profile SSID to whitelist"); /* i is the next available index to add the entry.*/ i = roam_params->num_ssid_allowed_list; - cdf_mem_copy(roam_params->ssid_allowed_list[i].ssId, + qdf_mem_copy(roam_params->ssid_allowed_list[i].ssId, req_buffer->ConnectedNetwork.ssId.ssId, req_buffer->ConnectedNetwork.ssId.length); roam_params->ssid_allowed_list[i].length = @@ -17008,7 +17008,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, req_buf->LookupThreshold = (int8_t)roam_info->cfgParams.neighborLookupThreshold * (-1); - cdf_mem_copy(roam_params_dst, roam_params_src, + qdf_mem_copy(roam_params_dst, roam_params_src, sizeof(struct roam_ext_params)); /* * rssi_diff which is updated via framework is equivalent to the @@ -17090,7 +17090,7 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: Not able to post message to WMA", __func__); - cdf_mem_free(req_buf); + qdf_mem_free(req_buf); return QDF_STATUS_E_FAILURE; } else { if (ROAM_SCAN_OFFLOAD_START == command) @@ -17155,7 +17155,7 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, pTempStaEntry->numClient++; found = true; } else { - cdf_mem_set(&staEntry, sizeof(tCsrPeStatsReqInfo), 0); + qdf_mem_set(&staEntry, sizeof(tCsrPeStatsReqInfo), 0); staEntry.numClient = 1; staEntry.periodicity = periodicity; staEntry.pMac = pMac; @@ -17238,7 +17238,7 @@ static void csr_roam_remove_stat_list_entry(tpAniSirGlobal pMac, tListElem *pEnt if (pEntry) { if (csr_ll_remove_entry (&pMac->roam.statsClientReqList, pEntry, LL_ACCESS_LOCK)) { - cdf_mem_free(GET_BASE_ADDR + qdf_mem_free(GET_BASE_ADDR (pEntry, tCsrStatsClientReqInfo, link)); } } @@ -17300,7 +17300,7 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, * successfully */ if (!pTempStaEntry->timerStopFailed) { - cdf_mem_free(pTempStaEntry); + qdf_mem_free(pTempStaEntry); pTempStaEntry = NULL; } break; @@ -17335,7 +17335,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, switch (counter) { case eCsrSummaryStats: sms_log(pMac, LOG2, FL("Summary stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. summaryStatsInfo, sizeof(tCsrSummaryStatsInfo)); @@ -17343,7 +17343,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, break; case eCsrGlobalClassAStats: sms_log(pMac, LOG2, FL("ClassA stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classAStatsInfo, sizeof(tCsrGlobalClassAStatsInfo)); @@ -17351,7 +17351,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, break; case eCsrGlobalClassBStats: sms_log(pMac, LOG2, FL("ClassB stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classBStatsInfo, sizeof(tCsrGlobalClassBStatsInfo)); @@ -17359,7 +17359,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, break; case eCsrGlobalClassCStats: sms_log(pMac, LOG2, FL("ClassC stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classCStatsInfo, sizeof(tCsrGlobalClassCStatsInfo)); @@ -17367,7 +17367,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, break; case eCsrGlobalClassDStats: sms_log(pMac, LOG2, FL("ClassD stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. classDStatsInfo, sizeof(tCsrGlobalClassDStatsInfo)); @@ -17375,7 +17375,7 @@ void csr_roam_report_statistics(tpAniSirGlobal pMac, uint32_t statsMask, break; case eCsrPerStaStats: sms_log(pMac, LOG2, FL("PerSta stats")); - cdf_mem_copy(pStats, + qdf_mem_copy(pStats, (uint8_t *) &pMac->roam. perStaStatsInfo[staId], sizeof(tCsrPerStaStatsInfo)); @@ -17571,7 +17571,7 @@ QDF_STATUS csr_roam_update_apwpsie(tpAniSirGlobal pMac, uint32_t sessionId, return QDF_STATUS_E_FAILURE; } - pMsg = cdf_mem_malloc(sizeof(*pMsg)); + pMsg = qdf_mem_malloc(sizeof(*pMsg)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; @@ -17579,7 +17579,7 @@ QDF_STATUS csr_roam_update_apwpsie(tpAniSirGlobal pMac, uint32_t sessionId, pMsg->transactionId = 0; qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr); pMsg->sessionId = sessionId; - cdf_mem_copy(&pMsg->APWPSIEs, pAPWPSIES, sizeof(tSirAPWPSIEs)); + qdf_mem_copy(&pMsg->APWPSIEs, pAPWPSIES, sizeof(tSirAPWPSIEs)); pMsg->length = sizeof(*pMsg); status = cds_send_mb_message_to_mac(pMsg); @@ -17599,15 +17599,15 @@ QDF_STATUS csr_roam_update_wparsni_es(tpAniSirGlobal pMac, uint32_t sessionId, return QDF_STATUS_E_FAILURE; } do { - pMsg = cdf_mem_malloc(sizeof(tSirUpdateAPWPARSNIEsReq)); + pMsg = qdf_mem_malloc(sizeof(tSirUpdateAPWPARSNIEsReq)); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0); + qdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0); pMsg->messageType = eWNI_SME_SET_APWPARSNIEs_REQ; pMsg->transactionId = 0; qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr); pMsg->sessionId = sessionId; - cdf_mem_copy(&pMsg->APWPARSNIEs, pAPSirRSNie, + qdf_mem_copy(&pMsg->APWPARSNIEs, pAPSirRSNie, sizeof(tSirRSNie)); pMsg->length = sizeof(struct sSirUpdateAPWPARSNIEsReq); status = cds_send_mb_message_to_mac(pMsg); @@ -17632,7 +17632,7 @@ csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId, } auth_req_len = sizeof(tSirFTPreAuthReq); - pftPreAuthReq = (tpSirFTPreAuthReq) cdf_mem_malloc(auth_req_len); + pftPreAuthReq = (tpSirFTPreAuthReq) qdf_mem_malloc(auth_req_len); if (NULL == pftPreAuthReq) { sms_log(pMac, LOGE, FL("Memory allocation for FT Preauth request failed")); @@ -17640,10 +17640,10 @@ csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId, } /* Save the SME Session ID here. We need it while processing the preauth response */ pSession->ftSmeContext.smeSessionId = sessionId; - cdf_mem_zero(pftPreAuthReq, auth_req_len); + qdf_mem_zero(pftPreAuthReq, auth_req_len); pftPreAuthReq->pbssDescription = - (tpSirBssDescription) cdf_mem_malloc(sizeof(pBssDescription->length) + (tpSirBssDescription) qdf_mem_malloc(sizeof(pBssDescription->length) + pBssDescription->length); if (NULL == pftPreAuthReq->pbssDescription) { sms_log(pMac, LOGE, @@ -17655,12 +17655,12 @@ csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId, pftPreAuthReq->preAuthchannelNum = pBssDescription->channelId; - cdf_mem_copy((void *)&pftPreAuthReq->currbssId, + qdf_mem_copy((void *)&pftPreAuthReq->currbssId, (void *)pSession->connectedProfile.bssid.bytes, sizeof(tSirMacAddr)); - cdf_mem_copy((void *)&pftPreAuthReq->preAuthbssId, + qdf_mem_copy((void *)&pftPreAuthReq->preAuthbssId, (void *)pBssDescription->bssId, sizeof(tSirMacAddr)); - cdf_mem_copy((void *)&pftPreAuthReq->self_mac_addr, + qdf_mem_copy((void *)&pftPreAuthReq->self_mac_addr, (void *)&pSession->selfMacAddr.bytes, sizeof(tSirMacAddr)); if (csr_roam_is11r_assoc(pMac, sessionId) && @@ -17668,13 +17668,13 @@ csr_roam_issue_ft_preauth_req(tHalHandle hHal, uint32_t sessionId, eCSR_AUTH_TYPE_OPEN_SYSTEM)) { pftPreAuthReq->ft_ies_length = (uint16_t) pSession->ftSmeContext.auth_ft_ies_length; - cdf_mem_copy(pftPreAuthReq->ft_ies, + qdf_mem_copy(pftPreAuthReq->ft_ies, pSession->ftSmeContext.auth_ft_ies, pSession->ftSmeContext.auth_ft_ies_length); } else { pftPreAuthReq->ft_ies_length = 0; } - cdf_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription, + qdf_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription, sizeof(pBssDescription->length) + pBssDescription->length); pftPreAuthReq->length = auth_req_len; return cds_send_mb_message_to_mac(pftPreAuthReq); @@ -17744,7 +17744,7 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, return; } /* Save the received response */ - cdf_mem_copy((void *)&pSession->ftSmeContext.preAuthbssId, + qdf_mem_copy((void *)&pSession->ftSmeContext.preAuthbssId, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(struct qdf_mac_addr)); if (csr_roam_is11r_assoc(pMac, pFTPreAuthRsp->smeSessionId)) csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId, NULL, 0, @@ -17757,7 +17757,7 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, csr_roam_read_tsf(pMac, (uint8_t *) roamInfo.timestamp, pFTPreAuthRsp->smeSessionId); /* Save the bssid from the received response */ - cdf_mem_copy((void *)&roamInfo.bssid, + qdf_mem_copy((void *)&roamInfo.bssid, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(struct qdf_mac_addr)); csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId, @@ -17770,7 +17770,7 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, /* So he can send us a PMK-ID for this candidate AP. */ if (csr_roam_is_fast_roam_enabled(pMac, pFTPreAuthRsp->smeSessionId)) { /* Save the bssid from the received response */ - cdf_mem_copy((void *)&roamInfo.bssid, + qdf_mem_copy((void *)&roamInfo.bssid, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(struct qdf_mac_addr)); csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId, @@ -17794,7 +17794,7 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, if ((pSession->ftSmeContext.reassoc_ft_ies) && (pSession->ftSmeContext.reassoc_ft_ies_length)) { - cdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies); + qdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies); pSession->ftSmeContext.reassoc_ft_ies_length = 0; pSession->ftSmeContext.reassoc_ft_ies = NULL; } @@ -17803,14 +17803,14 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, return; pSession->ftSmeContext.reassoc_ft_ies = - cdf_mem_malloc(ft_ies_length); + qdf_mem_malloc(ft_ies_length); if (NULL == pSession->ftSmeContext.reassoc_ft_ies) { sms_log(pMac, LOGE, FL("Memory allocation failed for ft_ies")); return; } else { /* Copy the RIC IEs to reassoc IEs */ - cdf_mem_copy(((uint8_t *) pSession->ftSmeContext. + qdf_mem_copy(((uint8_t *) pSession->ftSmeContext. reassoc_ft_ies), (uint8_t *) pFTPreAuthRsp->ric_ies, pFTPreAuthRsp->ric_ies_length); @@ -17842,7 +17842,7 @@ static void csr_ser_des_unpack_diassoc_rsp(uint8_t *pBuf, tSirSmeDisassocRsp *pR pBuf += 2; qdf_get_u32(pBuf, (uint32_t *) &pRsp->statusCode); pBuf += 4; - cdf_mem_copy(pRsp->peer_macaddr.bytes, pBuf, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(pRsp->peer_macaddr.bytes, pBuf, QDF_MAC_ADDR_SIZE); } } @@ -17889,7 +17889,7 @@ QDF_STATUS csr_handoff_request(tpAniSirGlobal pMac, cds_msg_t msg; tAniHandoffReq *pMsg; - pMsg = cdf_mem_malloc(sizeof(tAniHandoffReq)); + pMsg = qdf_mem_malloc(sizeof(tAniHandoffReq)); if (NULL == pMsg) { sms_log(pMac, LOGE, " csr_handoff_request: failed to allocate mem for req "); @@ -17900,14 +17900,14 @@ QDF_STATUS csr_handoff_request(tpAniSirGlobal pMac, pMsg->sessionId = sessionId; pMsg->channel = pHandoffInfo->channel; pMsg->handoff_src = pHandoffInfo->src; - cdf_mem_copy(pMsg->bssid, pHandoffInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(pMsg->bssid, pHandoffInfo->bssid.bytes, QDF_MAC_ADDR_SIZE); msg.type = eWNI_SME_HANDOFF_REQ; msg.bodyptr = pMsg; msg.reserved = 0; if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) { sms_log(pMac, LOGE, " csr_handoff_request failed to post msg to self "); - cdf_mem_free((void *)pMsg); + qdf_mem_free((void *)pMsg); status = QDF_STATUS_E_FAILURE; } return status; @@ -17934,7 +17934,7 @@ QDF_STATUS csr_set_cckm_ie(tpAniSirGlobal pMac, const uint8_t sessionId, sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(pSession->suppCckmIeInfo.cckmIe, pCckmIe, ccKmIeLen); + qdf_mem_copy(pSession->suppCckmIeInfo.cckmIe, pCckmIe, ccKmIeLen); pSession->suppCckmIeInfo.cckmIeLen = ccKmIeLen; return status; } @@ -17966,7 +17966,7 @@ QDF_STATUS csr_roam_read_tsf(tpAniSirGlobal pMac, uint8_t *pTimestamp, timeStamp[0] = pBssDescription->timeStamp[0]; timeStamp[1] = pBssDescription->timeStamp[1]; update_cckmtsf(&(timeStamp[0]), &(timeStamp[1]), &timer_diff); - cdf_mem_copy(pTimestamp, (void *)&timeStamp[0], sizeof(uint32_t) * 2); + qdf_mem_copy(pTimestamp, (void *)&timeStamp[0], sizeof(uint32_t) * 2); return status; } #endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ @@ -17992,12 +17992,12 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac, tCsrRoamStartBssParams param; csr_roam_get_bss_start_parms(pMac, profile, ¶m); - pMsg = cdf_mem_malloc(sizeof(tSirChanChangeRequest)); + pMsg = qdf_mem_malloc(sizeof(tSirChanChangeRequest)); if (!pMsg) { return QDF_STATUS_E_NOMEM; } - cdf_mem_set((void *)pMsg, sizeof(tSirChanChangeRequest), 0); + qdf_mem_set((void *)pMsg, sizeof(tSirChanChangeRequest), 0); pMsg->messageType = eWNI_SME_CHANNEL_CHANGE_REQ; pMsg->messageLen = sizeof(tSirChanChangeRequest); @@ -18008,10 +18008,10 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac, pMac->roam.configParam.uCfgDot11Mode); pMsg->center_freq_seg_0 = ch_params->center_freq_seg0; pMsg->center_freq_seg_1 = ch_params->center_freq_seg1; - cdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&pMsg->operational_rateset, + qdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&pMsg->operational_rateset, ¶m.operationalRateSet, sizeof(pMsg->operational_rateset)); - cdf_mem_copy(&pMsg->extended_rateset, + qdf_mem_copy(&pMsg->extended_rateset, ¶m.extendedRateSet, sizeof(pMsg->extended_rateset)); status = cds_send_mb_message_to_mac(pMsg); @@ -18030,17 +18030,17 @@ QDF_STATUS csr_roam_start_beacon_req(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirStartBeaconIndication *pMsg; - pMsg = cdf_mem_malloc(sizeof(tSirStartBeaconIndication)); + pMsg = qdf_mem_malloc(sizeof(tSirStartBeaconIndication)); if (!pMsg) { return QDF_STATUS_E_NOMEM; } - cdf_mem_set((void *)pMsg, sizeof(tSirStartBeaconIndication), 0); + qdf_mem_set((void *)pMsg, sizeof(tSirStartBeaconIndication), 0); pMsg->messageType = eWNI_SME_START_BEACON_REQ; pMsg->messageLen = sizeof(tSirStartBeaconIndication); pMsg->beaconStartStatus = dfsCacWaitStatus; - cdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); status = cds_send_mb_message_to_mac(pMsg); @@ -18064,24 +18064,24 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac, QDF_STATUS status; /* following buffer will be freed by consumer (PE) */ - pLocalBuffer = cdf_mem_malloc(pModifyIE->ieBufferlength); + pLocalBuffer = qdf_mem_malloc(pModifyIE->ieBufferlength); if (NULL == pLocalBuffer) { sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); return QDF_STATUS_E_NOMEM; } - pModifyAddIEInd = cdf_mem_malloc(sizeof(tSirModifyIEsInd)); + pModifyAddIEInd = qdf_mem_malloc(sizeof(tSirModifyIEsInd)); if (NULL == pModifyAddIEInd) { sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); - cdf_mem_free(pLocalBuffer); + qdf_mem_free(pLocalBuffer); return QDF_STATUS_E_NOMEM; } /*copy the IE buffer */ - cdf_mem_copy(pLocalBuffer, pModifyIE->pIEBuffer, + qdf_mem_copy(pLocalBuffer, pModifyIE->pIEBuffer, pModifyIE->ieBufferlength); - cdf_mem_zero(pModifyAddIEInd, sizeof(tSirModifyIEsInd)); + qdf_mem_zero(pModifyAddIEInd, sizeof(tSirModifyIEsInd)); pModifyAddIEInd->msgType = eWNI_SME_MODIFY_ADDITIONAL_IES; pModifyAddIEInd->msgLen = sizeof(tSirModifyIEsInd); @@ -18102,7 +18102,7 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" "!!! status %d"), status); - cdf_mem_free(pLocalBuffer); + qdf_mem_free(pLocalBuffer); } return status; } @@ -18129,25 +18129,25 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac, if (pUpdateIE->ieBufferlength != 0) { /* Following buffer will be freed by consumer (PE) */ - pLocalBuffer = cdf_mem_malloc(pUpdateIE->ieBufferlength); + pLocalBuffer = qdf_mem_malloc(pUpdateIE->ieBufferlength); if (NULL == pLocalBuffer) { sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer, + qdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer, pUpdateIE->ieBufferlength); } - pUpdateAddIEs = cdf_mem_malloc(sizeof(tSirUpdateIEsInd)); + pUpdateAddIEs = qdf_mem_malloc(sizeof(tSirUpdateIEsInd)); if (NULL == pUpdateAddIEs) { sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!")); if (pLocalBuffer != NULL) { - cdf_mem_free(pLocalBuffer); + qdf_mem_free(pLocalBuffer); } return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pUpdateAddIEs, sizeof(tSirUpdateIEsInd)); + qdf_mem_zero(pUpdateAddIEs, sizeof(tSirUpdateIEsInd)); pUpdateAddIEs->msgType = eWNI_SME_UPDATE_ADDITIONAL_IES; pUpdateAddIEs->msgLen = sizeof(tSirUpdateIEsInd); @@ -18167,7 +18167,7 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg" "!!! status %d"), status); - cdf_mem_free(pLocalBuffer); + qdf_mem_free(pLocalBuffer); } return status; } @@ -18189,11 +18189,11 @@ QDF_STATUS csr_send_ext_change_channel(tpAniSirGlobal mac_ctx, uint32_t channel, QDF_STATUS status = QDF_STATUS_SUCCESS; struct sir_sme_ext_cng_chan_req *msg; - msg = cdf_mem_malloc(sizeof(*msg)); + msg = qdf_mem_malloc(sizeof(*msg)); if (NULL == msg) return QDF_STATUS_E_NOMEM; - cdf_mem_zero(msg, sizeof(*msg)); + qdf_mem_zero(msg, sizeof(*msg)); msg->message_type = eWNI_SME_EXT_CHANGE_CHANNEL; msg->length = sizeof(*msg); msg->new_channel = channel; @@ -18223,19 +18223,19 @@ csr_roam_send_chan_sw_ie_request(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_SUCCESS; tSirDfsCsaIeRequest *msg; - msg = cdf_mem_malloc(sizeof(tSirDfsCsaIeRequest)); + msg = qdf_mem_malloc(sizeof(tSirDfsCsaIeRequest)); if (!msg) { return QDF_STATUS_E_NOMEM; } - cdf_mem_set((void *)msg, sizeof(tSirDfsCsaIeRequest), 0); + qdf_mem_set((void *)msg, sizeof(tSirDfsCsaIeRequest), 0); msg->msgType = eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ; msg->msgLen = sizeof(tSirDfsCsaIeRequest); msg->targetChannel = target_channel; msg->csaIeRequired = csa_ie_reqd; - cdf_mem_copy(msg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&msg->ch_params, ch_params, sizeof(chan_params_t)); + qdf_mem_copy(msg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&msg->ch_params, ch_params, sizeof(chan_params_t)); status = cds_send_mb_message_to_mac(msg); @@ -18261,7 +18261,7 @@ void csr_roaming_report_diag_event(tpAniSirGlobal mac_ctx, { WLAN_HOST_DIAG_EVENT_DEF(roam_connection, host_event_wlan_status_payload_type); - cdf_mem_set(&roam_connection, + qdf_mem_set(&roam_connection, sizeof(host_event_wlan_status_payload_type), 0); switch (reason) { case eCSR_REASON_ROAM_SYNCH_IND: @@ -18696,7 +18696,7 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) } len = sizeof(*cmd); - cmd = cdf_mem_malloc(len); + cmd = qdf_mem_malloc(len); if (!cmd) { sms_log(mac, LOGE, FL("Memory allocation failed")); /* Probably the fail response will also fail during malloc. @@ -18718,7 +18718,7 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) } } - cdf_mem_set(cmd, len, 0); + qdf_mem_set(cmd, len, 0); cmd->messageType = eWNI_SME_SET_HW_MODE_REQ; cmd->length = len; @@ -18740,7 +18740,7 @@ void csr_process_set_hw_mode(tpAniSirGlobal mac, tSmeCmd *command) } return; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { sms_log(mac, LOGE, FL("Malloc fail: Fail to send response to SME")); @@ -18783,7 +18783,7 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command) } len = sizeof(*cmd); - cmd = cdf_mem_malloc(len); + cmd = qdf_mem_malloc(len); if (!cmd) { sms_log(mac, LOGE, FL("Memory allocation failed")); /* Probably the fail response will also fail during malloc. @@ -18816,7 +18816,7 @@ void csr_process_set_dual_mac_config(tpAniSirGlobal mac, tSmeCmd *command) } return; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { sms_log(mac, LOGE, FL("Malloc fail: Fail to send response to SME")); @@ -18862,7 +18862,7 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) } len = sizeof(*msg); - msg = cdf_mem_malloc(len); + msg = qdf_mem_malloc(len); if (!msg) { sms_log(mac, LOGE, FL("Memory allocation failed")); /* Probably the fail response is also fail during malloc. @@ -18871,7 +18871,7 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) goto fail; } - cdf_mem_set((void *)msg, sizeof(*msg), 0); + qdf_mem_set((void *)msg, sizeof(*msg), 0); msg->msgType = eWNI_SME_NSS_UPDATE_REQ; msg->msgLen = sizeof(*msg); @@ -18888,7 +18888,7 @@ void csr_process_nss_update_req(tpAniSirGlobal mac, tSmeCmd *command) } return; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { sms_log(mac, LOGE, FL("Malloc fail: Fail to send response to SME")); @@ -18980,7 +18980,7 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, ies_local); ps_global_info->remain_in_power_active_till_dhcp = false; session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED; - roam_info = cdf_mem_malloc(sizeof(tCsrRoamInfo)); + roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo)); if (NULL == roam_info) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, FL("LFR3: Mem Alloc failed for roam info")); @@ -18990,12 +18990,12 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, } csr_scan_save_roam_offload_ap_to_scan_cache(mac_ctx, roam_synch_data, bss_desc); - cdf_mem_zero(roam_info, sizeof(tCsrRoamInfo)); + qdf_mem_zero(roam_info, sizeof(tCsrRoamInfo)); roam_info->sessionId = session_id; csr_roam_call_callback(mac_ctx, roam_synch_data->roamedVdevId, roam_info, 0, eCSR_ROAM_TDLS_STATUS_UPDATE, eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND); - cdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId, + qdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId, sizeof(struct qdf_mac_addr)); csr_roam_save_connected_infomation(mac_ctx, session_id, session->pCurRoamProfile, @@ -19058,24 +19058,24 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, SIR_MAC_HDR_LEN_3A - SIR_MAC_REASSOC_SSID_OFFSET; roam_info->nAssocRspLength = roam_synch_data->reassocRespLength - SIR_MAC_HDR_LEN_3A; - roam_info->pbFrames = cdf_mem_malloc(roam_info->nBeaconLength + + roam_info->pbFrames = qdf_mem_malloc(roam_info->nBeaconLength + roam_info->nAssocReqLength + roam_info->nAssocRspLength); if (NULL == roam_info->pbFrames) { sms_log(mac_ctx, LOGE, FL("no memory available")); session->roam_synch_in_progress = false; if (roam_info) - cdf_mem_free(roam_info); + qdf_mem_free(roam_info); sme_release_global_lock(&mac_ctx->sme); return; } - cdf_mem_zero(roam_info->pbFrames, roam_info->nBeaconLength + + qdf_mem_zero(roam_info->pbFrames, roam_info->nBeaconLength + roam_info->nAssocReqLength + roam_info->nAssocRspLength); - cdf_mem_copy(roam_info->pbFrames, + qdf_mem_copy(roam_info->pbFrames, (uint8_t *)roam_synch_data + roam_synch_data->reassoc_req_offset + SIR_MAC_HDR_LEN_3A + SIR_MAC_REASSOC_SSID_OFFSET, roam_info->nAssocReqLength); - cdf_mem_copy(roam_info->pbFrames + roam_info->nAssocReqLength, + qdf_mem_copy(roam_info->pbFrames + roam_info->nAssocReqLength, (uint8_t *)roam_synch_data + roam_synch_data->reassocRespOffset + SIR_MAC_HDR_LEN_3A, @@ -19149,9 +19149,9 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, } roam_info->roamSynchInProgress = true; roam_info->synchAuthStatus = roam_synch_data->authStatus; - cdf_mem_copy(roam_info->kck, roam_synch_data->kck, SIR_KCK_KEY_LEN); - cdf_mem_copy(roam_info->kek, roam_synch_data->kek, SIR_KEK_KEY_LEN); - cdf_mem_copy(roam_info->replay_ctr, roam_synch_data->replay_ctr, + qdf_mem_copy(roam_info->kck, roam_synch_data->kck, SIR_KCK_KEY_LEN); + qdf_mem_copy(roam_info->kek, roam_synch_data->kek, SIR_KEK_KEY_LEN); + qdf_mem_copy(roam_info->replay_ctr, roam_synch_data->replay_ctr, SIR_REPLAY_CTR_LEN); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, FL("LFR3: Copy KCK, KEK and Replay Ctr")); @@ -19172,7 +19172,7 @@ void csr_roam_synch_callback(tpAniSirGlobal mac_ctx, } session->fRoaming = false; session->roam_synch_in_progress = false; - cdf_mem_free(roam_info->pbFrames); - cdf_mem_free(roam_info); + qdf_mem_free(roam_info->pbFrames); + qdf_mem_free(roam_info); sme_release_global_lock(&mac_ctx->sme); } diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index c587ca589e13..4054ffea9b5d 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -133,9 +133,9 @@ static void csr_release_scan_cmd_pending_list(tpAniSirGlobal pMac) void csr_free_scan_result_entry(tpAniSirGlobal pMac, tCsrScanResult *pResult) { if (NULL != pResult->Result.pvIes) { - cdf_mem_free(pResult->Result.pvIes); + qdf_mem_free(pResult->Result.pvIes); } - cdf_mem_free(pResult); + qdf_mem_free(pResult); } static QDF_STATUS csr_ll_scan_purge_result(tpAniSirGlobal pMac, @@ -320,7 +320,7 @@ csr_scan_2g_only_request(tpAniSirGlobal mac_ctx, /* Contsruct valid Supported 2.4 GHz Channel List */ if (NULL == scan_req->ChannelInfo.ChannelList) { scan_req->ChannelInfo.ChannelList = - cdf_mem_malloc(NUM_24GHZ_CHANNELS); + qdf_mem_malloc(NUM_24GHZ_CHANNELS); if (NULL == scan_req->ChannelInfo.ChannelList) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed.")); return QDF_STATUS_E_NOMEM; @@ -400,20 +400,20 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, && (false == mac_ctx->scan.fEnableBypass11d))) return QDF_STATUS_SUCCESS; - cdf_mem_set(&tmp_rq, sizeof(tCsrScanRequest), 0); + qdf_mem_set(&tmp_rq, sizeof(tCsrScanRequest), 0); scan_11d_cmd = csr_get_command_buffer(mac_ctx); if (!scan_11d_cmd) { sms_log(mac_ctx, LOGE, FL("scan_11d_cmd failed")); return QDF_STATUS_E_FAILURE; } - cdf_mem_set(&scan_11d_cmd->u.scanCmd, sizeof(tScanCmd), 0); - pChnInfo->ChannelList = cdf_mem_malloc(numChn); + qdf_mem_set(&scan_11d_cmd->u.scanCmd, sizeof(tScanCmd), 0); + pChnInfo->ChannelList = qdf_mem_malloc(numChn); if (NULL == pChnInfo->ChannelList) { sms_log(mac_ctx, LOGE, FL("Failed to allocate memory")); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pChnInfo->ChannelList, + qdf_mem_copy(pChnInfo->ChannelList, mac_ctx->scan.base_channels.channelList, numChn); pChnInfo->numOfChannels = (uint8_t) numChn; @@ -461,7 +461,7 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, status = csr_scan_copy_request(mac_ctx, &scan_11d_cmd->u.scanCmd.u.scanRequest, &tmp_rq); /* Free the channel list */ - cdf_mem_free(pChnInfo->ChannelList); + qdf_mem_free(pChnInfo->ChannelList); pChnInfo->ChannelList = NULL; if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(mac_ctx, LOGE, FL("csr_scan_copy_request failed")); @@ -531,7 +531,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, goto release_cmd; } - cdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0); scan_cmd->command = eSmeCommandScan; scan_cmd->sessionId = sessionId; if (scan_cmd->sessionId >= CSR_ROAM_SESSION_MAX) @@ -664,12 +664,12 @@ QDF_STATUS csr_issue_roam_after_lostlink_scan(tpAniSirGlobal pMac, goto free_filter; } /* Here is the profile we need to connect to */ - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) { status = QDF_STATUS_E_NOMEM; goto free_filter; } - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); if (NULL == pSession->pCurRoamProfile) { pScanFilter->EncryptionType.numEntries = 1; pScanFilter->EncryptionType.encryptionType[0] = @@ -679,12 +679,12 @@ QDF_STATUS csr_issue_roam_after_lostlink_scan(tpAniSirGlobal pMac, * We have to make a copy of pCurRoamProfile because it will * be free inside csr_roam_issue_connect */ - pProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile)); + pProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (NULL == pProfile) { status = QDF_STATUS_E_NOMEM; goto free_filter; } - cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); status = csr_roam_copy_profile(pMac, pProfile, pSession->pCurRoamProfile); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -715,11 +715,11 @@ free_filter: if (pScanFilter) { /* we need to free memory for filter if profile exists */ csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); } if (NULL != pProfile) { csr_release_profile(pMac, pProfile); - cdf_mem_free(pProfile); + qdf_mem_free(pProfile); } return status; } @@ -818,11 +818,11 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, * on error: following memory will be released by call to * csr_release_command_scan in the end */ - ssid_list->SSIDList = cdf_mem_malloc(sizeof(tCsrSSIDInfo)); + ssid_list->SSIDList = qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (NULL == ssid_list->SSIDList) return QDF_STATUS_E_NOMEM; ssid_list->numOfSSIDs = 1; - cdf_mem_copy(&ssid_list->SSIDList[0].SSID, + qdf_mem_copy(&ssid_list->SSIDList[0].SSID, &pSession->connectedProfile.SSID, sizeof(tSirMacSSid)); } else { @@ -832,11 +832,11 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, if (!pSession->pCurRoamProfile) return QDF_STATUS_SUCCESS; - scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == scan_filter) return QDF_STATUS_E_NOMEM; - cdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0); status = csr_roam_prepare_filter_from_profile(mac_ctx, pSession->pCurRoamProfile, scan_filter); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -846,7 +846,7 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, &bss_lst)) && bss_lst)) { if (csr_roam_is_channel_valid(mac_ctx, pSession->connectedProfile.operationChannel)) { - ch_info->ChannelList = cdf_mem_malloc(1); + ch_info->ChannelList = qdf_mem_malloc(1); if (NULL == ch_info->ChannelList) { status = QDF_STATUS_E_NOMEM; goto free_lost_link1_local_mem; @@ -859,7 +859,7 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, } /* on error: this mem will be released by csr_release_command_scan */ - ch_info->ChannelList = cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN); + ch_info->ChannelList = qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN); if (NULL == ch_info->ChannelList) { status = QDF_STATUS_E_NOMEM; goto free_lost_link1_local_mem; @@ -893,7 +893,7 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, free_lost_link1_local_mem: if (scan_filter) { csr_free_scan_filter(mac_ctx, scan_filter); - cdf_mem_free(scan_filter); + qdf_mem_free(scan_filter); } if (bss_lst) csr_scan_result_purge(mac_ctx, bss_lst); @@ -929,12 +929,12 @@ csr_scan_request_lost_link1(tpAniSirGlobal mac_ctx, uint32_t session_id) status = QDF_STATUS_E_RESOURCES; goto release_lost_link1_cmd; } - cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); status = csr_update_lost_link1_cmd(mac_ctx, cmd, session, session_id); if (!QDF_IS_STATUS_SUCCESS(status)) goto release_lost_link1_cmd; - cdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid, + qdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid, sizeof(struct qdf_mac_addr), 0xFF); status = csr_queue_sme_command(mac_ctx, cmd, false); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -981,11 +981,11 @@ csr_update_lost_link2_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, status = qdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &cmd); - scan_fltr = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + scan_fltr = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == scan_fltr) return QDF_STATUS_E_NOMEM; - cdf_mem_set(scan_fltr, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(scan_fltr, sizeof(tCsrScanResultFilter), 0); status = csr_roam_prepare_filter_from_profile(mac_ctx, session->pCurRoamProfile, scan_fltr); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -998,7 +998,7 @@ csr_update_lost_link2_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, if (!bss_lst) goto free_lost_link2_local_mem; - ch_info->ChannelList = cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN); + ch_info->ChannelList = qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN); if (NULL == ch_info->ChannelList) { status = QDF_STATUS_E_NOMEM; goto free_lost_link2_local_mem; @@ -1020,7 +1020,7 @@ csr_update_lost_link2_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, free_lost_link2_local_mem: if (scan_fltr) { csr_free_scan_filter(mac_ctx, scan_fltr); - cdf_mem_free(scan_fltr); + qdf_mem_free(scan_fltr); } if (bss_lst) csr_scan_result_purge(mac_ctx, bss_lst); @@ -1056,12 +1056,12 @@ csr_scan_request_lost_link2(tpAniSirGlobal mac_ctx, uint32_t session_id) status = QDF_STATUS_E_RESOURCES; goto release_lost_link2_cmd; } - cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); status = csr_update_lost_link2_cmd(mac_ctx, cmd, session_id, session); if (!QDF_IS_STATUS_SUCCESS(status)) goto release_lost_link2_cmd; - cdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid, + qdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid, sizeof(struct qdf_mac_addr), 0xFF); /* Put to the head in pending queue */ status = csr_queue_sme_command(mac_ctx, cmd, true); @@ -1101,7 +1101,7 @@ csr_scan_request_lost_link3(tpAniSirGlobal mac_ctx, uint32_t session_id) status = QDF_STATUS_E_RESOURCES; break; } - cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0); cmd->command = eSmeCommandScan; cmd->sessionId = (uint8_t) session_id; cmd->u.scanCmd.reason = eCsrScanLostLink3; @@ -1168,12 +1168,12 @@ QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac, } if (pProfile == NULL) break; - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) { status = QDF_STATUS_E_NOMEM; break; } - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); status = csr_roam_prepare_filter_from_profile(pMac, pProfile, pScanFilter); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -1206,7 +1206,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac, } if (pScanFilter) { csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); } return status; } @@ -1238,7 +1238,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, char str[36]; tSirMacSSid *ptr_ssid = &pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID; - cdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length); + qdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length); str[ptr_ssid->length] = 0; sms_log(pMac, LOGW, FL("SSID = %s"), str); } @@ -1270,7 +1270,7 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, if (pSession->bRefAssocStartCnt > 0) { tCsrRoamInfo *pRoamInfo = NULL, roamInfo; - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; if (pCommand->u.roamCmd.pRoamBssEntry) { tCsrScanResult *pScanResult = GET_BASE_ADDR( @@ -1306,7 +1306,7 @@ QDF_STATUS csr_scan_result_purge(tpAniSirGlobal pMac, if (pScanList) { status = csr_ll_scan_purge_result(pMac, &pScanList->List); csr_ll_close(&pScanList->List); - cdf_mem_free(pScanList); + qdf_mem_free(pScanList); } return status; } @@ -1386,9 +1386,9 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi, struct qdf_mac_addr local_bssid; modified_rssi = rssi; - cdf_mem_zero(&local_bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_zero(&local_bssid.bytes, QDF_MAC_ADDR_SIZE); if (bssid) - cdf_mem_copy(local_bssid.bytes, bssid->bytes, + qdf_mem_copy(local_bssid.bytes, bssid->bytes, QDF_MAC_ADDR_SIZE); roam_params = &mac_ctx->roam.configParam.roam_params; /* @@ -1421,10 +1421,10 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi, * Check if there are preferred bssid and then apply the * preferred score */ - cdf_mem_zero(&fav_bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_zero(&fav_bssid.bytes, QDF_MAC_ADDR_SIZE); if (bssid && roam_params->num_bssid_favored) { for (i = 0; i < roam_params->num_bssid_favored; i++) { - cdf_mem_copy(fav_bssid.bytes, + qdf_mem_copy(fav_bssid.bytes, &roam_params->bssid_favored[i], QDF_MAC_ADDR_SIZE); if (!qdf_is_macaddr_equal(&fav_bssid, bssid)) @@ -1526,13 +1526,13 @@ static bool csr_is_better_rssi(tpAniSirGlobal mac_ctx, * Apply the boost and penlty logic and check * which is the best RSSI */ - cdf_mem_zero(&local_mac.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&local_mac.bytes, + qdf_mem_zero(&local_mac.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(&local_mac.bytes, &bss1->Result.BssDescriptor.bssId, QDF_MAC_ADDR_SIZE); rssi1 = csr_get_altered_rssi(mac_ctx, rssi1, bss1->Result.BssDescriptor.channelId, &local_mac); - cdf_mem_copy(&local_mac.bytes, + qdf_mem_copy(&local_mac.bytes, &bss2->Result.BssDescriptor.bssId, QDF_MAC_ADDR_SIZE); rssi2 = csr_get_altered_rssi(mac_ctx, rssi2, bss2->Result.BssDescriptor.channelId, @@ -1626,8 +1626,8 @@ static void csr_scan_add_result(tpAniSirGlobal pMac, tCsrScanResult *pResult, struct qdf_mac_addr bssid; uint8_t channel_id = pResult->Result.BssDescriptor.channelId; - cdf_mem_zero(&bssid.bytes, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(bssid.bytes, &pResult->Result.BssDescriptor.bssId, + qdf_mem_zero(&bssid.bytes, QDF_MAC_ADDR_SIZE); + qdf_mem_copy(bssid.bytes, &pResult->Result.BssDescriptor.bssId, QDF_MAC_ADDR_SIZE); pResult->preferValue = csr_get_bss_prefer_value(pMac, (int)pResult->Result.BssDescriptor.rssi, @@ -1684,7 +1684,7 @@ csr_parser_scan_result_for_5ghz_preference(tpAniSirGlobal pMac, fMatch = true; sms_log(pMac, LOG1, FL("Security Matched")); if ((pBssDesc->Result.pvIes == NULL) && pIes) - cdf_mem_free(pIes); + qdf_mem_free(pIes); continue; } #ifdef WLAN_FEATURE_11W @@ -1705,7 +1705,7 @@ csr_parser_scan_result_for_5ghz_preference(tpAniSirGlobal pMac, pIes, NULL, NULL, NULL); #endif if ((pBssDesc->Result.pvIes == NULL) && pIes) - cdf_mem_free(pIes); + qdf_mem_free(pIes); if (fMatch) sms_log(pMac, LOG1, FL("Security Matched")); } /* for loop ends */ @@ -1816,7 +1816,7 @@ csr_save_ies(tpAniSirGlobal pMac, return status; /* Only save it when matching */ if (!(*fMatch) && !pBssDesc->Result.pvIes) { - cdf_mem_free(pIes); + qdf_mem_free(pIes); return status; } if (!pBssDesc->Result.pvIes) { @@ -1832,16 +1832,16 @@ csr_save_ies(tpAniSirGlobal pMac, * Only to save parsed IEs if caller provides a filter. Most likely the * caller is using to for association, hence save the parsed IEs */ - *pNewIes = cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + *pNewIes = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if (NULL == *pNewIes) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, FL("fail to allocate memory for IEs")); /* Need to free memory allocated by csr_match_bss */ if (!pBssDesc->Result.pvIes) - cdf_mem_free(pIes); + qdf_mem_free(pIes); return status; } - cdf_mem_copy(*pNewIes, pIes, sizeof(tDot11fBeaconIEs)); + qdf_mem_copy(*pNewIes, pIes, sizeof(tDot11fBeaconIEs)); return status; } @@ -1870,17 +1870,17 @@ csr_save_scan_entry(tpAniSirGlobal pMac, bssLen = pBssDesc->Result.BssDescriptor.length + sizeof(pBssDesc->Result.BssDescriptor.length); allocLen = sizeof(tCsrScanResult) + bssLen; - pResult = cdf_mem_malloc(allocLen); + pResult = qdf_mem_malloc(allocLen); if (NULL == pResult) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, FL("fail to allocate memory for scan result, len=%d"), allocLen); if (pNewIes) - cdf_mem_free(pNewIes); + qdf_mem_free(pNewIes); return status; } - cdf_mem_set(pResult, allocLen, 0); + qdf_mem_set(pResult, allocLen, 0); pResult->capValue = pBssDesc->capValue; pResult->preferValue = pBssDesc->preferValue; pResult->ucEncryptionType = uc; @@ -1891,7 +1891,7 @@ csr_save_scan_entry(tpAniSirGlobal pMac, /* save the pIes for later use */ pResult->Result.pvIes = pNewIes; /* save bss description */ - cdf_mem_copy(&pResult->Result.BssDescriptor, + qdf_mem_copy(&pResult->Result.BssDescriptor, &pBssDesc->Result.BssDescriptor, bssLen); /* @@ -2059,13 +2059,13 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, csr_prefer_5ghz(pMac, pFilter); - pRetList = cdf_mem_malloc(sizeof(tScanResultList)); + pRetList = qdf_mem_malloc(sizeof(tScanResultList)); if (NULL == pRetList) { sms_log(pMac, LOGE, FL("pRetList is NULL")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(pRetList, sizeof(tScanResultList), 0); + qdf_mem_set(pRetList, sizeof(tScanResultList), 0); csr_ll_open(pMac->hHdd, &pRetList->List); pRetList->pCurEntry = NULL; status = csr_parse_scan_results(pMac, pFilter, pRetList, &count); @@ -2078,7 +2078,7 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, if (0 == count) { /* We are here meaning the there is no match */ csr_ll_close(&pRetList->List); - cdf_mem_free(pRetList); + qdf_mem_free(pRetList); status = QDF_STATUS_E_NULL_VALUE; } else if (phResult) { *phResult = pRetList; @@ -2140,7 +2140,7 @@ QDF_STATUS csr_scan_flush_selective_result(tpAniSirGlobal pMac, bool flushP2P) pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK); while (pEntry != NULL) { pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); - if (flushP2P == cdf_mem_compare(pBssDesc->Result.ssId.ssId, + if (flushP2P != qdf_mem_cmp(pBssDesc->Result.ssId.ssId, "DIRECT-", 7)) { pFreeElem = pEntry; pEntry = csr_ll_next(pList, pEntry, LL_ACCESS_NOLOCK); @@ -2168,7 +2168,7 @@ void csr_scan_flush_bss_entry(tpAniSirGlobal pMac, pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK); while (pEntry != NULL) { pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); - if (cdf_mem_compare(pBssDesc->Result.BssDescriptor.bssId, + if (!qdf_mem_cmp(pBssDesc->Result.BssDescriptor.bssId, pCsaOffloadInd->bssid.bytes, QDF_MAC_ADDR_SIZE)) { pFreeElem = pEntry; pEntry = csr_ll_next(pList, pEntry, LL_ACCESS_NOLOCK); @@ -2320,11 +2320,11 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, if (phResult) { *phResult = CSR_INVALID_SCANRESULT_HANDLE; } - pRetList = cdf_mem_malloc(sizeof(tScanResultList)); + pRetList = qdf_mem_malloc(sizeof(tScanResultList)); if (NULL == pRetList) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set(pRetList, sizeof(tScanResultList), 0); + qdf_mem_set(pRetList, sizeof(tScanResultList), 0); csr_ll_open(pMac->hHdd, &pRetList->List); pRetList->pCurEntry = NULL; csr_ll_lock(&pMac->scan.scanResultList); @@ -2338,7 +2338,7 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, pScanResult->Result.BssDescriptor.length + sizeof(pScanResult->Result.BssDescriptor.length); allocLen = sizeof(tCsrScanResult) + bssLen; - pResult = cdf_mem_malloc(allocLen); + pResult = qdf_mem_malloc(allocLen); if (NULL == pResult) status = QDF_STATUS_E_NOMEM; else @@ -2350,27 +2350,27 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, count = 0; break; } - cdf_mem_set(pResult, allocLen, 0); - cdf_mem_copy(&pResult->Result.BssDescriptor, + qdf_mem_set(pResult, allocLen, 0); + qdf_mem_copy(&pResult->Result.BssDescriptor, &pScanResult->Result.BssDescriptor, bssLen); if (pScanResult->Result.pvIes) { pResult->Result.pvIes = - cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if (NULL == pResult->Result.pvIes) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; if (!QDF_IS_STATUS_SUCCESS(status)) { /* Free the memory we allocate above first */ - cdf_mem_free(pResult); + qdf_mem_free(pResult); csr_scan_result_purge(pMac, (tScanResultHandle *) pRetList); count = 0; break; } - cdf_mem_copy(pResult->Result.pvIes, + qdf_mem_copy(pResult->Result.pvIes, pScanResult->Result.pvIes, sizeof(tDot11fBeaconIEs)); } @@ -2386,7 +2386,7 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, if (QDF_IS_STATUS_SUCCESS(status)) { if (0 == count) { csr_ll_close(&pRetList->List); - cdf_mem_free(pRetList); + qdf_mem_free(pRetList); status = QDF_STATUS_E_NULL_VALUE; } else if (phResult) { *phResult = pRetList; @@ -2430,7 +2430,7 @@ QDF_STATUS csr_scanning_state_msg_processor(tpAniSirGlobal pMac, sms_log(pMac, LOG1, FL("Scanning: ASSOC cnf can be given to upper layer")); - cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); + qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; pUpperLayerAssocCnf = (tSirSmeAssocIndToUpperLayerCnf *) pMsgBuf; status = csr_roam_get_session_id_from_bssid(pMac, @@ -2450,10 +2450,10 @@ QDF_STATUS csr_scanning_state_msg_processor(tpAniSirGlobal pMac, pRoamInfo->prsnIE = pUpperLayerAssocCnf->rsnIE.rsnIEdata; pRoamInfo->addIELen = (uint8_t) pUpperLayerAssocCnf->addIE.length; pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata; - cdf_mem_copy(pRoamInfo->peerMac.bytes, + qdf_mem_copy(pRoamInfo->peerMac.bytes, pUpperLayerAssocCnf->peerMacAddr, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(&pRoamInfo->bssid.bytes, pUpperLayerAssocCnf->bssId, + qdf_mem_copy(&pRoamInfo->bssid.bytes, pUpperLayerAssocCnf->bssId, QDF_MAC_ADDR_SIZE); pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta; if (CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile)) { @@ -2491,7 +2491,7 @@ void csr_check_n_save_wsc_ie(tpAniSirGlobal pMac, tSirBssDescription *pNewBssDes /* Founrd it */ if ((DOT11F_IE_WSCPROBERES_MAX_LEN - 2) >= pbIe[1]) { - cdf_mem_copy(pNewBssDescr-> + qdf_mem_copy(pNewBssDescr-> WscIeProbeRsp, pbIe, pbIe[1] + 2); pNewBssDescr->WscIeLen = pbIe[1] + 2; @@ -2619,14 +2619,14 @@ QDF_STATUS csr_add_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId, /* BSS is capable of doing pre-authentication */ #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR - cdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), + qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type), 0); secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND; secEvent.encryptionModeMulticast = (uint8_t)diag_enc_type_from_csr_type( pSession->connectedProfile.mcEncryptionType); secEvent.encryptionModeUnicast = (uint8_t)diag_enc_type_from_csr_type( pSession->connectedProfile.EncryptionType); - cdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes, + qdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes, QDF_MAC_ADDR_SIZE); secEvent.authMode = (uint8_t)diag_auth_type_from_csr_type( pSession->connectedProfile.AuthType); @@ -2635,7 +2635,7 @@ QDF_STATUS csr_add_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId, pmkid_info = &pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate]; /* if yes, then add to PMKIDCandidateList */ - cdf_mem_copy(pmkid_info->BSSID.bytes, pBssDesc->bssId, + qdf_mem_copy(pmkid_info->BSSID.bytes, pBssDesc->bssId, QDF_MAC_ADDR_SIZE); /* Bit 0 offirst byte - PreAuthentication Capability */ if ((pIes->RSN.RSN_Cap[0] >> 0) & 0x1) @@ -2668,7 +2668,7 @@ QDF_STATUS csr_process_bss_desc_for_pmkid_list(tpAniSirGlobal pMac, if (!CSR_IS_SESSION_VALID(pMac, sessionId)) { if (!pIes) - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); return status; } @@ -2689,7 +2689,7 @@ QDF_STATUS csr_process_bss_desc_for_pmkid_list(tpAniSirGlobal pMac, } if (!pIes) - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); return status; } @@ -2717,7 +2717,7 @@ QDF_STATUS csr_add_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId, if (pSession->NumBkidCandidate < CSR_MAX_BKID_ALLOWED) { /* if yes, then add to BKIDCandidateList */ - cdf_mem_copy(pSession-> + qdf_mem_copy(pSession-> BkidCandidateInfo[pSession-> NumBkidCandidate]. BSSID.bytes, pBssDesc->bssId, @@ -2779,7 +2779,7 @@ bool csr_process_bss_desc_for_bkid_list(tpAniSirGlobal pMac, } } if (!pIes) - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); return fRC; } @@ -2828,7 +2828,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, if (CSR_SCAN_IS_OVER_BSS_LIMIT(mac_ctx)) { sms_log(mac_ctx, LOGW, FL("BSS limit reached")); if ((bss_dscp->Result.pvIes == NULL) && local_ie) - cdf_mem_free(local_ie); + qdf_mem_free(local_ie); csr_free_scan_result_entry(mac_ctx, bss_dscp); /* Continue because there may be duplicated BSS */ continue; @@ -2885,7 +2885,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, /* append to main list */ csr_scan_add_result(mac_ctx, bss_dscp, local_ie, session_id); if ((bss_dscp->Result.pvIes == NULL) && local_ie) - cdf_mem_free(local_ie); + qdf_mem_free(local_ie); } /* end of loop */ } @@ -2935,9 +2935,9 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, cbAllocated = sizeof(tCsrScanResult) + cbBSSDesc; - pCsrBssDescription = cdf_mem_malloc(cbAllocated); + pCsrBssDescription = qdf_mem_malloc(cbAllocated); if (NULL != pCsrBssDescription) { - cdf_mem_set(pCsrBssDescription, cbAllocated, 0); + qdf_mem_set(pCsrBssDescription, cbAllocated, 0); pCsrBssDescription->AgingCount = (int32_t) pMac->roam.configParam.agingCount; sms_log(pMac, LOGW, @@ -2945,7 +2945,7 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, pCsrBssDescription->AgingCount, MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor. bssId)); - cdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor, + qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor, pBSSDescription, cbBSSDesc); #if defined(CDF_ENSBALED) if (NULL != pCsrBssDescription->Result.pvIes) { @@ -3019,7 +3019,7 @@ void csr_purge_channel_power(tpAniSirGlobal pMac, tDblLinkList *pChannelList) LL_ACCESS_NOLOCK)) != NULL) { pChannelSet = GET_BASE_ADDR(pEntry, tCsrChannelPowerInfo, link); if (pChannelSet) - cdf_mem_free(pChannelSet); + qdf_mem_free(pChannelSet); } csr_ll_unlock(pChannelList); return; @@ -3043,12 +3043,12 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, pChannelInfo = channelTable; /* atleast 3 bytes have to be remaining -- from "countryString" */ while (i--) { - pChannelSet = cdf_mem_malloc(sizeof(tCsrChannelPowerInfo)); + pChannelSet = qdf_mem_malloc(sizeof(tCsrChannelPowerInfo)); if (NULL == pChannelSet) { pChannelInfo++; continue; } - cdf_mem_set(pChannelSet, sizeof(tCsrChannelPowerInfo), 0); + qdf_mem_set(pChannelSet, sizeof(tCsrChannelPowerInfo), 0); pChannelSet->firstChannel = pChannelInfo->firstChanNum; pChannelSet->numChannels = pChannelInfo->numChannels; /* @@ -3071,7 +3071,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, sms_log(pMac, LOGW, FL("Invalid Channel %d Present in Country IE"), pChannelSet->firstChannel); - cdf_mem_free(pChannelSet); + qdf_mem_free(pChannelSet); return QDF_STATUS_E_FAILURE; } pChannelSet->txPower = QDF_MIN(pChannelInfo->maxTxPower, @@ -3094,7 +3094,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, sms_log(pMac, LOGW, FL("Adding 11B/G ch in 11A. 1st ch %d"), pChannelSet->firstChannel); - cdf_mem_free(pChannelSet); + qdf_mem_free(pChannelSet); } } else { /* 5GHz info found */ @@ -3115,7 +3115,7 @@ QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, sms_log(pMac, LOGW, FL("Adding 11A ch in B/G. 1st ch %d"), pChannelSet->firstChannel); - cdf_mem_free(pChannelSet); + qdf_mem_free(pChannelSet); } } pChannelInfo++; /* move to next entry */ @@ -3129,9 +3129,9 @@ static void csr_clear_dfs_channel_list(tpAniSirGlobal pMac) uint16_t msgLen; msgLen = (uint16_t) (sizeof(tSirMbMsg)); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL != pMsg) { - cdf_mem_set((void *)pMsg, msgLen, 0); + qdf_mem_set((void *)pMsg, msgLen, 0); pMsg->type = eWNI_SME_CLEAR_DFS_CHANNEL_LIST; pMsg->msgLen = msgLen; cds_send_mb_message_to_mac(pMsg); @@ -3194,10 +3194,10 @@ static void csr_diag_reset_country_information(tpAniSirGlobal pMac) return; p11dLog->eventId = WLAN_80211D_EVENT_RESET; - cdf_mem_copy(p11dLog->countryCode, pMac->scan.countryCodeCurrent, 3); + qdf_mem_copy(p11dLog->countryCode, pMac->scan.countryCodeCurrent, 3); p11dLog->numChannel = pMac->scan.base_channels.numChannels; if (p11dLog->numChannel <= HOST_LOG_MAX_NUM_CHANNEL) { - cdf_mem_copy(p11dLog->Channels, + qdf_mem_copy(p11dLog->Channels, pMac->scan.base_channels.channelList, p11dLog->numChannel); for (Index = 0; @@ -3238,13 +3238,13 @@ void csr_apply_channel_power_info_wrapper(tpAniSirGlobal pMac) csr_apply_channel_power_info_to_fw(pMac, &pMac->scan.base_channels, pMac->scan.countryCodeCurrent); /* clear the 11d channel list */ - cdf_mem_set(&pMac->scan.channels11d, sizeof(pMac->scan.channels11d), 0); + qdf_mem_set(&pMac->scan.channels11d, sizeof(pMac->scan.channels11d), 0); } void csr_clear_votes_for_country_info(tpAniSirGlobal pMac) { pMac->scan.countryCodeCount = 0; - cdf_mem_set(pMac->scan.votes11d, + qdf_mem_set(pMac->scan.votes11d, sizeof(tCsrVotes11d) * CSR_MAX_NUM_COUNTRY_CODE, 0); } @@ -3286,7 +3286,7 @@ void csr_add_vote_for_country_info(tpAniSirGlobal pMac, uint8_t *pCountryCode) } for (i = 0; i < pMac->scan.countryCodeCount; i++) { - match = (cdf_mem_compare(pMac->scan.votes11d[i].countryCode, + match = (!qdf_mem_cmp(pMac->scan.votes11d[i].countryCode, pCountryCode, 2)); if (match) { break; @@ -3296,7 +3296,7 @@ void csr_add_vote_for_country_info(tpAniSirGlobal pMac, uint8_t *pCountryCode) if (match) { pMac->scan.votes11d[i].votes++; } else { - cdf_mem_copy(pMac->scan.votes11d[pMac->scan.countryCodeCount]. + qdf_mem_copy(pMac->scan.votes11d[pMac->scan.countryCodeCount]. countryCode, pCountryCode, 3); pMac->scan.votes11d[pMac->scan.countryCodeCount].votes = 1; pMac->scan.countryCodeCount++; @@ -3335,10 +3335,10 @@ bool csr_elected_country_info(tpAniSirGlobal pMac) } if (fRet) { - cdf_mem_copy(pMac->scan.countryCodeElected, + qdf_mem_copy(pMac->scan.countryCodeElected, pMac->scan.votes11d[j].countryCode, WNI_CFG_COUNTRY_CODE_LEN); - cdf_mem_copy(pMac->scan.countryCode11d, + qdf_mem_copy(pMac->scan.countryCode11d, pMac->scan.votes11d[j].countryCode, WNI_CFG_COUNTRY_CODE_LEN); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, @@ -3370,7 +3370,7 @@ QDF_STATUS csr_set_country_code(tpAniSirGlobal pMac, uint8_t *pCountry) &domainId, SOURCE_USERSPACE); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_copy(pMac->scan.countryCodeCurrent, + qdf_mem_copy(pMac->scan.countryCodeCurrent, pCountry, WNI_CFG_COUNTRY_CODE_LEN); csr_set_cfg_country_code(pMac, pCountry); @@ -3421,12 +3421,12 @@ void csr_diag_apply_country_info(tpAniSirGlobal mac_ctx) return; p11dLog->eventId = WLAN_80211D_EVENT_COUNTRY_SET; - cdf_mem_copy(p11dLog->countryCode, mac_ctx->scan.countryCode11d, 3); + qdf_mem_copy(p11dLog->countryCode, mac_ctx->scan.countryCode11d, 3); p11dLog->numChannel = mac_ctx->scan.channels11d.numChannels; if (p11dLog->numChannel > HOST_LOG_MAX_NUM_CHANNEL) goto diag_end; - cdf_mem_copy(p11dLog->Channels, + qdf_mem_copy(p11dLog->Channels, mac_ctx->scan.channels11d.channelList, p11dLog->numChannel); csr_get_channel_power_info(mac_ctx, @@ -3513,12 +3513,12 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f) pMac->scan.base_channels.numChannels : WNI_CFG_VALID_CHANNEL_LIST_LEN; - chan_info = cdf_mem_malloc(sizeof(tSirMacChanInfo) * + chan_info = qdf_mem_malloc(sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN); if (NULL == chan_info) return; - cdf_mem_set(chan_info, sizeof(tSirMacChanInfo) * + qdf_mem_set(chan_info, sizeof(tSirMacChanInfo) * WNI_CFG_VALID_CHANNEL_LIST_LEN, 0); ch_info_start = chan_info; for (idx = 0; idx < max_ch_idx; idx++) { @@ -3546,7 +3546,7 @@ void csr_save_channel_power_for_band(tpAniSirGlobal pMac, bool fill_5f) csr_save_to_channel_power2_g_5_g(pMac, count * sizeof(tSirMacChanInfo), ch_info_start); } - cdf_mem_free(ch_info_start); + qdf_mem_free(ch_info_start); } bool csr_is_supported_channel(tpAniSirGlobal pMac, uint8_t channelId) @@ -3618,13 +3618,13 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac, } /* updating 11d Country Code with Country code selected. */ - cdf_mem_copy(pMac->scan.countryCode11d, pCountryCodeSelected, + qdf_mem_copy(pMac->scan.countryCode11d, pCountryCodeSelected, WNI_CFG_COUNTRY_CODE_LEN); fRet = true; free_ie: if (!pIes && pIesLocal) { /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return fRet; } @@ -3657,9 +3657,9 @@ void csr_reinit_scan_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) } if (pCommand->u.scanCmd.pToRoamProfile) { csr_release_profile(pMac, pCommand->u.scanCmd.pToRoamProfile); - cdf_mem_free(pCommand->u.scanCmd.pToRoamProfile); + qdf_mem_free(pCommand->u.scanCmd.pToRoamProfile); } - cdf_mem_set(&pCommand->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&pCommand->u.scanCmd, sizeof(tScanCmd), 0); } eCsrScanCompleteNextCommand csr_scan_get_next_command_state(tpAniSirGlobal pMac, @@ -3800,15 +3800,15 @@ csr_diag_scan_complete(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL("fail to parse IEs")); break; } - cdf_mem_copy(pScanLog->bssid[n], + qdf_mem_copy(pScanLog->bssid[n], pScanResult->BssDescriptor.bssId, 6); if (pIes && pIes->SSID.present && HOST_LOG_MAX_SSID_SIZE >= pIes->SSID.num_ssid) { - cdf_mem_copy(pScanLog->ssid[n], + qdf_mem_copy(pScanLog->ssid[n], pIes->SSID.ssid, pIes->SSID.num_ssid); } - cdf_mem_free(pIes); + qdf_mem_free(pIes); n++; } c++; @@ -3846,7 +3846,7 @@ QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, QDF_STATUS status; save_cmd->u.scanCmd.pToRoamProfile = - cdf_mem_malloc(sizeof(tCsrRoamProfile)); + qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (!save_cmd->u.scanCmd.pToRoamProfile) { sms_log(mac_ctx, LOGE, FL("pToRoamProfile mem fail")); goto error; @@ -3865,7 +3865,7 @@ QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs = command->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs; save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList = - cdf_mem_malloc( + qdf_mem_malloc( save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo)); if (!save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) { @@ -3873,7 +3873,7 @@ QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, goto error; } - cdf_mem_copy(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList, + qdf_mem_copy(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList, command->u.scanCmd.u.scanRequest.SSIDs.SSIDList, save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo)); @@ -3887,7 +3887,7 @@ QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, bss_len = scan_result->Result.BssDescriptor.length + sizeof(scan_result->Result.BssDescriptor.length); - temp = cdf_mem_malloc(sizeof(tCsrScanResult) + bss_len); + temp = qdf_mem_malloc(sizeof(tCsrScanResult) + bss_len); if (!temp) { sms_log(mac_ctx, LOGE, FL("bss mem fail")); goto error; @@ -3902,15 +3902,15 @@ QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, /* pvIes is unsued in success/failure */ temp->Result.pvIes = NULL; - cdf_mem_copy(temp->Result.pvIes, + qdf_mem_copy(temp->Result.pvIes, scan_result->Result.pvIes, sizeof(*scan_result->Result.pvIes)); temp->Result.ssId.length = scan_result->Result.ssId.length; - cdf_mem_copy(temp->Result.ssId.ssId, + qdf_mem_copy(temp->Result.ssId.ssId, scan_result->Result.ssId.ssId, sizeof(scan_result->Result.ssId.ssId)); temp->Result.timer = scan_result->Result.timer; - cdf_mem_copy(&temp->Result.BssDescriptor, + qdf_mem_copy(&temp->Result.BssDescriptor, &scan_result->Result.BssDescriptor, sizeof(temp->Result.BssDescriptor)); temp->Link.last = temp->Link.next = NULL; @@ -3921,11 +3921,11 @@ error: csr_scan_handle_search_for_ssid_failure(mac_ctx, command); if (save_cmd->u.roamCmd.pRoamBssEntry) - cdf_mem_free(save_cmd->u.roamCmd.pRoamBssEntry); + qdf_mem_free(save_cmd->u.roamCmd.pRoamBssEntry); if (save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) - cdf_mem_free(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList); + qdf_mem_free(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList); if (save_cmd->u.scanCmd.pToRoamProfile) - cdf_mem_free(save_cmd->u.scanCmd.pToRoamProfile); + qdf_mem_free(save_cmd->u.scanCmd.pToRoamProfile); return QDF_STATUS_E_FAILURE; } @@ -4003,13 +4003,13 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, sms_log(mac_ctx, LOG1, FL("chan: %d session: %d status: %d"), chan, pCommand->sessionId, ret); if (mac_ctx->sme.saved_scan_cmd) { - cdf_mem_free(mac_ctx->sme.saved_scan_cmd); + qdf_mem_free(mac_ctx->sme.saved_scan_cmd); mac_ctx->sme.saved_scan_cmd = NULL; sms_log(mac_ctx, LOGE, FL("memory should have been free. Check!")); } - save_cmd = (tSmeCmd *) cdf_mem_malloc(sizeof(*pCommand)); + save_cmd = (tSmeCmd *) qdf_mem_malloc(sizeof(*pCommand)); if (!save_cmd) { sms_log(mac_ctx, LOGE, FL("save_cmd mem fail")); goto error; @@ -4020,7 +4020,7 @@ csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, /* csr_save_profile should report error */ sms_log(mac_ctx, LOGE, FL("profile save failed %d"), status); - cdf_mem_free(save_cmd); + qdf_mem_free(save_cmd); return; } @@ -4032,7 +4032,7 @@ error: csr_scan_handle_search_for_ssid_failure(mac_ctx, pCommand); if (mac_ctx->sme.saved_scan_cmd) { - cdf_mem_free(mac_ctx->sme.saved_scan_cmd); + qdf_mem_free(mac_ctx->sme.saved_scan_cmd); mac_ctx->sme.saved_scan_cmd = NULL; } } else if ((QDF_STATUS_E_NOSUPPORT == ret) || @@ -4040,7 +4040,7 @@ error: sms_log(mac_ctx, LOGE, FL("conn update ret %d"), ret); csr_scan_handle_search_for_ssid(mac_ctx, pCommand); if (mac_ctx->sme.saved_scan_cmd) { - cdf_mem_free(mac_ctx->sme.saved_scan_cmd); + qdf_mem_free(mac_ctx->sme.saved_scan_cmd); mac_ctx->sme.saved_scan_cmd = NULL; } } @@ -4256,10 +4256,10 @@ tCsrScanResult *csr_scan_save_bss_description_to_interim_list(tpAniSirGlobal pMa sms_log(pMac, LOG4, FL("new BSS description, length %d, cbBSSDesc %d"), cbAllocated, cbBSSDesc); - pCsrBssDescription = cdf_mem_malloc(cbAllocated); + pCsrBssDescription = qdf_mem_malloc(cbAllocated); if (NULL != pCsrBssDescription) { - cdf_mem_set(pCsrBssDescription, cbAllocated, 0); - cdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor, + qdf_mem_set(pCsrBssDescription, cbAllocated, 0); + qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor, pBSSDescription, cbBSSDesc); pCsrBssDescription->AgingCount = (int32_t) pMac->roam.configParam.agingCount; @@ -4280,7 +4280,7 @@ tCsrScanResult *csr_scan_save_bss_description_to_interim_list(tpAniSirGlobal pMa pCsrBssDescription->Result.ssId.length = len; pCsrBssDescription->Result.timer = qdf_mc_timer_get_system_time(); - cdf_mem_copy(pCsrBssDescription->Result.ssId.ssId, + qdf_mem_copy(pCsrBssDescription->Result.ssId.ssId, pIes->SSID.ssid, len); } csr_ll_insert_tail(&pMac->scan.tempScanResults, @@ -4366,10 +4366,10 @@ bool csr_is_duplicate_bss_description(tpAniSirGlobal pMac, free_ies: if (pIes1) - cdf_mem_free(pIes1); + qdf_mem_free(pIes1); if ((NULL == pIes2) && pIesTemp) /* locally allocated */ - cdf_mem_free(pIesTemp); + qdf_mem_free(pIesTemp); return fMatch; } @@ -4466,7 +4466,7 @@ static bool csr_scan_validate_scan_result(tpAniSirGlobal pMac, if (valid) *ppIes = pIes; else - cdf_mem_free(pIes); + qdf_mem_free(pIes); } return valid; } @@ -4560,7 +4560,7 @@ QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal mac_ctx, csr_update_scantype(mac_ctx, ies, bssdescr->channelId); /* Free the resource */ if (ies != NULL) - cdf_mem_free(ies); + qdf_mem_free(ies); } return QDF_STATUS_SUCCESS; } @@ -4569,13 +4569,13 @@ QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal mac_ctx, bool csr_scan_is_wild_card_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand) { uint8_t bssid[QDF_MAC_ADDR_SIZE] = {0}; - bool f = cdf_mem_compare(pCommand->u.scanCmd.u.scanRequest.bssid.bytes, + bool f = qdf_mem_cmp(pCommand->u.scanCmd.u.scanRequest.bssid.bytes, bssid, sizeof(struct qdf_mac_addr)); /* * It is not a wild card scan if the bssid is not broadcast and * the number of SSID is 1. */ - return (f || (0xff == pCommand->u.scanCmd.u.scanRequest.bssid.bytes[0])) + return ((!f) || (0xff == pCommand->u.scanCmd.u.scanRequest.bssid.bytes[0])) && (pCommand->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs != 1); } @@ -4717,7 +4717,7 @@ QDF_STATUS csr_move_bss_to_head_from_bssid(tpAniSirGlobal pMac, pEntry = csr_ll_peek_head(&pResultList->List, LL_ACCESS_NOLOCK); while (pEntry) { pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); - if (cdf_mem_compare(bssid, pResult->Result.BssDescriptor.bssId, + if (!qdf_mem_cmp(bssid, pResult->Result.BssDescriptor.bssId, sizeof(struct qdf_mac_addr))) { status = QDF_STATUS_SUCCESS; csr_ll_remove_entry(&pResultList->List, pEntry, @@ -4861,7 +4861,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, pScanReq->ChannelInfo.numOfChannels)) + (pScanReq->uIEFieldLen); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) { sms_log(pMac, LOGE, FL("memory allocation failed")); sms_log(pMac, LOG1, FL("Failed: SId: %d FirstMatch = %d" @@ -4883,7 +4883,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, return QDF_STATUS_E_NOMEM; } - cdf_mem_set(pMsg, msgLen, 0); + qdf_mem_set(pMsg, msgLen, 0); pMsg->messageType = eWNI_SME_SCAN_REQ; pMsg->length = msgLen; /* ToDO: Fill in session info when we need to do scan base on session */ @@ -4973,7 +4973,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, if ((pScanReq->SSIDs.numOfSSIDs != 0) && (eSIR_PASSIVE_SCAN != scanType)) { for (i = 0; i < pMsg->numSsid; i++) { - cdf_mem_copy(&pMsg->ssId[i], + qdf_mem_copy(&pMsg->ssId[i], &pScanReq->SSIDs.SSIDList[i].SSID, sizeof(tSirMacSSid)); } @@ -5000,7 +5000,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, (uint8_t) pScanReq->ChannelInfo.numOfChannels; if (pScanReq->ChannelInfo.numOfChannels) { /* Assuming the channelNumber is uint8_t (1 byte) */ - cdf_mem_copy(pMsg->channelList.channelNumber, + qdf_mem_copy(pMsg->channelList.channelNumber, pScanReq->ChannelInfo.ChannelList, pScanReq->ChannelInfo.numOfChannels); } @@ -5011,7 +5011,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, (sizeof(pMsg->channelList.channelNumber) * pScanReq->ChannelInfo.numOfChannels)); if (pScanReq->uIEFieldLen != 0) { - cdf_mem_copy((uint8_t *) pMsg + pMsg->uIEFieldOffset, + qdf_mem_copy((uint8_t *) pMsg + pMsg->uIEFieldOffset, pScanReq->pIEField, pScanReq->uIEFieldLen); } pMsg->p2pSearch = pScanReq->p2pSearch; @@ -5037,7 +5037,7 @@ send_scan_req: sms_log(pMac, LOGE, FL("failed to send down scan req with status = %d"), status); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); } return status; } @@ -5051,11 +5051,11 @@ QDF_STATUS csr_send_mb_scan_result_req(tpAniSirGlobal pMac, uint16_t msgLen; msgLen = (uint16_t) (sizeof(tSirSmeScanReq)); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pMsg, msgLen, 0); + qdf_mem_set(pMsg, msgLen, 0); pMsg->messageType = eWNI_SME_SCAN_REQ; pMsg->length = msgLen; pMsg->sessionId = sessionId; @@ -5104,7 +5104,7 @@ static void csr_diag_scan_channels(tpAniSirGlobal pMac, tSmeCmd *pCommand) (uint8_t) pCommand->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels; if (pScanLog->numChannel && (pScanLog->numChannel < HOST_LOG_MAX_NUM_CHANNEL)) { - cdf_mem_copy(pScanLog->channels, + qdf_mem_copy(pScanLog->channels, pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList, pScanLog->numChannel); } @@ -5164,7 +5164,7 @@ csr_issue_user_scan(tpAniSirGlobal mac_ctx, tSmeCmd *cmd) && (NULL != cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList)) { len = cmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels; /* allocate twice the channel */ - new_ch_info.ChannelList = (uint8_t *) cdf_mem_malloc(len * 2); + new_ch_info.ChannelList = (uint8_t *) qdf_mem_malloc(len * 2); ch_lst = cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList; } else { /* get the valid channel list to scan all. */ @@ -5174,7 +5174,7 @@ csr_issue_user_scan(tpAniSirGlobal mac_ctx, tSmeCmd *cmd) if (QDF_IS_STATUS_SUCCESS(status)) { /* allocate twice the channel */ new_ch_info.ChannelList = - (uint8_t *) cdf_mem_malloc(len * 2); + (uint8_t *) qdf_mem_malloc(len * 2); ch_lst = mac_ctx->roam.validChannelList; } } @@ -5193,7 +5193,7 @@ csr_issue_user_scan(tpAniSirGlobal mac_ctx, tSmeCmd *cmd) * ch_lst points to the channellist from the command, * free it. */ - cdf_mem_free( + qdf_mem_free( cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList); cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList = NULL; @@ -5333,7 +5333,7 @@ static bool csr_scan_filter_ibss_chnl_band(tpAniSirGlobal mac_ctx, dst_req->ChannelInfo.numOfChannels) ? dst_req->ChannelInfo.numOfChannels : WNI_CFG_VALID_CHANNEL_LIST_LEN; - cdf_mem_copy(valid_chnl_list, dst_req->ChannelInfo.ChannelList, + qdf_mem_copy(valid_chnl_list, dst_req->ChannelInfo.ChannelList, valid_chnl_len); } for (i = 0; i < valid_chnl_len; i++) { @@ -5362,13 +5362,13 @@ static bool csr_scan_filter_ibss_chnl_band(tpAniSirGlobal mac_ctx, } if (dst_req->ChannelInfo.ChannelList) { - cdf_mem_free(dst_req->ChannelInfo.ChannelList); + qdf_mem_free(dst_req->ChannelInfo.ChannelList); dst_req->ChannelInfo.ChannelList = NULL; dst_req->ChannelInfo.numOfChannels = 0; } dst_req->ChannelInfo.ChannelList = - cdf_mem_malloc(filter_chnl_len * + qdf_mem_malloc(filter_chnl_len * sizeof(*dst_req->ChannelInfo.ChannelList)); dst_req->ChannelInfo.numOfChannels = filter_chnl_len; if (NULL == dst_req->ChannelInfo.ChannelList) { @@ -5376,7 +5376,7 @@ static bool csr_scan_filter_ibss_chnl_band(tpAniSirGlobal mac_ctx, FL("Memory allocation failed")); return false; } - cdf_mem_copy(dst_req->ChannelInfo.ChannelList, valid_chnl_list, + qdf_mem_copy(dst_req->ChannelInfo.ChannelList, valid_chnl_list, filter_chnl_len); return true; } @@ -5409,7 +5409,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, status = csr_scan_free_request(mac_ctx, dst_req); if (!QDF_IS_STATUS_SUCCESS(status)) goto complete; - cdf_mem_copy(dst_req, src_req, sizeof(tCsrScanRequest)); + qdf_mem_copy(dst_req, src_req, sizeof(tCsrScanRequest)); /* Re-initialize the pointers to NULL since we did a copy */ dst_req->pIEField = NULL; dst_req->ChannelInfo.ChannelList = NULL; @@ -5417,7 +5417,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, if (src_req->uIEFieldLen) { dst_req->pIEField = - cdf_mem_malloc(src_req->uIEFieldLen); + qdf_mem_malloc(src_req->uIEFieldLen); if (NULL == dst_req->pIEField) { status = QDF_STATUS_E_NOMEM; sms_log(mac_ctx, LOGE, @@ -5425,7 +5425,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, goto complete; } else { status = QDF_STATUS_SUCCESS; - cdf_mem_copy(dst_req->pIEField, src_req->pIEField, + qdf_mem_copy(dst_req->pIEField, src_req->pIEField, src_req->uIEFieldLen); dst_req->uIEFieldLen = src_req->uIEFieldLen; } @@ -5437,7 +5437,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, dst_req->ChannelInfo.numOfChannels = 0; } else { dst_req->ChannelInfo.ChannelList = - cdf_mem_malloc(src_req->ChannelInfo.numOfChannels * + qdf_mem_malloc(src_req->ChannelInfo.numOfChannels * sizeof(*dst_req->ChannelInfo.ChannelList)); if (NULL == dst_req->ChannelInfo.ChannelList) { status = QDF_STATUS_E_NOMEM; @@ -5524,7 +5524,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, dst_req->SSIDs.SSIDList = NULL; } else { dst_req->SSIDs.SSIDList = - cdf_mem_malloc(src_req->SSIDs.numOfSSIDs * + qdf_mem_malloc(src_req->SSIDs.numOfSSIDs * sizeof(*dst_req->SSIDs.SSIDList)); if (NULL == dst_req->SSIDs.SSIDList) status = QDF_STATUS_E_NOMEM; @@ -5533,7 +5533,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, if (QDF_IS_STATUS_SUCCESS(status)) { dst_req->SSIDs.numOfSSIDs = src_req->SSIDs.numOfSSIDs; - cdf_mem_copy(dst_req->SSIDs.SSIDList, + qdf_mem_copy(dst_req->SSIDs.SSIDList, src_req->SSIDs.SSIDList, src_req->SSIDs.numOfSSIDs * sizeof(*dst_req->SSIDs.SSIDList)); @@ -5562,17 +5562,17 @@ QDF_STATUS csr_scan_free_request(tpAniSirGlobal pMac, tCsrScanRequest *pReq) { if (pReq->ChannelInfo.ChannelList) { - cdf_mem_free(pReq->ChannelInfo.ChannelList); + qdf_mem_free(pReq->ChannelInfo.ChannelList); pReq->ChannelInfo.ChannelList = NULL; } pReq->ChannelInfo.numOfChannels = 0; if (pReq->pIEField) { - cdf_mem_free(pReq->pIEField); + qdf_mem_free(pReq->pIEField); pReq->pIEField = NULL; } pReq->uIEFieldLen = 0; if (pReq->SSIDs.SSIDList) { - cdf_mem_free(pReq->SSIDs.SSIDList); + qdf_mem_free(pReq->SSIDs.SSIDList); pReq->SSIDs.SSIDList = NULL; } pReq->SSIDs.numOfSSIDs = 0; @@ -5674,7 +5674,7 @@ static void csr_sta_ap_conc_timer_handler(void *pv) (csr_is_concurrent_infra_connected(mac_ctx)) && (scan_cmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) || (csr_is_p2p_session_connected(mac_ctx)))) { - cdf_mem_set(&scan_req, sizeof(tCsrScanRequest), 0); + qdf_mem_set(&scan_req, sizeof(tCsrScanRequest), 0); /* optimize this to use 2 command buffer only */ send_scancmd = csr_get_command_buffer(mac_ctx); @@ -5706,12 +5706,12 @@ static void csr_sta_ap_conc_timer_handler(void *pv) * to be modified for split scan */ if (scan_req.ChannelInfo.ChannelList != NULL) { - cdf_mem_free(scan_req.ChannelInfo.ChannelList); + qdf_mem_free(scan_req.ChannelInfo.ChannelList); scan_req.ChannelInfo.ChannelList = NULL; } chn_info->numOfChannels = numchan_combinedconc; - cdf_mem_copy(&channel_to_scan[0], + qdf_mem_copy(&channel_to_scan[0], &scan_cmd->u.scanCmd.u.scanRequest.ChannelInfo. ChannelList[0], chn_info->numOfChannels * sizeof(uint8_t)); @@ -5848,7 +5848,7 @@ bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId) tDblLinkList localList; tDblLinkList *pCmdList; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return fRet; @@ -5946,23 +5946,23 @@ QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac, return status; *pNumItems = 0; - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); /* Here is the profile we need to connect to */ status = csr_roam_prepare_filter_from_profile(pMac, pSession->pCurRoamProfile, pScanFilter); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } status = csr_scan_get_result(pMac, pScanFilter, &hBSSList); if (!QDF_IS_STATUS_SUCCESS(status)) { csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } @@ -5980,14 +5980,14 @@ QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac, if (pSession->NumPmkidCandidate) { *pNumItems = pSession->NumPmkidCandidate; - cdf_mem_copy(pPmkidList, pSession->PmkidCandidateInfo, + qdf_mem_copy(pPmkidList, pSession->PmkidCandidateInfo, pSession->NumPmkidCandidate * sizeof(tPmkidCandidateInfo)); } csr_scan_result_purge(pMac, hBSSList); csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } @@ -6017,23 +6017,23 @@ QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac, return status; *pNumItems = 0; - pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); + pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); if (NULL == pScanFilter) return QDF_STATUS_E_NOMEM; - cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); + qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0); /* Here is the profile we need to connect to */ status = csr_roam_prepare_filter_from_profile(pMac, pSession->pCurRoamProfile, pScanFilter); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } status = csr_scan_get_result(pMac, pScanFilter, &hBSSList); if (!QDF_IS_STATUS_SUCCESS(status)) { csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } @@ -6050,14 +6050,14 @@ QDF_STATUS csr_scan_get_bkid_candidate_list(tpAniSirGlobal pMac, if (pSession->NumBkidCandidate) { *pNumItems = pSession->NumBkidCandidate; - cdf_mem_copy(pBkidList, pSession->BkidCandidateInfo, + qdf_mem_copy(pBkidList, pSession->BkidCandidateInfo, pSession->NumBkidCandidate * sizeof(tBkidCandidateInfo)); } csr_scan_result_purge(pMac, hBSSList); csr_free_scan_filter(pMac, pScanFilter); - cdf_mem_free(pScanFilter); + qdf_mem_free(pScanFilter); return status; } #endif /* FEATURE_WLAN_WAPI */ @@ -6137,9 +6137,9 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, goto error; } - cdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0); + qdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0); scan_cmd->u.scanCmd.pToRoamProfile = - cdf_mem_malloc(sizeof(tCsrRoamProfile)); + qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (NULL == scan_cmd->u.scanCmd.pToRoamProfile) status = QDF_STATUS_E_NOMEM; @@ -6160,7 +6160,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, /* let it wrap around */ wma_get_scan_id(&scan_cmd->u.scanCmd.scanID); - cdf_mem_set(&scan_cmd->u.scanCmd.u.scanRequest, + qdf_mem_set(&scan_cmd->u.scanCmd.u.scanRequest, sizeof(tCsrScanRequest), 0); status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, @@ -6179,18 +6179,18 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, /* Allocate memory for IE field */ if (profile->pAddIEScan) { scan_req->pIEField = - cdf_mem_malloc(profile->nAddIEScanLength); + qdf_mem_malloc(profile->nAddIEScanLength); if (NULL == scan_req->pIEField) status = QDF_STATUS_E_NOMEM; else status = QDF_STATUS_SUCCESS; - cdf_mem_set(scan_req->pIEField, + qdf_mem_set(scan_req->pIEField, profile->nAddIEScanLength, 0); if (QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_copy(scan_req->pIEField, + qdf_mem_copy(scan_req->pIEField, profile->pAddIEScan, profile->nAddIEScanLength); scan_req->uIEFieldLen = profile->nAddIEScanLength; @@ -6235,7 +6235,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, if (profile->ChannelInfo.numOfChannels) { scan_req->ChannelInfo.ChannelList = - cdf_mem_malloc(sizeof(*scan_req->ChannelInfo.ChannelList) * + qdf_mem_malloc(sizeof(*scan_req->ChannelInfo.ChannelList) * profile->ChannelInfo.numOfChannels); if (NULL == scan_req->ChannelInfo.ChannelList) @@ -6259,7 +6259,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, if (profile->SSIDs.numOfSSIDs) { scan_req->SSIDs.SSIDList = - cdf_mem_malloc(profile->SSIDs.numOfSSIDs * + qdf_mem_malloc(profile->SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo)); if (NULL == scan_req->SSIDs.SSIDList) @@ -6273,7 +6273,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, ssids = &scan_req->SSIDs; ssids->numOfSSIDs = 1; - cdf_mem_copy(scan_req->SSIDs.SSIDList, + qdf_mem_copy(scan_req->SSIDs.SSIDList, profile->SSIDs.SSIDList, sizeof(tCsrSSIDInfo)); } @@ -6338,11 +6338,11 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList, /* allocate maximum space for all channels */ dataLen = WNI_CFG_VALID_CHANNEL_LIST_LEN * sizeof(tSirMacChanInfo); - pBuf = cdf_mem_malloc(dataLen); + pBuf = qdf_mem_malloc(dataLen); if (pBuf == NULL) return; - cdf_mem_set(pBuf, dataLen, 0); + qdf_mem_set(pBuf, dataLen, 0); ch_pwr_set = (tSirMacChanInfo *) (pBuf); pEntry = csr_ll_peek_head(pList, LL_ACCESS_LOCK); /* @@ -6418,7 +6418,7 @@ void csr_save_tx_power_to_cfg(tpAniSirGlobal pMac, tDblLinkList *pList, if (cbLen) cfg_set_str(pMac, cfgId, (uint8_t *) pBuf, cbLen); - cdf_mem_free(pBuf); + qdf_mem_free(pBuf); } void csr_set_cfg_country_code(tpAniSirGlobal pMac, uint8_t *countryCode) @@ -6427,7 +6427,7 @@ void csr_set_cfg_country_code(tpAniSirGlobal pMac, uint8_t *countryCode) /* v_REGDOMAIN_t DomainId */ sms_log(pMac, LOG3, FL("Setting Country Code in Cfg %s"), countryCode); - cdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN); + qdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN); /* * don't program the bogus country codes that we created for Korea in the @@ -6482,9 +6482,9 @@ void csr_set_cfg_scan_control_list(tpAniSirGlobal pMac, uint8_t *countryCode, uint8_t *pControlList = NULL; uint32_t len = WNI_CFG_SCAN_CONTROL_LIST_LEN; - pControlList = cdf_mem_malloc(WNI_CFG_SCAN_CONTROL_LIST_LEN); + pControlList = qdf_mem_malloc(WNI_CFG_SCAN_CONTROL_LIST_LEN); if (pControlList != NULL) { - cdf_mem_set((void *)pControlList, WNI_CFG_SCAN_CONTROL_LIST_LEN, + qdf_mem_set((void *)pControlList, WNI_CFG_SCAN_CONTROL_LIST_LEN, 0); if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_str(pMac, WNI_CFG_SCAN_CONTROL_LIST, @@ -6516,7 +6516,7 @@ void csr_set_cfg_scan_control_list(tpAniSirGlobal pMac, uint8_t *countryCode, cfg_set_str(pMac, WNI_CFG_SCAN_CONTROL_LIST, pControlList, len); } /* Successfully getting scan control list */ - cdf_mem_free(pControlList); + qdf_mem_free(pControlList); } /* AllocateMemory */ } @@ -6547,7 +6547,7 @@ void csr_remove_cmd_with_session_id_from_pending_list(tpAniSirGlobal pMac, tSmeCmd *pCommand; tListElem *pEntryToRemove; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL("failed to open list")); return; @@ -6597,7 +6597,7 @@ void csr_remove_cmd_from_pending_list(tpAniSirGlobal pMac, tSmeCmd *pCommand; tListElem *pEntryToRemove; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return; @@ -6655,7 +6655,7 @@ void csr_remove_scan_for_ssid_from_pending_list(tpAniSirGlobal pMac, tSmeCmd *pCommand; tListElem *pEntryToRemove; - cdf_mem_zero(&localList, sizeof(tDblLinkList)); + qdf_mem_zero(&localList, sizeof(tDblLinkList)); if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) { sms_log(pMac, LOGE, FL(" failed to open list")); return; @@ -6712,13 +6712,13 @@ static void csr_send_scan_abort(tpAniSirGlobal mac_ctx, QDF_STATUS status = QDF_STATUS_SUCCESS; msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq)); - msg = cdf_mem_malloc(msg_len); + msg = qdf_mem_malloc(msg_len); if (NULL == msg) { sms_log(mac_ctx, LOGE, FL("Failed to alloc memory for SmeScanAbortReq")); return; } - cdf_mem_zero((void *)msg, msg_len); + qdf_mem_zero((void *)msg, msg_len); msg->type = eWNI_SME_SCAN_ABORT_IND; msg->msgLen = msg_len; msg->sessionId = session_id; @@ -6728,7 +6728,7 @@ static void csr_send_scan_abort(tpAniSirGlobal mac_ctx, scan_id, session_id); status = cds_send_mb_message_to_mac(msg); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(msg); + qdf_mem_free(msg); sms_log(mac_ctx, LOGE, FL("Failed to send abort scan.scan_id %d session %d"), scan_id, session_id); @@ -6833,7 +6833,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, tpSirMacMgmtHdr macHeader = (tpSirMacMgmtHdr) pPrefNetworkFoundInd->data; parsed_frm = - (tpSirProbeRespBeacon) cdf_mem_malloc(sizeof(tSirProbeRespBeacon)); + (tpSirProbeRespBeacon) qdf_mem_malloc(sizeof(tSirProbeRespBeacon)); if (NULL == parsed_frm) { sms_log(pMac, LOGE, FL("fail to allocate memory for frame")); @@ -6843,7 +6843,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL("Incorrect len(%d)"), pPrefNetworkFoundInd->frameLength); - cdf_mem_free(parsed_frm); + qdf_mem_free(parsed_frm); return QDF_STATUS_E_FAILURE; } if (sir_convert_probe_frame2_struct(pMac, @@ -6853,7 +6853,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, || !parsed_frm->ssidPresent) { sms_log(pMac, LOGE, FL("Parse error ProbeResponse, length=%d"), pPrefNetworkFoundInd->frameLength); - cdf_mem_free(parsed_frm); + qdf_mem_free(parsed_frm); return QDF_STATUS_E_FAILURE; } /* 24 byte MAC header and 12 byte to ssid IE */ @@ -6862,13 +6862,13 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, uLen = pPrefNetworkFoundInd->frameLength - (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET); } - pScanResult = cdf_mem_malloc(sizeof(tCsrScanResult) + uLen); + pScanResult = qdf_mem_malloc(sizeof(tCsrScanResult) + uLen); if (NULL == pScanResult) { sms_log(pMac, LOGE, FL("fail to allocate memory for frame")); - cdf_mem_free(parsed_frm); + qdf_mem_free(parsed_frm); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0); + qdf_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0); pBssDescr = &pScanResult->Result.BssDescriptor; /* * Length of BSS desription is without length of length itself and @@ -6912,7 +6912,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pBssDescr->timeStamp[0] = parsed_frm->timeStamp[0]; pBssDescr->timeStamp[1] = parsed_frm->timeStamp[1]; pBssDescr->capabilityInfo = *((uint16_t *)&parsed_frm->capabilityInfo); - cdf_mem_copy((uint8_t *) &pBssDescr->bssId, + qdf_mem_copy((uint8_t *) &pBssDescr->bssId, (uint8_t *) macHeader->bssId, sizeof(tSirMacAddr)); pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks(); sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"), @@ -6920,7 +6920,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pBssDescr->rssi); /* IEs */ if (uLen) { - cdf_mem_copy(&pBssDescr->ieFields, + qdf_mem_copy(&pBssDescr->ieFields, pPrefNetworkFoundInd->data + (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET), uLen); } @@ -6930,7 +6930,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, if (!(local_ie || QDF_IS_STATUS_SUCCESS(status))) { sms_log(pMac, LOGE, FL("Cannot parse IEs")); csr_free_scan_result_entry(pMac, pScanResult); - cdf_mem_free(parsed_frm); + qdf_mem_free(parsed_frm); return QDF_STATUS_E_RESOURCES; } @@ -6943,9 +6943,9 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, sms_log(pMac, LOGE, FL("BSS limit reached")); /* Free the resources */ if ((pScanResult->Result.pvIes == NULL) && local_ie) - cdf_mem_free(local_ie); + qdf_mem_free(local_ie); csr_free_scan_result_entry(pMac, pScanResult); - cdf_mem_free(parsed_frm); + qdf_mem_free(parsed_frm); return QDF_STATUS_E_RESOURCES; } /* Add to scan cache */ @@ -6953,8 +6953,8 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pPrefNetworkFoundInd->sessionId); if ((pScanResult->Result.pvIes == NULL) && local_ie) - cdf_mem_free(local_ie); - cdf_mem_free(parsed_frm); + qdf_mem_free(local_ie); + qdf_mem_free(parsed_frm); return QDF_STATUS_SUCCESS; } #endif /* FEATURE_WLAN_SCAN_PNO */ @@ -7005,7 +7005,7 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId) * csr_get_parsed_bss_description_ies */ if ((pBssDesc->Result.pvIes == NULL) && pIes) - cdf_mem_free(pIes); + qdf_mem_free(pIes); pEntry = csr_ll_next(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK); } /* while */ @@ -7046,15 +7046,15 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, status = QDF_STATUS_E_FAILURE; goto free_mem; } - pNewBssDescriptor = cdf_mem_malloc(size); + pNewBssDescriptor = qdf_mem_malloc(size); if (NULL == pNewBssDescriptor) { sms_log(pMac, LOGE, FL("memory allocation failed")); status = QDF_STATUS_E_FAILURE; goto free_mem; } - cdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size); + qdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size); /* change the BSSID & channel as passed */ - cdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes, + qdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes, sizeof(tSirMacAddr)); pNewBssDescriptor->channelId = channel; if (NULL == csr_scan_append_bss_description(pMac, pNewBssDescriptor, @@ -7068,10 +7068,10 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, free_mem: if (pNewIes) { - cdf_mem_free(pNewIes); + qdf_mem_free(pNewIes); } if (pNewBssDescriptor) { - cdf_mem_free(pNewBssDescriptor); + qdf_mem_free(pNewBssDescriptor); } return status; } @@ -7116,15 +7116,15 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac, length = roam_sync_ind_ptr->beaconProbeRespLength - (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET); - scan_res_ptr = cdf_mem_malloc(sizeof(tCsrScanResult) + length); + scan_res_ptr = qdf_mem_malloc(sizeof(tCsrScanResult) + length); if (scan_res_ptr == NULL) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, " fail to allocate memory for frame"); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(scan_res_ptr, sizeof(tCsrScanResult) + length); - cdf_mem_copy(&scan_res_ptr->Result.BssDescriptor, + qdf_mem_zero(scan_res_ptr, sizeof(tCsrScanResult) + length); + qdf_mem_copy(&scan_res_ptr->Result.BssDescriptor, bss_desc_ptr, (sizeof(tSirBssDescription) + length)); ies_local_ptr = (tDot11fBeaconIEs *)(scan_res_ptr->Result.pvIes); @@ -7146,7 +7146,7 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s:BSS Limit Exceed", __func__); if ((scan_res_ptr->Result.pvIes == NULL) && ies_local_ptr) - cdf_mem_free(ies_local_ptr); + qdf_mem_free(ies_local_ptr); csr_free_scan_result_entry(pMac, scan_res_ptr); return QDF_STATUS_E_RESOURCES; @@ -7181,7 +7181,7 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle, if (csr_ll_is_list_empty(&bss_list->List, LL_ACCESS_NOLOCK)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL("bss_list->List is empty")); - cdf_mem_free(bss_list); + qdf_mem_free(bss_list); return NULL; } first_element = csr_ll_peek_head(&bss_list->List, LL_ACCESS_NOLOCK); @@ -7189,7 +7189,7 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle, scan_result = GET_BASE_ADDR(first_element, tCsrScanResult, Link); - cdf_mem_copy(bss_descr, + qdf_mem_copy(bss_descr, &scan_result->Result.BssDescriptor, sizeof(tSirBssDescription)); } @@ -7230,13 +7230,13 @@ void csr_scan_active_list_timeout_handle(void *userData) FL("Scan Timeout:Sending abort to Firmware ID %d session %d "), scan_id, scan_cmd->sessionId); msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq)); - msg = cdf_mem_malloc(msg_len); + msg = qdf_mem_malloc(msg_len); if (NULL == msg) { sms_log(mac_ctx, LOGE, FL("Failed to alloc memory for SmeScanAbortReq")); return; } - cdf_mem_zero((void *)msg, msg_len); + qdf_mem_zero((void *)msg, msg_len); msg->type = eWNI_SME_SCAN_ABORT_IND; msg->msgLen = msg_len; msg->sessionId = scan_cmd->sessionId; @@ -7245,7 +7245,7 @@ void csr_scan_active_list_timeout_handle(void *userData) if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(mac_ctx, LOGE, FL(" Failed to post message to LIM")); - cdf_mem_free(msg); + qdf_mem_free(msg); } csr_release_scan_command(mac_ctx, scan_cmd, eCSR_SCAN_FAILURE); return; diff --git a/core/sme/src/csr/csr_link_list.c b/core/sme/src/csr/csr_link_list.c index 4241ee51ef44..2e52aa4312e3 100644 --- a/core/sme/src/csr/csr_link_list.c +++ b/core/sme/src/csr/csr_link_list.c @@ -34,7 +34,7 @@ #include "csr_link_list.h" #include "qdf_lock.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "qdf_trace.h" #include "qdf_mc_timer.h" diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index 60599908bd22..36e01046377a 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -110,15 +110,15 @@ static void csr_neighbor_roam_send_lfr_metric_event( { tCsrRoamInfo *roam_info; - roam_info = cdf_mem_malloc(sizeof(tCsrRoamInfo)); + roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo)); if (NULL == roam_info) { sms_log(mac_ctx, LOG1, FL("Memory allocation failed!")); } else { - cdf_mem_copy((void *)roam_info->bssid, + qdf_mem_copy((void *)roam_info->bssid, (void *)bssid, sizeof(*roam_info)); csr_roam_call_callback(mac_ctx, session_id, roam_info, 0, status, 0); - cdf_mem_free(roam_info); + qdf_mem_free(roam_info); } } #else @@ -150,10 +150,10 @@ void csr_neighbor_roam_free_neighbor_roam_bss_node(tpAniSirGlobal pMac, { if (neighborRoamBSSNode) { if (neighborRoamBSSNode->pBssDescription) { - cdf_mem_free(neighborRoamBSSNode->pBssDescription); + qdf_mem_free(neighborRoamBSSNode->pBssDescription); neighborRoamBSSNode->pBssDescription = NULL; } - cdf_mem_free(neighborRoamBSSNode); + qdf_mem_free(neighborRoamBSSNode); neighborRoamBSSNode = NULL; } @@ -623,7 +623,7 @@ static void csr_neighbor_roam_reset_channel_info(tpCsrNeighborRoamChannelInfo rChInfo->currentChannelListInfo.numOfChannels = 0; if (rChInfo->currentChannelListInfo.ChannelList) - cdf_mem_free(rChInfo->currentChannelListInfo. + qdf_mem_free(rChInfo->currentChannelListInfo. ChannelList); rChInfo->currentChannelListInfo.ChannelList = NULL; @@ -648,11 +648,11 @@ static void csr_neighbor_roam_reset_preauth_control_info(tpAniSirGlobal pMac, pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0; pNeighborRoamInfo->FTRoamInfo.neighborRptPending = false; pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0; - cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, + qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT); pNeighborRoamInfo->uOsRequestedHandoff = 0; - cdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo, + qdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo, sizeof(tCsrHandoffRequest)); } @@ -684,11 +684,11 @@ void csr_neighbor_roam_reset_connected_state_control_info(tpAniSirGlobal pMac, pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0; pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0; pNeighborRoamInfo->FTRoamInfo.preauthRspPending = 0; - cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, + qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT); pNeighborRoamInfo->uOsRequestedHandoff = 0; - cdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo, + qdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo, sizeof(tCsrHandoffRequest)); } @@ -754,7 +754,7 @@ void csr_neighbor_roam_purge_preauth_fail_list(tpAniSirGlobal pMac) pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[i]; while (pNeighborRoamInfo->FTRoamInfo.preAuthFailList. numMACAddress) { - cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo. + qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo. preAuthFailList. macAddress[pNeighborRoamInfo->FTRoamInfo. preAuthFailList.numMACAddress - @@ -792,7 +792,7 @@ QDF_STATUS csr_neighbor_roam_add_preauth_fail(tpAniSirGlobal mac_ctx, for (i = 0; i < neighbor_roam_info->FTRoamInfo.preAuthFailList.numMACAddress; i++) { - if (true == cdf_mem_compare( + if (true != qdf_mem_cmp( neighbor_roam_info->FTRoamInfo.preAuthFailList.macAddress[i], bssid, sizeof(tSirMacAddr))) { sms_log(mac_ctx, LOGW, FL("BSSID "MAC_ADDRESS_STR" already present in preauth fail list"), @@ -806,7 +806,7 @@ QDF_STATUS csr_neighbor_roam_add_preauth_fail(tpAniSirGlobal mac_ctx, FL("Cannot add, preauth fail list is full.")); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(neighbor_roam_info->FTRoamInfo.preAuthFailList. + qdf_mem_copy(neighbor_roam_info->FTRoamInfo.preAuthFailList. macAddress[num_mac_addr], bssid, sizeof(tSirMacAddr)); neighbor_roam_info->FTRoamInfo.preAuthFailList.numMACAddress++; @@ -840,8 +840,8 @@ bool csr_neighbor_roam_is_preauth_candidate(tpAniSirGlobal pMac, for (i = 0; i < pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress; i++) { - if (true == - cdf_mem_compare(pNeighborRoamInfo->FTRoamInfo. + if (true != + qdf_mem_cmp(pNeighborRoamInfo->FTRoamInfo. preAuthFailList.macAddress[i], bssId, sizeof(tSirMacAddr))) { NEIGHBOR_ROAM_DEBUG(pMac, LOGE, @@ -1144,7 +1144,7 @@ csr_neighbor_roam_offload_update_preauth_list(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; } - bss_info_ptr = cdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo)); + bss_info_ptr = qdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo)); if (NULL == bss_info_ptr) { sms_log(pMac, LOGE, FL("LFR3:Memory allocation for Neighbor Roam BSS Info failed")); @@ -1152,15 +1152,15 @@ csr_neighbor_roam_offload_update_preauth_list(tpAniSirGlobal pMac, } bss_desc_len = roam_sync_ind_ptr->bss_desc_ptr->length + sizeof(roam_sync_ind_ptr->bss_desc_ptr->length); - bss_info_ptr->pBssDescription = cdf_mem_malloc(bss_desc_len); + bss_info_ptr->pBssDescription = qdf_mem_malloc(bss_desc_len); if (bss_info_ptr->pBssDescription != NULL) { - cdf_mem_copy(bss_info_ptr->pBssDescription, + qdf_mem_copy(bss_info_ptr->pBssDescription, roam_sync_ind_ptr->bss_desc_ptr, bss_desc_len); } else { sms_log(pMac, LOGE, FL("LFR3:Mem alloc for Neighbor Roam BSS Descriptor failed")); - cdf_mem_free(bss_info_ptr); + qdf_mem_free(bss_info_ptr); return QDF_STATUS_E_NOMEM; } @@ -1205,7 +1205,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, if (pScanFilter == NULL) return QDF_STATUS_E_FAILURE; - cdf_mem_zero(pScanFilter, sizeof(tCsrScanResultFilter)); + qdf_mem_zero(pScanFilter, sizeof(tCsrScanResultFilter)); roam_params = &pMac->roam.configParam.roam_params; /* We dont want to set BSSID based Filter */ pScanFilter->BSSIDs.numOfBSSIDs = 0; @@ -1214,7 +1214,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, if (nbr_roam_info->uOsRequestedHandoff) { pScanFilter->BSSIDs.numOfBSSIDs = 1; pScanFilter->BSSIDs.bssid = - cdf_mem_malloc(sizeof(tSirMacAddr) * + qdf_mem_malloc(sizeof(tSirMacAddr) * pScanFilter->BSSIDs.numOfBSSIDs); if (NULL == pScanFilter->BSSIDs.bssid) { sms_log(pMac, LOGE, @@ -1222,7 +1222,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pScanFilter->BSSIDs.bssid, + qdf_mem_zero(pScanFilter->BSSIDs.bssid, sizeof(tSirMacAddr) * pScanFilter->BSSIDs.numOfBSSIDs); @@ -1239,7 +1239,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, pScanFilter->SSIDs.numOfSSIDs = roam_params->num_ssid_allowed_list; pScanFilter->SSIDs.SSIDList = - cdf_mem_malloc(sizeof(tCsrSSIDInfo) * + qdf_mem_malloc(sizeof(tCsrSSIDInfo) * pScanFilter->SSIDs.numOfSSIDs); if (NULL == pScanFilter->SSIDs.SSIDList) { sms_log(pMac, LOGE, @@ -1249,7 +1249,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, for (i = 0; i < roam_params->num_ssid_allowed_list; i++) { pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1; pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0; - cdf_mem_copy((void *) + qdf_mem_copy((void *) pScanFilter->SSIDs.SSIDList[i].SSID.ssId, roam_params->ssid_allowed_list[i].ssId, roam_params->ssid_allowed_list[i].length); @@ -1260,7 +1260,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, /* Populate all the information from the connected profile */ pScanFilter->SSIDs.numOfSSIDs = 1; pScanFilter->SSIDs.SSIDList = - cdf_mem_malloc(sizeof(tCsrSSIDInfo)); + qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (NULL == pScanFilter->SSIDs.SSIDList) { sms_log(pMac, LOGE, FL("Scan Filter SSID mem alloc failed")); @@ -1270,7 +1270,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, pScanFilter->SSIDs.SSIDList->ssidHidden = 0; pScanFilter->SSIDs.SSIDList->SSID.length = pCurProfile->SSID.length; - cdf_mem_copy((void *)pScanFilter->SSIDs.SSIDList->SSID.ssId, + qdf_mem_copy((void *)pScanFilter->SSIDs.SSIDList->SSID.ssId, (void *)pCurProfile->SSID.ssId, pCurProfile->SSID.length); @@ -1302,11 +1302,11 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac, */ pScanFilter->ChannelInfo.numOfChannels = num_ch; pScanFilter->ChannelInfo.ChannelList = - cdf_mem_malloc(num_ch * sizeof(uint8_t)); + qdf_mem_malloc(num_ch * sizeof(uint8_t)); if (NULL == pScanFilter->ChannelInfo.ChannelList) { sms_log(pMac, LOGE, FL("Scan Filter Ch list mem alloc failed")); - cdf_mem_free(pScanFilter->SSIDs.SSIDList); + qdf_mem_free(pScanFilter->SSIDs.SSIDList); pScanFilter->SSIDs.SSIDList = NULL; return QDF_STATUS_E_NOMEM; } @@ -1352,8 +1352,8 @@ uint32_t csr_get_current_ap_rssi(tpAniSirGlobal pMac, while (NULL != (pScanResult = csr_scan_result_get_next(pMac, *pScanResultList))) { - if (true == - cdf_mem_compare(pScanResult->BssDescriptor.bssId, + if (true != + qdf_mem_cmp(pScanResult->BssDescriptor.bssId, nbr_roam_info->currAPbssid.bytes, sizeof(tSirMacAddr))) { /* We got a match with the currently associated AP. @@ -1451,7 +1451,7 @@ csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx, MAC_ADDR_ARRAY(descr->bssId), abs(descr->rssi), descr->channelId); - if (true == cdf_mem_compare(descr->bssId, + if (true != qdf_mem_cmp(descr->bssId, n_roam_info->currAPbssid.bytes, sizeof(tSirMacAddr))) { /* @@ -1469,7 +1469,7 @@ csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx, * have duplicates */ if ((n_roam_info->uOsRequestedHandoff) && - ((false == cdf_mem_compare(descr->bssId, + ((false != qdf_mem_cmp(descr->bssId, n_roam_info->handoffReqInfo.bssid.bytes, sizeof(tSirMacAddr))) || (descr->channelId != @@ -1550,22 +1550,22 @@ csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx, /* Finished all checks, now add it to candidate list */ bss_info = - cdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo)); + qdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo)); if (NULL == bss_info) { sms_log(mac_ctx, LOGE, FL("Memory allocation failed. Ignored candidate.")); continue; } bss_info->pBssDescription = - cdf_mem_malloc(descr->length + + qdf_mem_malloc(descr->length + sizeof(descr->length)); if (bss_info->pBssDescription != NULL) { - cdf_mem_copy(bss_info->pBssDescription, descr, + qdf_mem_copy(bss_info->pBssDescription, descr, descr->length + sizeof(descr->length)); } else { sms_log(mac_ctx, LOGE, FL("Memory allocation failed. Ignored candidate.")); - cdf_mem_free(bss_info); + qdf_mem_free(bss_info); continue; } /* @@ -1859,7 +1859,7 @@ QDF_STATUS csr_neighbor_roam_create_chan_list_from_neighbor_report(tpAniSirGloba neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo. numBssFromNeighborReport]. neighborScore = (uint8_t) pNeighborBssDesc->roamScore; - cdf_mem_copy(pNeighborRoamInfo->FTRoamInfo. + qdf_mem_copy(pNeighborRoamInfo->FTRoamInfo. neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo. numBssFromNeighborReport]. neighborBssId, @@ -1921,7 +1921,7 @@ QDF_STATUS csr_neighbor_roam_create_chan_list_from_neighbor_report(tpAniSirGloba if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList) { - cdf_mem_free(pNeighborRoamInfo->roamChannelInfo. + qdf_mem_free(pNeighborRoamInfo->roamChannelInfo. currentChannelListInfo.ChannelList); } @@ -1933,7 +1933,7 @@ QDF_STATUS csr_neighbor_roam_create_chan_list_from_neighbor_report(tpAniSirGloba if (numChannels) pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList = - cdf_mem_malloc((numChannels) * sizeof(uint8_t)); + qdf_mem_malloc((numChannels) * sizeof(uint8_t)); if (NULL == pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList) { @@ -1943,7 +1943,7 @@ QDF_STATUS csr_neighbor_roam_create_chan_list_from_neighbor_report(tpAniSirGloba return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. + qdf_mem_copy(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList, channelList, (numChannels) * sizeof(uint8_t)); pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. numOfChannels = numChannels; @@ -2101,7 +2101,7 @@ bool csr_neighbor_roam_is_new_connected_profile(tpAniSirGlobal pMac, fNew = false; } if (pIes) { - cdf_mem_free(pIes); + qdf_mem_free(pIes); } } @@ -2216,7 +2216,7 @@ void csr_roam_reset_roam_params(tpAniSirGlobal mac_ctx) FL("Roaming parameters are reset")); roam_params = &mac_ctx->roam.configParam.roam_params; roam_params->num_ssid_allowed_list = 0; - cdf_mem_set(&roam_params->ssid_allowed_list, 0, + qdf_mem_set(&roam_params->ssid_allowed_list, 0, sizeof(tSirMacSSid) * MAX_SSID_ALLOWED_LIST); } @@ -2276,7 +2276,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac, } #ifdef FEATURE_WLAN_ESE if (pSession->connectedProfile.isESEAssoc) { - cdf_mem_copy(&pSession->prevApSSID, + qdf_mem_copy(&pSession->prevApSSID, &pSession->connectedProfile.SSID, sizeof(tSirMacSSid)); qdf_copy_macaddr(&pSession->prevApBssid, @@ -2466,7 +2466,7 @@ static void csr_neighbor_roam_info_ctx_init( QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "Free Reassoc Rsp"); - cdf_mem_free(pMac->roam.pReassocResp); + qdf_mem_free(pMac->roam.pReassocResp); pMac->roam.pReassocResp = NULL; } } else @@ -2537,7 +2537,7 @@ QDF_STATUS csr_neighbor_roam_indicate_connect( session->roam_synch_data->authStatus)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "LFR3:csr_neighbor_roam_indicate_connect"); - msg = cdf_mem_malloc(sizeof(tSirSetActiveModeSetBncFilterReq)); + msg = qdf_mem_malloc(sizeof(tSirSetActiveModeSetBncFilterReq)); if (msg == NULL) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "LFR3:Mem Alloc failed for beacon Filter Req"); @@ -2615,7 +2615,7 @@ void csr_neighbor_roam_purge_preauth_failed_list(tpAniSirGlobal pMac) i < pNeighborRoamInfo->FTRoamInfo.preAuthFailList. numMACAddress; i++) { - cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo. + qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo. preAuthFailList.macAddress[i], sizeof(tSirMacAddr)); } @@ -2661,7 +2661,7 @@ QDF_STATUS csr_neighbor_roam_init11r_assoc_info(tpAniSirGlobal pMac) pFTRoamInfo->currentNeighborRptRetryNum = 0; pFTRoamInfo->numBssFromNeighborReport = 0; - cdf_mem_zero(pFTRoamInfo->neighboReportBssInfo, + qdf_mem_zero(pFTRoamInfo->neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT); @@ -2730,7 +2730,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId) numChannels; if (pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels != 0) { pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = - cdf_mem_malloc(pMac->roam.configParam.neighborRoamConfig. + qdf_mem_malloc(pMac->roam.configParam.neighborRoamConfig. neighborScanChanList.numChannels); if (NULL == pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) { @@ -2746,7 +2746,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId) } /* Update the roam global structure from CFG */ - cdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList, + qdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList, pMac->roam.configParam.neighborRoamConfig. neighborScanChanList.channelList, pMac->roam.configParam.neighborRoamConfig. @@ -2777,13 +2777,13 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId) pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt; pNeighborRoamInfo->currentRoamBeaconRssiWeight = pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight; - cdf_mem_set(&pNeighborRoamInfo->prevConnProfile, + qdf_mem_set(&pNeighborRoamInfo->prevConnProfile, sizeof(tCsrRoamConnectedProfile), 0); status = csr_ll_open(pMac->hHdd, &pNeighborRoamInfo->roamableAPList); if (QDF_STATUS_SUCCESS != status) { sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed")); - cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. + qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; return QDF_STATUS_E_RESOURCES; @@ -2800,7 +2800,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId) status = csr_neighbor_roam_init11r_assoc_info(pMac); if (QDF_STATUS_SUCCESS != status) { sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed")); - cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. + qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; csr_ll_close(&pNeighborRoamInfo->roamableAPList); @@ -2839,7 +2839,7 @@ void csr_neighbor_roam_close(tpAniSirGlobal pMac, uint8_t sessionId) } if (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) - cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. + qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo. ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; @@ -2851,7 +2851,7 @@ void csr_neighbor_roam_close(tpAniSirGlobal pMac, uint8_t sessionId) if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo. ChannelList) { - cdf_mem_free(pNeighborRoamInfo->roamChannelInfo. + qdf_mem_free(pNeighborRoamInfo->roamChannelInfo. currentChannelListInfo.ChannelList); } @@ -2870,7 +2870,7 @@ void csr_neighbor_roam_close(tpAniSirGlobal pMac, uint8_t sessionId) csr_roam_free_connect_profile(&pNeighborRoamInfo->prevConnProfile); pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0; pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0; - cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, + qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo, sizeof(tCsrNeighborReportBssInfo) * MAX_BSS_IN_NEIGHBOR_RPT); csr_neighbor_roam_free_roamable_bss_list(pMac, @@ -2927,11 +2927,11 @@ void csr_neighbor_roam_request_handoff(tpAniSirGlobal mac_ctx, FL("HANDOFF CANDIDATE BSSID "MAC_ADDRESS_STR), MAC_ADDR_ARRAY(handoff_node.pBssDescription->bssId)); - cdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo)); + qdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo)); csr_roam_call_callback(mac_ctx, session_id, &roam_info, roamid, eCSR_ROAM_FT_START, eSIR_SME_SUCCESS); - cdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo)); + qdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo)); CSR_NEIGHBOR_ROAM_STATE_TRANSITION (mac_ctx, eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING, session_id) @@ -2954,7 +2954,7 @@ void csr_neighbor_roam_request_handoff(tpAniSirGlobal mac_ctx, status); return; } - cdf_mem_copy(neighbor_roam_info->csrNeighborRoamProfile.BSSIDs.bssid, + qdf_mem_copy(neighbor_roam_info->csrNeighborRoamProfile.BSSIDs.bssid, handoff_node.pBssDescription->bssId, sizeof(tSirMacAddr)); neighbor_roam_info->csrNeighborRoamProfile.ChannelInfo.ChannelList[0] = handoff_node.pBssDescription->channelId; @@ -2973,7 +2973,7 @@ void csr_neighbor_roam_request_handoff(tpAniSirGlobal mac_ctx, /* notify HDD for handoff, providing the BSSID too */ roam_info.reasonCode = eCsrRoamReasonBetterAP; - cdf_mem_copy(roam_info.bssid.bytes, + qdf_mem_copy(roam_info.bssid.bytes, handoff_node.pBssDescription->bssId, sizeof(struct qdf_mac_addr)); @@ -3085,7 +3085,7 @@ bool csr_neighbor_roam_get_handoff_ap_info(tpAniSirGlobal pMac, } if (NULL == bss_node) return false; - cdf_mem_copy(hand_off_node, bss_node, sizeof(tCsrNeighborRoamBSSInfo)); + qdf_mem_copy(hand_off_node, bss_node, sizeof(tCsrNeighborRoamBSSInfo)); return true; } @@ -3249,12 +3249,12 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req( } roam_id = GET_NEXT_ROAM_ID(&mac_ctx->roam); - profile = cdf_mem_malloc(sizeof(tCsrRoamProfile)); + profile = qdf_mem_malloc(sizeof(tCsrRoamProfile)); if (NULL == profile) { sms_log(mac_ctx, LOGE, FL("Memory alloc failed")); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(profile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(profile, sizeof(tCsrRoamProfile), 0); status = csr_roam_copy_profile(mac_ctx, profile, session->pCurRoamProfile); @@ -3266,7 +3266,7 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req( profile->BSSIDs.numOfBSSIDs = 1; if (NULL == profile->BSSIDs.bssid) { profile->BSSIDs.bssid = - cdf_mem_malloc(sizeof(tSirMacAddr) * + qdf_mem_malloc(sizeof(tSirMacAddr) * profile->BSSIDs.numOfBSSIDs); if (NULL == profile->BSSIDs.bssid) { sms_log(mac_ctx, LOGE, FL("mem alloc failed for BSSID")); @@ -3275,7 +3275,7 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req( } } - cdf_mem_zero(profile->BSSIDs.bssid, + qdf_mem_zero(profile->BSSIDs.bssid, sizeof(tSirMacAddr) * profile->BSSIDs.numOfBSSIDs); @@ -3288,7 +3288,7 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req( profile->ChannelInfo.numOfChannels = 1; if (NULL == profile->ChannelInfo.ChannelList) { profile->ChannelInfo.ChannelList = - cdf_mem_malloc(sizeof(*profile-> + qdf_mem_malloc(sizeof(*profile-> ChannelInfo.ChannelList) * profile->ChannelInfo.numOfChannels); if (NULL == profile->ChannelInfo.ChannelList) { @@ -3311,7 +3311,7 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req( end: if (NULL != profile) { csr_release_profile(mac_ctx, profile); - cdf_mem_free(profile); + qdf_mem_free(profile); } return status; @@ -3412,7 +3412,7 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr( } /* sanity check */ - if (true == cdf_mem_compare(handoff_req->bssid, + if (true != qdf_mem_cmp(handoff_req->bssid, roam_ctrl_info->currAPbssid.bytes, sizeof(tSirMacAddr))) { sms_log(mac_ctx, LOGE, @@ -3424,7 +3424,7 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr( handoff_req->channel; roam_ctrl_info->handoffReqInfo.src = handoff_req->handoff_src; - cdf_mem_copy(&roam_ctrl_info->handoffReqInfo.bssid.bytes, + qdf_mem_copy(&roam_ctrl_info->handoffReqInfo.bssid.bytes, &handoff_req->bssid, QDF_MAC_ADDR_SIZE); roam_ctrl_info->uOsRequestedHandoff = 1; status = csr_roam_offload_scan(mac_ctx, session_id, diff --git a/core/sme/src/csr/csr_tdls_process.c b/core/sme/src/csr/csr_tdls_process.c index fa9657931d6a..d6baf4ea1525 100644 --- a/core/sme/src/csr/csr_tdls_process.c +++ b/core/sme/src/csr/csr_tdls_process.c @@ -63,7 +63,7 @@ QDF_STATUS csr_tdls_remove_sme_cmd(tpAniSirGlobal pMac, eSmeCommandType cmdType) if (cmdType == pCommand->command) { if (csr_ll_remove_entry(&pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK)) { - cdf_mem_zero(&pCommand->u.tdlsCmd, + qdf_mem_zero(&pCommand->u.tdlsCmd, sizeof(tTdlsCmd)); csr_release_command(pMac, pCommand); sme_process_pending_queue(pMac); @@ -106,18 +106,18 @@ QDF_STATUS csr_tdls_send_mgmt_req(tHalHandle hHal, uint8_t sessionId, tdlsSendMgmtCmdInfo->statusCode = tdlsSendMgmt->statusCode; tdlsSendMgmtCmdInfo->responder = tdlsSendMgmt->responder; tdlsSendMgmtCmdInfo->peerCapability = tdlsSendMgmt->peerCapability; - cdf_mem_copy(tdlsSendMgmtCmdInfo->peerMac, tdlsSendMgmt->peerMac, + qdf_mem_copy(tdlsSendMgmtCmdInfo->peerMac, tdlsSendMgmt->peerMac, sizeof(tSirMacAddr)); if ((0 != tdlsSendMgmt->len) && (NULL != tdlsSendMgmt->buf)) { - tdlsSendMgmtCmdInfo->buf = cdf_mem_malloc(tdlsSendMgmt->len); + tdlsSendMgmtCmdInfo->buf = qdf_mem_malloc(tdlsSendMgmt->len); if (NULL == tdlsSendMgmtCmdInfo->buf) { status = QDF_STATUS_E_NOMEM; sms_log(pMac, LOGE, FL("Alloc Failed")); QDF_ASSERT(0); return status; } - cdf_mem_copy(tdlsSendMgmtCmdInfo->buf, tdlsSendMgmt->buf, + qdf_mem_copy(tdlsSendMgmtCmdInfo->buf, tdlsSendMgmt->buf, tdlsSendMgmt->len); tdlsSendMgmtCmdInfo->len = tdlsSendMgmt->len; } else { @@ -158,41 +158,41 @@ QDF_STATUS csr_tdls_change_peer_sta(tHalHandle hHal, uint8_t sessionId, tdlsAddStaCmd->sessionId = sessionId; - cdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes, + qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes, peerMac, QDF_MAC_ADDR_SIZE); tdlsAddStaCmdInfo->capability = pstaParams->capability; tdlsAddStaCmdInfo->uapsdQueues = pstaParams->uapsd_queues; tdlsAddStaCmdInfo->maxSp = pstaParams->max_sp; - cdf_mem_copy(tdlsAddStaCmdInfo->extnCapability, + qdf_mem_copy(tdlsAddStaCmdInfo->extnCapability, pstaParams->extn_capability, sizeof(pstaParams->extn_capability)); tdlsAddStaCmdInfo->htcap_present = pstaParams->htcap_present; if (pstaParams->htcap_present) - cdf_mem_copy(&tdlsAddStaCmdInfo->HTCap, + qdf_mem_copy(&tdlsAddStaCmdInfo->HTCap, &pstaParams->HTCap, sizeof(pstaParams->HTCap)); else - cdf_mem_set(&tdlsAddStaCmdInfo->HTCap, + qdf_mem_set(&tdlsAddStaCmdInfo->HTCap, sizeof(pstaParams->HTCap), 0); tdlsAddStaCmdInfo->vhtcap_present = pstaParams->vhtcap_present; if (pstaParams->vhtcap_present) - cdf_mem_copy(&tdlsAddStaCmdInfo->VHTCap, + qdf_mem_copy(&tdlsAddStaCmdInfo->VHTCap, &pstaParams->VHTCap, sizeof(pstaParams->VHTCap)); else - cdf_mem_set(&tdlsAddStaCmdInfo->VHTCap, + qdf_mem_set(&tdlsAddStaCmdInfo->VHTCap, sizeof(pstaParams->VHTCap), 0); tdlsAddStaCmdInfo->supportedRatesLen = pstaParams->supported_rates_len; if (0 != pstaParams->supported_rates_len) - cdf_mem_copy(&tdlsAddStaCmdInfo->supportedRates, + qdf_mem_copy(&tdlsAddStaCmdInfo->supportedRates, pstaParams->supported_rates, pstaParams->supported_rates_len); @@ -232,7 +232,7 @@ QDF_STATUS csr_tdls_send_link_establish_params(tHalHandle hHal, tdlsLinkEstablishCmd->sessionId = sessionId; - cdf_mem_copy(tdlsLinkEstablishCmdInfo->peermac.bytes, + qdf_mem_copy(tdlsLinkEstablishCmdInfo->peermac.bytes, peerMac, QDF_MAC_ADDR_SIZE); tdlsLinkEstablishCmdInfo->isBufSta = tdlsLinkEstablishParams->isBufSta; @@ -244,14 +244,14 @@ QDF_STATUS csr_tdls_send_link_establish_params(tHalHandle hHal, tdlsLinkEstablishParams->uapsdQueues; tdlsLinkEstablishCmdInfo->isOffChannelSupported = tdlsLinkEstablishParams->isOffChannelSupported; - cdf_mem_copy(tdlsLinkEstablishCmdInfo-> + qdf_mem_copy(tdlsLinkEstablishCmdInfo-> supportedChannels, tdlsLinkEstablishParams->supportedChannels, tdlsLinkEstablishParams-> supportedChannelsLen); tdlsLinkEstablishCmdInfo->supportedChannelsLen = tdlsLinkEstablishParams->supportedChannelsLen; - cdf_mem_copy(tdlsLinkEstablishCmdInfo-> + qdf_mem_copy(tdlsLinkEstablishCmdInfo-> supportedOperClasses, tdlsLinkEstablishParams-> supportedOperClasses, @@ -300,7 +300,7 @@ QDF_STATUS csr_tdls_add_peer_sta(tHalHandle hHal, uint8_t sessionId, tdlsAddStaCmd->sessionId = sessionId; tdlsAddStaCmdInfo->tdlsAddOper = TDLS_OPER_ADD; - cdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes, + qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes, peerMac, QDF_MAC_ADDR_SIZE); tdlsAddStaCmd->command = eSmeCommandTdlsAddPeer; @@ -336,7 +336,7 @@ QDF_STATUS csr_tdls_del_peer_sta(tHalHandle hHal, uint8_t sessionId, tdlsDelStaCmd->sessionId = sessionId; - cdf_mem_copy(tdlsDelStaCmdInfo->peermac.bytes, + qdf_mem_copy(tdlsDelStaCmdInfo->peermac.bytes, peerMac, QDF_MAC_ADDR_SIZE); tdlsDelStaCmd->command = eSmeCommandTdlsDelPeer; @@ -390,7 +390,7 @@ QDF_STATUS csr_tdls_process_send_mgmt(tpAniSirGlobal pMac, tSmeCmd *cmd) } tdlsSendMgmtReq = - cdf_mem_malloc(sizeof(tSirTdlsSendMgmtReq) + + qdf_mem_malloc(sizeof(tSirTdlsSendMgmtReq) + tdlsSendMgmtCmdInfo->len); if (NULL == tdlsSendMgmtReq) status = QDF_STATUS_E_NOMEM; @@ -411,14 +411,14 @@ QDF_STATUS csr_tdls_process_send_mgmt(tpAniSirGlobal pMac, tSmeCmd *cmd) tdlsSendMgmtReq->responder = tdlsSendMgmtCmdInfo->responder; tdlsSendMgmtReq->peerCapability = tdlsSendMgmtCmdInfo->peerCapability; - cdf_mem_copy(tdlsSendMgmtReq->bssid.bytes, + qdf_mem_copy(tdlsSendMgmtReq->bssid.bytes, pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(tdlsSendMgmtReq->peer_mac.bytes, + qdf_mem_copy(tdlsSendMgmtReq->peer_mac.bytes, tdlsSendMgmtCmdInfo->peerMac, QDF_MAC_ADDR_SIZE); if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) { - cdf_mem_copy(tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf, + qdf_mem_copy(tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf, tdlsSendMgmtCmdInfo->len); } @@ -433,7 +433,7 @@ QDF_STATUS csr_tdls_process_send_mgmt(tpAniSirGlobal pMac, tSmeCmd *cmd) } if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) { /* Done with the buf. Free it. */ - cdf_mem_free(tdlsSendMgmtCmdInfo->buf); + qdf_mem_free(tdlsSendMgmtCmdInfo->buf); tdlsSendMgmtCmdInfo->buf = NULL; tdlsSendMgmtCmdInfo->len = 0; } @@ -459,7 +459,7 @@ QDF_STATUS csr_tdls_process_add_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) return QDF_STATUS_E_FAILURE; } - tdlsAddStaReq = cdf_mem_malloc(sizeof(tSirTdlsAddStaReq)); + tdlsAddStaReq = qdf_mem_malloc(sizeof(tSirTdlsAddStaReq)); if (NULL == tdlsAddStaReq) status = QDF_STATUS_E_NOMEM; else @@ -475,7 +475,7 @@ QDF_STATUS csr_tdls_process_add_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) /* Using dialog as transactionId. This can be used to match response with request */ tdlsAddStaReq->transactionId = 0; - cdf_mem_copy(tdlsAddStaReq->bssid.bytes, + qdf_mem_copy(tdlsAddStaReq->bssid.bytes, pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE); qdf_copy_macaddr(&tdlsAddStaReq->peermac, @@ -485,19 +485,19 @@ QDF_STATUS csr_tdls_process_add_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) tdlsAddStaReq->uapsd_queues = tdlsAddStaCmdInfo->uapsdQueues; tdlsAddStaReq->max_sp = tdlsAddStaCmdInfo->maxSp; - cdf_mem_copy(tdlsAddStaReq->extn_capability, + qdf_mem_copy(tdlsAddStaReq->extn_capability, tdlsAddStaCmdInfo->extnCapability, SIR_MAC_MAX_EXTN_CAP); tdlsAddStaReq->htcap_present = tdlsAddStaCmdInfo->htcap_present; - cdf_mem_copy(&tdlsAddStaReq->htCap, + qdf_mem_copy(&tdlsAddStaReq->htCap, &tdlsAddStaCmdInfo->HTCap, sizeof(tdlsAddStaCmdInfo->HTCap)); tdlsAddStaReq->vhtcap_present = tdlsAddStaCmdInfo->vhtcap_present; - cdf_mem_copy(&tdlsAddStaReq->vhtCap, + qdf_mem_copy(&tdlsAddStaReq->vhtCap, &tdlsAddStaCmdInfo->VHTCap, sizeof(tdlsAddStaCmdInfo->VHTCap)); tdlsAddStaReq->supported_rates_length = tdlsAddStaCmdInfo->supportedRatesLen; - cdf_mem_copy(&tdlsAddStaReq->supported_rates, + qdf_mem_copy(&tdlsAddStaReq->supported_rates, tdlsAddStaCmdInfo->supportedRates, tdlsAddStaCmdInfo->supportedRatesLen); @@ -530,7 +530,7 @@ QDF_STATUS csr_tdls_process_del_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) return QDF_STATUS_E_FAILURE; } - tdlsDelStaReq = cdf_mem_malloc(sizeof(tSirTdlsDelStaReq)); + tdlsDelStaReq = qdf_mem_malloc(sizeof(tSirTdlsDelStaReq)); if (NULL == tdlsDelStaReq) status = QDF_STATUS_E_NOMEM; else @@ -545,7 +545,7 @@ QDF_STATUS csr_tdls_process_del_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) /* Using dialog as transactionId. This can be used to match response with request */ tdlsDelStaReq->transactionId = 0; - cdf_mem_copy(tdlsDelStaReq->bssid.bytes, + qdf_mem_copy(tdlsDelStaReq->bssid.bytes, pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE); qdf_copy_macaddr(&tdlsDelStaReq->peermac, @@ -627,7 +627,7 @@ QDF_STATUS csr_tdls_process_link_establish(tpAniSirGlobal pMac, tSmeCmd *cmd) return QDF_STATUS_E_FAILURE; } - tdlsLinkEstablishReq = cdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReq)); + tdlsLinkEstablishReq = qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReq)); if (tdlsLinkEstablishReq == NULL) { sms_log(pMac, LOGE, FL("alloc failed")); @@ -639,14 +639,14 @@ QDF_STATUS csr_tdls_process_link_establish(tpAniSirGlobal pMac, tSmeCmd *cmd) tdlsLinkEstablishReq->transactionId = 0; qdf_copy_macaddr(&tdlsLinkEstablishReq->peermac, &tdlsLinkEstablishCmdInfo->peermac); - cdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes, + qdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes, pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE); - cdf_mem_copy(tdlsLinkEstablishReq->supportedChannels, + qdf_mem_copy(tdlsLinkEstablishReq->supportedChannels, tdlsLinkEstablishCmdInfo->supportedChannels, tdlsLinkEstablishCmdInfo->supportedChannelsLen); tdlsLinkEstablishReq->supportedChannelsLen = tdlsLinkEstablishCmdInfo->supportedChannelsLen; - cdf_mem_copy(tdlsLinkEstablishReq->supportedOperClasses, + qdf_mem_copy(tdlsLinkEstablishReq->supportedOperClasses, tdlsLinkEstablishCmdInfo->supportedOperClasses, tdlsLinkEstablishCmdInfo->supportedOperClassesLen); tdlsLinkEstablishReq->supportedOperClassesLen = diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 3107e086de4e..e181cf892872 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -258,7 +258,7 @@ const char *get_e_csr_roam_result_str(eCsrRoamResult val) bool csr_get_bss_id_bss_desc(tHalHandle hHal, tSirBssDescription *pSirBssDesc, struct qdf_mac_addr *pBssId) { - cdf_mem_copy(pBssId, &pSirBssDesc->bssId[0], + qdf_mem_copy(pBssId, &pSirBssDesc->bssId[0], sizeof(struct qdf_mac_addr)); return true; } @@ -1123,20 +1123,19 @@ bool csr_is_ssid_equal(tHalHandle hHal, tSirBssDescription *pSirBssDesc1, break; if (pIes1->SSID.num_ssid != pIesLocal->SSID.num_ssid) break; - cdf_mem_copy(Ssid1.ssId, pIes1->SSID.ssid, + qdf_mem_copy(Ssid1.ssId, pIes1->SSID.ssid, pIes1->SSID.num_ssid); - cdf_mem_copy(Ssid2.ssId, pIesLocal->SSID.ssid, + qdf_mem_copy(Ssid2.ssId, pIesLocal->SSID.ssid, pIesLocal->SSID.num_ssid); - fEqual = - cdf_mem_compare(Ssid1.ssId, Ssid2.ssId, - pIesLocal->SSID.num_ssid); + fEqual = (!qdf_mem_cmp(Ssid1.ssId, Ssid2.ssId, + pIesLocal->SSID.num_ssid)); } while (0); if (pIes1) - cdf_mem_free(pIes1); + qdf_mem_free(pIes1); if (pIesLocal && !pIes2) - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); return fEqual; } @@ -1172,7 +1171,7 @@ bool csr_is_bss_description_wme(tHalHandle hHal, tSirBssDescription *pSirBssDesc } if ((pIes == NULL) && (NULL != pIesTemp)) { /* we allocate memory here so free it before returning */ - cdf_mem_free(pIesTemp); + qdf_mem_free(pIesTemp); } return fWme; @@ -1246,15 +1245,15 @@ QDF_STATUS csr_get_parsed_bss_description_ies(tHalHandle hHal, tpAniSirGlobal pMac = PMAC_STRUCT(hHal); if (pBssDesc && ppIEStruct) { - *ppIEStruct = cdf_mem_malloc(sizeof(tDot11fBeaconIEs)); + *ppIEStruct = qdf_mem_malloc(sizeof(tDot11fBeaconIEs)); if ((*ppIEStruct) != NULL) { - cdf_mem_set((void *)*ppIEStruct, + qdf_mem_set((void *)*ppIEStruct, sizeof(tDot11fBeaconIEs), 0); status = csr_parse_bss_description_ies(hHal, pBssDesc, *ppIEStruct); if (!QDF_IS_STATUS_SUCCESS(status)) { - cdf_mem_free(*ppIEStruct); + qdf_mem_free(*ppIEStruct); *ppIEStruct = NULL; } } else { @@ -2428,7 +2427,7 @@ bool csr_is_profile_wapi(tCsrRoamProfile *pProfile) static bool csr_is_wapi_oui_equal(tpAniSirGlobal pMac, uint8_t *Oui1, uint8_t *Oui2) { - return cdf_mem_compare(Oui1, Oui2, CSR_WAPI_OUI_SIZE); + return !qdf_mem_cmp(Oui1, Oui2, CSR_WAPI_OUI_SIZE); } static bool csr_is_wapi_oui_match(tpAniSirGlobal pMac, @@ -2447,7 +2446,7 @@ static bool csr_is_wapi_oui_match(tpAniSirGlobal pMac, } if (fYes && Oui) { - cdf_mem_copy(Oui, AllCyphers[idx], CSR_WAPI_OUI_SIZE); + qdf_mem_copy(Oui, AllCyphers[idx], CSR_WAPI_OUI_SIZE); } return fYes; @@ -2457,7 +2456,7 @@ static bool csr_is_wapi_oui_match(tpAniSirGlobal pMac, static bool csr_is_wpa_oui_equal(tpAniSirGlobal pMac, uint8_t *Oui1, uint8_t *Oui2) { - return cdf_mem_compare(Oui1, Oui2, CSR_WPA_OUI_SIZE); + return !qdf_mem_cmp(Oui1, Oui2, CSR_WPA_OUI_SIZE); } static bool csr_is_oui_match(tpAniSirGlobal pMac, @@ -2475,7 +2474,7 @@ static bool csr_is_oui_match(tpAniSirGlobal pMac, } if (fYes && Oui) { - cdf_mem_copy(Oui, AllCyphers[idx], CSR_WPA_OUI_SIZE); + qdf_mem_copy(Oui, AllCyphers[idx], CSR_WPA_OUI_SIZE); } return fYes; @@ -2707,13 +2706,13 @@ bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type, if (!rsn_ie->present) goto end; c_mcast_cipher++; - cdf_mem_copy(mccipher_arr, rsn_ie->gp_cipher_suite, + qdf_mem_copy(mccipher_arr, rsn_ie->gp_cipher_suite, CSR_RSN_OUI_SIZE); c_ucast_cipher = (uint8_t) (rsn_ie->pwise_cipher_suite_count); c_auth_suites = (uint8_t) (rsn_ie->akm_suite_count); for (i = 0; i < c_auth_suites && i < CSR_RSN_MAX_AUTH_SUITES; i++) { - cdf_mem_copy((void *)&authsuites[i], + qdf_mem_copy((void *)&authsuites[i], (void *)&rsn_ie->akm_suites[i], CSR_RSN_OUI_SIZE); } @@ -2814,14 +2813,14 @@ bool csr_get_rsn_information(tHalHandle hal, tCsrAuthList *auth_type, end: if (acceptable_cipher) { if (mcast_cipher) - cdf_mem_copy(mcast_cipher, multicast, + qdf_mem_copy(mcast_cipher, multicast, CSR_RSN_OUI_SIZE); if (ucast_cipher) - cdf_mem_copy(ucast_cipher, unicast, CSR_RSN_OUI_SIZE); + qdf_mem_copy(ucast_cipher, unicast, CSR_RSN_OUI_SIZE); if (auth_suite) - cdf_mem_copy(auth_suite, authentication, + qdf_mem_copy(auth_suite, authentication, CSR_RSN_OUI_SIZE); if (negotiated_authtype) @@ -2985,7 +2984,7 @@ bool csr_lookup_pmkid(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t *pBSSId, sms_log(pMac, LOG1, "match PMKID " MAC_ADDRESS_STR " to ", MAC_ADDR_ARRAY(pBSSId)); - if (cdf_mem_compare + if (!qdf_mem_cmp (pBSSId, pSession->PmkidCacheInfo[Index].BSSID.bytes, sizeof(struct qdf_mac_addr))) { /* match found */ @@ -2997,7 +2996,7 @@ bool csr_lookup_pmkid(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t *pBSSId, if (!fMatchFound) break; - cdf_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID, + qdf_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID, CSR_RSN_PMKID_SIZE); fRC = true; @@ -3058,12 +3057,12 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, pRSNIe->Version = CSR_RSN_VERSION_SUPPORTED; - cdf_mem_copy(pRSNIe->MulticastOui, MulticastCypher, + qdf_mem_copy(pRSNIe->MulticastOui, MulticastCypher, sizeof(MulticastCypher)); pRSNIe->cUnicastCyphers = 1; - cdf_mem_copy(&pRSNIe->UnicastOui[0], UnicastCypher, + qdf_mem_copy(&pRSNIe->UnicastOui[0], UnicastCypher, sizeof(UnicastCypher)); pAuthSuite = @@ -3071,7 +3070,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, UnicastOui[pRSNIe->cUnicastCyphers]); pAuthSuite->cAuthenticationSuites = 1; - cdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite, + qdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite, sizeof(AuthSuite)); /* RSN capabilities follows the Auth Suite (two octects) */ @@ -3105,7 +3104,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, &(PMKId[0]))) { pPMK->cPMKIDs = 1; - cdf_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId, + qdf_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId, CSR_RSN_PMKID_SIZE); } else { pPMK->cPMKIDs = 0; @@ -3116,7 +3115,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, pGroupMgmtCipherSuite = (uint8_t *) pPMK + sizeof(uint16_t) + (pPMK->cPMKIDs * CSR_RSN_PMKID_SIZE); - cdf_mem_copy(pGroupMgmtCipherSuite, csr_rsn_oui[07], + qdf_mem_copy(pGroupMgmtCipherSuite, csr_rsn_oui[07], CSR_WPA_OUI_SIZE); } #endif @@ -3150,7 +3149,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, if (!pIes && pIesLocal) { /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return cbRSNIe; @@ -3199,12 +3198,12 @@ bool csr_get_wapi_information(tHalHandle hal, tCsrAuthList *auth_type, goto end; c_mcast_cipher++; - cdf_mem_copy(mccipher_arr, wapi_ie->multicast_cipher_suite, + qdf_mem_copy(mccipher_arr, wapi_ie->multicast_cipher_suite, CSR_WAPI_OUI_SIZE); c_ucast_cipher = (uint8_t) (wapi_ie->unicast_cipher_suite_count); c_auth_suites = (uint8_t) (wapi_ie->akm_suite_count); for (i = 0; i < c_auth_suites && i < CSR_WAPI_MAX_AUTH_SUITES; i++) - cdf_mem_copy((void *)&authsuites[i], + qdf_mem_copy((void *)&authsuites[i], (void *)&wapi_ie->akm_suites[i], CSR_WAPI_OUI_SIZE); wapioui_idx = csr_get_oui_index_from_cipher(encr_type); @@ -3277,12 +3276,12 @@ bool csr_get_wapi_information(tHalHandle hal, tCsrAuthList *auth_type, end: if (acceptable_cipher) { if (mcast_cipher) - cdf_mem_copy(mcast_cipher, multicast, + qdf_mem_copy(mcast_cipher, multicast, CSR_WAPI_OUI_SIZE); if (ucast_cipher) - cdf_mem_copy(ucast_cipher, unicast, CSR_WAPI_OUI_SIZE); + qdf_mem_copy(ucast_cipher, unicast, CSR_WAPI_OUI_SIZE); if (auth_suite) - cdf_mem_copy(auth_suite, authentication, + qdf_mem_copy(auth_suite, authentication, CSR_WAPI_OUI_SIZE); if (negotiated_authtype) *negotiated_authtype = neg_authtype; @@ -3322,7 +3321,7 @@ bool csr_lookup_bkid(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t *pBSSId, for (Index = 0; Index < pSession->NumBkidCache; Index++) { sms_log(pMac, LOGW, "match BKID " MAC_ADDRESS_STR " to ", MAC_ADDR_ARRAY(pBSSId)); - if (cdf_mem_compare + if (!qdf_mem_cmp (pBSSId, pSession->BkidCacheInfo[Index].BSSID.bytes, sizeof(struct qdf_mac_addr))) { /* match found */ @@ -3334,7 +3333,7 @@ bool csr_lookup_bkid(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t *pBSSId, if (!fMatchFound) break; - cdf_mem_copy(pBKId, pSession->BkidCacheInfo[Index].BKID, + qdf_mem_copy(pBKId, pSession->BkidCacheInfo[Index].BKID, CSR_WAPI_BKID_SIZE); fRC = true; @@ -3383,24 +3382,24 @@ uint8_t csr_construct_wapi_ie(tpAniSirGlobal pMac, uint32_t sessionId, if (!fWapiMatch) break; - cdf_mem_set(pWapiIe, sizeof(tCsrWapiIe), 0); + qdf_mem_set(pWapiIe, sizeof(tCsrWapiIe), 0); pWapiIe->IeHeader.ElementID = DOT11F_EID_WAPI; pWapiIe->Version = CSR_WAPI_VERSION_SUPPORTED; pWapiIe->cAuthenticationSuites = 1; - cdf_mem_copy(&pWapiIe->AuthOui[0], AuthSuite, + qdf_mem_copy(&pWapiIe->AuthOui[0], AuthSuite, sizeof(AuthSuite)); pWapi = (uint8_t *) (&pWapiIe->AuthOui[1]); *pWapi = (uint16_t) 1; /* cUnicastCyphers */ pWapi += 2; - cdf_mem_copy(pWapi, UnicastCypher, sizeof(UnicastCypher)); + qdf_mem_copy(pWapi, UnicastCypher, sizeof(UnicastCypher)); pWapi += sizeof(UnicastCypher); - cdf_mem_copy(pWapi, MulticastCypher, sizeof(MulticastCypher)); + qdf_mem_copy(pWapi, MulticastCypher, sizeof(MulticastCypher)); pWapi += sizeof(MulticastCypher); /* WAPI capabilities follows the Auth Suite (two octects) */ @@ -3416,7 +3415,7 @@ uint8_t csr_construct_wapi_ie(tpAniSirGlobal pMac, uint32_t sessionId, /* Do we need to change the endianness here */ *pWapi = (uint16_t) 1; /* cBKIDs */ pWapi += 2; - cdf_mem_copy(pWapi, BKId, CSR_WAPI_BKID_SIZE); + qdf_mem_copy(pWapi, BKId, CSR_WAPI_BKID_SIZE); } else { *pWapi = 0; pWapi += 1; @@ -3442,7 +3441,7 @@ uint8_t csr_construct_wapi_ie(tpAniSirGlobal pMac, uint32_t sessionId, if (!pIes && pIesLocal) { /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return cbWapiIe; @@ -3487,7 +3486,7 @@ bool csr_get_wpa_cyphers(tpAniSirGlobal mac_ctx, tCsrAuthList *auth_type, if (!wpa_ie->present) goto end; c_mcast_cipher = 1; - cdf_mem_copy(mccipher_arr, wpa_ie->multicast_cipher, CSR_WPA_OUI_SIZE); + qdf_mem_copy(mccipher_arr, wpa_ie->multicast_cipher, CSR_WPA_OUI_SIZE); c_ucast_cipher = (uint8_t) (wpa_ie->unicast_cipher_count); c_auth_suites = (uint8_t) (wpa_ie->auth_suite_count); @@ -3558,15 +3557,15 @@ bool csr_get_wpa_cyphers(tpAniSirGlobal mac_ctx, tCsrAuthList *auth_type, end: if (acceptable_cipher) { if (mcast_cipher) - cdf_mem_copy((uint8_t **) mcast_cipher, multicast, + qdf_mem_copy((uint8_t **) mcast_cipher, multicast, CSR_WPA_OUI_SIZE); if (ucast_cipher) - cdf_mem_copy((uint8_t **) ucast_cipher, unicast, + qdf_mem_copy((uint8_t **) ucast_cipher, unicast, CSR_WPA_OUI_SIZE); if (auth_suite) - cdf_mem_copy((uint8_t **) auth_suite, authentication, + qdf_mem_copy((uint8_t **) auth_suite, authentication, CSR_WPA_OUI_SIZE); if (negotiated_authtype) @@ -3630,16 +3629,16 @@ uint8_t csr_construct_wpa_ie(tHalHandle hHal, tCsrRoamProfile *pProfile, pWpaIe->IeHeader.ElementID = SIR_MAC_WPA_EID; - cdf_mem_copy(pWpaIe->Oui, csr_wpa_oui[01], sizeof(pWpaIe->Oui)); + qdf_mem_copy(pWpaIe->Oui, csr_wpa_oui[01], sizeof(pWpaIe->Oui)); pWpaIe->Version = CSR_WPA_VERSION_SUPPORTED; - cdf_mem_copy(pWpaIe->MulticastOui, MulticastCypher, + qdf_mem_copy(pWpaIe->MulticastOui, MulticastCypher, sizeof(MulticastCypher)); pWpaIe->cUnicastCyphers = 1; - cdf_mem_copy(&pWpaIe->UnicastOui[0], UnicastCypher, + qdf_mem_copy(&pWpaIe->UnicastOui[0], UnicastCypher, sizeof(UnicastCypher)); pAuthSuite = @@ -3647,7 +3646,7 @@ uint8_t csr_construct_wpa_ie(tHalHandle hHal, tCsrRoamProfile *pProfile, UnicastOui[pWpaIe->cUnicastCyphers]); pAuthSuite->cAuthenticationSuites = 1; - cdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite, + qdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite, sizeof(AuthSuite)); /* The WPA capabilities follows the Auth Suite (two octects)-- */ @@ -3669,7 +3668,7 @@ uint8_t csr_construct_wpa_ie(tHalHandle hHal, tCsrRoamProfile *pProfile, if (!pIes && pIesLocal) { /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return cbWpaIe; @@ -3691,7 +3690,7 @@ uint8_t csr_retrieve_wpa_ie(tHalHandle hHal, tCsrRoamProfile *pProfile, if (SIR_MAC_WPA_IE_MAX_LENGTH >= pProfile->nWPAReqIELength) { cbWpaIe = (uint8_t) pProfile->nWPAReqIELength; - cdf_mem_copy(pWpaIe, pProfile->pWPAReqIE, + qdf_mem_copy(pWpaIe, pProfile->pWPAReqIE, cbWpaIe); } else { sms_log(pMac, LOGW, @@ -3732,7 +3731,7 @@ uint8_t csr_retrieve_rsn_ie(tHalHandle hHal, uint32_t sessionId, if (SIR_MAC_WPA_IE_MAX_LENGTH >= pProfile->nRSNReqIELength) { cbRsnIe = (uint8_t) pProfile->nRSNReqIELength; - cdf_mem_copy(pRsnIe, pProfile->pRSNReqIE, + qdf_mem_copy(pRsnIe, pProfile->pRSNReqIE, cbRsnIe); } else { sms_log(pMac, LOGW, @@ -3767,7 +3766,7 @@ uint8_t csr_retrieve_wapi_ie(tHalHandle hHal, uint32_t sessionId, if (DOT11F_IE_WAPI_MAX_LEN >= pProfile->nWAPIReqIELength) { cbWapiIe = (uint8_t) pProfile->nWAPIReqIELength; - cdf_mem_copy(pWapiIe, pProfile->pWAPIReqIE, + qdf_mem_copy(pWapiIe, pProfile->pWAPIReqIE, cbWapiIe); } else { sms_log(pMac, LOGW, @@ -3965,18 +3964,18 @@ bool csr_validate_wep(tpAniSirGlobal mac_ctx, eCsrEncryptionType uc_encry_type, /* else we can use the encryption type directly */ if (ie_ptr->WPA.present) { - match = cdf_mem_compare(ie_ptr->WPA.multicast_cipher, + match = (!qdf_mem_cmp(ie_ptr->WPA.multicast_cipher, csr_wpa_oui[csr_get_oui_index_from_cipher( uc_encry_type)], - CSR_WPA_OUI_SIZE); + CSR_WPA_OUI_SIZE)); if (match) goto end; } if (ie_ptr->RSN.present) { - match = cdf_mem_compare(ie_ptr->RSN.gp_cipher_suite, + match = (!qdf_mem_cmp(ie_ptr->RSN.gp_cipher_suite, csr_rsn_oui[csr_get_oui_index_from_cipher( uc_encry_type)], - CSR_RSN_OUI_SIZE); + CSR_RSN_OUI_SIZE)); } @@ -4292,7 +4291,7 @@ bool csr_is_ssid_match(tpAniSirGlobal pMac, uint8_t *ssid1, uint8_t ssid1Len, if (ssid1Len != bssSsidLen) break; - if (cdf_mem_compare(bssSsid, ssid1, bssSsidLen)) { + if (!qdf_mem_cmp(bssSsid, ssid1, bssSsidLen)) { fMatch = true; break; } @@ -4317,9 +4316,9 @@ bool csr_is_ssid_in_list(tHalHandle hHal, tSirMacSSid *pSsid, || ((pSsidList->SSIDList[i].SSID.length == pSsid->length) - && cdf_mem_compare(pSsid->ssId, + && (!qdf_mem_cmp(pSsid->ssId, pSsidList->SSIDList[i].SSID. - ssId, pSsid->length))) { + ssId, pSsid->length)))) { fMatch = true; break; } @@ -4337,7 +4336,7 @@ bool csr_is_bssid_match(tHalHandle hHal, struct qdf_mac_addr *pProfBssid, /* for efficiency of the MAC_ADDRESS functions, move the */ /* Bssid's into MAC_ADDRESS structs. */ - cdf_mem_copy(&ProfileBssid, pProfBssid, sizeof(struct qdf_mac_addr)); + qdf_mem_copy(&ProfileBssid, pProfBssid, sizeof(struct qdf_mac_addr)); do { @@ -4845,7 +4844,7 @@ end: if (ie_dblptr) *ie_dblptr = ie_ptr; else if (ie_ptr) - cdf_mem_free(ie_ptr); + qdf_mem_free(ie_ptr); return rc; } @@ -4933,7 +4932,7 @@ bool csr_match_bss_to_connect_profile(tHalHandle hHal, if (!pIes && pIesLocal) { /* locally allocated */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return fRC; @@ -5169,57 +5168,57 @@ void csr_release_profile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile) { if (pProfile) { if (pProfile->BSSIDs.bssid) { - cdf_mem_free(pProfile->BSSIDs.bssid); + qdf_mem_free(pProfile->BSSIDs.bssid); pProfile->BSSIDs.bssid = NULL; } if (pProfile->SSIDs.SSIDList) { - cdf_mem_free(pProfile->SSIDs.SSIDList); + qdf_mem_free(pProfile->SSIDs.SSIDList); pProfile->SSIDs.SSIDList = NULL; } if (pProfile->pWPAReqIE) { - cdf_mem_free(pProfile->pWPAReqIE); + qdf_mem_free(pProfile->pWPAReqIE); pProfile->pWPAReqIE = NULL; } if (pProfile->pRSNReqIE) { - cdf_mem_free(pProfile->pRSNReqIE); + qdf_mem_free(pProfile->pRSNReqIE); pProfile->pRSNReqIE = NULL; } #ifdef FEATURE_WLAN_WAPI if (pProfile->pWAPIReqIE) { - cdf_mem_free(pProfile->pWAPIReqIE); + qdf_mem_free(pProfile->pWAPIReqIE); pProfile->pWAPIReqIE = NULL; } #endif /* FEATURE_WLAN_WAPI */ if (pProfile->pAddIEScan) { - cdf_mem_free(pProfile->pAddIEScan); + qdf_mem_free(pProfile->pAddIEScan); pProfile->pAddIEScan = NULL; } if (pProfile->pAddIEAssoc) { - cdf_mem_free(pProfile->pAddIEAssoc); + qdf_mem_free(pProfile->pAddIEAssoc); pProfile->pAddIEAssoc = NULL; } if (pProfile->ChannelInfo.ChannelList) { - cdf_mem_free(pProfile->ChannelInfo.ChannelList); + qdf_mem_free(pProfile->ChannelInfo.ChannelList); pProfile->ChannelInfo.ChannelList = NULL; } - cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); + qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0); } } void csr_free_scan_filter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter) { if (pScanFilter->BSSIDs.bssid) { - cdf_mem_free(pScanFilter->BSSIDs.bssid); + qdf_mem_free(pScanFilter->BSSIDs.bssid); pScanFilter->BSSIDs.bssid = NULL; } if (pScanFilter->ChannelInfo.ChannelList) { - cdf_mem_free(pScanFilter->ChannelInfo.ChannelList); + qdf_mem_free(pScanFilter->ChannelInfo.ChannelList); pScanFilter->ChannelInfo.ChannelList = NULL; } if (pScanFilter->SSIDs.SSIDList) { - cdf_mem_free(pScanFilter->SSIDs.SSIDList); + qdf_mem_free(pScanFilter->SSIDs.SSIDList); pScanFilter->SSIDs.SSIDList = NULL; } } @@ -5230,7 +5229,7 @@ void csr_free_roam_profile(tpAniSirGlobal pMac, uint32_t sessionId) if (pSession->pCurRoamProfile) { csr_release_profile(pMac, pSession->pCurRoamProfile); - cdf_mem_free(pSession->pCurRoamProfile); + qdf_mem_free(pSession->pCurRoamProfile); pSession->pCurRoamProfile = NULL; } } @@ -5240,7 +5239,7 @@ void csr_free_connect_bss_desc(tpAniSirGlobal pMac, uint32_t sessionId) tCsrRoamSession *pSession = &pMac->roam.roamSession[sessionId]; if (pSession->pConnectBssDesc) { - cdf_mem_free(pSession->pConnectBssDesc); + qdf_mem_free(pSession->pConnectBssDesc); pSession->pConnectBssDesc = NULL; } } @@ -5452,7 +5451,7 @@ bool csr_match_country_code(tpAniSirGlobal pMac, uint8_t *pCountry, for (i = 0; i < WNI_CFG_COUNTRY_CODE_LEN - 1; i++) { pCountry[i] = csr_to_upper(pCountry[i]); } - if (!cdf_mem_compare(pIes->Country.country, pCountry, + if (qdf_mem_cmp(pIes->Country.country, pCountry, WNI_CFG_COUNTRY_CODE_LEN - 1)) { fRet = false; break; @@ -5472,7 +5471,7 @@ QDF_STATUS csr_get_modify_profile_fields(tpAniSirGlobal pMac, uint32_t sessionId return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(pModifyProfileFields, + qdf_mem_copy(pModifyProfileFields, &pMac->roam.roamSession[sessionId].connectedProfile. modifyProfileFields, sizeof(tCsrRoamModifyProfileFields)); @@ -5485,7 +5484,7 @@ QDF_STATUS csr_set_modify_profile_fields(tpAniSirGlobal pMac, uint32_t sessionId { tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); - cdf_mem_copy(&pSession->connectedProfile.modifyProfileFields, + qdf_mem_copy(&pSession->connectedProfile.modifyProfileFields, pModifyProfileFields, sizeof(tCsrRoamModifyProfileFields)); return QDF_STATUS_SUCCESS; @@ -5633,7 +5632,7 @@ void csr_diag_event_report(tpAniSirGlobal pmac, uint16_t event_type, { WLAN_HOST_DIAG_EVENT_DEF(diag_event, host_event_wlan_pe_payload_type); - cdf_mem_zero(&diag_event, sizeof(host_event_wlan_pe_payload_type)); + qdf_mem_zero(&diag_event, sizeof(host_event_wlan_pe_payload_type)); /* diag_event.bssid is already all zeroes */ diag_event.sme_state = sme_get_lim_sme_state(pmac); diff --git a/core/sme/src/nan/nan_api.c b/core/sme/src/nan/nan_api.c index 849d5fb88ace..7fc71e0f944e 100644 --- a/core/sme/src/nan/nan_api.c +++ b/core/sme/src/nan/nan_api.c @@ -79,7 +79,7 @@ QDF_STATUS sme_nan_request(tpNanRequestReq input) size_t data_len; data_len = sizeof(tNanRequest) + input->request_data_len; - data = cdf_mem_malloc(data_len); + data = qdf_mem_malloc(data_len); if (data == NULL) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -87,10 +87,10 @@ QDF_STATUS sme_nan_request(tpNanRequestReq input) return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(data, data_len); + qdf_mem_zero(data, data_len); data->request_data_len = input->request_data_len; if (input->request_data_len) { - cdf_mem_copy(data->request_data, + qdf_mem_copy(data->request_data, input->request_data, input->request_data_len); } @@ -102,7 +102,7 @@ QDF_STATUS sme_nan_request(tpNanRequestReq input) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, FL ("Not able to post WMA_NAN_REQUEST message to WMA")); - cdf_mem_free(data); + qdf_mem_free(data); return QDF_STATUS_SUCCESS; } diff --git a/core/sme/src/oem_data/oem_data_api.c b/core/sme/src/oem_data/oem_data_api.c index 5474e8cc8d92..6478e19ae479 100644 --- a/core/sme/src/oem_data/oem_data_api.c +++ b/core/sme/src/oem_data/oem_data_api.c @@ -58,7 +58,7 @@ QDF_STATUS oem_data_oem_data_req_open(tHalHandle hHal) do { /* initialize all the variables to null */ - cdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0); + qdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0); if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(pMac, LOGE, "oem_data_oem_data_req_open: Cannot allocate memory for the timer function"); @@ -88,7 +88,7 @@ QDF_STATUS oem_data_oem_data_req_close(tHalHandle hHal) } /* initialize all the variables to null */ - cdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0); + qdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0); } while (0); @@ -110,12 +110,12 @@ void oem_data_release_oem_data_req_command(tpAniSirGlobal pMac, if (csr_ll_remove_entry (&pMac->sme.smeCmdActiveList, &pOemDataCmd->Link, LL_ACCESS_LOCK)) { if (pOemDataCmd->u.oemDataCmd.oemDataReq.data) { - cdf_mem_free( + qdf_mem_free( pOemDataCmd->u.oemDataCmd.oemDataReq.data); pOemDataCmd->u.oemDataCmd.oemDataReq.data = NULL; } - cdf_mem_zero(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd)); + qdf_mem_zero(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd)); /* Now put this command back on the avilable command list */ sme_release_command(pMac, pOemDataCmd); @@ -165,7 +165,7 @@ QDF_STATUS oem_data_oem_data_req(tHalHandle hHal, /* set the oem data request */ cmd_req->sessionId = sessionId; cmd_req->data_len = oemDataReqConfig->data_len; - cmd_req->data = cdf_mem_malloc(cmd_req->data_len); + cmd_req->data = qdf_mem_malloc(cmd_req->data_len); if (!cmd_req->data) { sms_log(pMac, LOGE, FL("memory alloc failed")); @@ -173,7 +173,7 @@ QDF_STATUS oem_data_oem_data_req(tHalHandle hHal, break; } - cdf_mem_copy((void *)(cmd_req->data), + qdf_mem_copy((void *)(cmd_req->data), (void *)(oemDataReqConfig->data), cmd_req->data_len); } else { @@ -220,9 +220,9 @@ QDF_STATUS oem_data_send_mb_oem_data_req(tpAniSirGlobal pMac, return QDF_STATUS_E_INVAL; } - pMsg = cdf_mem_malloc(sizeof(*pMsg)); + pMsg = qdf_mem_malloc(sizeof(*pMsg)); if (NULL == pMsg) { - sms_log(pMac, LOGP, FL("cdf_mem_malloc failed")); + sms_log(pMac, LOGP, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } @@ -333,11 +333,11 @@ QDF_STATUS sme_handle_oem_data_rsp(tHalHandle hHal, uint8_t *pMsg) if (csr_ll_remove_entry (&pMac->sme.smeCmdActiveList, &pCommand->Link, LL_ACCESS_LOCK)) { - cdf_mem_set(&(pCommand->u.oemDataCmd), + qdf_mem_set(&(pCommand->u.oemDataCmd), sizeof(tOemDataCmd), 0); req = &(pCommand->u.oemDataCmd.oemDataReq); - cdf_mem_free(req->data); + qdf_mem_free(req->data); sme_release_command(pMac, pCommand); } } diff --git a/core/sme/src/p2p/p2p_api.c b/core/sme/src/p2p/p2p_api.c index 3f84dfbc1b6e..9deb1678b48d 100644 --- a/core/sme/src/p2p/p2p_api.c +++ b/core/sme/src/p2p/p2p_api.c @@ -70,13 +70,13 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac, goto error; } - pMsg = cdf_mem_malloc(len); + pMsg = qdf_mem_malloc(len); if (NULL == pMsg) goto error; else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, "%s call", __func__); - cdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0); + qdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0); pMsg->messageType = eWNI_SME_REMAIN_ON_CHANNEL_REQ; pMsg->length = (uint16_t) len; qdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr); @@ -88,7 +88,7 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac, p2pRemainonChn->u.remainChlCmd.isP2PProbeReqAllowed; pMsg->scan_id = p2pRemainonChn->u.remainChlCmd.scan_id; if (pMac->p2pContext.probeRspIeLength) - cdf_mem_copy((void *)pMsg->probeRspIe, + qdf_mem_copy((void *)pMsg->probeRspIe, (void *)pMac->p2pContext.probeRspIe, pMac->p2pContext.probeRspIeLength); status = cds_send_mb_message_to_mac(pMsg); @@ -196,7 +196,7 @@ QDF_STATUS sme_p2p_open(tHalHandle hHal) QDF_STATUS status = QDF_STATUS_SUCCESS; /* If static structure is too big, Need to change this function to allocate memory dynamically */ - cdf_mem_zero(&pMac->p2pContext, sizeof(tp2pContext)); + qdf_mem_zero(&pMac->p2pContext, sizeof(tp2pContext)); if (!QDF_IS_STATUS_SUCCESS(status)) { sme_p2p_close(hHal); @@ -210,7 +210,7 @@ QDF_STATUS p2p_stop(tHalHandle hHal) tpAniSirGlobal pMac = PMAC_STRUCT(hHal); if (pMac->p2pContext.probeRspIe) { - cdf_mem_free(pMac->p2pContext.probeRspIe); + qdf_mem_free(pMac->p2pContext.probeRspIe); pMac->p2pContext.probeRspIe = NULL; } @@ -224,7 +224,7 @@ QDF_STATUS sme_p2p_close(tHalHandle hHal) tpAniSirGlobal pMac = PMAC_STRUCT(hHal); if (pMac->p2pContext.probeRspIe) { - cdf_mem_free(pMac->p2pContext.probeRspIe); + qdf_mem_free(pMac->p2pContext.probeRspIe); pMac->p2pContext.probeRspIe = NULL; } @@ -314,18 +314,18 @@ QDF_STATUS p2p_send_action(tHalHandle hHal, uint8_t sessionId, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_MED, " %s sends action frame", __func__); msgLen = (uint16_t) ((sizeof(tSirMbMsgP2p)) + len); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set((void *)pMsg, msgLen, 0); + qdf_mem_set((void *)pMsg, msgLen, 0); pMsg->type = eWNI_SME_SEND_ACTION_FRAME_IND; pMsg->msgLen = msgLen; pMsg->sessionId = sessionId; pMsg->noack = noack; pMsg->channel_freq = channel_freq; pMsg->wait = (uint16_t) wait; - cdf_mem_copy(pMsg->data, pBuf, len); + qdf_mem_copy(pMsg->data, pBuf, len); status = cds_send_mb_message_to_mac(pMsg); } return status; @@ -341,11 +341,11 @@ QDF_STATUS p2p_cancel_remain_on_channel(tHalHandle hHal, /* Need to check session ID to support concurrency */ msgLen = (uint16_t) (sizeof(tSirMbMsgP2p)); - pMsg = cdf_mem_malloc(msgLen); + pMsg = qdf_mem_malloc(msgLen); if (NULL == pMsg) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set((void *)pMsg, msgLen, 0); + qdf_mem_set((void *)pMsg, msgLen, 0); pMsg->type = eWNI_SME_ABORT_REMAIN_ON_CHAN_IND; pMsg->msgLen = msgLen; pMsg->sessionId = sessionId; @@ -363,12 +363,12 @@ QDF_STATUS p2p_set_ps(tHalHandle hHal, tP2pPsConfig *pNoA) QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - pNoAParam = cdf_mem_malloc(sizeof(tP2pPsConfig)); + pNoAParam = qdf_mem_malloc(sizeof(tP2pPsConfig)); if (NULL == pNoAParam) status = QDF_STATUS_E_NOMEM; else { - cdf_mem_set(pNoAParam, sizeof(tP2pPsConfig), 0); - cdf_mem_copy(pNoAParam, pNoA, sizeof(tP2pPsConfig)); + qdf_mem_set(pNoAParam, sizeof(tP2pPsConfig), 0); + qdf_mem_copy(pNoAParam, pNoA, sizeof(tP2pPsConfig)); msg.type = eWNI_SME_UPDATE_NOA; msg.bodyval = 0; msg.bodyptr = pNoAParam; diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c index 64eb0feacaca..0e3d4ff01358 100644 --- a/core/sme/src/qos/sme_qos.c +++ b/core/sme/src/qos/sme_qos.c @@ -520,7 +520,7 @@ QDF_STATUS sme_qos_open(tpAniSirGlobal pMac) "%s: %d: initializing SME-QoS module", __func__, __LINE__); /* init the control block */ /* (note that this will make all sessions invalid) */ - cdf_mem_zero(&sme_qos_cb, sizeof(sme_qos_cb)); + qdf_mem_zero(&sme_qos_cb, sizeof(sme_qos_cb)); sme_qos_cb.pMac = pMac; sme_qos_cb.nextFlowId = SME_QOS_MIN_FLOW_ID; sme_qos_cb.nextDialogToken = SME_QOS_MIN_DIALOG_TOKEN; @@ -595,7 +595,7 @@ QDF_STATUS sme_qos_close(tpAniSirGlobal pMac) /* Clean up the assoc info if already allocated */ if (pSession->assocInfo.pBssDesc) { - cdf_mem_free(pSession->assocInfo.pBssDesc); + qdf_mem_free(pSession->assocInfo.pBssDesc); pSession->assocInfo.pBssDesc = NULL; } /* close the session's buffered command list */ @@ -779,7 +779,7 @@ sme_QosStatusType sme_qos_release_req(tHalHandle hHal, uint32_t QosFlowID) void qos_release_command(tpAniSirGlobal pMac, tSmeCmd *pCommand) { - cdf_mem_zero(&pCommand->u.qosCmd, sizeof(tGenericQosCmd)); + qdf_mem_zero(&pCommand->u.qosCmd, sizeof(tGenericQosCmd)); sme_release_command(pMac, pCommand); } @@ -904,7 +904,7 @@ QDF_STATUS sme_qos_validate_params(tpAniSirGlobal pMac, "%s: %d: validated with status = %d", __func__, __LINE__, status); if (pIes) { - cdf_mem_free(pIes); + qdf_mem_free(pIes); } return status; } @@ -1183,7 +1183,7 @@ sme_QosStatusType sme_qos_internal_setup_req(tpAniSirGlobal pMac, status)) { /* we received an expected "good" status */ /* create an entry in the flow list */ - pentry = cdf_mem_malloc(sizeof(*pentry)); + pentry = qdf_mem_malloc(sizeof(*pentry)); if (!pentry) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -1214,7 +1214,7 @@ sme_QosStatusType sme_qos_internal_setup_req(tpAniSirGlobal pMac, ac, pACInfo->tspec_mask_status); QDF_ASSERT(0); - cdf_mem_free(pentry); + qdf_mem_free(pentry); return SME_QOS_STATUS_SETUP_FAILURE_RSP; } pACInfo->tspec_mask_status = @@ -1518,7 +1518,7 @@ sme_QosStatusType sme_qos_internal_setup_req(tpAniSirGlobal pMac, /* create an entry in the flow list */ pentry = (sme_QosFlowInfoEntry *) - cdf_mem_malloc(sizeof(*pentry)); + qdf_mem_malloc(sizeof(*pentry)); if (!pentry) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -1556,7 +1556,7 @@ sme_QosStatusType sme_qos_internal_setup_req(tpAniSirGlobal pMac, /* if we are not in handoff, then notify all flows on */ /* this AC that the aggregate TSPEC may have changed */ if (!pentry->hoRenewal) { - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof (sme_QosSearchInfo)); search_key.key.ac_type = ac; @@ -1681,7 +1681,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, "%s: %d: invoked for flow %d", __func__, __LINE__, QosFlowID); - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.QosFlowID = QosFlowID; search_key.index = SME_QOS_SEARCH_KEY_INDEX_1; @@ -1790,7 +1790,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac, /* Once we have decided on OTA exchange needed or not we can delete the */ /* original one from the List */ pNewEntry = - (sme_QosFlowInfoEntry *) cdf_mem_malloc(sizeof(*pNewEntry)); + (sme_QosFlowInfoEntry *) 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 " @@ -1855,7 +1855,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac, == status)) { new_state = SME_QOS_QOS_ON; - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* delete the original entry in FLOW list which got modified */ search_key.key.ac_type = ac; @@ -1878,7 +1878,7 @@ sme_QosStatusType sme_qos_internal_modify_req(tpAniSirGlobal pMac, if (SME_QOS_STATUS_SETUP_SUCCESS_APSD_SET_ALREADY == status) { status = SME_QOS_STATUS_MODIFY_SETUP_SUCCESS_APSD_SET_ALREADY; - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof (sme_QosSearchInfo)); search_key.key.ac_type = ac; @@ -2031,7 +2031,7 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, "%s: %d: invoked for flow %d", __func__, __LINE__, QosFlowID); - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.QosFlowID = QosFlowID; search_key.index = SME_QOS_SEARCH_KEY_INDEX_1; @@ -2115,7 +2115,7 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, * to AP. */ if (flow_info->QoSInfo.ts_info.direction == SME_QOS_WMM_TS_DIR_BOTH) { - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.ac_type = ac; @@ -2149,7 +2149,7 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, && downlinkFlowsPresent) { /* Need to split the uni-directional flows into SME_QOS_TSPEC_INDEX_0 and SME_QOS_TSPEC_INDEX_1 */ - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof (sme_QosSearchInfo)); /* Mark all downstream flows as using tspec index 1 */ @@ -2281,7 +2281,7 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, pEntry, true); pDeletedFlow = flow_info; if (SME_QOS_STATUS_SETUP_SUCCESS_APSD_SET_ALREADY == status) { - cdf_mem_zero(&search_key, + qdf_mem_zero(&search_key, sizeof (sme_QosSearchInfo)); search_key.key.ac_type = ac; @@ -2551,12 +2551,12 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, } if (false == deltsIssued) { - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> curr_QoSInfo[flow_info-> tspec_mask - 1], sizeof(sme_QosWmmTspecInfo)); } - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> requested_QoSInfo[flow_info->tspec_mask - 1], sizeof(sme_QosWmmTspecInfo)); @@ -2617,7 +2617,7 @@ sme_QosStatusType sme_qos_internal_release_req(tpAniSirGlobal pMac, } /* if we deleted a flow, reclaim the memory */ if (pDeletedFlow) { - cdf_mem_free(pDeletedFlow); + qdf_mem_free(pDeletedFlow); } if ((SME_QOS_STATUS_RELEASE_SUCCESS_RSP == status)) { (void)sme_qos_process_buffered_cmd(sessionId); @@ -2705,7 +2705,7 @@ sme_QosStatusType sme_qos_setup(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: %d: On session %d AP doesn't support QoS", __func__, __LINE__, sessionId); - cdf_mem_free(pIes); + qdf_mem_free(pIes); /* notify HDD through the synchronous status msg */ return SME_QOS_STATUS_SETUP_NOT_QOS_AP_RSP; } @@ -2870,7 +2870,7 @@ sme_QosStatusType sme_qos_setup(tpAniSirGlobal pMac, } } while (0); - cdf_mem_free(pIes); + qdf_mem_free(pIes); return status; } @@ -2912,7 +2912,7 @@ QDF_STATUS sme_qos_ese_save_tspec_response(tpAniSirGlobal pMac, uint8_t sessionI ac = sme_qos_u_pto_ac_map[pTspec->user_priority]; - cdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp)); + qdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp)); pAddtsRsp->messageType = eWNI_SME_ADDTS_RSP; pAddtsRsp->length = sizeof(tSirAddtsRsp); @@ -3176,7 +3176,7 @@ QDF_STATUS sme_qos_create_tspec_ricie(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&ricIE, sizeof(tDot11fIERICDataDesc)); + qdf_mem_zero(&ricIE, sizeof(tDot11fIERICDataDesc)); ricIE.present = 1; ricIE.RICData.present = 1; @@ -3314,7 +3314,7 @@ static QDF_STATUS sme_qos_process_ft_reassoc_req_ev( ac_info->requested_QoSInfo[tspec_index] = ac_info->curr_QoSInfo[tspec_index]; - cdf_mem_zero( + qdf_mem_zero( &ac_info->curr_QoSInfo[tspec_index], sizeof(sme_QosWmmTspecInfo)); qos_requested = true; @@ -3407,7 +3407,7 @@ static void sme_qos_fill_aggr_info(int ac_id, int ts_id, session->ac_info[ac_id].addTsRsp[ts_id].rsp.lleTspecPresent; msg->aggrInfo.aggrAddTsInfo[ac_id].numTclas = session->ac_info[ac_id].addTsRsp[ts_id].rsp.numTclas; - cdf_mem_copy(msg->aggrInfo.aggrAddTsInfo[ac_id].tclasInfo, + qdf_mem_copy(msg->aggrInfo.aggrAddTsInfo[ac_id].tclasInfo, session->ac_info[ac_id].addTsRsp[ts_id].rsp.tclasInfo, SIR_MAC_TCLASIE_MAXNUM); msg->aggrInfo.aggrAddTsInfo[ac_id].tclasProc = @@ -3452,7 +3452,7 @@ QDF_STATUS sme_qos_ft_aggr_qos_req(tpAniSirGlobal mac_ctx, uint8_t session_id) session = &sme_qos_cb.sessionInfo[session_id]; - aggr_req = (tSirAggrQosReq *) cdf_mem_malloc(sizeof(tSirAggrQosReq)); + aggr_req = (tSirAggrQosReq *) qdf_mem_malloc(sizeof(tSirAggrQosReq)); if (!aggr_req) { /* err msg */ @@ -3461,14 +3461,14 @@ QDF_STATUS sme_qos_ft_aggr_qos_req(tpAniSirGlobal mac_ctx, uint8_t session_id) return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(aggr_req, sizeof(tSirAggrQosReq)); + qdf_mem_zero(aggr_req, sizeof(tSirAggrQosReq)); aggr_req->messageType = eWNI_SME_FT_AGGR_QOS_REQ; aggr_req->length = sizeof(tSirAggrQosReq); aggr_req->sessionId = session_id; aggr_req->timeout = 0; aggr_req->rspReqd = true; - cdf_mem_copy(&aggr_req->bssid.bytes[0], + qdf_mem_copy(&aggr_req->bssid.bytes[0], &session->assocInfo.pBssDesc->bssId[0], sizeof(struct qdf_mac_addr)); @@ -3519,7 +3519,7 @@ QDF_STATUS sme_qos_process_ftric_response(tpAniSirGlobal pMac, uint8_t sessionId = &sme_qos_cb.sessionInfo[sessionId].ac_info[ac].addTsRsp[tspecIndex]; - cdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp)); + qdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp)); pAddtsRsp->messageType = eWNI_SME_ADDTS_RSP; pAddtsRsp->length = sizeof(tSirAddtsRsp); @@ -3899,7 +3899,7 @@ QDF_STATUS sme_qos_add_ts_req(tpAniSirGlobal pMac, } pSession = &sme_qos_cb.sessionInfo[sessionId]; - pMsg = (tSirAddtsReq *) cdf_mem_malloc(sizeof(tSirAddtsReq)); + pMsg = (tSirAddtsReq *) qdf_mem_malloc(sizeof(tSirAddtsReq)); if (!pMsg) { /* err msg */ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -3907,7 +3907,7 @@ QDF_STATUS sme_qos_add_ts_req(tpAniSirGlobal pMac, __func__, __LINE__); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pMsg, sizeof(tSirAddtsReq)); + qdf_mem_zero(pMsg, sizeof(tSirAddtsReq)); pMsg->messageType = eWNI_SME_ADDTS_REQ; pMsg->length = sizeof(tSirAddtsReq); pMsg->sessionId = sessionId; @@ -3956,10 +3956,10 @@ QDF_STATUS sme_qos_add_ts_req(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: %d: BSS descriptor is NULL so we don't send request to PE", __func__, __LINE__); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&pMsg->bssid.bytes[0], + qdf_mem_copy(&pMsg->bssid.bytes[0], &pSession->assocInfo.pBssDesc->bssId[0], sizeof(struct qdf_mac_addr)); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, @@ -4016,7 +4016,7 @@ QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, "%s: %d: invoked on session %d for AC %d", __func__, __LINE__, sessionId, ac); - pMsg = (tSirDeltsReq *) cdf_mem_malloc(sizeof(tSirDeltsReq)); + pMsg = (tSirDeltsReq *) qdf_mem_malloc(sizeof(tSirDeltsReq)); if (!pMsg) { /* err msg */ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -4024,7 +4024,7 @@ QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac, __func__, __LINE__); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pMsg, sizeof(tSirDeltsReq)); + qdf_mem_zero(pMsg, sizeof(tSirDeltsReq)); /* get pointer to the TSPEC being deleted */ pSession = &sme_qos_cb.sessionInfo[sessionId]; pACInfo = &pSession->ac_info[ac]; @@ -4066,10 +4066,10 @@ QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac, QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: %d: BSS descriptor is NULL so we don't send request to PE", __func__, __LINE__); - cdf_mem_free(pMsg); + qdf_mem_free(pMsg); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&pMsg->bssid.bytes[0], + qdf_mem_copy(&pMsg->bssid.bytes[0], &pSession->assocInfo.pBssDesc->bssId[0], sizeof(struct qdf_mac_addr)); @@ -4077,7 +4077,7 @@ QDF_STATUS sme_qos_del_ts_req(tpAniSirGlobal pMac, "%s: %d: up = %d, tid = %d", __func__, __LINE__, pTspecInfo->ts_info.up, pTspecInfo->ts_info.tid); - cdf_mem_zero(&pACInfo->curr_QoSInfo[tspec_mask - 1], + qdf_mem_zero(&pACInfo->curr_QoSInfo[tspec_mask - 1], sizeof(sme_QosWmmTspecInfo)); if (QDF_IS_STATUS_SUCCESS(cds_send_mb_message_to_mac(pMsg))) { status = QDF_STATUS_SUCCESS; @@ -4243,7 +4243,7 @@ QDF_STATUS sme_qos_process_del_ts_ind(tpAniSirGlobal pMac, void *pMsgBuf) pSession = &sme_qos_cb.sessionInfo[sessionId]; pACInfo = &pSession->ac_info[ac]; - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_2; @@ -4516,14 +4516,14 @@ QDF_STATUS sme_qos_handle_handoff_state(tpAniSirGlobal mac_ctx, /* notify HDD with new Service Interval */ ac_info->curr_QoSInfo[SME_QOS_TSPEC_INDEX_0] = ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0]; - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_2; search_key.sessionId = sessionid; /* notify PMC that reassoc is done for APSD on certain AC?? */ - cdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo)); /* set the hoRenewal field in control block if needed */ search_key1.index = SME_QOS_SEARCH_KEY_INDEX_3; search_key1.key.reason = SME_QOS_REASON_SETUP; @@ -4554,7 +4554,7 @@ QDF_STATUS sme_qos_handle_handoff_state(tpAniSirGlobal mac_ctx, return QDF_STATUS_E_FAILURE; } ac_info->hoRenewal = false; - cdf_mem_zero(&ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0], + qdf_mem_zero(&ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0], sizeof(sme_QosWmmTspecInfo)); return status; @@ -4712,16 +4712,16 @@ QDF_STATUS sme_qos_process_reassoc_failure_ev(tpAniSirGlobal pMac, if (pACInfo->reassoc_pending) { pACInfo->reassoc_pending = false; } - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> curr_QoSInfo[SME_QOS_TSPEC_INDEX_0], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> requested_QoSInfo[SME_QOS_TSPEC_INDEX_0], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> curr_QoSInfo[SME_QOS_TSPEC_INDEX_1], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> requested_QoSInfo[SME_QOS_TSPEC_INDEX_1], sizeof(sme_QosWmmTspecInfo)); pACInfo->tspec_mask_status = SME_QOS_TSPEC_MASK_CLEAR; @@ -4902,16 +4902,16 @@ QDF_STATUS sme_qos_process_handoff_failure_ev(tpAniSirGlobal pMac, case SME_QOS_HANDOFF: sme_qos_state_transition(sessionId, ac, SME_QOS_INIT); /* need to clean up flows: TODO */ - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> curr_QoSInfo[SME_QOS_TSPEC_INDEX_0], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> requested_QoSInfo[SME_QOS_TSPEC_INDEX_0], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> curr_QoSInfo[SME_QOS_TSPEC_INDEX_1], sizeof(sme_QosWmmTspecInfo)); - cdf_mem_zero(&pACInfo-> + qdf_mem_zero(&pACInfo-> requested_QoSInfo[SME_QOS_TSPEC_INDEX_1], sizeof(sme_QosWmmTspecInfo)); pACInfo->tspec_mask_status = SME_QOS_TSPEC_MASK_CLEAR; @@ -4937,7 +4937,7 @@ QDF_STATUS sme_qos_process_handoff_failure_ev(tpAniSirGlobal pMac, pSession->handoffRequested = false; /* clean up the assoc info */ if (pSession->assocInfo.pBssDesc) { - cdf_mem_free(pSession->assocInfo.pBssDesc); + qdf_mem_free(pSession->assocInfo.pBssDesc); pSession->assocInfo.pBssDesc = NULL; } return QDF_STATUS_SUCCESS; @@ -4997,7 +4997,7 @@ QDF_STATUS sme_qos_process_disconnect_ev(tpAniSirGlobal pMac, uint8_t sessionId, sme_qos_delete_existing_flows(pMac, sessionId); /* clean up the assoc info */ if (pSession->assocInfo.pBssDesc) { - cdf_mem_free(pSession->assocInfo.pBssDesc); + qdf_mem_free(pSession->assocInfo.pBssDesc); pSession->assocInfo.pBssDesc = NULL; } sme_qos_cb.sessionInfo[sessionId].sessionActive = false; @@ -5046,7 +5046,7 @@ QDF_STATUS sme_qos_process_join_req_ev(tpAniSirGlobal pMac, uint8_t sessionId, } /* clean up the assoc info if already set */ if (pSession->assocInfo.pBssDesc) { - cdf_mem_free(pSession->assocInfo.pBssDesc); + qdf_mem_free(pSession->assocInfo.pBssDesc); pSession->assocInfo.pBssDesc = NULL; } return QDF_STATUS_SUCCESS; @@ -5143,7 +5143,7 @@ QDF_STATUS sme_qos_process_preauth_success_ind(tpAniSirGlobal mac_ctx, ac_info = &qos_session->ac_info[ac]; tspec_pending_status = ac_info->tspec_pending; tspec_mask_status = ac_info->tspec_mask_status; - cdf_mem_zero(ac_info->ricIdentifier, SME_QOS_TSPEC_INDEX_MAX); + qdf_mem_zero(ac_info->ricIdentifier, SME_QOS_TSPEC_INDEX_MAX); QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, FL("AC %d ==> TSPEC status = %d, tspec pending = %d"), ac, tspec_mask_status, tspec_pending_status); @@ -5229,7 +5229,7 @@ QDF_STATUS sme_qos_process_add_ts_failure_rsp(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_2; @@ -5244,7 +5244,7 @@ QDF_STATUS sme_qos_process_add_ts_failure_rsp(tpAniSirGlobal pMac, QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1], + qdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1], sizeof(sme_QosWmmTspecInfo)); if ((!pACInfo->num_flows[0]) && (!pACInfo->num_flows[1])) { @@ -5473,7 +5473,7 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac, if ((pACInfo->curr_QoSInfo[pACInfo->tspec_pending - 1].ts_info. direction == SME_QOS_WMM_TS_DIR_BOTH) && (pACInfo->num_flows[SME_QOS_TSPEC_INDEX_1] > 0)) { - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* update tspec_mask for all the flows having SME_QOS_TSPEC_MASK_BIT_2_SET to SME_QOS_TSPEC_MASK_BIT_1_SET */ search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_5; @@ -5483,7 +5483,7 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac, SME_QOS_TSPEC_MASK_BIT_1_SET); } - cdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo)); /* set the horenewal field in control block if needed */ search_key1.index = SME_QOS_SEARCH_KEY_INDEX_3; search_key1.key.reason = SME_QOS_REASON_SETUP; @@ -5500,7 +5500,7 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac, } } } - cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); + qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); /* set the key type & the key to be searched in the Flow List */ search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_2; @@ -5518,7 +5518,7 @@ QDF_STATUS sme_qos_process_add_ts_success_rsp(tpAniSirGlobal pMac, return QDF_STATUS_E_FAILURE; } pACInfo->hoRenewal = false; - cdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1], + qdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1], sizeof(sme_QosWmmTspecInfo)); /* event: EVENT_WLAN_QOS */ #ifdef FEATURE_WLAN_DIAG_SUPPORT @@ -5623,7 +5623,7 @@ QDF_STATUS sme_qos_aggregate_params(sme_QosWmmTspecInfo *pInput_Tspec_Info, __func__, __LINE__); return QDF_STATUS_E_FAILURE; } - cdf_mem_copy(&TspecInfo, pCurrent_Tspec_Info, + qdf_mem_copy(&TspecInfo, pCurrent_Tspec_Info, sizeof(sme_QosWmmTspecInfo)); TspecInfo.ts_info.psb = pInput_Tspec_Info->ts_info.psb; /*------------------------------------------------------------------------- @@ -5755,10 +5755,10 @@ QDF_STATUS sme_qos_aggregate_params(sme_QosWmmTspecInfo *pInput_Tspec_Info, TspecInfo.ts_info.burst_size_defn = 1; } if (pUpdated_Tspec_Info) { - cdf_mem_copy(pUpdated_Tspec_Info, &TspecInfo, + qdf_mem_copy(pUpdated_Tspec_Info, &TspecInfo, sizeof(sme_QosWmmTspecInfo)); } else { - cdf_mem_copy(pCurrent_Tspec_Info, &TspecInfo, + qdf_mem_copy(pCurrent_Tspec_Info, &TspecInfo, sizeof(sme_QosWmmTspecInfo)); } return QDF_STATUS_SUCCESS; @@ -5797,7 +5797,7 @@ static QDF_STATUS sme_qos_update_params(uint8_t sessionId, __func__, __LINE__); return QDF_STATUS_E_FAILURE; } - cdf_mem_zero(&Tspec_Info, sizeof(sme_QosWmmTspecInfo)); + qdf_mem_zero(&Tspec_Info, sizeof(sme_QosWmmTspecInfo)); pEntry = csr_ll_peek_head(&sme_qos_cb.flow_list, false); if (!pEntry) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -6137,7 +6137,7 @@ bool sme_qos_is_acm(tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc, __func__, __LINE__, ret_val, ac); if (NULL == pIes) { /* IEs were allocated locally so free them */ - cdf_mem_free(pIesLocal); + qdf_mem_free(pIesLocal); } return ret_val; } @@ -6253,7 +6253,7 @@ static QDF_STATUS sme_qos_buffer_existing_flows(tpAniSirGlobal mac_ctx, FL("Deleting original entry at %p with flowID %d"), flow_info, flow_info->QosFlowID); csr_ll_remove_entry(&sme_qos_cb.flow_list, list_entry, true); - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); list_entry = list_nextentry; } @@ -6304,7 +6304,7 @@ static QDF_STATUS sme_qos_delete_existing_flows(tpAniSirGlobal pMac, /* delete the entry from Flow List */ csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry, true); - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); } pEntry = pNextEntry; } @@ -6329,7 +6329,7 @@ QDF_STATUS sme_qos_buffer_cmd(sme_QosCmdInfo *pcmd, bool insert_head) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, "%s: %d: Invoked", __func__, __LINE__); pentry = - (sme_QosCmdInfoEntry *) cdf_mem_malloc(sizeof(sme_QosCmdInfoEntry)); + (sme_QosCmdInfoEntry *) qdf_mem_malloc(sizeof(sme_QosCmdInfoEntry)); if (!pentry) { /* err msg */ QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -6451,7 +6451,7 @@ static QDF_STATUS sme_qos_process_buffered_cmd(uint8_t session_id) break; } /* buffered command has been processed, reclaim the memory */ - cdf_mem_free(pcmd); + qdf_mem_free(pcmd); } else { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH, FL("cmd buffer empty")); @@ -6497,7 +6497,7 @@ static QDF_STATUS sme_qos_delete_buffered_requests(tpAniSirGlobal pMac, true); /* reclaim the memory */ pcmd = GET_BASE_ADDR(pEntry, sme_QosCmdInfoEntry, link); - cdf_mem_free(pcmd); + qdf_mem_free(pcmd); pEntry = pNextEntry; } return QDF_STATUS_SUCCESS; @@ -6528,20 +6528,20 @@ QDF_STATUS sme_qos_save_assoc_info(sme_QosSessionInfo *pSession, } /* clean up the assoc info if already set */ if (pSession->assocInfo.pBssDesc) { - cdf_mem_free(pSession->assocInfo.pBssDesc); + qdf_mem_free(pSession->assocInfo.pBssDesc); pSession->assocInfo.pBssDesc = NULL; } bssLen = pAssoc_info->pBssDesc->length + sizeof(pAssoc_info->pBssDesc->length); /* save the bss Descriptor */ - pBssDesc = (tSirBssDescription *) cdf_mem_malloc(bssLen); + 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__); return QDF_STATUS_E_NOMEM; } - cdf_mem_copy(pBssDesc, pAssoc_info->pBssDesc, bssLen); + qdf_mem_copy(pBssDesc, pAssoc_info->pBssDesc, bssLen); pSession->assocInfo.pBssDesc = pBssDesc; /* save the apsd info from assoc */ if (pAssoc_info->pProfile) { @@ -6666,7 +6666,7 @@ QDF_STATUS sme_qos_modify_fnp(tpAniSirGlobal pMac, tListElem *pEntry) __func__, __LINE__, flow_info, flow_info->QosFlowID); csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry, true); /* reclaim the memory */ - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); break; default: break; @@ -6848,7 +6848,7 @@ sme_qos_reassoc_success_ev_fnp(tpAniSirGlobal mac_ctx, flow_info, flow_info->QosFlowID); csr_ll_remove_entry(&sme_qos_cb.flow_list, entry, true); /* reclaim the memory */ - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); } return QDF_STATUS_SUCCESS; } @@ -6935,7 +6935,7 @@ QDF_STATUS sme_qos_add_ts_failure_fnp(tpAniSirGlobal pMac, tListElem *pEntry) __func__, __LINE__, flow_info, flow_info->QosFlowID); csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry, true); /* reclaim the memory */ - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); } return QDF_STATUS_SUCCESS; } @@ -7116,7 +7116,7 @@ QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal mac_ctx, /* delete the entry from Flow List */ csr_ll_remove_entry(&sme_qos_cb.flow_list, entry, true); /* reclaim the memory */ - cdf_mem_free(flow_info); + qdf_mem_free(flow_info); } return QDF_STATUS_SUCCESS; } @@ -7311,10 +7311,10 @@ void sme_qos_cleanup_ctrl_blk_for_handoff(tpAniSirGlobal pMac, uint8_t sessionId pSession = &sme_qos_cb.sessionInfo[sessionId]; for (ac = SME_QOS_EDCA_AC_BE; ac < SME_QOS_EDCA_AC_MAX; ac++) { pACInfo = &pSession->ac_info[ac]; - cdf_mem_zero(pACInfo->curr_QoSInfo, + qdf_mem_zero(pACInfo->curr_QoSInfo, sizeof(sme_QosWmmTspecInfo) * SME_QOS_TSPEC_INDEX_MAX); - cdf_mem_zero(pACInfo->requested_QoSInfo, + qdf_mem_zero(pACInfo->requested_QoSInfo, sizeof(sme_QosWmmTspecInfo) * SME_QOS_TSPEC_INDEX_MAX); pACInfo->num_flows[0] = 0; @@ -7389,11 +7389,11 @@ bool sme_qos_is_ts_info_ack_policy_valid(tpAniSirGlobal pMac, "%s: %d: On session %d HT Caps aren't present but application set ack policy to HT ", __func__, __LINE__, sessionId); - cdf_mem_free(pIes); + qdf_mem_free(pIes); return false; } - cdf_mem_free(pIes); + qdf_mem_free(pIes); return true; } @@ -7654,7 +7654,7 @@ static void sme_qos_init_a_cs(tpAniSirGlobal pMac, uint8_t sessionId) sme_QosEdcaAcType ac; pSession = &sme_qos_cb.sessionInfo[sessionId]; for (ac = SME_QOS_EDCA_AC_BE; ac < SME_QOS_EDCA_AC_MAX; ac++) { - cdf_mem_zero(&pSession->ac_info[ac], sizeof(sme_QosACInfo)); + qdf_mem_zero(&pSession->ac_info[ac], sizeof(sme_QosACInfo)); sme_qos_state_transition(sessionId, ac, SME_QOS_INIT); } } diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 31728178ef34..c95c6ee0bf87 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -94,8 +94,8 @@ static void rrm_ll_purge_neighbor_cache(tpAniSirGlobal pMac, while ((pEntry = csr_ll_remove_head(pList, LL_ACCESS_NOLOCK)) != NULL) { pNeighborReportDesc = GET_BASE_ADDR(pEntry, tRrmNeighborReportDesc, List); - cdf_mem_free(pNeighborReportDesc->pNeighborBssDescription); - cdf_mem_free(pNeighborReportDesc); + qdf_mem_free(pNeighborReportDesc->pNeighborBssDescription); + qdf_mem_free(pNeighborReportDesc); } csr_ll_unlock(pList); return; @@ -193,13 +193,13 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx, do { length = sizeof(tSirBeaconReportXmitInd); - beacon_rep = cdf_mem_malloc(length); + beacon_rep = qdf_mem_malloc(length); if (NULL == beacon_rep) { sms_log(mac_ctx, LOGP, "Unable to allocate memory for beacon report"); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(beacon_rep, length); + qdf_mem_zero(beacon_rep, length); #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Allocated memory for beacon_rep")); #endif @@ -208,7 +208,7 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx, beacon_rep->uDialogToken = rrm_ctx->token; beacon_rep->duration = rrm_ctx->duration[0]; beacon_rep->regClass = rrm_ctx->regClass; - cdf_mem_copy(beacon_rep->bssId, rrm_ctx->sessionBssId.bytes, + qdf_mem_copy(beacon_rep->bssId, rrm_ctx->sessionBssId.bytes, QDF_MAC_ADDR_SIZE); i = 0; @@ -218,14 +218,14 @@ sme_rrm_send_beacon_report_xmit_ind(tpAniSirGlobal mac_ctx, break; ie_len = GET_IE_LEN_IN_BSS(bss_desc->length); beacon_rep->pBssDescription[i] = - cdf_mem_malloc(ie_len + + qdf_mem_malloc(ie_len + sizeof(tSirBssDescription)); if (NULL == beacon_rep->pBssDescription[i]) break; - cdf_mem_copy(beacon_rep->pBssDescription[i], + qdf_mem_copy(beacon_rep->pBssDescription[i], bss_desc, sizeof(tSirBssDescription)); - cdf_mem_copy( + qdf_mem_copy( &beacon_rep->pBssDescription[i]->ieFields[0], bss_desc->ieFields, ie_len); sms_log(mac_ctx, LOG1, @@ -314,7 +314,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results( if (result_arr) cur_result = result_arr[bss_counter]; - cdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp)); + qdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp)); do { cur_meas_req = NULL; for (i = 0; i < rrm_ctx->eseBcnReqInfo.numBcnReqIe; i++) { @@ -356,7 +356,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results( bcn_rpt_fields->CapabilityInfo = bss_desc->capabilityInfo; - cdf_mem_copy(bcn_rpt_fields->Bssid, + qdf_mem_copy(bcn_rpt_fields->Bssid, bss_desc->bssId, sizeof(tSirMacAddr)); fill_ie_status = sir_beacon_ie_ese_bcn_report(mac_ctx, @@ -405,7 +405,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results( /* Free the memory allocated to IE */ for (i = 0; i < j; i++) if (bcn_report->bcnRepBssInfo[i].pBuf) - cdf_mem_free(bcn_report->bcnRepBssInfo[i].pBuf); + qdf_mem_free(bcn_report->bcnRepBssInfo[i].pBuf); } while (cur_result); return status; } @@ -442,27 +442,27 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx, sms_log(mac_ctx, LOGE, FL("Send scan result to PE ")); #endif - cdf_mem_zero(&filter, sizeof(filter)); - cdf_mem_zero(scanresults_arr, + qdf_mem_zero(&filter, sizeof(filter)); + qdf_mem_zero(scanresults_arr, sizeof(next_result) * SIR_BCN_REPORT_MAX_BSS_DESC); filter.BSSIDs.numOfBSSIDs = 1; filter.BSSIDs.bssid = (struct qdf_mac_addr *)&rrm_ctx->bssId; if (rrm_ctx->ssId.length) { filter.SSIDs.SSIDList = - (tCsrSSIDInfo *) cdf_mem_malloc(sizeof(tCsrSSIDInfo)); + (tCsrSSIDInfo *) qdf_mem_malloc(sizeof(tCsrSSIDInfo)); if (filter.SSIDs.SSIDList == NULL) { - sms_log(mac_ctx, LOGP, FL("cdf_mem_malloc failed")); + sms_log(mac_ctx, LOGP, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Allocated memory for SSIDList")); #endif - cdf_mem_zero(filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo)); + qdf_mem_zero(filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo)); filter.SSIDs.SSIDList->SSID.length = rrm_ctx->ssId.length; - cdf_mem_copy(filter.SSIDs.SSIDList->SSID.ssId, + qdf_mem_copy(filter.SSIDs.SSIDList->SSID.ssId, rrm_ctx->ssId.ssId, rrm_ctx->ssId.length); filter.SSIDs.numOfSSIDs = 1; } else { @@ -489,7 +489,7 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx, if (filter.SSIDs.SSIDList) { /* Free the memory allocated for SSIDList */ - cdf_mem_free(filter.SSIDs.SSIDList); + qdf_mem_free(filter.SSIDs.SSIDList); #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Free memory for SSIDList")); #endif @@ -623,7 +623,7 @@ static QDF_STATUS sme_rrm_scan_request_callback(tHalHandle halHandle, &pSmeRrmContext->channelList. ChannelList[pSmeRrmContext->currentIndex], true); - cdf_mem_free(pSmeRrmContext->channelList.ChannelList); + qdf_mem_free(pSmeRrmContext->channelList.ChannelList); #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) pSmeRrmContext->eseBcnReqInProgress = false; #endif @@ -674,31 +674,31 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Issue scan request")); #endif - cdf_mem_zero(&scan_req, sizeof(scan_req)); + qdf_mem_zero(&scan_req, sizeof(scan_req)); /* set scan_type, active or passive */ scan_req.bcnRptReqScan = true; scan_req.scanType = scan_type; - cdf_mem_copy(&scan_req.bssid.bytes, sme_rrm_ctx->bssId, + qdf_mem_copy(&scan_req.bssid.bytes, sme_rrm_ctx->bssId, QDF_MAC_ADDR_SIZE); if (sme_rrm_ctx->ssId.length) { scan_req.SSIDs.numOfSSIDs = 1; scan_req.SSIDs.SSIDList = - (tCsrSSIDInfo *)cdf_mem_malloc( + (tCsrSSIDInfo *)qdf_mem_malloc( sizeof(tCsrSSIDInfo)); if (NULL == scan_req.SSIDs.SSIDList) { sms_log(mac_ctx, LOGP, - FL("cdf_mem_malloc failed")); + FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Allocated memory for pSSIDList")); #endif - cdf_mem_zero(scan_req.SSIDs.SSIDList, + qdf_mem_zero(scan_req.SSIDs.SSIDList, sizeof(tCsrSSIDInfo)); scan_req.SSIDs.SSIDList->SSID.length = sme_rrm_ctx->ssId.length; - cdf_mem_copy(scan_req.SSIDs.SSIDList->SSID.ssId, + qdf_mem_copy(scan_req.SSIDs.SSIDList->SSID.ssId, sme_rrm_ctx->ssId.ssId, sme_rrm_ctx->ssId.length); } @@ -743,7 +743,7 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) &sme_rrm_scan_request_callback, NULL); if (sme_rrm_ctx->ssId.length) { - cdf_mem_free(scan_req.SSIDs.SSIDList); + qdf_mem_free(scan_req.SSIDs.SSIDList); #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("Free memory for SSIDList")); #endif @@ -776,7 +776,7 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) sme_rrm_send_scan_result(mac_ctx, 1, &sme_rrm_ctx->channelList.ChannelList[ sme_rrm_ctx->currentIndex], true); - cdf_mem_free(sme_rrm_ctx->channelList.ChannelList); + qdf_mem_free(sme_rrm_ctx->channelList.ChannelList); } } else { sms_log(mac_ctx, LOGE, FL("Unknown beacon report req mode(%d)"), @@ -821,9 +821,9 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, void *pMsg && (pBeaconReq->channelList.numChannels == 0))) { /* Add all the channel in the regulatory domain. */ wlan_cfg_get_str_len(pMac, WNI_CFG_VALID_CHANNEL_LIST, &len); - pSmeRrmContext->channelList.ChannelList = cdf_mem_malloc(len); + pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len); if (pSmeRrmContext->channelList.ChannelList == NULL) { - sms_log(pMac, LOGP, FL("cdf_mem_malloc failed")); + sms_log(pMac, LOGP, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } #if defined WLAN_VOWIFI_DEBUG @@ -851,9 +851,9 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, void *pMsg len += pBeaconReq->channelList.numChannels; - pSmeRrmContext->channelList.ChannelList = cdf_mem_malloc(len); + pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len); if (pSmeRrmContext->channelList.ChannelList == NULL) { - sms_log(pMac, LOGP, FL("cdf_mem_malloc failed")); + sms_log(pMac, LOGP, FL("qdf_mem_malloc failed")); return QDF_STATUS_E_NOMEM; } #if defined WLAN_VOWIFI_DEBUG @@ -891,15 +891,15 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, void *pMsg } /* Copy session bssid */ - cdf_mem_copy(pSmeRrmContext->sessionBssId.bytes, pBeaconReq->bssId, + qdf_mem_copy(pSmeRrmContext->sessionBssId.bytes, pBeaconReq->bssId, sizeof(tSirMacAddr)); /* copy measurement bssid */ - cdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid, + qdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid, sizeof(tSirMacAddr)); /* Copy ssid */ - cdf_mem_copy(&pSmeRrmContext->ssId, &pBeaconReq->ssId, + qdf_mem_copy(&pSmeRrmContext->ssId, &pBeaconReq->ssId, sizeof(tAniSSID)); pSmeRrmContext->token = pBeaconReq->uDialogToken; @@ -909,10 +909,10 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, void *pMsg pSmeRrmContext->rrmConfig.max_randn_interval); pSmeRrmContext->currentIndex = 0; pSmeRrmContext->msgSource = pBeaconReq->msgSource; - cdf_mem_copy((uint8_t *) &pSmeRrmContext->measMode, + qdf_mem_copy((uint8_t *) &pSmeRrmContext->measMode, (uint8_t *) &pBeaconReq->fMeasurementtype, SIR_ESE_MAX_MEAS_IE_REQS); - cdf_mem_copy((uint8_t *) &pSmeRrmContext->duration, + qdf_mem_copy((uint8_t *) &pSmeRrmContext->duration, (uint8_t *) &pBeaconReq->measurementDuration, SIR_ESE_MAX_MEAS_IE_REQS); @@ -959,14 +959,14 @@ QDF_STATUS sme_rrm_neighbor_report_request(tpAniSirGlobal pMac, uint8_t sessionI return QDF_STATUS_E_AGAIN; } - pMsg = cdf_mem_malloc(sizeof(tSirNeighborReportReqInd)); + pMsg = qdf_mem_malloc(sizeof(tSirNeighborReportReqInd)); if (NULL == pMsg) { sms_log(pMac, LOGE, "Unable to allocate memory for Neighbor request"); return QDF_STATUS_E_NOMEM; } - cdf_mem_zero(pMsg, sizeof(tSirNeighborReportReqInd)); + qdf_mem_zero(pMsg, sizeof(tSirNeighborReportReqInd)); #if defined WLAN_VOWIFI_DEBUG sms_log(pMac, LOGE, FL(" Allocated memory for Neighbor request")); #endif @@ -983,10 +983,10 @@ QDF_STATUS sme_rrm_neighbor_report_request(tpAniSirGlobal pMac, uint8_t sessionI pMsg->messageType = eWNI_SME_NEIGHBOR_REPORT_REQ_IND; pMsg->length = sizeof(tSirNeighborReportReqInd); - cdf_mem_copy(&pMsg->bssId, &pSession->connectedProfile.bssid, + qdf_mem_copy(&pMsg->bssId, &pSession->connectedProfile.bssid, sizeof(tSirMacAddr)); pMsg->noSSID = pNeighborReq->no_ssid; - cdf_mem_copy(&pMsg->ucSSID, &pNeighborReq->ssid, sizeof(tSirMacSSid)); + qdf_mem_copy(&pMsg->ucSSID, &pNeighborReq->ssid, sizeof(tSirMacSSid)); status = cds_send_mb_message_to_mac(pMsg); if (status != QDF_STATUS_SUCCESS) @@ -1198,7 +1198,7 @@ QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac, void *pMsgBuf) for (i = 0; i < pNeighborRpt->numNeighborReports; i++) { pNeighborReportDesc = - cdf_mem_malloc(sizeof(tRrmNeighborReportDesc)); + qdf_mem_malloc(sizeof(tRrmNeighborReportDesc)); if (NULL == pNeighborReportDesc) { sms_log(pMac, LOGE, "Failed to allocate memory for RRM Neighbor report desc"); @@ -1207,20 +1207,20 @@ QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac, void *pMsgBuf) } - cdf_mem_zero(pNeighborReportDesc, + qdf_mem_zero(pNeighborReportDesc, sizeof(tRrmNeighborReportDesc)); pNeighborReportDesc->pNeighborBssDescription = - cdf_mem_malloc(sizeof(tSirNeighborBssDescription)); + qdf_mem_malloc(sizeof(tSirNeighborBssDescription)); if (NULL == pNeighborReportDesc->pNeighborBssDescription) { sms_log(pMac, LOGE, "Failed to allocate memory for RRM Neighbor report BSS Description"); - cdf_mem_free(pNeighborReportDesc); + qdf_mem_free(pNeighborReportDesc); status = QDF_STATUS_E_NOMEM; goto end; } - cdf_mem_zero(pNeighborReportDesc->pNeighborBssDescription, + qdf_mem_zero(pNeighborReportDesc->pNeighborBssDescription, sizeof(tSirNeighborBssDescription)); - cdf_mem_copy(pNeighborReportDesc->pNeighborBssDescription, + qdf_mem_copy(pNeighborReportDesc->pNeighborBssDescription, &pNeighborRpt->sNeighborBssDescription[i], sizeof(tSirNeighborBssDescription)); @@ -1247,9 +1247,9 @@ QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac, void *pMsgBuf) sNeighborBssDescription[i]. bssId)); - cdf_mem_free(pNeighborReportDesc-> + qdf_mem_free(pNeighborReportDesc-> pNeighborBssDescription); - cdf_mem_free(pNeighborReportDesc); + qdf_mem_free(pNeighborReportDesc); } } end: @@ -1493,7 +1493,7 @@ QDF_STATUS rrm_ready(tpAniSirGlobal pMac) QDF_STATUS rrm_change_default_config_param(tpAniSirGlobal pMac, struct rrm_config_param *rrm_config) { - cdf_mem_copy(&pMac->rrm.rrmSmeContext.rrmConfig, rrm_config, + qdf_mem_copy(&pMac->rrm.rrmSmeContext.rrmConfig, rrm_config, sizeof(struct rrm_config_param)); return QDF_STATUS_SUCCESS; diff --git a/core/utils/epping/src/epping_helper.c b/core/utils/epping/src/epping_helper.c index 278693326847..8940579d3a7a 100644 --- a/core/utils/epping/src/epping_helper.c +++ b/core/utils/epping/src/epping_helper.c @@ -60,7 +60,7 @@ int epping_cookie_init(epping_context_t *pEpping_ctx) pEpping_ctx->cookie_count = 0; for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) { pEpping_ctx->s_cookie_mem[i] = - cdf_mem_malloc(sizeof(struct epping_cookie) * + qdf_mem_malloc(sizeof(struct epping_cookie) * MAX_COOKIE_SLOT_SIZE); if (pEpping_ctx->s_cookie_mem == NULL) { EPPING_LOG(QDF_TRACE_LEVEL_FATAL, @@ -68,7 +68,7 @@ int epping_cookie_init(epping_context_t *pEpping_ctx) i); goto error; } - cdf_mem_zero(pEpping_ctx->s_cookie_mem[i], + qdf_mem_zero(pEpping_ctx->s_cookie_mem[i], sizeof(struct epping_cookie) * MAX_COOKIE_SLOT_SIZE); } @@ -84,7 +84,7 @@ int epping_cookie_init(epping_context_t *pEpping_ctx) error: for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) { if (pEpping_ctx->s_cookie_mem[i]) { - cdf_mem_free(pEpping_ctx->s_cookie_mem[i]); + qdf_mem_free(pEpping_ctx->s_cookie_mem[i]); pEpping_ctx->s_cookie_mem[i] = NULL; } } @@ -101,7 +101,7 @@ void epping_cookie_cleanup(epping_context_t *pEpping_ctx) qdf_spin_unlock_bh(&pEpping_ctx->cookie_lock); for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) { if (pEpping_ctx->s_cookie_mem[i]) { - cdf_mem_free(pEpping_ctx->s_cookie_mem[i]); + qdf_mem_free(pEpping_ctx->s_cookie_mem[i]); pEpping_ctx->s_cookie_mem[i] = NULL; } } diff --git a/core/utils/epping/src/epping_main.c b/core/utils/epping/src/epping_main.c index ee8fef1fff02..e9b141ec4262 100644 --- a/core/utils/epping/src/epping_main.c +++ b/core/utils/epping/src/epping_main.c @@ -87,7 +87,7 @@ int epping_open(void) { EPPING_LOG(QDF_TRACE_LEVEL_INFO_HIGH, "%s: Enter", __func__); - g_epping_ctx = cdf_mem_malloc(sizeof(*g_epping_ctx)); + g_epping_ctx = qdf_mem_malloc(sizeof(*g_epping_ctx)); if (g_epping_ctx == NULL) { EPPING_LOG(QDF_TRACE_LEVEL_ERROR, @@ -148,7 +148,7 @@ void epping_close(void) to_free = g_epping_ctx; g_epping_ctx = NULL; - cdf_mem_free(to_free); + qdf_mem_free(to_free); } static void epping_target_suspend_acknowledge(void *context) diff --git a/core/utils/epping/src/epping_txrx.c b/core/utils/epping/src/epping_txrx.c index 4012af562a1f..3d41d0f707f7 100644 --- a/core/utils/epping/src/epping_txrx.c +++ b/core/utils/epping/src/epping_txrx.c @@ -221,9 +221,9 @@ static int epping_set_mac_address(struct net_device *dev, void *addr) { epping_adapter_t *pAdapter = netdev_priv(dev); struct sockaddr *psta_mac_addr = addr; - cdf_mem_copy(&pAdapter->macAddressCurrent, + qdf_mem_copy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN); - cdf_mem_copy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); + qdf_mem_copy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); return 0; } @@ -360,12 +360,12 @@ epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx, } pAdapter = netdev_priv(dev); - cdf_mem_zero(pAdapter, sizeof(*pAdapter)); + qdf_mem_zero(pAdapter, sizeof(*pAdapter)); pAdapter->dev = dev; pAdapter->pEpping_ctx = pEpping_ctx; pAdapter->device_mode = device_mode; /* station, SAP, etc */ - cdf_mem_copy(dev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr)); - cdf_mem_copy(pAdapter->macAddressCurrent.bytes, + qdf_mem_copy(dev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr)); + qdf_mem_copy(pAdapter->macAddressCurrent.bytes, macAddr, sizeof(tSirMacAddr)); qdf_spinlock_create(&pAdapter->data_lock); cdf_nbuf_queue_init(&pAdapter->nodrop_queue); @@ -394,8 +394,8 @@ int epping_connect_service(epping_context_t *pEpping_ctx) HTC_SERVICE_CONNECT_REQ connect; HTC_SERVICE_CONNECT_RESP response; - cdf_mem_zero(&connect, sizeof(connect)); - cdf_mem_zero(&response, sizeof(response)); + qdf_mem_zero(&connect, sizeof(connect)); + qdf_mem_zero(&response, sizeof(response)); /* these fields are the same for all service endpoints */ connect.EpCallbacks.pContext = pEpping_ctx; diff --git a/core/utils/fwlog/dbglog_host.c b/core/utils/fwlog/dbglog_host.c index 6de19c5ec3c7..b37e83974340 100644 --- a/core/utils/fwlog/dbglog_host.c +++ b/core/utils/fwlog/dbglog_host.c @@ -4118,10 +4118,10 @@ cnss_diag_event_report(A_UINT16 event_Id, A_UINT16 length, void *pPayload) event_report_t *pEvent_report; A_UINT16 total_len; total_len = sizeof(event_report_t) + length; - pBuf = cdf_mem_malloc(total_len); + pBuf = qdf_mem_malloc(total_len); if (!pBuf) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, - ("%s: cdf_mem_malloc failed \n", __func__)); + ("%s: qdf_mem_malloc failed \n", __func__)); return; } pBuf1 = pBuf; @@ -4133,7 +4133,7 @@ cnss_diag_event_report(A_UINT16 event_Id, A_UINT16 length, void *pPayload) memcpy(pBuf, pPayload, length); send_diag_netlink_data((A_UINT8 *) pBuf1, total_len, DIAG_TYPE_HOST_MSG); - cdf_mem_free((void *)pBuf1); + qdf_mem_free((void *)pBuf1); return; } diff --git a/core/utils/host_diag_log/src/host_diag_log.c b/core/utils/host_diag_log/src/host_diag_log.c index 0ad80713f3f7..4f9d26164c2e 100644 --- a/core/utils/host_diag_log/src/host_diag_log.c +++ b/core/utils/host_diag_log/src/host_diag_log.c @@ -131,15 +131,15 @@ void host_diag_log_submit(void *plog_hdr_ptr) total_len = sizeof(tAniHdr) + sizeof(uint32_t) + data_len; - pBuf = (uint8_t *) cdf_mem_malloc(total_len); + pBuf = (uint8_t *) qdf_mem_malloc(total_len); if (!pBuf) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "cdf_mem_malloc failed"); + "qdf_mem_malloc failed"); return; } - cdf_mem_zero((void *)pBuf, total_len); + qdf_mem_zero((void *)pBuf, total_len); wmsg = (tAniHdr *) pBuf; wmsg->type = PTT_MSG_DIAG_CMDS_TYPE; @@ -154,7 +154,7 @@ void host_diag_log_submit(void *plog_hdr_ptr) memcpy(pBuf, pHdr, data_len); ptt_sock_send_msg_to_app (wmsg, 0, ANI_NL_MSG_PUMAC, INVALID_PID); - cdf_mem_free((void *)wmsg); + qdf_mem_free((void *)wmsg); } return; } @@ -226,11 +226,11 @@ void host_diag_event_report_payload(uint16_t event_Id, uint16_t length, if (cds_is_multicast_logging()) { total_len = sizeof(tAniHdr) + sizeof(event_report_t) + length; - pBuf = (uint8_t *) cdf_mem_malloc(total_len); + pBuf = (uint8_t *) qdf_mem_malloc(total_len); if (!pBuf) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, - "cdf_mem_malloc failed"); + "qdf_mem_malloc failed"); return; } wmsg = (tAniHdr *) pBuf; @@ -252,11 +252,11 @@ void host_diag_event_report_payload(uint16_t event_Id, uint16_t length, (wmsg, 0, ANI_NL_MSG_PUMAC, INVALID_PID) < 0) { QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR, "Ptt Socket error sending message to the app!!"); - cdf_mem_free((void *)wmsg); + qdf_mem_free((void *)wmsg); return; } - cdf_mem_free((void *)wmsg); + qdf_mem_free((void *)wmsg); } return; diff --git a/core/utils/host_diag_log/src/i_host_diag_core_log.h b/core/utils/host_diag_log/src/i_host_diag_core_log.h index 8695171022ef..829ae193034e 100644 --- a/core/utils/host_diag_log/src/i_host_diag_core_log.h +++ b/core/utils/host_diag_log/src/i_host_diag_core_log.h @@ -46,7 +46,7 @@ Include Files ------------------------------------------------------------------------*/ #include <qdf_types.h> -#include <cdf_memory.h> +#include <qdf_mem.h> /*-------------------------------------------------------------------------- Preprocessor definitions and constants @@ -83,9 +83,9 @@ void host_diag_log_submit(void *plog_hdr_ptr); #define WLAN_HOST_DIAG_LOG_ALLOC(payload_ptr, payload_type, log_code) \ do { \ - payload_ptr = (payload_type *)cdf_mem_malloc(sizeof(payload_type)); \ + payload_ptr = (payload_type *)qdf_mem_malloc(sizeof(payload_type)); \ if (payload_ptr) { \ - cdf_mem_zero(payload_ptr, sizeof(payload_type)); \ + qdf_mem_zero(payload_ptr, sizeof(payload_type)); \ host_diag_log_set_code(payload_ptr, log_code); \ host_diag_log_set_length(payload_ptr, sizeof(payload_type)); \ } \ @@ -98,7 +98,7 @@ void host_diag_log_submit(void *plog_hdr_ptr); do { \ if (payload_ptr) { \ host_diag_log_submit(payload_ptr); \ - cdf_mem_free(payload_ptr); \ + qdf_mem_free(payload_ptr); \ } \ } while (0) @@ -108,7 +108,7 @@ void host_diag_log_submit(void *plog_hdr_ptr); #define WLAN_HOST_DIAG_LOG_FREE(payload_ptr) \ do { \ if (payload_ptr) { \ - cdf_mem_free(payload_ptr); \ + qdf_mem_free(payload_ptr); \ } \ } while (0) diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c index 55eefa96d4a7..631cff50eff3 100644 --- a/core/utils/logging/src/wlan_logging_sock_svc.c +++ b/core/utils/logging/src/wlan_logging_sock_svc.c @@ -667,7 +667,7 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf) return -ENOMEM; } - cdf_mem_zero(gplog_msg, (num_buf * sizeof(struct log_msg))); + qdf_mem_zero(gplog_msg, (num_buf * sizeof(struct log_msg))); gwlan_logging.log_fe_to_console = !!log_fe_to_console; gwlan_logging.num_buf = num_buf; diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c index 3297c000e41e..4289ab331a0e 100644 --- a/core/utils/pktlog/linux_ac.c +++ b/core/utils/pktlog/linux_ac.c @@ -583,7 +583,7 @@ int pktlog_send_per_pkt_stats_to_user(void) do { pktlog = (struct host_log_pktlog_info *) - cdf_mem_malloc(sizeof(struct host_log_pktlog_info) + + qdf_mem_malloc(sizeof(struct host_log_pktlog_info) + VOS_LOG_PKT_LOG_SIZE); if (!pktlog) { printk(PKTLOG_TAG " %s: Memory allocation failed\n", @@ -591,7 +591,7 @@ int pktlog_send_per_pkt_stats_to_user(void) return -ENOMEM; } - cdf_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE); + qdf_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE); host_diag_log_set_code(pktlog, LOG_WLAN_PKT_LOG_INFO_C); pktlog->buf_len = 0; @@ -643,7 +643,7 @@ int pktlog_send_per_pkt_stats_to_user(void) pktlog->seq_no = pl_info->buf->msg_index++; WLAN_HOST_DIAG_LOG_REPORT(pktlog); } else { - cdf_mem_free(pktlog); + qdf_mem_free(pktlog); } num_bytes_read += ret_val; @@ -710,7 +710,7 @@ pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, if (*ppos < bufhdr_size) { count = MIN((bufhdr_size - *ppos), rem_len); - cdf_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos, + qdf_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos, count); rem_len -= count; ret_val += count; @@ -756,7 +756,7 @@ pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, goto rd_done; count = MIN(rem_len, (end_offset - ppos_data + 1)); - cdf_mem_copy(buf + ret_val, + qdf_mem_copy(buf + ret_val, log_buf->log_data + ppos_data, count); ret_val += count; @@ -764,7 +764,7 @@ pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, } else { if (ppos_data <= fold_offset) { count = MIN(rem_len, (fold_offset - ppos_data + 1)); - cdf_mem_copy(buf + ret_val, + qdf_mem_copy(buf + ret_val, log_buf->log_data + ppos_data, count); ret_val += count; @@ -780,7 +780,7 @@ pktlog_read_proc_entry(char *buf, size_t nbytes, loff_t *ppos, if (ppos_data <= end_offset) { count = MIN(rem_len, (end_offset - ppos_data + 1)); - cdf_mem_copy(buf + ret_val, + qdf_mem_copy(buf + ret_val, log_buf->log_data + ppos_data, count); ret_val += count; diff --git a/core/utils/pktlog/pktlog_ac.c b/core/utils/pktlog/pktlog_ac.c index 842ecb5c20b6..3b3f071e2d10 100644 --- a/core/utils/pktlog/pktlog_ac.c +++ b/core/utils/pktlog/pktlog_ac.c @@ -41,7 +41,7 @@ */ #ifndef REMOVE_PKT_LOG -#include "cdf_memory.h" +#include "qdf_mem.h" #include "athdefs.h" #include "pktlog_ac_i.h" #include "cds_api.h" @@ -78,7 +78,7 @@ static A_STATUS pktlog_wma_post_msg(WMI_PKTLOG_EVENT event_types, QDF_STATUS status; struct ath_pktlog_wmi_params *param; - param = cdf_mem_malloc(sizeof(struct ath_pktlog_wmi_params)); + param = qdf_mem_malloc(sizeof(struct ath_pktlog_wmi_params)); if (!param) return A_NO_MEMORY; @@ -93,7 +93,7 @@ static A_STATUS pktlog_wma_post_msg(WMI_PKTLOG_EVENT event_types, status = cds_mq_post_message(CDS_MQ_ID_WMA, &msg); if (status != QDF_STATUS_SUCCESS) { - cdf_mem_free(param); + qdf_mem_free(param); return A_ERROR; } diff --git a/core/utils/pktlog/pktlog_internal.c b/core/utils/pktlog/pktlog_internal.c index cdc416fbbba5..010585ce362f 100644 --- a/core/utils/pktlog/pktlog_internal.c +++ b/core/utils/pktlog/pktlog_internal.c @@ -44,7 +44,7 @@ #include "ol_txrx_types.h" #include "ol_htt_tx_api.h" #include "ol_tx_desc.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "htt.h" #include "htt_internal.h" #include "pktlog_ac_i.h" @@ -327,7 +327,7 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) &buf_size); if (data) { process_ieee_hdr(data); - cdf_mem_free(data); + qdf_mem_free(data); } } else { /* @@ -359,11 +359,11 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) */ txctl_log.priv.frm_hdr = frm_hdr; qdf_assert(txctl_log.priv.txdesc_ctl); - cdf_mem_copy((void *)&txctl_log.priv.txdesc_ctl, + qdf_mem_copy((void *)&txctl_log.priv.txdesc_ctl, ((void *)data + sizeof(struct ath_pktlog_hdr)), pl_hdr.size); qdf_assert(txctl_log.txdesc_hdr_ctl); - cdf_mem_copy(txctl_log.txdesc_hdr_ctl, &txctl_log.priv, + qdf_mem_copy(txctl_log.txdesc_hdr_ctl, &txctl_log.priv, sizeof(txctl_log.priv)); /* Add Protocol information and HT specific information */ #else @@ -373,8 +373,8 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) qdf_assert(txdesc_hdr_ctl); qdf_assert(pl_hdr.size < (370 * sizeof(u_int32_t))); - cdf_mem_copy(txdesc_hdr_ctl, &frm_hdr, sizeof(frm_hdr)); - cdf_mem_copy((char *)txdesc_hdr_ctl + sizeof(frm_hdr), + qdf_mem_copy(txdesc_hdr_ctl, &frm_hdr, sizeof(frm_hdr)); + qdf_mem_copy((char *)txdesc_hdr_ctl + sizeof(frm_hdr), ((void *)data + sizeof(struct ath_pktlog_hdr)), pl_hdr.size); #endif /* !defined(HELIUMPLUS) */ @@ -387,7 +387,7 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) txstat_log.ds_status = (void *) pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); qdf_assert(txstat_log.ds_status); - cdf_mem_copy(txstat_log.ds_status, + qdf_mem_copy(txstat_log.ds_status, ((void *)data + sizeof(struct ath_pktlog_hdr)), pl_hdr.size); } @@ -409,7 +409,7 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) cdf_nbuf_t netbuf; uint32_t len; - cdf_mem_set(&pl_msdu_info, sizeof(pl_msdu_info), 0); + qdf_mem_set(&pl_msdu_info, sizeof(pl_msdu_info), 0); pl_msdu_info.num_msdu = *msdu_id_info; pl_msdu_info.priv_size = sizeof(uint32_t) * @@ -473,10 +473,10 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data) } pl_msdu_info.ath_msdu_info = pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); - cdf_mem_copy((void *)&pl_msdu_info.priv.msdu_id_info, + qdf_mem_copy((void *)&pl_msdu_info.priv.msdu_id_info, ((void *)data + sizeof(struct ath_pktlog_hdr)), sizeof(pl_msdu_info.priv.msdu_id_info)); - cdf_mem_copy(pl_msdu_info.ath_msdu_info, &pl_msdu_info.priv, + qdf_mem_copy(pl_msdu_info.ath_msdu_info, &pl_msdu_info.priv, sizeof(pl_msdu_info.priv)); } return A_OK; @@ -528,7 +528,7 @@ A_STATUS process_rx_info_remote(void *pdev, cdf_nbuf_t amsdu) #endif /* !defined(HELIUMPLUS) */ rxstat_log.rx_desc = (void *)pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); - cdf_mem_copy(rxstat_log.rx_desc, (void *)rx_desc + + qdf_mem_copy(rxstat_log.rx_desc, (void *)rx_desc + sizeof(struct htt_host_fw_desc_base), pl_hdr.size); msdu = cdf_nbuf_next(msdu); } @@ -567,7 +567,7 @@ A_STATUS process_rx_info(void *pdev, void *data) rxstat_log.rx_desc = (void *)pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); - cdf_mem_copy(rxstat_log.rx_desc, + qdf_mem_copy(rxstat_log.rx_desc, (void *)data + sizeof(struct ath_pktlog_hdr), pl_hdr.size); return A_OK; @@ -620,7 +620,7 @@ A_STATUS process_rate_find(void *pdev, void *data) rcf_log.rcFind = (void *)pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); - cdf_mem_copy(rcf_log.rcFind, + qdf_mem_copy(rcf_log.rcFind, ((char *)data + sizeof(struct ath_pktlog_hdr)), pl_hdr.size); @@ -672,7 +672,7 @@ A_STATUS process_rate_update(void *pdev, void *data) */ rcu_log.txRateCtrl = (void *)pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr); - cdf_mem_copy(rcu_log.txRateCtrl, + qdf_mem_copy(rcu_log.txRateCtrl, ((char *)data + sizeof(struct ath_pktlog_hdr)), pl_hdr.size); return A_OK; diff --git a/core/wma/src/wlan_qct_wma_legacy.c b/core/wma/src/wlan_qct_wma_legacy.c index 71768f74d793..c2c81bd25977 100644 --- a/core/wma/src/wlan_qct_wma_legacy.c +++ b/core/wma/src/wlan_qct_wma_legacy.c @@ -114,14 +114,14 @@ tSirRetStatus u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb) msg.type = pMb->type; msg.bodyval = 0; - pMbLocal = cdf_mem_malloc(pMb->msgLen); + pMbLocal = qdf_mem_malloc(pMb->msgLen); if (!pMbLocal) { WMA_LOGE("Memory allocation failed! Can't send 0x%x\n", msg.type); return eSIR_MEM_ALLOC_FAILED; } - cdf_mem_copy((void *)pMbLocal, (void *)pMb, pMb->msgLen); + qdf_mem_copy((void *)pMbLocal, (void *)pMb, pMb->msgLen); msg.bodyptr = pMbLocal; switch (msg.type & HAL_MMH_MB_MSG_TYPE_MASK) { @@ -142,12 +142,12 @@ tSirRetStatus u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb) break; case SIR_PTT_MSG_TYPES_BEGIN: - cdf_mem_free(msg.bodyptr); + qdf_mem_free(msg.bodyptr); break; default: WMA_LOGD("Unknown message type = 0x%X\n", msg.type); - cdf_mem_free(msg.bodyptr); + qdf_mem_free(msg.bodyptr); return eSIR_FAILURE; } diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index aa56cb9c4cef..941ce36dc8f6 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -48,7 +48,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -830,7 +830,7 @@ static void wma_data_tx_ack_work_handler(void *ack_work) wma_handle->umac_data_ota_ack_cb = NULL; wma_handle->last_umac_data_nbuf = NULL; - cdf_mem_free(work); + qdf_mem_free(work); wma_handle->ack_work_ctx = NULL; } @@ -881,7 +881,7 @@ wma_data_tx_ack_comp_hdlr(void *wma_context, cdf_nbuf_t netbuf, int32_t status) if (wma_handle && wma_handle->umac_data_ota_ack_cb) { struct wma_tx_ack_work_ctx *ack_work; - ack_work = cdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx)); + ack_work = qdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx)); wma_handle->ack_work_ctx = ack_work; if (ack_work) { ack_work->wma_handle = wma_handle; @@ -1128,7 +1128,7 @@ QDF_STATUS wma_set_mcc_channel_time_latency buf_ptr += WMI_TLV_HDR_SIZE; chan_latency.chan_mhz = chan1_freq; chan_latency.latency = latency_chan1; - cdf_mem_copy(buf_ptr, &chan_latency, sizeof(chan_latency)); + qdf_mem_copy(buf_ptr, &chan_latency, sizeof(chan_latency)); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_RESMGR_SET_CHAN_LATENCY_CMDID); if (ret) { @@ -1255,12 +1255,12 @@ QDF_STATUS wma_set_mcc_channel_time_quota buf_ptr += WMI_TLV_HDR_SIZE; chan_quota.chan_mhz = chan1_freq; chan_quota.channel_time_quota = quota_chan1; - cdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota)); + qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota)); /* Construct channel and quota record for the 2nd MCC mode. */ buf_ptr += sizeof(chan_quota); chan_quota.chan_mhz = chan2_freq; chan_quota.channel_time_quota = quota_chan2; - cdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota)); + qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota)); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID); @@ -1410,7 +1410,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, if (!pdev) { WMA_LOGE("vdev handle is invalid for %pM", pRateUpdateParams->bssid.bytes); - cdf_mem_free(pRateUpdateParams); + qdf_mem_free(pRateUpdateParams); return QDF_STATUS_E_INVAL; } short_gi = intr[vdev_id].config.shortgi; @@ -1446,7 +1446,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, mbpsx10_rate, pRateUpdateParams->nss, &rate); if (ret != QDF_STATUS_SUCCESS) { WMA_LOGE("%s: Error, Invalid input rate value", __func__); - cdf_mem_free(pRateUpdateParams); + qdf_mem_free(pRateUpdateParams); return ret; } ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id, @@ -1454,12 +1454,12 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, if (ret) { WMA_LOGE("%s: Failed to Set WMI_VDEV_PARAM_SGI (%d), ret = %d", __func__, short_gi, ret); - cdf_mem_free(pRateUpdateParams); + qdf_mem_free(pRateUpdateParams); return QDF_STATUS_E_FAILURE; } ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id, paramId, rate); - cdf_mem_free(pRateUpdateParams); + qdf_mem_free(pRateUpdateParams); if (ret) { WMA_LOGE("%s: Failed to Set rate, ret = %d", __func__, ret); return QDF_STATUS_E_FAILURE; @@ -1497,7 +1497,7 @@ static void wma_mgmt_tx_ack_work_handler(void *ack_work) ack_cb((tpAniSirGlobal) (wma_handle->mac_context), work->status ? 0 : 1); - cdf_mem_free(work); + qdf_mem_free(work); wma_handle->ack_work_ctx = NULL; } @@ -1555,7 +1555,7 @@ wma_mgmt_tx_ack_comp_hdlr(void *wma_context, cdf_nbuf_t netbuf, int32_t status) struct wma_tx_ack_work_ctx *ack_work; ack_work = - cdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx)); + qdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx)); if (ack_work) { ack_work->wma_handle = wma_handle; @@ -2181,27 +2181,27 @@ static void wma_decap_to_8023(cdf_nbuf_t msdu, struct wma_decap_info_t *info) ethr_hdr = (struct ethernet_hdr_t *)local_buf; switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_TODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_FROMDS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3, ETHERNET_ADDR_LEN); break; case IEEE80211_FC1_DIR_DSTODS: - cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, + qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3, ETHERNET_ADDR_LEN); - cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4, + qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4, ETHERNET_ADDR_LEN); break; } @@ -2217,7 +2217,7 @@ static void wma_decap_to_8023(cdf_nbuf_t msdu, struct wma_decap_info_t *info) ethr_hdr->ethertype[0] = (ether_type >> 8) & 0xff; ethr_hdr->ethertype[1] = (ether_type) & 0xff; } - cdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN); + qdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN); } /** @@ -2257,7 +2257,7 @@ int wmi_desc_pool_init(tp_wma_handle wma_handle, uint32_t pool_size) WMA_LOGE("%s: initialize desc pool of size %d", __func__, pool_size); wma_handle->wmi_desc_pool.pool_size = pool_size; wma_handle->wmi_desc_pool.num_free = pool_size; - wma_handle->wmi_desc_pool.array = cdf_mem_malloc(pool_size * + wma_handle->wmi_desc_pool.array = qdf_mem_malloc(pool_size * sizeof(union wmi_desc_elem_t)); if (!wma_handle->wmi_desc_pool.array) { WMA_LOGE("%s: failed to allocate desc pool", __func__); @@ -2289,7 +2289,7 @@ void wmi_desc_pool_deinit(tp_wma_handle wma_handle) { qdf_spin_lock_bh(&wma_handle->wmi_desc_pool.wmi_desc_pool_lock); if (wma_handle->wmi_desc_pool.array) { - cdf_mem_free(wma_handle->wmi_desc_pool.array); + qdf_mem_free(wma_handle->wmi_desc_pool.array); wma_handle->wmi_desc_pool.array = NULL; } else { WMA_LOGE("%s: Empty WMI descriptor pool", __func__); @@ -2392,7 +2392,7 @@ mgmt_wmi_unified_cmd_send(tp_wma_handle wma_handle, void *tx_frame, WMITLV_SET_HDR(bufp, WMITLV_TAG_ARRAY_BYTE, roundup(bufp_len, sizeof(uint32_t))); bufp += WMI_TLV_HDR_SIZE; - cdf_mem_copy(bufp, pData, bufp_len); + qdf_mem_copy(bufp, pData, bufp_len); cdf_nbuf_map_single(qdf_ctx, tx_frame, QDF_DMA_TO_DEVICE); dma_addr = cdf_nbuf_get_frag_paddr(tx_frame, 0); cmd->paddr_lo = (uint32_t)(dma_addr & 0xffffffff); @@ -2529,9 +2529,9 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, * MAC header and data, Keep the CCMP header and * trailer as 0's, firmware shall fill this */ - cdf_mem_set(pFrame, newFrmLen, 0); - cdf_mem_copy(pFrame, wh, sizeof(*wh)); - cdf_mem_copy(pFrame + sizeof(*wh) + + qdf_mem_set(pFrame, newFrmLen, 0); + qdf_mem_copy(pFrame, wh, sizeof(*wh)); + qdf_mem_copy(pFrame + sizeof(*wh) + IEEE80211_CCMP_HEADERLEN, pData + sizeof(*wh), frmLen - sizeof(*wh)); @@ -2560,9 +2560,9 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, * MAC header and data. MMIE field will be * filled by cds_attach_mmie API */ - cdf_mem_set(pFrame, newFrmLen, 0); - cdf_mem_copy(pFrame, wh, sizeof(*wh)); - cdf_mem_copy(pFrame + sizeof(*wh), + qdf_mem_set(pFrame, newFrmLen, 0); + qdf_mem_copy(pFrame, wh, sizeof(*wh)); + qdf_mem_copy(pFrame + sizeof(*wh), pData + sizeof(*wh), frmLen - sizeof(*wh)); if (!cds_attach_mmie(iface->key.key, iface->key.key_id[0].ipn, @@ -2644,14 +2644,14 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, /* Take out 802.11 header from skb */ decap_info.hdr_len = wma_ieee80211_hdrsize(wh); - cdf_mem_copy(decap_info.hdr, wh, decap_info.hdr_len); + qdf_mem_copy(decap_info.hdr, wh, decap_info.hdr_len); cdf_nbuf_pull_head(skb, decap_info.hdr_len); /* Decapsulate to 802.3 format */ wma_decap_to_8023(skb, &decap_info); /* Zero out skb's context buffer for the driver to use */ - cdf_mem_set(skb->cb, sizeof(skb->cb), 0); + qdf_mem_set(skb->cb, sizeof(skb->cb), 0); /* Do the DMA Mapping */ cdf_nbuf_map_single(pdev->osdev, skb, QDF_DMA_TO_DEVICE); @@ -2912,34 +2912,34 @@ void ol_rx_err(ol_pdev_handle pdev, uint8_t vdev_id, if (cdf_nbuf_len(rx_frame) < sizeof(*eth_hdr)) return; eth_hdr = (struct ether_header *)cdf_nbuf_data(rx_frame); - mic_err_ind = cdf_mem_malloc(sizeof(*mic_err_ind)); + mic_err_ind = qdf_mem_malloc(sizeof(*mic_err_ind)); if (!mic_err_ind) { WMA_LOGE("%s: Failed to allocate memory for MIC indication message", __func__); return; } - cdf_mem_set((void *)mic_err_ind, sizeof(*mic_err_ind), 0); + qdf_mem_set((void *)mic_err_ind, sizeof(*mic_err_ind), 0); mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND; mic_err_ind->length = sizeof(*mic_err_ind); mic_err_ind->sessionId = vdev_id; qdf_copy_macaddr(&mic_err_ind->bssId, (struct qdf_mac_addr *) &wma->interfaces[vdev_id].bssid); - cdf_mem_copy(mic_err_ind->info.taMacAddr, + qdf_mem_copy(mic_err_ind->info.taMacAddr, (struct qdf_mac_addr *) peer_mac_addr, sizeof(tSirMacAddr)); - cdf_mem_copy(mic_err_ind->info.srcMacAddr, + qdf_mem_copy(mic_err_ind->info.srcMacAddr, (struct qdf_mac_addr *) eth_hdr->ether_shost, sizeof(tSirMacAddr)); - cdf_mem_copy(mic_err_ind->info.dstMacAddr, + qdf_mem_copy(mic_err_ind->info.dstMacAddr, (struct qdf_mac_addr *) eth_hdr->ether_dhost, sizeof(tSirMacAddr)); mic_err_ind->info.keyId = key_id; mic_err_ind->info.multicast = IEEE80211_IS_MULTICAST(eth_hdr->ether_dhost); - cdf_mem_copy(mic_err_ind->info.TSC, pn, SIR_CIPHER_SEQ_CTR_SIZE); + qdf_mem_copy(mic_err_ind->info.TSC, pn, SIR_CIPHER_SEQ_CTR_SIZE); - cdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0); + qdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0); cds_msg.type = eWNI_SME_MIC_FAILURE_IND; cds_msg.bodyptr = (void *) mic_err_ind; @@ -2947,7 +2947,7 @@ void ol_rx_err(ol_pdev_handle pdev, uint8_t vdev_id, cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg)) { WMA_LOGE("%s: could not post mic failure indication to SME", __func__); - cdf_mem_free((void *)mic_err_ind); + qdf_mem_free((void *)mic_err_ind); } } @@ -3107,14 +3107,14 @@ wma_indicate_err( return; } - mic_err_ind = cdf_mem_malloc(sizeof(*mic_err_ind)); + mic_err_ind = qdf_mem_malloc(sizeof(*mic_err_ind)); if (!mic_err_ind) { WMA_LOGE("%s: MIC indication mem alloc failed", __func__); return; } - cdf_mem_set((void *) mic_err_ind, 0, + qdf_mem_set((void *) mic_err_ind, 0, sizeof(*mic_err_ind)); mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND; mic_err_ind->length = sizeof(*mic_err_ind); @@ -3125,23 +3125,23 @@ wma_indicate_err( mic_err_ind->bssId.bytes[0], mic_err_ind->bssId.bytes[1], mic_err_ind->bssId.bytes[2], mic_err_ind->bssId.bytes[3], mic_err_ind->bssId.bytes[4], mic_err_ind->bssId.bytes[5]); - cdf_mem_copy(mic_err_ind->info.taMacAddr, + qdf_mem_copy(mic_err_ind->info.taMacAddr, (struct qdf_mac_addr *) err_info->u.mic_err.ta, sizeof(tSirMacAddr)); - cdf_mem_copy(mic_err_ind->info.srcMacAddr, + qdf_mem_copy(mic_err_ind->info.srcMacAddr, (struct qdf_mac_addr *) err_info->u.mic_err.sa, sizeof(tSirMacAddr)); - cdf_mem_copy(mic_err_ind->info.dstMacAddr, + qdf_mem_copy(mic_err_ind->info.dstMacAddr, (struct qdf_mac_addr *) err_info->u.mic_err.da, sizeof(tSirMacAddr)); mic_err_ind->info.keyId = err_info->u.mic_err.key_id; mic_err_ind->info.multicast = IEEE80211_IS_MULTICAST(err_info->u.mic_err.da); - cdf_mem_copy(mic_err_ind->info.TSC, + qdf_mem_copy(mic_err_ind->info.TSC, (void *)&err_info-> u.mic_err.pn, SIR_CIPHER_SEQ_CTR_SIZE); - cdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0); + qdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0); cds_msg.type = eWNI_SME_MIC_FAILURE_IND; cds_msg.bodyptr = (void *) mic_err_ind; if (QDF_STATUS_SUCCESS != @@ -3149,7 +3149,7 @@ wma_indicate_err( (cds_msg_t *) &cds_msg)) { WMA_LOGE("%s: mic failure ind post to SME failed", __func__); - cdf_mem_free((void *)mic_err_ind); + qdf_mem_free((void *)mic_err_ind); } break; } diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index a4ce0beab19f..3dafbddae5f5 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -48,7 +48,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -504,18 +504,18 @@ void wma_vdev_detach_callback(void *ctx) __func__, param->session_id); qdf_mc_timer_stop(&req_msg->event_timeout); qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } } if (iface->addBssStaContext) - cdf_mem_free(iface->addBssStaContext); + qdf_mem_free(iface->addBssStaContext); #if defined WLAN_FEATURE_VOWIFI_11R if (iface->staKeyParams) - cdf_mem_free(iface->staKeyParams); + qdf_mem_free(iface->staKeyParams); #endif /* WLAN_FEATURE_VOWIFI_11R */ - cdf_mem_zero(iface, sizeof(*iface)); + qdf_mem_zero(iface, sizeof(*iface)); param->status = QDF_STATUS_SUCCESS; sme_msg.type = eWNI_SME_DEL_STA_SELF_RSP; sme_msg.bodyptr = param; @@ -524,7 +524,7 @@ void wma_vdev_detach_callback(void *ctx) status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP"); - cdf_mem_free(param); + qdf_mem_free(param); } } @@ -573,7 +573,7 @@ static QDF_STATUS wma_self_peer_remove(tp_wma_handle wma_handle, if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap, WMI_SERVICE_SYNC_DELETE_CMDS)) { sta_self_wmi_rsp = - cdf_mem_malloc(sizeof(struct del_sta_self_rsp_params)); + qdf_mem_malloc(sizeof(struct del_sta_self_rsp_params)); if (sta_self_wmi_rsp == NULL) { WMA_LOGP(FL("Failed to allocate memory")); return QDF_STATUS_E_NOMEM; @@ -652,12 +652,12 @@ static QDF_STATUS wma_handle_vdev_detach(tp_wma_handle wma_handle, return status; out: if (iface->addBssStaContext) - cdf_mem_free(iface->addBssStaContext); + qdf_mem_free(iface->addBssStaContext); #if defined WLAN_FEATURE_VOWIFI_11R if (iface->staKeyParams) - cdf_mem_free(iface->staKeyParams); + qdf_mem_free(iface->staKeyParams); #endif /* WLAN_FEATURE_VOWIFI_11R */ - cdf_mem_zero(iface, sizeof(*iface)); + qdf_mem_zero(iface, sizeof(*iface)); del_sta_self_req_param->status = status; if (generate_rsp) { sme_msg.type = eWNI_SME_DEL_STA_SELF_RSP; @@ -667,7 +667,7 @@ out: status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { WMA_LOGE("Failed to post eWNI_SME_DEL_STA_SELF_RSP"); - cdf_mem_free(del_sta_self_req_param); + qdf_mem_free(del_sta_self_req_param); } } return status; @@ -698,7 +698,7 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle, if (!iface->handle) { WMA_LOGE("handle of vdev_id %d is NULL vdev is already freed", vdev_id); - cdf_mem_free(pdel_sta_self_req_param); + qdf_mem_free(pdel_sta_self_req_param); pdel_sta_self_req_param = NULL; return status; } @@ -791,7 +791,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma, #endif /* QCA_IBSS_SUPPORT */ ) { wma->interfaces[resp_event->vdev_id].beacon = - cdf_mem_malloc(sizeof(struct beacon_info)); + qdf_mem_malloc(sizeof(struct beacon_info)); bcn = wma->interfaces[resp_event->vdev_id].beacon; if (!bcn) { @@ -800,13 +800,13 @@ static void wma_vdev_start_rsp(tp_wma_handle wma, add_bss->status = QDF_STATUS_E_NOMEM; goto send_fail_resp; } - cdf_mem_zero(bcn, sizeof(*bcn)); + qdf_mem_zero(bcn, sizeof(*bcn)); bcn->buf = cdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0, sizeof(uint32_t), 0); if (!bcn->buf) { WMA_LOGE("%s: No memory allocated for beacon buffer", __func__); - cdf_mem_free(bcn); + qdf_mem_free(bcn); add_bss->status = QDF_STATUS_E_FAILURE; goto send_fail_resp; } @@ -858,7 +858,7 @@ void wma_find_mcc_ap(tp_wma_handle wma, uint8_t vdev_id, bool add) uint8_t *ap_vdev_ids = NULL; uint8_t num_ch = 0; - ap_vdev_ids = cdf_mem_malloc(wma->max_bssid); + ap_vdev_ids = qdf_mem_malloc(wma->max_bssid); if (!ap_vdev_ids) return; @@ -1024,7 +1024,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0); } else if (req_msg->msg_type == WMA_ADD_BSS_REQ) { tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data; - cdf_mem_copy(iface->bssid, bssParams->bssId, + qdf_mem_copy(iface->bssid, bssParams->bssId, IEEE80211_ADDR_LEN); wma_vdev_start_rsp(wma, bssParams, resp_event); } else if (req_msg->msg_type == WMA_OCB_SET_CONFIG_CMD) { @@ -1044,7 +1044,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, wma_set_sap_keepalive(wma, resp_event->vdev_id); qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return 0; } @@ -1182,7 +1182,7 @@ int wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr, uint32_t param_id, WMI_PEER_SET_PARAM_CMDID); if (err) { WMA_LOGE("Failed to send set_param cmd"); - cdf_mem_free(buf); + qdf_mem_free(buf); return -EIO; } return 0; @@ -1323,15 +1323,15 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev, /* for each remote ibss peer, clear its keys */ if (wma_is_vdev_in_ibss_mode(wma, vdev_id) && - !cdf_mem_compare(peer_addr, vdev->mac_addr.raw, + qdf_mem_cmp(peer_addr, vdev->mac_addr.raw, IEEE80211_ADDR_LEN)) { tSetStaKeyParams key_info; WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__, peer_addr); - cdf_mem_set(&key_info, sizeof(key_info), 0); + qdf_mem_set(&key_info, sizeof(key_info), 0); key_info.smesessionId = vdev_id; - cdf_mem_copy(key_info.peer_macaddr.bytes, peer_addr, + qdf_mem_copy(key_info.peer_macaddr.bytes, peer_addr, IEEE80211_ADDR_LEN); key_info.sendRsp = false; @@ -1535,7 +1535,7 @@ static void wma_recreate_ibss_vdev_and_bss_peer(tp_wma_handle wma, /* delete old ibss vdev */ del_sta_param.session_id = vdev_id; - cdf_mem_copy((void *)del_sta_param.self_mac_addr, + qdf_mem_copy((void *)del_sta_param.self_mac_addr, (void *)&(vdev->mac_addr), QDF_MAC_ADDR_SIZE); wma_vdev_detach(wma, &del_sta_param, 0); @@ -1617,7 +1617,7 @@ void wma_hidden_ssid_vdev_restart_on_vdev_stop(tp_wma_handle wma_handle, cmd->vdev_id = sessionId; cmd->ssid.ssid_len = intr[sessionId].vdev_restart_params.ssid.ssid_len; - cdf_mem_copy(cmd->ssid.ssid, + qdf_mem_copy(cmd->ssid.ssid, intr[sessionId].vdev_restart_params.ssid.ssid, cmd->ssid.ssid_len); cmd->flags = intr[sessionId].vdev_restart_params.flags; @@ -1782,7 +1782,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, cdf_nbuf_unmap_single(pdev->osdev, bcn->buf, QDF_DMA_TO_DEVICE); cdf_nbuf_free(bcn->buf); - cdf_mem_free(bcn); + qdf_mem_free(bcn); wma->interfaces[resp_event->vdev_id].beacon = NULL; } @@ -1796,7 +1796,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, * to send response to UMAC */ if (params->status == QDF_STATUS_FW_MSG_TIMEDOUT) { - cdf_mem_free(params); + qdf_mem_free(params); WMA_LOGE("%s: DEL BSS from ADD BSS timeout do not send " "resp to UMAC (vdev id %x)", __func__, resp_event->vdev_id); @@ -1814,7 +1814,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, } free_req_msg: qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -1911,7 +1911,7 @@ ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle, else wma_handle->wow.bmiss_enable = cfg_val ? true : false; - cdf_mem_copy(wma_handle->interfaces[self_sta_req->session_id].addr, + qdf_mem_copy(wma_handle->interfaces[self_sta_req->session_id].addr, self_sta_req->self_mac_addr, sizeof(wma_handle->interfaces[self_sta_req->session_id]. addr)); @@ -2063,7 +2063,7 @@ end: status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP"); - cdf_mem_free(self_sta_req); + qdf_mem_free(self_sta_req); } } return txrx_vdev_handle; @@ -2248,7 +2248,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma, cmd->ssid.ssid_len = req->ssid.length; else cmd->ssid.ssid_len = sizeof(cmd->ssid.ssid); - cdf_mem_copy(cmd->ssid.ssid, req->ssid.ssId, + qdf_mem_copy(cmd->ssid.ssid, req->ssid.ssId, cmd->ssid.ssid_len); } @@ -2284,7 +2284,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma, intr[req->vdev_id].vdev_restart_params.vdev_id = req->vdev_id; intr[req->vdev_id].vdev_restart_params.ssid.ssid_len = cmd->ssid.ssid_len; - cdf_mem_copy(intr[req->vdev_id].vdev_restart_params.ssid.ssid, + qdf_mem_copy(intr[req->vdev_id].vdev_restart_params.ssid.ssid, cmd->ssid.ssid, cmd->ssid.ssid_len); intr[req->vdev_id].vdev_restart_params.flags = cmd->flags; intr[req->vdev_id].vdev_restart_params.requestor_id = @@ -2418,7 +2418,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, free_req_msg: qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -2467,7 +2467,7 @@ int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info, wma_vdev_detach_callback(req_msg->user_data); qdf_mc_timer_stop(&req_msg->event_timeout); qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -2533,9 +2533,9 @@ int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info, WMA_LOGD(FL("Calling vdev detach handler")); wma_handle_vdev_detach(wma, data->self_sta_param, data->generate_rsp); - cdf_mem_free(data); + qdf_mem_free(data); } - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); return status; } @@ -2596,7 +2596,7 @@ void wma_hold_req_timer(void *data) } free_tgt_req: qdf_mc_timer_destroy(&tgt_req->event_timeout); - cdf_mem_free(tgt_req); + qdf_mem_free(tgt_req); } /** @@ -2617,7 +2617,7 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, struct wma_target_req *req; QDF_STATUS status; - req = cdf_mem_malloc(sizeof(*req)); + req = qdf_mem_malloc(sizeof(*req)); if (!req) { WMA_LOGP(FL("Failed to allocate memory for msg %d vdev %d"), msg_type, vdev_id); @@ -2638,7 +2638,7 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, if (QDF_STATUS_SUCCESS != status) { qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock); WMA_LOGE(FL("Failed add request in queue")); - cdf_mem_free(req); + qdf_mem_free(req); return NULL; } qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock); @@ -2668,7 +2668,7 @@ void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id, qdf_mc_timer_stop(&req_msg->event_timeout); qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } /** @@ -2790,7 +2790,7 @@ void wma_vdev_resp_timer(void *data) cdf_nbuf_unmap_single(pdev->osdev, bcn->buf, QDF_DMA_TO_DEVICE); cdf_nbuf_free(bcn->buf); - cdf_mem_free(bcn); + qdf_mem_free(bcn); wma->interfaces[tgt_req->vdev_id].beacon = NULL; } @@ -2830,19 +2830,19 @@ void wma_vdev_resp_timer(void *data) status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP"); - cdf_mem_free(iface->del_staself_req); + qdf_mem_free(iface->del_staself_req); } if (iface->addBssStaContext) - cdf_mem_free(iface->addBssStaContext); + qdf_mem_free(iface->addBssStaContext); #if defined WLAN_FEATURE_VOWIFI_11R if (iface->staKeyParams) - cdf_mem_free(iface->staKeyParams); + qdf_mem_free(iface->staKeyParams); #endif /* WLAN_FEATURE_VOWIFI_11R */ - cdf_mem_zero(iface, sizeof(*iface)); + qdf_mem_zero(iface, sizeof(*iface)); } else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) { tpAddBssParams params = (tpAddBssParams) tgt_req->user_data; tDeleteBssParams *del_bss_params = - cdf_mem_malloc(sizeof(tDeleteBssParams)); + qdf_mem_malloc(sizeof(tDeleteBssParams)); if (NULL == del_bss_params) { WMA_LOGE("Failed to allocate memory for del_bss_params"); peer = ol_txrx_find_peer_by_addr(pdev, params->bssId, @@ -2854,7 +2854,7 @@ void wma_vdev_resp_timer(void *data) QDF_STATUS_FW_MSG_TIMEDOUT; del_bss_params->sessionId = params->sessionId; del_bss_params->bssIdx = params->bssIdx; - cdf_mem_copy(del_bss_params->bssid, params->bssId, + qdf_mem_copy(del_bss_params->bssid, params->bssId, sizeof(tSirMacAddr)); WMA_LOGA("%s: WMA_ADD_BSS_REQ timedout", __func__); @@ -2905,7 +2905,7 @@ error0: } free_tgt_req: qdf_mc_timer_destroy(&tgt_req->event_timeout); - cdf_mem_free(tgt_req); + qdf_mem_free(tgt_req); } /** @@ -2926,7 +2926,7 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, struct wma_target_req *req; QDF_STATUS status; - req = cdf_mem_malloc(sizeof(*req)); + req = qdf_mem_malloc(sizeof(*req)); if (!req) { WMA_LOGP("%s: Failed to allocate memory for msg %d vdev %d", __func__, msg_type, vdev_id); @@ -2947,7 +2947,7 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, qdf_spin_unlock_bh(&wma->vdev_respq_lock); WMA_LOGE(FL("Failed add request in queue for vdev_id %d type %d"), vdev_id, type); - cdf_mem_free(req); + qdf_mem_free(req); return NULL; } @@ -2974,7 +2974,7 @@ void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id, qdf_mc_timer_stop(&req_msg->event_timeout); qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } /** @@ -3108,7 +3108,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss) add_bss->staContext.staIdx = ol_txrx_local_peer_id(peer); - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.vdev_id = vdev_id; req.chan = add_bss->currentOperChannel; req.chan_width = add_bss->ch_width; @@ -3146,7 +3146,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss) req.oper_mode = BSS_OPERATIONAL_MODE_AP; req.ssid.length = add_bss->ssId.length; if (req.ssid.length > 0) - cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, + qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, add_bss->ssId.length); status = wma_get_current_hw_mode(&hw_mode); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -3284,10 +3284,10 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss) /* clear leftover ibss keys on bss peer */ WMA_LOGD("%s: ibss bss key clearing", __func__); - cdf_mem_set(&key_info, sizeof(key_info), 0); + qdf_mem_set(&key_info, sizeof(key_info), 0); key_info.smesessionId = vdev_id; key_info.numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; - cdf_mem_copy(&wma->ibsskey_info, &key_info, sizeof(tSetBssKeyParams)); + qdf_mem_copy(&wma->ibsskey_info, &key_info, sizeof(tSetBssKeyParams)); /* start ibss vdev */ @@ -3319,7 +3319,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss) } } - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.vdev_id = vdev_id; req.chan = add_bss->currentOperChannel; req.chan_width = add_bss->ch_width; @@ -3338,7 +3338,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss) req.oper_mode = BSS_OPERATIONAL_MODE_IBSS; req.ssid.length = add_bss->ssId.length; if (req.ssid.length > 0) - cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, + qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, add_bss->ssId.length); status = wma_get_current_hw_mode(&hw_mode); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -3425,30 +3425,30 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) if (add_bss->operMode) { /* Save parameters later needed by WMA_ADD_STA_REQ */ if (iface->addBssStaContext) { - cdf_mem_free(iface->addBssStaContext); + qdf_mem_free(iface->addBssStaContext); } - iface->addBssStaContext = cdf_mem_malloc(sizeof(tAddStaParams)); + iface->addBssStaContext = qdf_mem_malloc(sizeof(tAddStaParams)); if (!iface->addBssStaContext) { WMA_LOGE("%s Failed to allocat memory", __func__); goto send_fail_resp; } - cdf_mem_copy(iface->addBssStaContext, &add_bss->staContext, + qdf_mem_copy(iface->addBssStaContext, &add_bss->staContext, sizeof(tAddStaParams)); #if defined WLAN_FEATURE_VOWIFI_11R if (iface->staKeyParams) { - cdf_mem_free(iface->staKeyParams); + qdf_mem_free(iface->staKeyParams); iface->staKeyParams = NULL; } if (add_bss->extSetStaKeyParamValid) { iface->staKeyParams = - cdf_mem_malloc(sizeof(tSetStaKeyParams)); + qdf_mem_malloc(sizeof(tSetStaKeyParams)); if (!iface->staKeyParams) { WMA_LOGE("%s Failed to allocat memory", __func__); goto send_fail_resp; } - cdf_mem_copy(iface->staKeyParams, + qdf_mem_copy(iface->staKeyParams, &add_bss->extSetStaKeyParam, sizeof(tSetStaKeyParams)); } @@ -3502,7 +3502,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) add_bss->staContext.staIdx = ol_txrx_local_peer_id(peer); - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.vdev_id = vdev_id; req.chan = add_bss->currentOperChannel; req.chan_width = add_bss->ch_width; @@ -3520,7 +3520,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) req.ssid.length = add_bss->ssId.length; req.oper_mode = BSS_OPERATIONAL_MODE_STA; if (req.ssid.length > 0) - cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, + qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId, add_bss->ssId.length); status = wma_get_current_hw_mode(&hw_mode); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -3636,7 +3636,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) * Store the bssid in interface table, bssid will * be used during group key setting sta mode. */ - cdf_mem_copy(iface->bssid, add_bss->bssId, IEEE80211_ADDR_LEN); + qdf_mem_copy(iface->bssid, add_bss->bssId, IEEE80211_ADDR_LEN); } send_bss_resp: @@ -3645,7 +3645,7 @@ send_bss_resp: add_bss->status = (add_bss->staContext.staIdx < 0) ? QDF_STATUS_E_FAILURE : QDF_STATUS_SUCCESS; add_bss->bssIdx = add_bss->staContext.smesessionId; - cdf_mem_copy(add_bss->staContext.staMac, add_bss->bssId, + qdf_mem_copy(add_bss->staContext.staMac, add_bss->bssId, sizeof(add_bss->staContext.staMac)); if (!WMI_SERVICE_IS_ENABLED(wma->wmi_service_bitmap, @@ -4031,7 +4031,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta) "staIdx: %d, staMac: %pM", __func__, add_sta->staIdx, add_sta->staMac); - peerStateParams = cdf_mem_malloc(sizeof(tTdlsPeerStateParams)); + peerStateParams = qdf_mem_malloc(sizeof(tTdlsPeerStateParams)); if (!peerStateParams) { WMA_LOGE ("%s: Failed to allocate memory for peerStateParams for %pM", @@ -4040,10 +4040,10 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta) goto send_rsp; } - cdf_mem_zero(peerStateParams, sizeof(*peerStateParams)); + qdf_mem_zero(peerStateParams, sizeof(*peerStateParams)); peerStateParams->peerState = WMI_TDLS_PEER_STATE_PEERING; peerStateParams->vdevId = vdev->vdev_id; - cdf_mem_copy(&peerStateParams->peerMacAddr, + qdf_mem_copy(&peerStateParams->peerMacAddr, &add_sta->staMac, sizeof(tSirMacAddr)); wma_update_tdls_peer_state(wma, peerStateParams); } else { @@ -4438,7 +4438,7 @@ static void wma_del_tdls_sta(tp_wma_handle wma, tpDeleteStaParams del_sta) goto send_del_rsp; } - peerStateParams = cdf_mem_malloc(sizeof(tTdlsPeerStateParams)); + peerStateParams = qdf_mem_malloc(sizeof(tTdlsPeerStateParams)); if (!peerStateParams) { WMA_LOGE("%s: Failed to allocate memory for peerStateParams for: %pM", __func__, del_sta->staMac); @@ -4446,10 +4446,10 @@ static void wma_del_tdls_sta(tp_wma_handle wma, tpDeleteStaParams del_sta) goto send_del_rsp; } - cdf_mem_zero(peerStateParams, sizeof(*peerStateParams)); + qdf_mem_zero(peerStateParams, sizeof(*peerStateParams)); peerStateParams->peerState = WMA_TDLS_PEER_STATE_TEARDOWN; peerStateParams->vdevId = vdev->vdev_id; - cdf_mem_copy(&peerStateParams->peerMacAddr, + qdf_mem_copy(&peerStateParams->peerMacAddr, &del_sta->staMac, sizeof(tSirMacAddr)); WMA_LOGD("%s: sending tdls_peer_state for peer mac: %pM, " @@ -4588,7 +4588,7 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta) if (!rsp_requested) { WMA_LOGD("%s: vdev_id %d status %d", __func__, del_sta->smesessionId, del_sta->status); - cdf_mem_free(del_sta); + qdf_mem_free(del_sta); } } @@ -4662,7 +4662,7 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params) goto out; } - cdf_mem_zero(wma->interfaces[params->smesessionId].bssid, + qdf_mem_zero(wma->interfaces[params->smesessionId].bssid, IEEE80211_ADDR_LEN); txrx_vdev = wma_find_vdev_by_id(wma, params->smesessionId); @@ -4674,12 +4674,12 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params) /*Free the allocated stats response buffer for the the session */ if (wma->interfaces[params->smesessionId].stats_rsp) { - cdf_mem_free(wma->interfaces[params->smesessionId].stats_rsp); + qdf_mem_free(wma->interfaces[params->smesessionId].stats_rsp); wma->interfaces[params->smesessionId].stats_rsp = NULL; } if (wma->interfaces[params->smesessionId].psnr_req) { - cdf_mem_free(wma->interfaces[params->smesessionId].psnr_req); + qdf_mem_free(wma->interfaces[params->smesessionId].psnr_req); wma->interfaces[params->smesessionId].psnr_req = NULL; } diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index c3ae9572d088..ea82fa96aa3a 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -49,7 +49,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -116,7 +116,7 @@ static int wma_post_auto_shutdown_msg(void) cds_msg_t sme_msg = { 0 }; auto_sh_evt = (tSirAutoShutdownEvtParams *) - cdf_mem_malloc(sizeof(tSirAutoShutdownEvtParams)); + qdf_mem_malloc(sizeof(tSirAutoShutdownEvtParams)); if (!auto_sh_evt) { WMA_LOGE(FL("No Mem")); return -ENOMEM; @@ -131,7 +131,7 @@ static int wma_post_auto_shutdown_msg(void) qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("Fail to post eWNI_SME_AUTO_SHUTDOWN_IND msg to SME"); - cdf_mem_free(auto_sh_evt); + qdf_mem_free(auto_sh_evt); return -EINVAL; } @@ -161,13 +161,13 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle, * after wmi event */ if (pGetRssiReq) { - pRssiBkUp = cdf_mem_malloc(sizeof(tAniGetRssiReq)); + pRssiBkUp = qdf_mem_malloc(sizeof(tAniGetRssiReq)); if (!pRssiBkUp) { WMA_LOGE("Failed to allocate memory for tAniGetRssiReq"); wma_handle->pGetRssiReq = NULL; return QDF_STATUS_E_NOMEM; } - cdf_mem_set(pRssiBkUp, sizeof(tAniGetRssiReq), 0); + qdf_mem_set(pRssiBkUp, sizeof(tAniGetRssiReq), 0); pRssiBkUp->sessionId = ((tAniGetRssiReq *) pGetRssiReq)->sessionId; pRssiBkUp->rssiCallback = @@ -180,7 +180,7 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle, buf = wmi_buf_alloc(wma_handle->wmi_handle, len); if (!buf) { WMA_LOGE("%s: wmi_buf_alloc failed", __func__); - cdf_mem_free(pRssiBkUp); + qdf_mem_free(pRssiBkUp); wma_handle->pGetRssiReq = NULL; return QDF_STATUS_E_FAILURE; } @@ -195,7 +195,7 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle, (wma_handle->wmi_handle, buf, len, WMI_REQUEST_STATS_CMDID)) { WMA_LOGE("Failed to send host stats request to fw"); wmi_buf_free(buf); - cdf_mem_free(pRssiBkUp); + qdf_mem_free(pRssiBkUp); wma_handle->pGetRssiReq = NULL; return QDF_STATUS_E_FAILURE; } @@ -231,20 +231,20 @@ QDF_STATUS wma_get_snr(tAniGetSnrReq *psnr_req) return QDF_STATUS_SUCCESS; } - psnr_req_bkp = cdf_mem_malloc(sizeof(tAniGetSnrReq)); + psnr_req_bkp = qdf_mem_malloc(sizeof(tAniGetSnrReq)); if (!psnr_req_bkp) { WMA_LOGE("Failed to allocate memory for tAniGetSnrReq"); return QDF_STATUS_E_NOMEM; } - cdf_mem_set(psnr_req_bkp, sizeof(tAniGetSnrReq), 0); + qdf_mem_set(psnr_req_bkp, sizeof(tAniGetSnrReq), 0); psnr_req_bkp->staId = psnr_req->staId; psnr_req_bkp->pDevContext = psnr_req->pDevContext; psnr_req_bkp->snrCallback = psnr_req->snrCallback; buf = wmi_buf_alloc(wma_handle->wmi_handle, len); if (!buf) { WMA_LOGE("%s: wmi_buf_alloc failed", __func__); - cdf_mem_free(psnr_req_bkp); + qdf_mem_free(psnr_req_bkp); return QDF_STATUS_E_FAILURE; } @@ -261,7 +261,7 @@ QDF_STATUS wma_get_snr(tAniGetSnrReq *psnr_req) WMI_REQUEST_STATS_CMDID)) { WMA_LOGE("Failed to send host stats request to fw"); wmi_buf_free(buf); - cdf_mem_free(psnr_req_bkp); + qdf_mem_free(psnr_req_bkp); intr->psnr_req = NULL; return QDF_STATUS_E_FAILURE; } @@ -288,7 +288,7 @@ void wma_process_link_status_req(tp_wma_handle wma, if (iface->plink_status_req) { WMA_LOGE("%s:previous link status request is pending,deleting the new request", __func__); - cdf_mem_free(pGetLinkStatus); + qdf_mem_free(pGetLinkStatus); return; } @@ -402,7 +402,7 @@ QDF_STATUS wma_lphb_conf_hbenable(tp_wma_handle wma_handle, WMA_LOGI("%s: cached LPHB status in WMA context for item %d", __func__, i); } else { - cdf_mem_zero((void *)&wma_handle->wow.lphb_cache, + qdf_mem_zero((void *)&wma_handle->wow.lphb_cache, sizeof(wma_handle->wow.lphb_cache)); WMA_LOGI("%s: cleared all cached LPHB status in WMA context", __func__); @@ -748,7 +748,7 @@ QDF_STATUS wma_process_lphb_conf_req(tp_wma_handle wma_handle, break; } - cdf_mem_free(lphb_conf_req); + qdf_mem_free(lphb_conf_req); return qdf_status; } #endif /* FEATURE_WLAN_LPHB */ @@ -1293,7 +1293,7 @@ static int wma_lphb_handler(tp_wma_handle wma, uint8_t *event) WMA_LOGD("lphb indication received with vdev_id=%d, session=%d, reason=%d", hb_fp->vdev_id, hb_fp->session, hb_fp->reason); - slphb_indication = (tSirLPHBInd *) cdf_mem_malloc(sizeof(tSirLPHBInd)); + slphb_indication = (tSirLPHBInd *) qdf_mem_malloc(sizeof(tSirLPHBInd)); if (!slphb_indication) { WMA_LOGE("Invalid LPHB indication buffer"); @@ -1311,7 +1311,7 @@ static int wma_lphb_handler(tp_wma_handle wma, uint8_t *event) qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("Fail to post eWNI_SME_LPHB_IND msg to SME"); - cdf_mem_free(slphb_indication); + qdf_mem_free(slphb_indication); return -EINVAL; } @@ -1527,14 +1527,14 @@ int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, buf_ptr = (uint8_t *) nan_rsp_event_hdr; alloc_len = sizeof(tSirNanEvent); alloc_len += nan_rsp_event_hdr->data_len; - nan_rsp_event = (tSirNanEvent *) cdf_mem_malloc(alloc_len); + nan_rsp_event = (tSirNanEvent *) qdf_mem_malloc(alloc_len); if (NULL == nan_rsp_event) { WMA_LOGE("%s: Memory allocation failure", __func__); return -ENOMEM; } nan_rsp_event->event_data_len = nan_rsp_event_hdr->data_len; - cdf_mem_copy(nan_rsp_event->event_data, buf_ptr + + qdf_mem_copy(nan_rsp_event->event_data, buf_ptr + sizeof(wmi_nan_event_hdr) + WMI_TLV_HDR_SIZE, nan_rsp_event->event_data_len); cds_msg.type = eWNI_SME_NAN_EVENT; @@ -1545,7 +1545,7 @@ int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, if (status != QDF_STATUS_SUCCESS) { WMA_LOGE("%s: Failed to post NaN response event to SME", __func__); - cdf_mem_free(nan_rsp_event); + qdf_mem_free(nan_rsp_event); return -EFAULT; } WMA_LOGD("%s: NaN response event Posted to SME", __func__); @@ -1592,14 +1592,14 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len) return -EINVAL; } - csa_offload_event = cdf_mem_malloc(sizeof(*csa_offload_event)); + csa_offload_event = qdf_mem_malloc(sizeof(*csa_offload_event)); if (!csa_offload_event) { WMA_LOGE("CDF MEM Alloc Failed for csa_offload_event"); return -EINVAL; } - cdf_mem_zero(csa_offload_event, sizeof(*csa_offload_event)); - cdf_mem_copy(csa_offload_event->bssId, &bssid, IEEE80211_ADDR_LEN); + qdf_mem_zero(csa_offload_event, sizeof(*csa_offload_event)); + qdf_mem_copy(csa_offload_event->bssId, &bssid, IEEE80211_ADDR_LEN); if (csa_event->ies_present_flag & WMI_CSA_IE_PRESENT) { csa_ie = (struct ieee80211_channelswitch_ie *) @@ -1614,7 +1614,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len) csa_offload_event->new_op_class = xcsa_ie->newClass; } else { WMA_LOGE("CSA Event error: No CSA IE present"); - cdf_mem_free(csa_offload_event); + qdf_mem_free(csa_offload_event); return -EINVAL; } @@ -1640,7 +1640,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len) (cur_chan == csa_offload_event->channel)) { WMA_LOGE("CSA Event with channel %d. Ignore !!", csa_offload_event->channel); - cdf_mem_free(csa_offload_event); + qdf_mem_free(csa_offload_event); return -EINVAL; } wma->interfaces[vdev_id].is_channel_switch = true; @@ -1692,17 +1692,17 @@ int wma_oem_capability_event_callback(void *handle, return -EINVAL; } - pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp)); + pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp)); if (!pStartOemDataRsp) { WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__); return -ENOMEM; } - cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); + qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); pStartOemDataRsp->target_rsp = true; msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]); *msg_subtype = WMI_OEM_CAPABILITY_RSP; - cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); + qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)", __func__, datalen); @@ -1754,17 +1754,17 @@ int wma_oem_measurement_report_event_callback(void *handle, return -EINVAL; } - pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp)); + pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp)); if (!pStartOemDataRsp) { WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__); return -ENOMEM; } - cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); + qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); pStartOemDataRsp->target_rsp = true; msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]); *msg_subtype = WMI_OEM_MEASUREMENT_RSP; - cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); + qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)", __func__, datalen); @@ -1815,17 +1815,17 @@ int wma_oem_error_report_event_callback(void *handle, return -EINVAL; } - pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp)); + pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp)); if (!pStartOemDataRsp) { WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__); return -ENOMEM; } - cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); + qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); pStartOemDataRsp->target_rsp = true; msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]); *msg_subtype = WMI_OEM_ERROR_REPORT_RSP; - cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); + qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen); WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)", __func__, datalen); @@ -1871,15 +1871,15 @@ int wma_oem_data_response_handler(void *handle, return -EINVAL; } - oem_data_rsp = cdf_mem_malloc(sizeof(*oem_data_rsp)); + oem_data_rsp = qdf_mem_malloc(sizeof(*oem_data_rsp)); if (!oem_data_rsp) { WMA_LOGE(FL("Failed to alloc oem_data_rsp")); return -ENOMEM; } - cdf_mem_zero(oem_data_rsp, sizeof(tStartOemDataRsp)); + qdf_mem_zero(oem_data_rsp, sizeof(tStartOemDataRsp)); oem_data_rsp->target_rsp = true; - cdf_mem_copy(&oem_data_rsp->oemDataRsp[0], data, datalen); + qdf_mem_copy(&oem_data_rsp->oemDataRsp[0], data, datalen); WMA_LOGI(FL("Sending WMA_START_OEM_DATA_RSP, data len %d"), datalen); @@ -1925,7 +1925,7 @@ void wma_start_oem_data_req(tp_wma_handle wma_handle, WMITLV_SET_HDR(cmd, WMITLV_TAG_ARRAY_BYTE, startOemDataReq->data_len); cmd += WMI_TLV_HDR_SIZE; - cdf_mem_copy(cmd, startOemDataReq->data, + qdf_mem_copy(cmd, startOemDataReq->data, startOemDataReq->data_len); WMA_LOGI(FL("Sending OEM Data Request to target, data len %d"), @@ -1944,8 +1944,8 @@ out: /* free oem data req buffer received from UMAC */ if (startOemDataReq) { if (startOemDataReq->data) - cdf_mem_free(startOemDataReq->data); - cdf_mem_free(startOemDataReq); + qdf_mem_free(startOemDataReq->data); + qdf_mem_free(startOemDataReq); } /* Now send data resp back to PE/SME with message sub-type of @@ -1954,13 +1954,13 @@ out: * comes as wmi event from target then those shall be passed * to oem application */ - pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp)); + pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp)); if (!pStartOemDataRsp) { WMA_LOGE("%s:failed to allocate memory for OEM Data Resp to PE", __func__); return; } - cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); + qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp)); pStartOemDataRsp->target_rsp = false; WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP to clear up PE/SME pending cmd", @@ -2584,7 +2584,7 @@ static void wma_send_status_to_suspend_ind(tp_wma_handle wma, bool suspended) WMA_LOGD("Posting ready to suspend indication to umac"); len = sizeof(tSirReadyToSuspendInd); - ready_to_suspend = (tSirReadyToSuspendInd *) cdf_mem_malloc(len); + ready_to_suspend = (tSirReadyToSuspendInd *) qdf_mem_malloc(len); if (NULL == ready_to_suspend) { WMA_LOGE("%s: Memory allocation failure", __func__); @@ -2602,7 +2602,7 @@ static void wma_send_status_to_suspend_ind(tp_wma_handle wma, bool suspended) status = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg); if (status != QDF_STATUS_SUCCESS) { WMA_LOGE("Failed to post ready to suspend"); - cdf_mem_free(ready_to_suspend); + qdf_mem_free(ready_to_suspend); } } @@ -2940,7 +2940,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, WMA_LOGD("Wake up for Rx packet, dump starting from ethernet hdr"); if (param_buf->wow_packet_buffer) { /* First 4-bytes of wow_packet_buffer is the length */ - cdf_mem_copy((uint8_t *) &wow_buf_pkt_len, + qdf_mem_copy((uint8_t *) &wow_buf_pkt_len, param_buf->wow_packet_buffer, 4); wma_wow_wake_up_stats(wma, param_buf->wow_packet_buffer + 4, @@ -2967,7 +2967,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, if (param_buf->wow_packet_buffer) { /* Roam event is embedded in wow_packet_buffer */ WMA_LOGD("Host woken up because of roam event"); - cdf_mem_copy((uint8_t *) &wow_buf_pkt_len, + qdf_mem_copy((uint8_t *) &wow_buf_pkt_len, param_buf->wow_packet_buffer, 4); WMA_LOGD("wow_packet_buffer dump"); qdf_trace_hex_dump(QDF_MODULE_ID_WMA, @@ -3000,7 +3000,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, if (param_buf->wow_packet_buffer) { /* station kickout event embedded in wow_packet_buffer */ WMA_LOGD("Host woken up because of sta_kickout event"); - cdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, + qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, param_buf->wow_packet_buffer, 4); WMA_LOGD("wow_packet_buffer dump"); qdf_trace_hex_dump(QDF_MODULE_ID_WMA, @@ -3043,7 +3043,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, WMA_LOGD("Host woken up because of rssi breach reason"); /* rssi breach event is embedded in wow_packet_buffer */ if (param_buf->wow_packet_buffer) { - cdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, + qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len, param_buf->wow_packet_buffer, 4); if (wow_buf_pkt_len >= sizeof(param)) { param.fixed_param = @@ -3232,8 +3232,8 @@ static QDF_STATUS wma_send_wow_patterns_to_fw(tp_wma_handle wma, WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T, WMITLV_GET_STRUCT_TLVLEN(WOW_BITMAP_PATTERN_T)); - cdf_mem_copy(&bitmap_pattern->patternbuf[0], ptrn, ptrn_len); - cdf_mem_copy(&bitmap_pattern->bitmaskbuf[0], mask, mask_len); + qdf_mem_copy(&bitmap_pattern->patternbuf[0], ptrn, ptrn_len); + qdf_mem_copy(&bitmap_pattern->bitmaskbuf[0], mask, mask_len); bitmap_pattern->pattern_offset = ptrn_offset; bitmap_pattern->pattern_len = ptrn_len; @@ -3314,7 +3314,7 @@ static QDF_STATUS wma_wow_ap(tp_wma_handle wma, uint8_t vdev_id) uint8_t mac_mask[IEEE80211_ADDR_LEN]; /* Setup unicast pkt pattern */ - cdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF); + qdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF); ret = wma_send_wow_patterns_to_fw(wma, vdev_id, 0, wma->interfaces[vdev_id].addr, IEEE80211_ADDR_LEN, 0, mac_mask, @@ -3355,7 +3355,7 @@ static QDF_STATUS wma_wow_sta(tp_wma_handle wma, uint8_t vdev_id) QDF_STATUS ret = QDF_STATUS_SUCCESS; /* Setup unicast pkt pattern */ - cdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF); + qdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF); ret = wma_send_wow_patterns_to_fw(wma, vdev_id, 0, wma->interfaces[vdev_id].addr, IEEE80211_ADDR_LEN, 0, mac_mask, @@ -3809,7 +3809,7 @@ QDF_STATUS wma_wow_add_pattern(tp_wma_handle wma, struct wow_add_pattern *ptrn) * Mask value : FF:00:FF:00:0:00:00:FF * Pattern value : 12:00:13:00:00:00:00:44 */ - cdf_mem_zero(new_mask, sizeof(new_mask)); + qdf_mem_zero(new_mask, sizeof(new_mask)); for (pos = 0; pos < ptrn->pattern_size; pos++) { bit_to_check = (WMA_NUM_BITS_IN_BYTE - 1) - (pos % WMA_NUM_BITS_IN_BYTE); @@ -3890,7 +3890,7 @@ QDF_STATUS wma_wow_enter(tp_wma_handle wma, tpSirHalWowlEnterParams info) if (info->sessionId > wma->max_bssid) { WMA_LOGE("Invalid vdev id (%d)", info->sessionId); - cdf_mem_free(info); + qdf_mem_free(info); return QDF_STATUS_E_INVAL; } @@ -3902,7 +3902,7 @@ QDF_STATUS wma_wow_enter(tp_wma_handle wma, tpSirHalWowlEnterParams info) wma->wow.disassoc_enable = info->ucWowDeauthRcv ? true : false; wma->wow.bmiss_enable = info->ucWowMaxMissedBeacons ? true : false; - cdf_mem_free(info); + qdf_mem_free(info); return QDF_STATUS_SUCCESS; } @@ -3922,14 +3922,14 @@ QDF_STATUS wma_wow_exit(tp_wma_handle wma, tpSirHalWowlExitParams info) if (info->sessionId > wma->max_bssid) { WMA_LOGE("Invalid vdev id (%d)", info->sessionId); - cdf_mem_free(info); + qdf_mem_free(info); return QDF_STATUS_E_INVAL; } iface = &wma->interfaces[info->sessionId]; iface->ptrn_match_enable = false; wma->wow.magic_ptrn_enable = false; - cdf_mem_free(info); + qdf_mem_free(info); return QDF_STATUS_SUCCESS; } @@ -4468,7 +4468,7 @@ void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg) #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ err: - cdf_mem_free(msg); + qdf_mem_free(msg); } /** @@ -4827,7 +4827,7 @@ QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler, if (NULL == pdev) { WMA_LOGE("%s: Failed to get pdev", __func__); - cdf_mem_free(pTsmStatsMsg); + qdf_mem_free(pTsmStatsMsg); return QDF_STATUS_E_INVAL; } @@ -4838,12 +4838,12 @@ QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler, #ifdef FEATURE_WLAN_ESE_UPLOAD pTsmRspParams = - (tpAniGetTsmStatsRsp) cdf_mem_malloc(sizeof(tAniGetTsmStatsRsp)); + (tpAniGetTsmStatsRsp) qdf_mem_malloc(sizeof(tAniGetTsmStatsRsp)); if (NULL == pTsmRspParams) { QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, "%s: CDF MEM Alloc Failure", __func__); QDF_ASSERT(0); - cdf_mem_free(pTsmStatsMsg); + qdf_mem_free(pTsmStatsMsg); return QDF_STATUS_E_NOMEM; } pTsmRspParams->staId = pStats->staId; @@ -4899,7 +4899,7 @@ static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id, } cmd = (WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param *) wmi_buf_data(buf); - cdf_mem_zero(cmd, sizeof(*cmd)); + qdf_mem_zero(cmd, sizeof(*cmd)); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param, @@ -4914,7 +4914,7 @@ static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id, WMI_SET_MCASTBCAST_FILTER_CMDID); if (err) { WMA_LOGE("Failed to send set_param cmd"); - cdf_mem_free(buf); + qdf_mem_free(buf); return -EIO; } WMA_LOGD("Action:%d; vdev_id:%d; clearList:%d", @@ -5002,12 +5002,12 @@ int wma_gtk_offload_status_event(void *handle, uint8_t *event, return -ENOENT; } - resp = cdf_mem_malloc(sizeof(*resp)); + resp = qdf_mem_malloc(sizeof(*resp)); if (!resp) { WMA_LOGE("%s: Failed to alloc response", __func__); return -ENOMEM; } - cdf_mem_zero(resp, sizeof(*resp)); + qdf_mem_zero(resp, sizeof(*resp)); resp->mesgType = eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP; resp->mesgLen = sizeof(*resp); resp->ulStatus = QDF_STATUS_SUCCESS; @@ -5015,10 +5015,10 @@ int wma_gtk_offload_status_event(void *handle, uint8_t *event, /* TODO: Is the total rekey count and GTK rekey count same? */ resp->ulGTKRekeyCount = status->refresh_cnt; - cdf_mem_copy(&resp->ullKeyReplayCounter, &status->replay_counter, + qdf_mem_copy(&resp->ullKeyReplayCounter, &status->replay_counter, GTK_REPLAY_COUNTER_BYTES); - cdf_mem_copy(resp->bssid.bytes, bssid, IEEE80211_ADDR_LEN); + qdf_mem_copy(resp->bssid.bytes, bssid, IEEE80211_ADDR_LEN); #ifdef IGTK_OFFLOAD /* TODO: Is the refresh count same for GTK and IGTK? */ @@ -5032,7 +5032,7 @@ int wma_gtk_offload_status_event(void *handle, uint8_t *event, if (cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg) != QDF_STATUS_SUCCESS) { WMA_LOGE("Failed to post GTK response to SME"); - cdf_mem_free(resp); + qdf_mem_free(resp); return -EINVAL; } @@ -5096,9 +5096,9 @@ static QDF_STATUS wma_send_gtk_offload_req(tp_wma_handle wma, uint8_t vdev_id, wma->wow.gtk_err_enable[vdev_id] = true; /* Copy the keys and replay counter */ - cdf_mem_copy(cmd->KCK, params->aKCK, GTK_OFFLOAD_KCK_BYTES); - cdf_mem_copy(cmd->KEK, params->aKEK, GTK_OFFLOAD_KEK_BYTES); - cdf_mem_copy(cmd->replay_counter, ¶ms->ullKeyReplayCounter, + qdf_mem_copy(cmd->KCK, params->aKCK, GTK_OFFLOAD_KCK_BYTES); + qdf_mem_copy(cmd->KEK, params->aKEK, GTK_OFFLOAD_KEK_BYTES); + qdf_mem_copy(cmd->replay_counter, ¶ms->ullKeyReplayCounter, GTK_REPLAY_COUNTER_BYTES); } else { wma->wow.gtk_err_enable[vdev_id] = false; @@ -5165,7 +5165,7 @@ QDF_STATUS wma_process_gtk_offload_req(tp_wma_handle wma, } status = wma_send_gtk_offload_req(wma, vdev_id, params); out: - cdf_mem_free(params); + qdf_mem_free(params); WMA_LOGD("%s Exit", __func__); return status; } @@ -5223,7 +5223,7 @@ QDF_STATUS wma_process_gtk_offload_getinfo_req(tp_wma_handle wma, status = QDF_STATUS_E_FAILURE; } out: - cdf_mem_free(params); + qdf_mem_free(params); WMA_LOGD("%s Exit", __func__); return status; } @@ -5260,13 +5260,13 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma, &vdev_id)) { WMA_LOGE("vdev handle is invalid for %pM", pHostOffloadParams->bssid.bytes); - cdf_mem_free(pHostOffloadParams); + qdf_mem_free(pHostOffloadParams); return QDF_STATUS_E_INVAL; } if (!wma->interfaces[vdev_id].vdev_up) { WMA_LOGE("vdev %d is not up skipping arp/ns offload", vdev_id); - cdf_mem_free(pHostOffloadParams); + qdf_mem_free(pHostOffloadParams); return QDF_STATUS_E_FAILURE; } @@ -5295,7 +5295,7 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma, buf = wmi_buf_alloc(wma->wmi_handle, len); if (!buf) { WMA_LOGE("%s: wmi_buf_alloc failed", __func__); - cdf_mem_free(pHostOffloadParams); + qdf_mem_free(pHostOffloadParams); return QDF_STATUS_E_NOMEM; } @@ -5315,7 +5315,7 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma, /* Have copy of arp info to send along with NS, Since FW expects * both ARP and NS info in single cmd */ if (bArpOnly) - cdf_mem_copy(&wma->mArpInfo, pHostOffloadParams, + qdf_mem_copy(&wma->mArpInfo, pHostOffloadParams, sizeof(tSirHostOffloadReq)); buf_ptr += sizeof(WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param); @@ -5438,11 +5438,11 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma, if (res) { WMA_LOGE("Failed to enable ARP NDP/NSffload"); wmi_buf_free(buf); - cdf_mem_free(pHostOffloadParams); + qdf_mem_free(pHostOffloadParams); return QDF_STATUS_E_FAILURE; } - cdf_mem_free(pHostOffloadParams); + qdf_mem_free(pHostOffloadParams); return QDF_STATUS_SUCCESS; } @@ -5507,7 +5507,7 @@ QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle, buf_ptr += sizeof(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ptrn_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, pAddPeriodicTxPtrnParams->ucPattern, ptrn_len); + qdf_mem_copy(buf_ptr, pAddPeriodicTxPtrnParams->ucPattern, ptrn_len); for (j = 0; j < pAddPeriodicTxPtrnParams->ucPtrnSize; j++) { WMA_LOGD("%s: Add Ptrn: %02x", __func__, buf_ptr[j] & 0xff); } @@ -5624,7 +5624,7 @@ QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq) WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, cmd->data_len); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, preq->request_data, cmd->data_len); + qdf_mem_copy(buf_ptr, preq->request_data, cmd->data_len); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_REQUEST_STATS_EXT_CMDID); @@ -5657,7 +5657,7 @@ static void wma_send_status_of_ext_wow(tp_wma_handle wma, bool status) WMA_LOGD("Posting ready to suspend indication to umac"); len = sizeof(tSirReadyToExtWoWInd); - ready_to_extwow = (tSirReadyToExtWoWInd *) cdf_mem_malloc(len); + ready_to_extwow = (tSirReadyToExtWoWInd *) qdf_mem_malloc(len); if (NULL == ready_to_extwow) { WMA_LOGE("%s: Memory allocation failure", __func__); @@ -5675,7 +5675,7 @@ static void wma_send_status_of_ext_wow(tp_wma_handle wma, bool status) vstatus = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg); if (vstatus != QDF_STATUS_SUCCESS) { WMA_LOGE("Failed to post ready to suspend"); - cdf_mem_free(ready_to_extwow); + qdf_mem_free(ready_to_extwow); } } @@ -5761,9 +5761,9 @@ int wma_set_app_type1_params_in_fw(tp_wma_handle wma, cmd->vdev_id = appType1Params->vdev_id; WMI_CHAR_ARRAY_TO_MAC_ADDR(appType1Params->wakee_mac_addr.bytes, &cmd->wakee_mac); - cdf_mem_copy(cmd->ident, appType1Params->identification_id, 8); + qdf_mem_copy(cmd->ident, appType1Params->identification_id, 8); cmd->ident_len = appType1Params->id_length; - cdf_mem_copy(cmd->passwd, appType1Params->password, 16); + qdf_mem_copy(cmd->passwd, appType1Params->password, 16); cmd->passwd_len = appType1Params->pass_length; WMA_LOGD("%s: vdev_id %d wakee_mac_addr %pM " @@ -5815,7 +5815,7 @@ int wma_set_app_type2_params_in_fw(tp_wma_handle wma, cmd->vdev_id = appType2Params->vdev_id; - cdf_mem_copy(cmd->rc4_key, appType2Params->rc4_key, 16); + qdf_mem_copy(cmd->rc4_key, appType2Params->rc4_key, 16); cmd->rc4_key_len = appType2Params->rc4_key_len; cmd->ip_id = appType2Params->ip_id; @@ -6004,7 +6004,7 @@ QDF_STATUS wma_nan_req(void *wma_ptr, tpNanRequest nan_req) buf_ptr += sizeof(wmi_nan_cmd_param); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, nan_data_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, nan_req->request_data, cmd->data_len); + qdf_mem_copy(buf_ptr, nan_req->request_data, cmd->data_len); ret = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len, WMI_NAN_CMDID); @@ -6041,7 +6041,7 @@ int wma_process_dhcpserver_offload(tp_wma_handle wma_handle, } cmd = (wmi_set_dhcp_server_offload_cmd_fixed_param *) wmi_buf_data(buf); - cdf_mem_zero(cmd, sizeof(*cmd)); + qdf_mem_zero(cmd, sizeof(*cmd)); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param, @@ -6169,7 +6169,7 @@ int wma_channel_avoid_evt_handler(void *handle, uint8_t *event, } sca_indication = (tSirChAvoidIndType *) - cdf_mem_malloc(sizeof(tSirChAvoidIndType)); + qdf_mem_malloc(sizeof(tSirChAvoidIndType)); if (!sca_indication) { WMA_LOGE("Invalid channel avoid indication buffer"); return -EINVAL; @@ -6194,7 +6194,7 @@ int wma_channel_avoid_evt_handler(void *handle, uint8_t *event, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("Fail to post eWNI_SME_CH_AVOID_IND msg to SME"); - cdf_mem_free(sca_indication); + qdf_mem_free(sca_indication); return -EINVAL; } @@ -6783,7 +6783,7 @@ int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len) } tdls_event = (tSirTdlsEventnotify *) - cdf_mem_malloc(sizeof(*tdls_event)); + qdf_mem_malloc(sizeof(*tdls_event)); if (!tdls_event) { WMA_LOGE("%s: failed to allocate memory for tdls_event", __func__); @@ -6919,7 +6919,7 @@ int wma_set_tdls_offchan_mode(WMA_HANDLE handle, end: if (chan_switch_params) - cdf_mem_free(chan_switch_params); + qdf_mem_free(chan_switch_params); return ret; } @@ -7029,7 +7029,7 @@ int wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams) end_fw_tdls_state: if (pwmaTdlsparams) - cdf_mem_free(pwmaTdlsparams); + qdf_mem_free(pwmaTdlsparams); return ret; } @@ -7065,7 +7065,7 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle, /* peer capability info is valid only when peer state is connected */ if (WMA_TDLS_PEER_STATE_CONNECTED != peerStateParams->peerState) { - cdf_mem_zero(&peerStateParams->peerCap, + qdf_mem_zero(&peerStateParams->peerCap, sizeof(tTdlsPeerCapParams)); } @@ -7257,7 +7257,7 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle, end_tdls_peer_state: if (peerStateParams) - cdf_mem_free(peerStateParams); + qdf_mem_free(peerStateParams); return ret; } #endif /* FEATURE_WLAN_TDLS */ @@ -7625,7 +7625,7 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic, return -ENOENT; } radar_event = (struct wma_dfs_radar_indication *) - cdf_mem_malloc(sizeof(struct wma_dfs_radar_indication)); + qdf_mem_malloc(sizeof(struct wma_dfs_radar_indication)); if (radar_event == NULL) { WMA_LOGE("%s:DFS- Invalid radar_event", __func__); return -ENOMEM; @@ -7651,7 +7651,7 @@ int wma_dfs_indicate_radar(struct ieee80211com *ic, if (indication_status == false) { WMA_LOGE("%s:Application triggered channel switch in progress!.. drop radar event indiaction to SAP", __func__); - cdf_mem_free(radar_event); + qdf_mem_free(radar_event); qdf_spin_unlock_bh(&ic->chan_lock); return 0; } @@ -7718,7 +7718,7 @@ QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma, } buf_ptr = (u_int8_t *) wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); cmd = (wmi_get_fw_mem_dump_fixed_param *) buf_ptr; WMITLV_SET_HDR(&cmd->tlv_header, @@ -7791,7 +7791,7 @@ static QDF_STATUS wma_fw_mem_dump_rsp(uint32_t req_id, uint32_t status) cds_msg_t sme_msg = {0}; QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - dump_rsp = cdf_mem_malloc(sizeof(*dump_rsp)); + dump_rsp = qdf_mem_malloc(sizeof(*dump_rsp)); if (!dump_rsp) { WMA_LOGE(FL("Memory allocation failed.")); @@ -7812,7 +7812,7 @@ static QDF_STATUS wma_fw_mem_dump_rsp(uint32_t req_id, uint32_t status) qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Fail to post fw mem dump ind msg")); - cdf_mem_free(dump_rsp); + qdf_mem_free(dump_rsp); } return qdf_status; @@ -7898,7 +7898,7 @@ QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, } buf_ptr = wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); /* Populate the WMI command */ cmd = (wmi_vdev_set_ie_cmd_fixed_param *)buf_ptr; @@ -7918,7 +7918,7 @@ QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, ie_info->data, cmd->ie_len); + qdf_mem_copy(buf_ptr, ie_info->data, cmd->ie_len); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_VDEV_SET_IE_CMDID); diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index b54a3625f1e4..777b0275a90b 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -50,7 +50,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -505,13 +505,13 @@ int wma_cli_set2_command(int vdev_id, int param_id, int sval1, cds_msg_t msg = { 0 }; wma_cli_set_cmd_t *iwcmd; - iwcmd = cdf_mem_malloc(sizeof(*iwcmd)); + iwcmd = qdf_mem_malloc(sizeof(*iwcmd)); if (!iwcmd) { WMA_LOGE("%s: Failed alloc memory for iwcmd", __func__); return -ENOMEM; } - cdf_mem_zero(iwcmd, sizeof(*iwcmd)); + qdf_mem_zero(iwcmd, sizeof(*iwcmd)); iwcmd->param_value = sval1; iwcmd->param_sec_value = sval2; iwcmd->param_vdev_id = vdev_id; @@ -525,7 +525,7 @@ int wma_cli_set2_command(int vdev_id, int param_id, int sval1, cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { WMA_LOGP("%s: Failed to post WMA_CLI_SET_CMD msg", __func__); - cdf_mem_free(iwcmd); + qdf_mem_free(iwcmd); return -EIO; } return 0; @@ -1489,7 +1489,7 @@ int wma_process_fw_event_handler(struct wmi_unified *wmi_handle, wma_process_fw_event_params *params_buf; cds_msg_t cds_msg = { 0 }; - params_buf = cdf_mem_malloc(sizeof(wma_process_fw_event_params)); + params_buf = qdf_mem_malloc(sizeof(wma_process_fw_event_params)); if (!params_buf) { WMA_LOGE("%s: Failed alloc memory for params_buf", __func__); cdf_nbuf_free(evt_buf); @@ -1508,7 +1508,7 @@ int wma_process_fw_event_handler(struct wmi_unified *wmi_handle, WMA_LOGP("%s: Failed to post WMA_PROCESS_FW_EVENT msg", __func__); cdf_nbuf_free(evt_buf); - cdf_mem_free(params_buf); + qdf_mem_free(params_buf); return -EFAULT; } WMA_LOGD("WMA_PROCESS_FW_EVENT posted"); @@ -1619,7 +1619,7 @@ QDF_STATUS wma_open(void *cds_context, return qdf_status; } - cdf_mem_zero(wma_handle, sizeof(t_wma_handle)); + qdf_mem_zero(wma_handle, sizeof(t_wma_handle)); if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) { #ifdef FEATURE_WLAN_SCAN_PNO @@ -1752,14 +1752,14 @@ QDF_STATUS wma_open(void *cds_context, wma_handle->dfs_phyerr_filter_offload = mac_params->dfsPhyerrFilterOffload; wma_handle->dfs_pri_multiplier = mac_params->dfsRadarPriMultiplier; - wma_handle->interfaces = cdf_mem_malloc(sizeof(struct wma_txrx_node) * + wma_handle->interfaces = qdf_mem_malloc(sizeof(struct wma_txrx_node) * wma_handle->max_bssid); if (!wma_handle->interfaces) { WMA_LOGP("%s: failed to allocate interface table", __func__); qdf_status = QDF_STATUS_E_NOMEM; goto err_scn_context; } - cdf_mem_zero(wma_handle->interfaces, sizeof(struct wma_txrx_node) * + qdf_mem_zero(wma_handle->interfaces, sizeof(struct wma_txrx_node) * wma_handle->max_bssid); /* Register the debug print event handler */ wmi_unified_register_event_handler(wma_handle->wmi_handle, @@ -2016,14 +2016,14 @@ err_dbglog_init: err_event_init: wmi_unified_unregister_event_handler(wma_handle->wmi_handle, WMI_DEBUG_PRINT_EVENTID); - cdf_mem_free(wma_handle->interfaces); + qdf_mem_free(wma_handle->interfaces); err_scn_context: wma_dfs_detach(wma_handle->dfs_ic); #if defined(QCA_WIFI_FTM) wma_utf_detach(wma_handle); #endif /* QCA_WIFI_FTM */ err_wmi_handle: - cdf_mem_free(((p_cds_contextType) cds_context)->cfg_ctx); + qdf_mem_free(((p_cds_contextType) cds_context)->cfg_ctx); OS_FREE(wmi_handle); err_wma_handle: @@ -2115,7 +2115,7 @@ void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type, status = lim_post_msg_api(pMac, &msg); if (QDF_STATUS_SUCCESS != status) { if (NULL != body_ptr) - cdf_mem_free(body_ptr); + qdf_mem_free(body_ptr); QDF_ASSERT(0); } return; @@ -2142,7 +2142,7 @@ static int wma_set_base_macaddr_indicate(tp_wma_handle wma_handle, } cmd = (wmi_pdev_set_base_macaddr_cmd_fixed_param *) wmi_buf_data(buf); - cdf_mem_zero(cmd, sizeof(*cmd)); + qdf_mem_zero(cmd, sizeof(*cmd)); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param, @@ -2154,7 +2154,7 @@ static int wma_set_base_macaddr_indicate(tp_wma_handle wma_handle, WMI_PDEV_SET_BASE_MACADDR_CMDID); if (err) { WMA_LOGE("Failed to send set_base_macaddr cmd"); - cdf_mem_free(buf); + qdf_mem_free(buf); return -EIO; } WMA_LOGD("Base MAC Addr: " MAC_ADDRESS_STR, @@ -2211,10 +2211,10 @@ static int wma_log_supported_evt_handler(void *handle, /* Free any previous allocation */ if (wma->events_logs_list) - cdf_mem_free(wma->events_logs_list); + qdf_mem_free(wma->events_logs_list); /* Store the event list for run time enable/disable */ - wma->events_logs_list = cdf_mem_malloc(num_of_diag_events_logs * + wma->events_logs_list = qdf_mem_malloc(num_of_diag_events_logs * sizeof(uint32_t)); if (!wma->events_logs_list) { WMA_LOGE("%s: event log list memory allocation failed", @@ -2230,7 +2230,7 @@ static int wma_log_supported_evt_handler(void *handle, buf = wmi_buf_alloc(wma->wmi_handle, buf_len); if (!buf) { WMA_LOGE("%s: wmi_buf_alloc failed", __func__); - cdf_mem_free(wma->events_logs_list); + qdf_mem_free(wma->events_logs_list); wma->events_logs_list = NULL; return -ENOMEM; } @@ -2380,7 +2380,7 @@ static int wma_soc_set_hw_mode_resp_evt_handler(void *handle, return QDF_STATUS_E_NULL_VALUE; } - hw_mode_resp = cdf_mem_malloc(sizeof(*hw_mode_resp)); + hw_mode_resp = qdf_mem_malloc(sizeof(*hw_mode_resp)); if (!hw_mode_resp) { WMA_LOGI("%s: Memory allocation failed", __func__); /* Since this memory allocation itself failed, we cannot @@ -2490,7 +2490,7 @@ static int wma_soc_hw_mode_transition_evt_handler(void *handle, return QDF_STATUS_E_FAILURE; } - hw_mode_trans_ind = cdf_mem_malloc(sizeof(*hw_mode_trans_ind)); + hw_mode_trans_ind = qdf_mem_malloc(sizeof(*hw_mode_trans_ind)); if (!hw_mode_trans_ind) { WMA_LOGI("%s: Memory allocation failed", __func__); return QDF_STATUS_E_NULL_VALUE; @@ -2566,7 +2566,7 @@ static int wma_soc_set_dual_mode_config_resp_evt_handler(void *handle, return QDF_STATUS_E_NULL_VALUE; } - dual_mac_cfg_resp = cdf_mem_malloc(sizeof(*dual_mac_cfg_resp)); + dual_mac_cfg_resp = qdf_mem_malloc(sizeof(*dual_mac_cfg_resp)); if (!dual_mac_cfg_resp) { WMA_LOGE("%s: Memory allocation failed", __func__); /* Since the mem alloc failed, we cannot send resp to LIM. @@ -2864,7 +2864,7 @@ QDF_STATUS wma_stop(void *cds_ctx, uint8_t reason) if (wma_handle->ack_work_ctx) { cds_flush_work(&wma_handle->ack_work_ctx->ack_cmp_work); - cdf_mem_free(wma_handle->ack_work_ctx); + qdf_mem_free(wma_handle->ack_work_ctx); wma_handle->ack_work_ctx = NULL; } @@ -2935,7 +2935,7 @@ static void wma_cleanup_hold_req(tp_wma_handle wma) return; } qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock); } @@ -2970,7 +2970,7 @@ static void wma_cleanup_vdev_resp(tp_wma_handle wma) return; } qdf_mc_timer_destroy(&req_msg->event_timeout); - cdf_mem_free(req_msg); + qdf_mem_free(req_msg); } qdf_spin_unlock_bh(&wma->vdev_respq_lock); } @@ -3016,33 +3016,33 @@ QDF_STATUS wma_wmi_service_close(void *cds_ctx) cdf_nbuf_unmap_single(wma_handle->qdf_dev, bcn->buf, QDF_DMA_TO_DEVICE); cdf_nbuf_free(bcn->buf); - cdf_mem_free(bcn); + qdf_mem_free(bcn); wma_handle->interfaces[i].beacon = NULL; } if (wma_handle->interfaces[i].handle) { - cdf_mem_free(wma_handle->interfaces[i].handle); + qdf_mem_free(wma_handle->interfaces[i].handle); wma_handle->interfaces[i].handle = NULL; } if (wma_handle->interfaces[i].addBssStaContext) { - cdf_mem_free(wma_handle-> + qdf_mem_free(wma_handle-> interfaces[i].addBssStaContext); wma_handle->interfaces[i].addBssStaContext = NULL; } if (wma_handle->interfaces[i].del_staself_req) { - cdf_mem_free(wma_handle->interfaces[i].del_staself_req); + qdf_mem_free(wma_handle->interfaces[i].del_staself_req); wma_handle->interfaces[i].del_staself_req = NULL; } } - cdf_mem_free(wma_handle->interfaces); + qdf_mem_free(wma_handle->interfaces); /* free the wma_handle */ cds_free_context(wma_handle->cds_context, QDF_MODULE_ID_WMA, wma_handle); - cdf_mem_free(((p_cds_contextType) cds_ctx)->cfg_ctx); + qdf_mem_free(((p_cds_contextType) cds_ctx)->cfg_ctx); WMA_LOGD("%s: Exit", __func__); return QDF_STATUS_SUCCESS; } @@ -3116,13 +3116,13 @@ QDF_STATUS wma_close(void *cds_ctx) /* Free DBS list */ if (wma_handle->hw_mode.hw_mode_list) { - cdf_mem_free(wma_handle->hw_mode.hw_mode_list); + qdf_mem_free(wma_handle->hw_mode.hw_mode_list); wma_handle->hw_mode.hw_mode_list = NULL; WMA_LOGI("%s: DBS list is freed", __func__); } if (wma_handle->events_logs_list) { - cdf_mem_free(wma_handle->events_logs_list); + qdf_mem_free(wma_handle->events_logs_list); wma_handle->events_logs_list = NULL; WMA_LOGD("%s: Event log list freed", __func__); } @@ -3163,7 +3163,7 @@ QDF_STATUS wma_close(void *cds_ctx) qdf_wake_lock_destroy(&wma_handle->wmi_cmd_rsp_wake_lock); qdf_runtime_lock_deinit(wma_handle->wmi_cmd_rsp_runtime_lock); for (idx = 0; idx < wma_handle->num_mem_chunks; ++idx) { - cdf_os_mem_free_consistent(wma_handle->qdf_dev, + qdf_mem_free_consistent(wma_handle->qdf_dev, wma_handle->mem_chunks[idx].len, wma_handle->mem_chunks[idx].vaddr, wma_handle->mem_chunks[idx].paddr, @@ -3184,7 +3184,7 @@ QDF_STATUS wma_close(void *cds_ctx) } if (NULL != wma_handle->pGetRssiReq) { - cdf_mem_free(wma_handle->pGetRssiReq); + qdf_mem_free(wma_handle->pGetRssiReq); wma_handle->pGetRssiReq = NULL; } if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap, @@ -3244,11 +3244,10 @@ static uint32_t wma_alloc_host_mem_chunk(tp_wma_handle wma_handle, /** reduce the requested allocation by half until allocation succeeds */ while (wma_handle->mem_chunks[idx].vaddr == NULL && num_units) { wma_handle->mem_chunks[idx].vaddr = - cdf_os_mem_alloc_consistent(wma_handle->qdf_dev, - num_units * unit_len, &paddr, - qdf_get_dma_mem_context( - (&(wma_handle->mem_chunks[idx])), - memctx)); + qdf_mem_alloc_consistent(wma_handle->qdf_dev, + wma_handle->qdf_dev->dev, + num_units * unit_len, + &paddr); if (wma_handle->mem_chunks[idx].vaddr == NULL) { num_units = (num_units >> 1);/* reduce length by half */ } else { @@ -3514,7 +3513,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) struct wma_tgt_cfg tgt_cfg; void *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); - cdf_mem_zero(&tgt_cfg, sizeof(struct wma_tgt_cfg)); + qdf_mem_zero(&tgt_cfg, sizeof(struct wma_tgt_cfg)); tgt_cfg.reg_domain = wma_handle->reg_cap.eeprom_rd; tgt_cfg.eeprom_rd_ext = wma_handle->reg_cap.eeprom_rd_ext; @@ -3536,7 +3535,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) tgt_cfg.max_intf_count = wma_handle->wlan_resource_config.num_vdevs; - cdf_mem_copy(tgt_cfg.hw_macaddr.bytes, wma_handle->hwaddr, + qdf_mem_copy(tgt_cfg.hw_macaddr.bytes, wma_handle->hwaddr, ATH_MAC_LEN); wma_update_target_services(wma_handle, &tgt_cfg.services); @@ -3654,7 +3653,7 @@ static wmi_buf_t wma_setup_wmi_init_msg(tp_wma_handle wma_handle, WMITLV_TAG_ARRAY_STRUC, (sizeof(wlan_host_memory_chunk) * wma_handle->num_mem_chunks)); - cdf_mem_copy(&wma_handle->target_abi_vers, + qdf_mem_copy(&wma_handle->target_abi_vers, ¶m_buf->fixed_param->fw_abi_vers, sizeof(wmi_abi_version)); num_whitelist = sizeof(version_whitelist) / @@ -3679,7 +3678,7 @@ static wmi_buf_t wma_setup_wmi_init_msg(tp_wma_handle wma_handle, cmd->host_abi_vers.abi_version_ns_2, cmd->host_abi_vers.abi_version_ns_3); - cdf_mem_copy(&wma_handle->final_abi_vers, &cmd->host_abi_vers, + qdf_mem_copy(&wma_handle->final_abi_vers, &cmd->host_abi_vers, sizeof(wmi_abi_version)); return buf; } @@ -3831,13 +3830,13 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) wma_handle->num_dbs_hw_modes = ev->num_dbs_hw_modes; ev_wlan_dbs_hw_mode_list = param_buf->wlan_dbs_hw_mode_list; wma_handle->hw_mode.hw_mode_list = - cdf_mem_malloc(sizeof(*wma_handle->hw_mode.hw_mode_list) * + qdf_mem_malloc(sizeof(*wma_handle->hw_mode.hw_mode_list) * wma_handle->num_dbs_hw_modes); if (!wma_handle->hw_mode.hw_mode_list) { WMA_LOGE("%s: Memory allocation failed for DBS", __func__); /* Continuing with the rest of the processing */ } - cdf_mem_copy(wma_handle->hw_mode.hw_mode_list, + qdf_mem_copy(wma_handle->hw_mode.hw_mode_list, ev_wlan_dbs_hw_mode_list, (sizeof(*wma_handle->hw_mode.hw_mode_list) * wma_handle->num_dbs_hw_modes)); @@ -3855,7 +3854,7 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) wma_handle->phy_capability = ev->phy_capability; wma_handle->max_frag_entry = ev->max_frag_entry; wma_handle->num_rf_chains = ev->num_rf_chains; - cdf_mem_copy(&wma_handle->reg_cap, param_buf->hal_reg_capabilities, + qdf_mem_copy(&wma_handle->reg_cap, param_buf->hal_reg_capabilities, sizeof(HAL_REG_CAPABILITIES)); wma_handle->ht_cap_info = ev->ht_cap_info; #ifdef WLAN_FEATURE_11AC @@ -3876,7 +3875,7 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) if (ev->hw_bd_id) { wma_handle->hw_bd_id = ev->hw_bd_id; - cdf_mem_copy(wma_handle->hw_bd_info, + qdf_mem_copy(wma_handle->hw_bd_info, ev->hw_bd_info, sizeof(ev->hw_bd_info)); WMA_LOGE("%s: Board version: %x.%x", @@ -3884,7 +3883,7 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) wma_handle->hw_bd_info[0], wma_handle->hw_bd_info[1]); } else { wma_handle->hw_bd_id = 0; - cdf_mem_zero(wma_handle->hw_bd_info, + qdf_mem_zero(wma_handle->hw_bd_info, sizeof(wma_handle->hw_bd_info)); WMA_LOGE("%s: Board version is unknown!", __func__); } @@ -3894,7 +3893,7 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) /* dbg_print_wmi_service_11ac(ev); */ /* wmi service is ready */ - cdf_mem_copy(wma_handle->wmi_service_bitmap, + qdf_mem_copy(wma_handle->wmi_service_bitmap, param_buf->wmi_service_bitmap, sizeof(wma_handle->wmi_service_bitmap)); @@ -4004,12 +4003,12 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) return; } - cdf_mem_copy(target_cap.wmi_service_bitmap, + qdf_mem_copy(target_cap.wmi_service_bitmap, param_buf->wmi_service_bitmap, sizeof(wma_handle->wmi_service_bitmap)); target_cap.wlan_resource_config = wma_handle->wlan_resource_config; wma_update_fw_config(wma_handle, &target_cap); - cdf_mem_copy(wma_handle->wmi_service_bitmap, + qdf_mem_copy(wma_handle->wmi_service_bitmap, target_cap.wmi_service_bitmap, sizeof(wma_handle->wmi_service_bitmap)); wma_handle->wlan_resource_config = target_cap.wlan_resource_config; @@ -4192,9 +4191,9 @@ void wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info) WLAN_INIT_STATUS_GEN_FAILED; } } - cdf_mem_copy(&wma_handle->final_abi_vers, &ev->fw_abi_vers, + qdf_mem_copy(&wma_handle->final_abi_vers, &ev->fw_abi_vers, sizeof(wmi_abi_version)); - cdf_mem_copy(&wma_handle->target_abi_vers, &ev->fw_abi_vers, + qdf_mem_copy(&wma_handle->target_abi_vers, &ev->fw_abi_vers, sizeof(wmi_abi_version)); /* copy the mac addr */ @@ -4716,7 +4715,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) if (NULL == wma_handle) { WMA_LOGP("%s: wma_handle is NULL", __func__); QDF_ASSERT(0); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); qdf_status = QDF_STATUS_E_INVAL; goto end; } @@ -4729,7 +4728,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_PROCESS_FW_EVENT: wma_process_fw_event(wma_handle, (wma_process_fw_event_params *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef FEATURE_WLAN_ESE @@ -4767,16 +4766,16 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) break; case WMA_START_SCAN_OFFLOAD_REQ: wma_start_scan(wma_handle, msg->bodyptr, msg->type); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_STOP_SCAN_OFFLOAD_REQ: wma_stop_scan(wma_handle, msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_UPDATE_CHAN_LIST_REQ: wma_update_channel_list(wma_handle, (tSirUpdateChanList *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_LINK_STATE: wma_set_linkstate(wma_handle, (tpLinkStateParams) msg->bodyptr); @@ -4806,27 +4805,27 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_UPDATE_EDCA_PROFILE_IND: wma_process_update_edca_param_req(wma_handle, (tEdcaParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SEND_BEACON_REQ: wma_send_beacon(wma_handle, (tpSendbeaconParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SEND_PROBE_RSP_TMPL: wma_send_probe_rsp_tmpl(wma_handle, (tpSendProbeRespParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_CLI_SET_CMD: wma_process_cli_set_cmd(wma_handle, (wma_cli_set_cmd_t *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #if !defined(REMOVE_PKT_LOG) case WMA_PKTLOG_ENABLE_REQ: wma_pktlog_wmi_send_cmd(wma_handle, (struct ath_pktlog_wmi_params *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* REMOVE_PKT_LOG */ #if defined(QCA_WIFI_FTM) @@ -4838,22 +4837,22 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_ENTER_PS_REQ: wma_enable_sta_ps_mode(wma_handle, (tpEnablePsParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXIT_PS_REQ: wma_disable_sta_ps_mode(wma_handle, (tpDisablePsParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_ENABLE_UAPSD_REQ: wma_enable_uapsd_mode(wma_handle, (tpEnableUapsdParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_DISABLE_UAPSD_REQ: wma_disable_uapsd_mode(wma_handle, (tpDisableUapsdParams) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_TX_POWER_REQ: wma_set_tx_power(wma_handle, (tpMaxTxPowerParams) msg->bodyptr); @@ -4892,12 +4891,12 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_UPDATE_OP_MODE: wma_process_update_opmode(wma_handle, (tUpdateVHTOpMode *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_UPDATE_RX_NSS: wma_process_update_rx_nss(wma_handle, (tUpdateRxNss *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef WLAN_FEATURE_11AC case WMA_UPDATE_MEMBERSHIP: @@ -4912,7 +4911,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_UPDATE_BEACON_IND: wma_process_update_beacon_params(wma_handle, (tUpdateBeaconParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_ADD_TS_REQ: @@ -4930,24 +4929,24 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_RECEIVE_FILTER_SET_FILTER_REQ: wma_process_receive_filter_set_filter_req(wma_handle, (tSirRcvPktFilterCfgType *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_RECEIVE_FILTER_CLEAR_FILTER_REQ: wma_process_receive_filter_clear_filter_req(wma_handle, (tSirRcvFltPktClearParam *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WOW_ADD_PTRN: wma_wow_add_pattern(wma_handle, (struct wow_add_pattern *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WOW_DEL_PTRN: wma_wow_delete_user_pattern(wma_handle, (struct wow_delete_pattern *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WOWL_ENTER_REQ: wma_wow_enter(wma_handle, @@ -4973,7 +4972,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_8023_MULTICAST_LIST_REQ: wma_process_mcbc_set_filter_req(wma_handle, (tpSirRcvFltMcAddrList) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef WLAN_FEATURE_GTK_OFFLOAD case WMA_GTK_OFFLOAD_REQ: @@ -5034,17 +5033,17 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_ADD_PERIODIC_TX_PTRN_IND: wma_process_add_periodic_tx_ptrn_ind(wma_handle, (tSirAddPeriodicTxPtrn *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_DEL_PERIODIC_TX_PTRN_IND: wma_process_del_periodic_tx_ptrn_ind(wma_handle, (tSirDelPeriodicTxPtrn *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_TX_POWER_LIMIT: wma_process_tx_power_limits(wma_handle, (tSirTxPowerLimit *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef FEATURE_WLAN_LPHB case WMA_LPHB_CONF_REQ: @@ -5057,25 +5056,25 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_CH_AVOID_UPDATE_REQ: wma_process_ch_avoid_update_req(wma_handle, (tSirChAvoidUpdateReq *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* FEATURE_WLAN_CH_AVOID */ #ifdef FEATURE_WLAN_AUTO_SHUTDOWN case WMA_SET_AUTO_SHUTDOWN_TIMER_REQ: wma_set_auto_shutdown_timer_req(wma_handle, msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* FEATURE_WLAN_AUTO_SHUTDOWN */ case WMA_DHCP_START_IND: case WMA_DHCP_STOP_IND: wma_process_dhcp_ind(wma_handle, (tAniDHCPInd *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_INIT_THERMAL_INFO_CMD: wma_process_init_thermal_info(wma_handle, (t_thermal_mgmt *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_THERMAL_LEVEL: @@ -5085,26 +5084,26 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_SET_P2P_GO_NOA_REQ: wma_process_set_p2pgo_noa_req(wma_handle, (tP2pPsParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_MIMOPS_REQ: wma_process_set_mimops_req(wma_handle, (tSetMIMOPS *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_SAP_INTRABSS_DIS: wma_set_vdev_intrabss_fwd(wma_handle, (tDisableIntraBssFwd *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_GET_LINK_SPEED: wma_get_link_speed(wma_handle, msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_MODEM_POWER_STATE_IND: wma_notify_modem_power_state(wma_handle, (tSirModemPowerStateInd *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WLAN_RESUME_REQ: wma_resume_req(wma_handle, QDF_SYSTEM_SUSPEND); @@ -5114,76 +5113,76 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_STATS_EXT_REQUEST: wma_stats_ext_req(wma_handle, (tpStatsExtRequest) (msg->bodyptr)); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_STATS_EXT */ case WMA_HIDDEN_SSID_VDEV_RESTART: wma_hidden_ssid_vdev_restart(wma_handle, (tHalHiddenSsidVdevRestart *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef WLAN_FEATURE_EXTWOW_SUPPORT case WMA_WLAN_EXT_WOW: wma_enable_ext_wow(wma_handle, (tSirExtWoWParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WLAN_SET_APP_TYPE1_PARAMS: wma_set_app_type1_params_in_fw(wma_handle, (tSirAppType1Params *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_WLAN_SET_APP_TYPE2_PARAMS: wma_set_app_type2_params_in_fw(wma_handle, (tSirAppType2Params *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */ #ifdef FEATURE_WLAN_EXTSCAN case WMA_EXTSCAN_START_REQ: wma_start_extscan(wma_handle, (tSirWifiScanCmdReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_STOP_REQ: wma_stop_extscan(wma_handle, (tSirExtScanStopReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_SET_BSSID_HOTLIST_REQ: wma_extscan_start_hotlist_monitor(wma_handle, (tSirExtScanSetBssidHotListReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_RESET_BSSID_HOTLIST_REQ: wma_extscan_stop_hotlist_monitor(wma_handle, (tSirExtScanResetBssidHotlistReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_SET_SIGNF_CHANGE_REQ: wma_extscan_start_change_monitor(wma_handle, (tSirExtScanSetSigChangeReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_RESET_SIGNF_CHANGE_REQ: wma_extscan_stop_change_monitor(wma_handle, (tSirExtScanResetSignificantChangeReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_GET_CACHED_RESULTS_REQ: wma_extscan_get_cached_results(wma_handle, (tSirExtScanGetCachedResultsReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_EXTSCAN_GET_CAPABILITIES_REQ: wma_extscan_get_capabilities(wma_handle, (tSirGetExtScanCapabilitiesReqParams *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_EPNO_LIST_REQ: wma_set_epno_network_list(wma_handle, (struct wifi_epno_params *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_PASSPOINT_LIST_REQ: /* Issue reset passpoint network list first and clear @@ -5193,7 +5192,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) wma_set_passpoint_network_list(wma_handle, (struct wifi_passpoint_req *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_RESET_PASSPOINT_LIST_REQ: wma_reset_passpoint_network_list(wma_handle, @@ -5202,57 +5201,57 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_EXTSCAN_SET_SSID_HOTLIST_REQ: wma_set_ssid_hotlist(wma_handle, (struct sir_set_ssid_hotlist_request *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* FEATURE_WLAN_EXTSCAN */ case WMA_SET_SCAN_MAC_OUI_REQ: wma_scan_probe_setoui(wma_handle, msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef WLAN_FEATURE_LINK_LAYER_STATS case WMA_LINK_LAYER_STATS_CLEAR_REQ: wma_process_ll_stats_clear_req(wma_handle, (tpSirLLStatsClearReq) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_LINK_LAYER_STATS_SET_REQ: wma_process_ll_stats_set_req(wma_handle, (tpSirLLStatsSetReq) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_LINK_LAYER_STATS_GET_REQ: wma_process_ll_stats_get_req(wma_handle, (tpSirLLStatsGetReq) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ case SIR_HAL_UNIT_TEST_CMD: wma_process_unit_test_cmd(wma_handle, (t_wma_unit_test_cmd *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef WLAN_FEATURE_ROAM_OFFLOAD case WMA_ROAM_OFFLOAD_SYNCH_FAIL: wma_process_roam_synch_fail(wma_handle, (struct roam_offload_synch_fail *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_ROAM_INVOKE: wma_process_roam_invoke(wma_handle, (struct wma_roam_invoke_cmd *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_ROAM_OFFLOAD */ #ifdef WLAN_FEATURE_NAN case WMA_NAN_REQUEST: wma_nan_req(wma_handle, (tNanRequest *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_NAN */ case SIR_HAL_SET_BASE_MACADDR_IND: wma_set_base_macaddr_indicate(wma_handle, (tSirMacAddr *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_LINK_STATUS_GET_REQ: wma_process_link_status_req(wma_handle, @@ -5260,37 +5259,37 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) break; case WMA_GET_TEMPERATURE_REQ: wma_get_temperature(wma_handle); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #ifdef DHCP_SERVER_OFFLOAD case WMA_SET_DHCP_SERVER_OFFLOAD_CMD: wma_process_dhcpserver_offload(wma_handle, (tSirDhcpSrvOffloadInfo *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* DHCP_SERVER_OFFLOAD */ #ifdef WLAN_FEATURE_GPIO_LED_FLASHING case WMA_LED_FLASHING_REQ: wma_set_led_flashing(wma_handle, (tSirLedFlashingReq *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; #endif /* WLAN_FEATURE_GPIO_LED_FLASHING */ case SIR_HAL_SET_MAS: wma_process_set_mas(wma_handle, (uint32_t *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_SET_MIRACAST: wma_process_set_miracast(wma_handle, (uint32_t *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_CONFIG_STATS_FACTOR: wma_config_stats_factor(wma_handle, (struct sir_stats_avg_factor *) msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_CONFIG_GUARD_TIME: wma_config_guard_time(wma_handle, @@ -5299,14 +5298,14 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_IPA_OFFLOAD_ENABLE_DISABLE: wma_ipa_offload_enable_disable(wma_handle, (struct sir_ipa_offload_enable_disable *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_START_STOP_LOGGING: wma_set_wifi_start_packet_stats(wma_handle, (struct sir_wifi_start_log *)msg->bodyptr); wma_enable_specific_fw_logs(wma_handle, (struct sir_wifi_start_log *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_FLUSH_LOG_TO_FW: wma_send_flush_logs_to_fw(wma_handle); @@ -5319,72 +5318,72 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_FW_MEM_DUMP_REQ: wma_process_fw_mem_dump_req(wma_handle, (struct fw_dump_req *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_SOC_SET_PCL_TO_FW: wma_send_soc_set_pcl_cmd(wma_handle, (struct sir_pcl_list *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_SOC_SET_HW_MODE: wma_send_soc_set_hw_mode_cmd(wma_handle, (struct sir_hw_mode *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_OCB_SET_CONFIG_CMD: wma_ocb_set_config_req(wma_handle, (struct sir_ocb_config *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_OCB_SET_UTC_TIME_CMD: wma_ocb_set_utc_time(wma_handle, (struct sir_ocb_utc *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_OCB_START_TIMING_ADVERT_CMD: wma_ocb_start_timing_advert(wma_handle, (struct sir_ocb_timing_advert *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_OCB_STOP_TIMING_ADVERT_CMD: wma_ocb_stop_timing_advert(wma_handle, (struct sir_ocb_timing_advert *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_DCC_CLEAR_STATS_CMD: wma_dcc_clear_stats(wma_handle, (struct sir_dcc_clear_stats *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_OCB_GET_TSF_TIMER_CMD: wma_ocb_get_tsf_timer(wma_handle, (struct sir_ocb_get_tsf_timer *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_DCC_GET_STATS_CMD: wma_dcc_get_stats(wma_handle, (struct sir_dcc_get_stats *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_DCC_UPDATE_NDL_CMD: wma_dcc_update_ndl(wma_handle, (struct sir_dcc_update_ndl *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case SIR_HAL_SOC_DUAL_MAC_CFG_REQ: wma_send_soc_set_dual_mac_config(wma_handle, (struct sir_dual_mac_config *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_SET_IE_INFO: wma_process_set_ie_info(wma_handle, (struct vdev_ie_info *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_LRO_CONFIG_CMD: wma_lro_config_cmd(wma_handle, (struct wma_lro_config_cmd_t *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; case WMA_GW_PARAM_UPDATE_REQ: wma_set_gateway_params(wma_handle, @@ -5393,13 +5392,13 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg) case WMA_SET_EGAP_CONF_PARAMS: wma_send_egap_conf_params(wma_handle, (struct egap_conf_params *)msg->bodyptr); - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); break; default: WMA_LOGD("unknow msg type %x", msg->type); /* Do Nothing? MSG Body should be freed at here */ if (NULL != msg->bodyptr) { - cdf_mem_free(msg->bodyptr); + qdf_mem_free(msg->bodyptr); } } end: @@ -5555,7 +5554,7 @@ QDF_STATUS wma_send_soc_set_hw_mode_cmd(tp_wma_handle wma_handle, } return QDF_STATUS_SUCCESS; fail: - param = cdf_mem_malloc(sizeof(*param)); + param = qdf_mem_malloc(sizeof(*param)); if (!param) { WMA_LOGE("%s: Memory allocation failed", __func__); return QDF_STATUS_E_NULL_VALUE; @@ -5656,7 +5655,7 @@ int wma_lro_init(struct wma_lro_config_cmd_t *lro_config) cds_msg_t msg = {0}; struct wma_lro_config_cmd_t *iwcmd; - iwcmd = cdf_mem_malloc(sizeof(*iwcmd)); + iwcmd = qdf_mem_malloc(sizeof(*iwcmd)); if (!iwcmd) { WMA_LOGE("memory allocation for WMA_LRO_CONFIG_CMD failed!"); return -ENOMEM; @@ -5671,7 +5670,7 @@ int wma_lro_init(struct wma_lro_config_cmd_t *lro_config) if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) { WMA_LOGE("Failed to post WMA_LRO_CONFIG_CMD msg!"); - cdf_mem_free(iwcmd); + qdf_mem_free(iwcmd); return -EAGAIN; } diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index fce66cc66d06..2573e6715c63 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -49,7 +49,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -117,10 +117,10 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma, if (tim_info->tim_changed) { if (tim_info->tim_num_ps_pending) - cdf_mem_copy(&tim_ie->tim_bitmap, tim_info->tim_bitmap, + qdf_mem_copy(&tim_ie->tim_bitmap, tim_info->tim_bitmap, WMA_TIM_SUPPORTED_PVB_LENGTH); else - cdf_mem_zero(&tim_ie->tim_bitmap, + qdf_mem_zero(&tim_ie->tim_bitmap, WMA_TIM_SUPPORTED_PVB_LENGTH); /* * Currently we support fixed number of @@ -161,7 +161,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma, bcn->seq_no++; if (WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(p2p_noa_info)) { - cdf_mem_zero(&noa_ie, sizeof(noa_ie)); + qdf_mem_zero(&noa_ie, sizeof(noa_ie)); noa_ie.index = (uint8_t) WMI_UNIFIED_NOA_ATTR_INDEX_GET(p2p_noa_info); @@ -334,14 +334,14 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) switch (kickout_event->reason) { case WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT: p_inactivity = (tpSirIbssPeerInactivityInd) - cdf_mem_malloc(sizeof(tSirIbssPeerInactivityInd)); + qdf_mem_malloc(sizeof(tSirIbssPeerInactivityInd)); if (!p_inactivity) { WMA_LOGE("CDF MEM Alloc Failed for tSirIbssPeerInactivity"); return -ENOMEM; } p_inactivity->staIdx = peer_id; - cdf_mem_copy(p_inactivity->peer_addr.bytes, macaddr, + qdf_mem_copy(p_inactivity->peer_addr.bytes, macaddr, IEEE80211_ADDR_LEN); wma_send_msg(wma, WMA_IBSS_PEER_INACTIVITY_IND, (void *)p_inactivity, 0); @@ -351,7 +351,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) #ifdef FEATURE_WLAN_TDLS case WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT: del_sta_ctx = (tpDeleteStaContext) - cdf_mem_malloc(sizeof(tDeleteStaContext)); + qdf_mem_malloc(sizeof(tDeleteStaContext)); if (!del_sta_ctx) { WMA_LOGE("%s: mem alloc failed for tDeleteStaContext for TDLS peer: %pM", __func__, macaddr); @@ -359,8 +359,8 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) } del_sta_ctx->staId = peer_id; - cdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN); - cdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid, + qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN); + qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid, IEEE80211_ADDR_LEN); del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE; wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND, @@ -374,7 +374,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) (wma->interfaces[vdev_id].sub_type == 0 || wma->interfaces[vdev_id].sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) && - cdf_mem_compare(wma->interfaces[vdev_id].bssid, + !qdf_mem_cmp(wma->interfaces[vdev_id].bssid, macaddr, IEEE80211_ADDR_LEN)) { /* * KICKOUT event is for current station-AP connection. @@ -400,7 +400,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) (wma->interfaces[vdev_id].sub_type == 0 || wma->interfaces[vdev_id].sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) && - cdf_mem_compare(wma->interfaces[vdev_id].bssid, + !qdf_mem_cmp(wma->interfaces[vdev_id].bssid, macaddr, IEEE80211_ADDR_LEN)) { /* * KICKOUT event is for current station-AP connection. @@ -429,15 +429,15 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) * default action is to send delete station context indication to LIM */ del_sta_ctx = - (tpDeleteStaContext) cdf_mem_malloc(sizeof(tDeleteStaContext)); + (tpDeleteStaContext) qdf_mem_malloc(sizeof(tDeleteStaContext)); if (!del_sta_ctx) { WMA_LOGE("CDF MEM Alloc Failed for tDeleteStaContext"); return -ENOMEM; } del_sta_ctx->staId = peer_id; - cdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN); - cdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr, + qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN); + qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr, IEEE80211_ADDR_LEN); del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE; del_sta_ctx->rssi = kickout_event->rssi + WMA_TGT_NOISE_FLOOR_DBM; @@ -498,7 +498,7 @@ int wma_unified_bcntx_status_event_handler(void *handle, } beacon_tx_complete_ind = (tSirFirstBeaconTxCompleteInd *) - cdf_mem_malloc(sizeof(tSirFirstBeaconTxCompleteInd)); + qdf_mem_malloc(sizeof(tSirFirstBeaconTxCompleteInd)); if (!beacon_tx_complete_ind) { WMA_LOGE("%s: Failed to alloc beacon_tx_complete_ind", __func__); @@ -727,9 +727,9 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id, return; } cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE; - cdf_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr, + qdf_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr, SIR_IPV4_ADDR_LEN); - cdf_mem_copy(&arp_rsp->target_prot_addr, destv4addr, + qdf_mem_copy(&arp_rsp->target_prot_addr, destv4addr, SIR_IPV4_ADDR_LEN); WMI_CHAR_ARRAY_TO_MAC_ADDR(destmac, &arp_rsp->dest_mac_addr); } else { @@ -857,8 +857,8 @@ int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma, return -EINVAL; } - cdf_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set)); - cdf_mem_zero(&peer_ht_rates, sizeof(wmi_rate_set)); + qdf_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set)); + qdf_mem_zero(&peer_ht_rates, sizeof(wmi_rate_set)); phymode = wma_peer_phymode(nw_type, params->staType, params->htCapable, @@ -923,7 +923,7 @@ int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma, /* TODO: Do we really need this? */ WMA_LOGW("Peer is marked as HT capable but supported mcs rate is 0"); peer_ht_rates.num_rates = sizeof(temp_ni_rates); - cdf_mem_copy((uint8_t *) peer_ht_rates.rates, temp_ni_rates, + qdf_mem_copy((uint8_t *) peer_ht_rates.rates, temp_ni_rates, peer_ht_rates.num_rates); } @@ -1093,7 +1093,7 @@ int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, num_peer_legacy_rates); buf_ptr += WMI_TLV_HDR_SIZE; cmd->num_peer_legacy_rates = peer_legacy_rates.num_rates; - cdf_mem_copy(buf_ptr, peer_legacy_rates.rates, + qdf_mem_copy(buf_ptr, peer_legacy_rates.rates, peer_legacy_rates.num_rates); /* Update peer HT rate information */ @@ -1101,7 +1101,7 @@ int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, num_peer_ht_rates); buf_ptr += WMI_TLV_HDR_SIZE; cmd->num_peer_ht_rates = peer_ht_rates.num_rates; - cdf_mem_copy(buf_ptr, peer_ht_rates.rates, peer_ht_rates.num_rates); + qdf_mem_copy(buf_ptr, peer_ht_rates.rates, peer_ht_rates.num_rates); /* VHT Rates */ buf_ptr += num_peer_ht_rates; @@ -1499,9 +1499,9 @@ static wmi_buf_t wma_setup_install_key_cmd(tp_wma_handle wma_handle, cmd->key_txmic_len = WMA_TXMIC_LEN; cmd->key_rxmic_len = WMA_RXMIC_LEN; - cdf_mem_copy(&cmd->wpi_key_rsc_counter, &rx_iv, + qdf_mem_copy(&cmd->wpi_key_rsc_counter, &rx_iv, WPI_IV_LEN); - cdf_mem_copy(&cmd->wpi_key_tsc_counter, &tx_iv, + qdf_mem_copy(&cmd->wpi_key_tsc_counter, &tx_iv, WPI_IV_LEN); cmd->key_cipher = WMI_CIPHER_WAPI; break; @@ -1549,7 +1549,7 @@ static wmi_buf_t wma_setup_install_key_cmd(tp_wma_handle wma_handle, } } #else - cdf_mem_copy((void *)key_data, + qdf_mem_copy((void *)key_data, (const void *)key_params->key_data, key_params->key_len); #endif /* BIG_ENDIAN_HOST */ cmd->key_len = key_params->key_len; @@ -1559,12 +1559,12 @@ static wmi_buf_t wma_setup_install_key_cmd(tp_wma_handle wma_handle, iface = &wma_handle->interfaces[key_params->vdev_id]; if (iface) { iface->key.key_length = key_params->key_len; - cdf_mem_copy(iface->key.key, + qdf_mem_copy(iface->key.key, (const void *)key_params->key_data, iface->key.key_length); if ((cmd->key_ix == WMA_IGTK_KEY_INDEX_4) || (cmd->key_ix == WMA_IGTK_KEY_INDEX_5)) - cdf_mem_zero(iface->key.key_id[cmd->key_ix - + qdf_mem_zero(iface->key.key_id[cmd->key_ix - WMA_IGTK_KEY_INDEX_4].ipn, CMAC_IPN_LEN); } @@ -1614,22 +1614,22 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info) if (wma_handle->ibss_started > 0) goto out; WMA_LOGD("Caching IBSS Key"); - cdf_mem_copy(&wma_handle->ibsskey_info, key_info, + qdf_mem_copy(&wma_handle->ibsskey_info, key_info, sizeof(tSetBssKeyParams)); } - cdf_mem_set(&key_params, sizeof(key_params), 0); + qdf_mem_set(&key_params, sizeof(key_params), 0); key_params.vdev_id = key_info->smesessionId; key_params.key_type = key_info->encType; key_params.singl_tid_rc = key_info->singleTidRc; key_params.unicast = false; if (txrx_vdev->opmode == wlan_op_mode_sta) { - cdf_mem_copy(key_params.peer_mac, + qdf_mem_copy(key_params.peer_mac, wma_handle->interfaces[key_info->smesessionId].bssid, IEEE80211_ADDR_LEN); } else { /* vdev mac address will be passed for all other modes */ - cdf_mem_copy(key_params.peer_mac, txrx_vdev->mac_addr.raw, + qdf_mem_copy(key_params.peer_mac, txrx_vdev->mac_addr.raw, IEEE80211_ADDR_LEN); WMA_LOGA("BSS Key setup with vdev_mac %pM\n", txrx_vdev->mac_addr.raw); @@ -1654,14 +1654,14 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info) key_params.key_len = key_info->key[i].keyLength; if (key_info->encType == eSIR_ED_TKIP) { - cdf_mem_copy(key_params.key_data, + qdf_mem_copy(key_params.key_data, key_info->key[i].key, 16); - cdf_mem_copy(&key_params.key_data[16], + qdf_mem_copy(&key_params.key_data[16], &key_info->key[i].key[24], 8); - cdf_mem_copy(&key_params.key_data[24], + qdf_mem_copy(&key_params.key_data[24], &key_info->key[i].key[16], 8); } else - cdf_mem_copy((void *)key_params.key_data, + qdf_mem_copy((void *)key_params.key_data, (const void *)key_info->key[i].key, key_info->key[i].keyLength); @@ -1823,14 +1823,14 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle, return; } - cdf_mem_set(&key_params, sizeof(key_params), 0); + qdf_mem_set(&key_params, sizeof(key_params), 0); key_params.vdev_id = key_info->smesessionId; key_params.key_type = key_info->encType; key_params.singl_tid_rc = key_info->singleTidRc; key_params.unicast = false; ASSERT(wlan_op_mode_ibss == txrx_vdev->opmode); - cdf_mem_copy(key_params.peer_mac, peer_macaddr.bytes, + qdf_mem_copy(key_params.peer_mac, peer_macaddr.bytes, IEEE80211_ADDR_LEN); if (key_info->numKeys == 0 && @@ -1847,14 +1847,14 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle, key_params.key_idx = key_info->key[i].keyId; key_params.key_len = key_info->key[i].keyLength; if (key_info->encType == eSIR_ED_TKIP) { - cdf_mem_copy(key_params.key_data, + qdf_mem_copy(key_params.key_data, key_info->key[i].key, 16); - cdf_mem_copy(&key_params.key_data[16], + qdf_mem_copy(&key_params.key_data[16], &key_info->key[i].key[24], 8); - cdf_mem_copy(&key_params.key_data[24], + qdf_mem_copy(&key_params.key_data[24], &key_info->key[i].key[16], 8); } else - cdf_mem_copy((void *)key_params.key_data, + qdf_mem_copy((void *)key_params.key_data, (const void *)key_info->key[i].key, key_info->key[i].keyLength); @@ -1946,13 +1946,13 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info) } } } - cdf_mem_set(&key_params, sizeof(key_params), 0); + qdf_mem_set(&key_params, sizeof(key_params), 0); key_params.vdev_id = key_info->smesessionId; key_params.key_type = key_info->encType; key_params.singl_tid_rc = key_info->singleTidRc; key_params.unicast = true; key_params.def_key_idx = key_info->defWEPIdx; - cdf_mem_copy((void *)key_params.peer_mac, + qdf_mem_copy((void *)key_params.peer_mac, (const void *)key_info->peer_macaddr.bytes, IEEE80211_ADDR_LEN); for (i = 0; i < num_keys; i++) { @@ -1960,14 +1960,14 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info) !key_info->key[i].keyLength) continue; if (key_info->encType == eSIR_ED_TKIP) { - cdf_mem_copy(key_params.key_data, + qdf_mem_copy(key_params.key_data, key_info->key[i].key, 16); - cdf_mem_copy(&key_params.key_data[16], + qdf_mem_copy(&key_params.key_data[16], &key_info->key[i].key[24], 8); - cdf_mem_copy(&key_params.key_data[24], + qdf_mem_copy(&key_params.key_data[24], &key_info->key[i].key[16], 8); } else - cdf_mem_copy(key_params.key_data, key_info->key[i].key, + qdf_mem_copy(key_params.key_data, key_info->key[i].key, key_info->key[i].keyLength); if (key_info->encType == eSIR_ED_WPI) { key_params.key_idx = key_info->key[i].keyId; @@ -2172,7 +2172,7 @@ static int wmi_unified_probe_rsp_tmpl_send(tp_wma_handle wma, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, tmpl_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, frm, tmpl_len); + qdf_mem_copy(buf_ptr, frm, tmpl_len); ret = wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, wmi_buf_len, WMI_PRB_TMPL_CMDID); @@ -2273,7 +2273,7 @@ static int wmi_unified_bcn_tmpl_send(tp_wma_handle wma, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, tmpl_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, frm, tmpl_len); + qdf_mem_copy(buf_ptr, frm, tmpl_len); ret = wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, wmi_buf_len, WMI_BCN_TMPL_CMDID); @@ -2420,7 +2420,7 @@ int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event, intf[if_id].tsfadjust = adjusted_tsf[if_id]; qdf_spin_lock_bh(&bcn->lock); - cdf_mem_zero(&bcn_info, sizeof(bcn_info)); + qdf_mem_zero(&bcn_info, sizeof(bcn_info)); bcn_info.beacon = cdf_nbuf_data(bcn->buf); bcn_info.p2pIeOffset = bcn->p2p_ie_offset; bcn_info.beaconLength = bcn->len; @@ -2490,7 +2490,7 @@ static int wma_p2p_go_set_beacon_ie(t_wma_handle *wma_handle, buf_ptr += sizeof(wmi_p2p_go_set_beacon_ie_fixed_param); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, p2pIe, ie_len); + qdf_mem_copy(buf_ptr, p2pIe, ie_len); WMA_LOGI("%s: Sending WMI_P2P_GO_SET_BEACON_IE", __func__); @@ -2632,7 +2632,7 @@ void wma_set_keepalive_req(tp_wma_handle wma, keepalive->destIpv4Addr, keepalive->dest_macaddr.bytes); - cdf_mem_free(keepalive); + qdf_mem_free(keepalive); } /** @@ -2648,7 +2648,7 @@ void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id) { tSirSmeMissedBeaconInd *beacon_miss_ind; - beacon_miss_ind = (tSirSmeMissedBeaconInd *) cdf_mem_malloc + beacon_miss_ind = (tSirSmeMissedBeaconInd *) qdf_mem_malloc (sizeof(tSirSmeMissedBeaconInd)); if (NULL == beacon_miss_ind) { @@ -3089,7 +3089,7 @@ int wma_process_rmf_frame(tp_wma_handle wma_handle, /* Strip privacy headers (and trailer) * for a received frame */ - cdf_mem_move(orig_hdr + + qdf_mem_move(orig_hdr + IEEE80211_CCMP_HEADERLEN, wh, sizeof(*wh)); cdf_nbuf_pull_head(wbuf, @@ -3170,7 +3170,7 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, return -EINVAL; } - rx_pkt = cdf_mem_malloc(sizeof(*rx_pkt)); + rx_pkt = qdf_mem_malloc(sizeof(*rx_pkt)); if (!rx_pkt) { WMA_LOGE("Failed to allocate rx packet"); return -ENOMEM; @@ -3181,7 +3181,7 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, return -EINVAL; } - cdf_mem_zero(rx_pkt, sizeof(*rx_pkt)); + qdf_mem_zero(rx_pkt, sizeof(*rx_pkt)); /* * Fill in meta information needed by pe/lim @@ -3221,7 +3221,7 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, if (!wbuf) { WMA_LOGE("%s: Failed to allocate wbuf for mgmt rx len(%u)", __func__, hdr->buf_len); - cdf_mem_free(rx_pkt); + qdf_mem_free(rx_pkt); return -ENOMEM; } @@ -3259,7 +3259,7 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, } } #else - cdf_mem_copy(wh, param_tlvs->bufp, hdr->buf_len); + qdf_mem_copy(wh, param_tlvs->bufp, hdr->buf_len); #endif WMA_LOGD( diff --git a/core/wma/src/wma_ocb.c b/core/wma/src/wma_ocb.c index def726d12568..3a63ca5ef977 100644 --- a/core/wma/src/wma_ocb.c +++ b/core/wma/src/wma_ocb.c @@ -55,7 +55,7 @@ int wma_ocb_set_config_resp(tp_wma_handle wma_handle, uint8_t status) */ if (status == QDF_STATUS_SUCCESS && vdev && req) { if (vdev->ocb_channel_info) - cdf_mem_free(vdev->ocb_channel_info); + qdf_mem_free(vdev->ocb_channel_info); vdev->ocb_channel_count = req->channel_count; if (req->channel_count) { @@ -63,10 +63,10 @@ int wma_ocb_set_config_resp(tp_wma_handle wma_handle, uint8_t status) int buf_size = sizeof(*vdev->ocb_channel_info) * req->channel_count; vdev->ocb_channel_info = - cdf_mem_malloc(buf_size); + qdf_mem_malloc(buf_size); if (!vdev->ocb_channel_info) return -ENOMEM; - cdf_mem_zero(vdev->ocb_channel_info, buf_size); + qdf_mem_zero(vdev->ocb_channel_info, buf_size); for (i = 0; i < req->channel_count; i++) { vdev->ocb_channel_info[i].chan_freq = req->channels[i].chan_freq; @@ -81,10 +81,10 @@ int wma_ocb_set_config_resp(tp_wma_handle wma_handle, uint8_t status) } /* Free the configuration that was saved in wma_ocb_set_config. */ - cdf_mem_free(wma_handle->ocb_config_req); + qdf_mem_free(wma_handle->ocb_config_req); wma_handle->ocb_config_req = NULL; - resp = cdf_mem_malloc(sizeof(*resp)); + resp = qdf_mem_malloc(sizeof(*resp)); if (!resp) return -ENOMEM; @@ -96,7 +96,7 @@ int wma_ocb_set_config_resp(tp_wma_handle wma_handle, uint8_t status) qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Fail to post msg to SME")); - cdf_mem_free(resp); + qdf_mem_free(resp); return -EINVAL; } @@ -121,7 +121,7 @@ static struct sir_ocb_config *copy_sir_ocb_config(struct sir_ocb_config *src) src->dcc_ndl_chan_list_len + src->dcc_ndl_active_state_list_len; - dst = cdf_mem_malloc(length); + dst = qdf_mem_malloc(length); if (!dst) return NULL; @@ -131,19 +131,19 @@ static struct sir_ocb_config *copy_sir_ocb_config(struct sir_ocb_config *src) cursor += sizeof(*dst); dst->channels = cursor; cursor += src->channel_count * sizeof(*dst->channels); - cdf_mem_copy(dst->channels, src->channels, + qdf_mem_copy(dst->channels, src->channels, src->channel_count * sizeof(*dst->channels)); dst->schedule = cursor; cursor += src->schedule_size * sizeof(*dst->schedule); - cdf_mem_copy(dst->schedule, src->schedule, + qdf_mem_copy(dst->schedule, src->schedule, src->schedule_size * sizeof(*dst->schedule)); dst->dcc_ndl_chan_list = cursor; cursor += src->dcc_ndl_chan_list_len; - cdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list, + qdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list, src->dcc_ndl_chan_list_len); dst->dcc_ndl_active_state_list = cursor; cursor += src->dcc_ndl_active_state_list_len; - cdf_mem_copy(dst->dcc_ndl_active_state_list, + qdf_mem_copy(dst->dcc_ndl_active_state_list, src->dcc_ndl_active_state_list, src->dcc_ndl_active_state_list_len); return dst; @@ -166,7 +166,7 @@ int wma_ocb_set_config_req(tp_wma_handle wma_handle, * vdev start response message */ if (!wma_handle->interfaces[config_req->session_id].vdev_up) { - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); /* Enqueue OCB Set Schedule request message */ msg = wma_fill_vdev_req(wma_handle, config_req->session_id, WMA_OCB_SET_CONFIG_CMD, @@ -185,7 +185,7 @@ int wma_ocb_set_config_req(tp_wma_handle wma_handle, req.dot11_mode = WNI_CFG_DOT11_MODE_11A; if (wma_handle->ocb_config_req) - cdf_mem_free(wma_handle->ocb_config_req); + qdf_mem_free(wma_handle->ocb_config_req); wma_handle->ocb_config_req = copy_sir_ocb_config(config_req); req.preferred_rx_streams = 2; req.preferred_tx_streams = 2; @@ -376,7 +376,7 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config) buf_ptr += WMI_TLV_HDR_SIZE; if (config->dcc_ndl_chan_list_len) { ndl_chan = (wmi_dcc_ndl_chan *)buf_ptr; - cdf_mem_copy(ndl_chan, config->dcc_ndl_chan_list, + qdf_mem_copy(ndl_chan, config->dcc_ndl_chan_list, config->dcc_ndl_chan_list_len); for (i = 0; i < config->channel_count; i++) WMITLV_SET_HDR(&(ndl_chan[i].tlv_header), @@ -391,7 +391,7 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config) buf_ptr += WMI_TLV_HDR_SIZE; if (active_state_count) { ndl_active_config = (wmi_dcc_ndl_active_state_config *)buf_ptr; - cdf_mem_copy(ndl_active_config, + qdf_mem_copy(ndl_active_config, config->dcc_ndl_active_state_list, active_state_count * sizeof(*ndl_active_config)); for (i = 0; i < active_state_count; ++i) @@ -424,7 +424,7 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config) */ if (wma_handle->ocb_config_req != config) { if (wma_handle->ocb_config_req) - cdf_mem_free(wma_handle->ocb_config_req); + qdf_mem_free(wma_handle->ocb_config_req); wma_handle->ocb_config_req = copy_sir_ocb_config(config); } @@ -432,7 +432,7 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config) WMI_OCB_SET_CONFIG_CMDID); if (ret != EOK) { if (wma_handle->ocb_config_req) { - cdf_mem_free(wma_handle->ocb_config_req); + qdf_mem_free(wma_handle->ocb_config_req); wma_handle->ocb_config_req = NULL; } @@ -556,7 +556,7 @@ int wma_ocb_start_timing_advert(tp_wma_handle wma_handle, /* Add the timing advert template */ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, len_template); - cdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE, + qdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE, (uint8_t *)timing_advert->template_value, timing_advert->template_length); @@ -641,7 +641,7 @@ int wma_ocb_get_tsf_timer(tp_wma_handle wma_handle, buf_ptr = (uint8_t *)wmi_buf_data(buf); cmd = (wmi_ocb_get_tsf_timer_cmd_fixed_param *)buf_ptr; - cdf_mem_zero(cmd, len); + qdf_mem_zero(cmd, len); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN( @@ -681,7 +681,7 @@ int wma_ocb_get_tsf_timer_resp_event_handler(void *handle, uint8_t *event_buf, fix_param = param_tlvs->fixed_param; /* Allocate and populate the response */ - response = cdf_mem_malloc(sizeof(*response)); + response = qdf_mem_malloc(sizeof(*response)); if (response == NULL) return -ENOMEM; response->vdev_id = fix_param->vdev_id; @@ -694,7 +694,7 @@ int wma_ocb_get_tsf_timer_resp_event_handler(void *handle, uint8_t *event_buf, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Failed to post msg to SME")); - cdf_mem_free(response); + qdf_mem_free(response); return -EINVAL; } @@ -737,7 +737,7 @@ int wma_dcc_get_stats(tp_wma_handle wma_handle, } buf_ptr = wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); /* Populate the WMI command */ cmd = (wmi_dcc_get_stats_cmd_fixed_param *)buf_ptr; @@ -755,7 +755,7 @@ int wma_dcc_get_stats(tp_wma_handle wma_handle, buf_ptr += WMI_TLV_HDR_SIZE; channel_stats_array = (wmi_dcc_channel_stats_request *)buf_ptr; - cdf_mem_copy(channel_stats_array, get_stats_param->request_array, + qdf_mem_copy(channel_stats_array, get_stats_param->request_array, get_stats_param->request_array_len); for (i = 0; i < cmd->num_channels; i++) WMITLV_SET_HDR(&channel_stats_array[i].tlv_header, @@ -797,7 +797,7 @@ int wma_dcc_get_stats_resp_event_handler(void *handle, uint8_t *event_buf, fix_param = param_tlvs->fixed_param; /* Allocate and populate the response */ - response = cdf_mem_malloc(sizeof(*response) + fix_param->num_channels * + response = qdf_mem_malloc(sizeof(*response) + fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel)); if (response == NULL) return -ENOMEM; @@ -807,7 +807,7 @@ int wma_dcc_get_stats_resp_event_handler(void *handle, uint8_t *event_buf, response->channel_stats_array_len = fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel); response->channel_stats_array = ((void *)response) + sizeof(*response); - cdf_mem_copy(response->channel_stats_array, + qdf_mem_copy(response->channel_stats_array, param_tlvs->stats_per_channel_list, response->channel_stats_array_len); @@ -817,7 +817,7 @@ int wma_dcc_get_stats_resp_event_handler(void *handle, uint8_t *event_buf, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Failed to post msg to SME")); - cdf_mem_free(response); + qdf_mem_free(response); return -EINVAL; } @@ -850,7 +850,7 @@ int wma_dcc_clear_stats(tp_wma_handle wma_handle, } buf_ptr = wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); /* Populate the WMI command */ cmd = (wmi_dcc_clear_stats_cmd_fixed_param *)buf_ptr; @@ -924,7 +924,7 @@ int wma_dcc_update_ndl(tp_wma_handle wma_handle, } buf_ptr = wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); /* Populate the WMI command */ cmd = (wmi_dcc_update_ndl_cmd_fixed_param *)buf_ptr; @@ -942,7 +942,7 @@ int wma_dcc_update_ndl(tp_wma_handle wma_handle, buf_ptr += WMI_TLV_HDR_SIZE; ndl_chan_array = (wmi_dcc_ndl_chan *)buf_ptr; - cdf_mem_copy(ndl_chan_array, update_ndl_param->dcc_ndl_chan_list, + qdf_mem_copy(ndl_chan_array, update_ndl_param->dcc_ndl_chan_list, update_ndl_param->dcc_ndl_chan_list_len); for (i = 0; i < cmd->num_channel; i++) WMITLV_SET_HDR(&ndl_chan_array[i].tlv_header, @@ -956,7 +956,7 @@ int wma_dcc_update_ndl(tp_wma_handle wma_handle, buf_ptr += WMI_TLV_HDR_SIZE; ndl_active_state_array = (wmi_dcc_ndl_active_state_config *) buf_ptr; - cdf_mem_copy(ndl_active_state_array, + qdf_mem_copy(ndl_active_state_array, update_ndl_param->dcc_ndl_active_state_list, update_ndl_param->dcc_ndl_active_state_list_len); for (i = 0; i < active_state_count; i++) { @@ -1001,7 +1001,7 @@ int wma_dcc_update_ndl_resp_event_handler(void *handle, uint8_t *event_buf, param_tlvs = (WMI_DCC_UPDATE_NDL_RESP_EVENTID_param_tlvs *)event_buf; fix_param = param_tlvs->fixed_param; /* Allocate and populate the response */ - resp = cdf_mem_malloc(sizeof(*resp)); + resp = qdf_mem_malloc(sizeof(*resp)); if (!resp) { WMA_LOGE(FL("Error allocating memory for the response.")); return -ENOMEM; @@ -1015,7 +1015,7 @@ int wma_dcc_update_ndl_resp_event_handler(void *handle, uint8_t *event_buf, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Failed to post msg to SME")); - cdf_mem_free(resp); + qdf_mem_free(resp); return -EINVAL; } @@ -1042,7 +1042,7 @@ int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf, param_tlvs = (WMI_DCC_STATS_EVENTID_param_tlvs *)event_buf; fix_param = param_tlvs->fixed_param; /* Allocate and populate the response */ - response = cdf_mem_malloc(sizeof(*response) + + response = qdf_mem_malloc(sizeof(*response) + fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel)); if (response == NULL) return -ENOMEM; @@ -1051,7 +1051,7 @@ int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf, response->channel_stats_array_len = fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel); response->channel_stats_array = ((void *)response) + sizeof(*response); - cdf_mem_copy(response->channel_stats_array, + qdf_mem_copy(response->channel_stats_array, param_tlvs->stats_per_channel_list, response->channel_stats_array_len); @@ -1061,7 +1061,7 @@ int wma_dcc_stats_event_handler(void *handle, uint8_t *event_buf, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE(FL("Failed to post msg to SME")); - cdf_mem_free(response); + qdf_mem_free(response); return -EINVAL; } diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index 9d9a987cc22b..52276cb0f47e 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -48,7 +48,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -288,7 +288,7 @@ static int32_t wmi_unified_set_ap_ps_param(void *wma_ctx, uint32_t vdev_id, sizeof(*cmd), WMI_AP_PS_PEER_PARAM_CMDID); if (err) { WMA_LOGE("Failed to send set_ap_ps_param cmd"); - cdf_mem_free(buf); + qdf_mem_free(buf); return -EIO; } return 0; @@ -428,14 +428,14 @@ void wma_set_tx_power(WMA_HANDLE handle, if (!pdev) { WMA_LOGE("vdev handle is invalid for %pM", tx_pwr_params->bssId.bytes); - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); return; } if (!(wma_handle->interfaces[vdev_id].vdev_up)) { WMA_LOGE("%s: vdev id %d is not up for %pM", __func__, vdev_id, tx_pwr_params->bssId.bytes); - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); return; } @@ -471,7 +471,7 @@ void wma_set_tx_power(WMA_HANDLE handle, ret = 0; } end: - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); if (ret) WMA_LOGE("Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT"); } @@ -503,13 +503,13 @@ void wma_set_max_tx_power(WMA_HANDLE handle, if (!pdev) { WMA_LOGE("vdev handle is invalid for %pM", tx_pwr_params->bssId.bytes); - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); return; } if (!(wma_handle->interfaces[vdev_id].vdev_up)) { WMA_LOGE("%s: vdev id %d is not up", __func__, vdev_id); - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); return; } @@ -535,7 +535,7 @@ void wma_set_max_tx_power(WMA_HANDLE handle, else wma_handle->interfaces[vdev_id].max_tx_power = prev_max_power; end: - cdf_mem_free(tx_pwr_params); + qdf_mem_free(tx_pwr_params); if (ret) WMA_LOGE("%s: Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT", __func__); @@ -1173,7 +1173,7 @@ wmi_unified_set_sta_uapsd_auto_trig_cmd(wmi_unified_t wmi_handle, WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, param_len); buf_ptr += WMI_TLV_HDR_SIZE; - cdf_mem_copy(buf_ptr, autoTriggerparam, param_len); + qdf_mem_copy(buf_ptr, autoTriggerparam, param_len); /* * Update tag and length for uapsd auto trigger params (this will take @@ -1503,7 +1503,7 @@ static void wma_update_beacon_noa_ie(struct beacon_info *bcn, "but not present in swba event, " "So Reset the NoA", __func__); /* TODO: Assuming p2p noa ie is last ie in the beacon */ - cdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len + + qdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len + sizeof(struct p2p_ie))); bcn->len -= (bcn->noa_sub_ie_len + sizeof(struct p2p_ie)); @@ -1521,7 +1521,7 @@ static void wma_update_beacon_noa_ie(struct beacon_info *bcn, "bcn->noa_sub_ie_len %u", __func__, bcn->len, bcn->noa_sub_ie_len); bcn->len -= (bcn->noa_sub_ie_len + sizeof(struct p2p_ie)); - cdf_mem_zero(bcn->noa_ie, + qdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len + sizeof(struct p2p_ie))); } else { /* NoA is not present in previous beacon */ WMA_LOGD("%s: NoA not present in previous beacon, add it" @@ -1534,7 +1534,7 @@ static void wma_update_beacon_noa_ie(struct beacon_info *bcn, wma_add_p2p_ie(bcn->noa_ie); p2p_ie = (struct p2p_ie *)bcn->noa_ie; p2p_ie->p2p_len += new_noa_sub_ie_len; - cdf_mem_copy((bcn->noa_ie + sizeof(struct p2p_ie)), bcn->noa_sub_ie, + qdf_mem_copy((bcn->noa_ie + sizeof(struct p2p_ie)), bcn->noa_sub_ie, new_noa_sub_ie_len); bcn->len += (new_noa_sub_ie_len + sizeof(struct p2p_ie)); @@ -1636,14 +1636,14 @@ void wma_update_probe_resp_noa(tp_wma_handle wma_handle, struct p2p_sub_element_noa *noa_ie) { tSirP2PNoaAttr *noa_attr = - (tSirP2PNoaAttr *) cdf_mem_malloc(sizeof(tSirP2PNoaAttr)); + (tSirP2PNoaAttr *) qdf_mem_malloc(sizeof(tSirP2PNoaAttr)); WMA_LOGD("Received update NoA event"); if (!noa_attr) { WMA_LOGE("Failed to allocate memory for tSirP2PNoaAttr"); return; } - cdf_mem_zero(noa_attr, sizeof(tSirP2PNoaAttr)); + qdf_mem_zero(noa_attr, sizeof(tSirP2PNoaAttr)); noa_attr->index = noa_ie->index; noa_attr->oppPsFlag = noa_ie->oppPS; @@ -1707,7 +1707,7 @@ int wma_p2p_noa_event_handler(void *handle, uint8_t *event, if (WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(p2p_noa_info)) { - cdf_mem_zero(&noa_ie, sizeof(noa_ie)); + qdf_mem_zero(&noa_ie, sizeof(noa_ie)); noa_ie.index = (uint8_t) WMI_UNIFIED_NOA_ATTR_INDEX_GET(p2p_noa_info); noa_ie.oppPS = diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 55586707e1ad..138d4ea08961 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -49,7 +49,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -126,7 +126,7 @@ static inline void wma_set_p2p_scan_info(tp_wma_handle wma_handle, static inline void wma_reset_p2p_scan_info(tp_wma_handle wma_handle, uint8_t vdev_id) { - cdf_mem_zero((void *)&(wma_handle->interfaces[vdev_id].p2p_scan_info), + qdf_mem_zero((void *)&(wma_handle->interfaces[vdev_id].p2p_scan_info), sizeof(struct p2p_scan_param)); } @@ -484,7 +484,7 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, ssid = (wmi_ssid *) (buf_ptr + WMI_TLV_HDR_SIZE); for (i = 0; i < scan_req->numSsid; ++i) { ssid->ssid_len = scan_req->ssId[i].length; - cdf_mem_copy(ssid->ssid, scan_req->ssId[i].ssId, + qdf_mem_copy(ssid->ssid, scan_req->ssId[i].ssId, scan_req->ssId[i].length); ssid++; } @@ -513,7 +513,7 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, ie_len_with_pad = roundup(scan_req->uIEFieldLen, sizeof(uint32_t)); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_with_pad); if (scan_req->uIEFieldLen) { - cdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE, + qdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE, (uint8_t *) scan_req + (scan_req->uIEFieldOffset), scan_req->uIEFieldLen); } @@ -522,7 +522,7 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, *buf_len = len; return QDF_STATUS_SUCCESS; error: - cdf_mem_free(*buf); + qdf_mem_free(*buf); *buf = NULL; return qdf_status; } @@ -657,7 +657,7 @@ error: if (msg_type == WMA_START_SCAN_OFFLOAD_REQ) { scan_event = (tSirScanOffloadEvent *) - cdf_mem_malloc(sizeof(tSirScanOffloadEvent)); + qdf_mem_malloc(sizeof(tSirScanOffloadEvent)); if (!scan_event) { WMA_LOGP("%s: Failed to allocate memory for scan rsp", __func__); @@ -922,7 +922,7 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, roam_scan_mode_fp->vdev_id = vdev_id; /* Fill in scan parameters suitable for roaming scan */ buf_ptr += sizeof(wmi_roam_scan_mode_fixed_param); - cdf_mem_copy(buf_ptr, scan_cmd_fp, + qdf_mem_copy(buf_ptr, scan_cmd_fp, sizeof(wmi_start_scan_cmd_fixed_param)); /* Ensure there is no additional IEs */ scan_cmd_fp->ie_len = 0; @@ -971,10 +971,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, buf_ptr += WMI_TLV_HDR_SIZE; roam_offload_ese = (wmi_roam_ese_offload_tlv_param *) buf_ptr; - cdf_mem_copy(roam_offload_ese->krk, + qdf_mem_copy(roam_offload_ese->krk, roam_req->KRK, sizeof(roam_req->KRK)); - cdf_mem_copy(roam_offload_ese->btk, + qdf_mem_copy(roam_offload_ese->btk, roam_req->BTK, sizeof(roam_req->BTK)); WMITLV_SET_HDR(&roam_offload_ese->tlv_header, @@ -997,10 +997,10 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, (wmi_roam_11r_offload_tlv_param *) buf_ptr; roam_offload_11r->r0kh_id_len = roam_req->R0KH_ID_Length; - cdf_mem_copy(roam_offload_11r->r0kh_id, + qdf_mem_copy(roam_offload_11r->r0kh_id, roam_req->R0KH_ID, roam_offload_11r->r0kh_id_len); - cdf_mem_copy(roam_offload_11r->psk_msk, + qdf_mem_copy(roam_offload_11r->psk_msk, roam_req->PSK_PMK, sizeof(roam_req->PSK_PMK)); roam_offload_11r->psk_msk_len = @@ -1040,7 +1040,7 @@ QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, WMA_LOGE("LFR3:OKC Disabled"); } - cdf_mem_copy(roam_offload_11i->pmk, + qdf_mem_copy(roam_offload_11i->pmk, roam_req->PSK_PMK, sizeof(roam_req->PSK_PMK)); roam_offload_11i->pmk_len = roam_req->pmk_len; @@ -1571,7 +1571,7 @@ void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle, tSirRoamOffloadScanReq *roam_req, wmi_ap_profile *ap_profile_p) { - cdf_mem_zero(ap_profile_p, sizeof(wmi_ap_profile)); + qdf_mem_zero(ap_profile_p, sizeof(wmi_ap_profile)); if (roam_req == NULL) { ap_profile_p->ssid.ssid_len = 0; ap_profile_p->ssid.ssid[0] = 0; @@ -1583,7 +1583,7 @@ void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle, } else { ap_profile_p->ssid.ssid_len = roam_req->ConnectedNetwork.ssId.length; - cdf_mem_copy(ap_profile_p->ssid.ssid, + qdf_mem_copy(ap_profile_p->ssid.ssid, roam_req->ConnectedNetwork.ssId.ssId, ap_profile_p->ssid.ssid_len); ap_profile_p->rsn_authmode = @@ -1629,7 +1629,7 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, return; } - cdf_mem_zero(scan_params, sizeof(wmi_start_scan_cmd_fixed_param)); + qdf_mem_zero(scan_params, sizeof(wmi_start_scan_cmd_fixed_param)); scan_params->scan_ctrl_flags = WMI_SCAN_ADD_CCK_RATES | WMI_SCAN_ADD_OFDM_RATES | WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ; @@ -1830,7 +1830,7 @@ QDF_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle, roam_ap_profile_fp->id = 0; buf_ptr += sizeof(wmi_roam_ap_profile_fixed_param); - cdf_mem_copy(buf_ptr, ap_profile_p, sizeof(wmi_ap_profile)); + qdf_mem_copy(buf_ptr, ap_profile_p, sizeof(wmi_ap_profile)); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_STRUC_wmi_ap_profile, WMITLV_GET_STRUCT_TLVLEN(wmi_ap_profile)); @@ -2134,7 +2134,7 @@ QDF_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, /* roam scan offload is not enabled in firmware. * Cannot initialize it in the middle of connection. */ - cdf_mem_free(roam_req); + qdf_mem_free(roam_req); return QDF_STATUS_E_PERM; } switch (roam_req->Command) { @@ -2265,11 +2265,11 @@ QDF_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, cds_msg_t cds_msg; tSirRoamOffloadScanRsp *scan_offload_rsp; scan_offload_rsp = - cdf_mem_malloc(sizeof(*scan_offload_rsp)); + qdf_mem_malloc(sizeof(*scan_offload_rsp)); if (!scan_offload_rsp) { WMA_LOGE("%s: Alloc failed for scan_offload_rsp", __func__); - cdf_mem_free(roam_req); + qdf_mem_free(roam_req); return QDF_STATUS_E_NOMEM; } cds_msg.type = eWNI_SME_ROAM_SCAN_OFFLOAD_RSP; @@ -2284,7 +2284,7 @@ QDF_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg)) { - cdf_mem_free(scan_offload_rsp); + qdf_mem_free(scan_offload_rsp); QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_INFO, "%s: Failed to post Scan Offload Rsp to UMAC", @@ -2417,7 +2417,7 @@ QDF_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, default: break; } - cdf_mem_free(roam_req); + qdf_mem_free(roam_req); return qdf_status; } @@ -2554,7 +2554,7 @@ void wma_fill_roam_synch_buffer(tp_wma_handle wma, roam_synch_ind_ptr->beaconProbeRespOffset; roam_synch_ind_ptr->beaconProbeRespLength = synch_event->bcn_probe_rsp_len; - cdf_mem_copy(bcn_probersp_ptr, param_buf->bcn_probe_rsp_frame, + qdf_mem_copy(bcn_probersp_ptr, param_buf->bcn_probe_rsp_frame, roam_synch_ind_ptr->beaconProbeRespLength); /* ReAssoc Rsp data */ roam_synch_ind_ptr->reassocRespOffset = @@ -2563,7 +2563,7 @@ void wma_fill_roam_synch_buffer(tp_wma_handle wma, roam_synch_ind_ptr->reassocRespLength = synch_event->reassoc_rsp_len; reassoc_rsp_ptr = (uint8_t *) roam_synch_ind_ptr + roam_synch_ind_ptr->reassocRespOffset; - cdf_mem_copy(reassoc_rsp_ptr, + qdf_mem_copy(reassoc_rsp_ptr, param_buf->reassoc_rsp_frame, roam_synch_ind_ptr->reassocRespLength); @@ -2575,18 +2575,18 @@ void wma_fill_roam_synch_buffer(tp_wma_handle wma, roam_synch_ind_ptr->reassoc_req_length = synch_event->reassoc_req_len; reassoc_req_ptr = (uint8_t *) roam_synch_ind_ptr + roam_synch_ind_ptr->reassoc_req_offset; - cdf_mem_copy(reassoc_req_ptr, param_buf->reassoc_req_frame, + qdf_mem_copy(reassoc_req_ptr, param_buf->reassoc_req_frame, roam_synch_ind_ptr->reassoc_req_length); chan = (wmi_channel *) param_buf->chan; roam_synch_ind_ptr->chan_freq = chan->mhz; key = (wmi_key_material *) param_buf->key; if (key != NULL) { - cdf_mem_copy(roam_synch_ind_ptr->kck, key->kck, + qdf_mem_copy(roam_synch_ind_ptr->kck, key->kck, SIR_KCK_KEY_LEN); - cdf_mem_copy(roam_synch_ind_ptr->kek, key->kek, + qdf_mem_copy(roam_synch_ind_ptr->kek, key->kek, SIR_KEK_KEY_LEN); - cdf_mem_copy(roam_synch_ind_ptr->replay_ctr, + qdf_mem_copy(roam_synch_ind_ptr->replay_ctr, key->replay_counter, SIR_REPLAY_CTR_LEN); WMA_LOGD("%s: KCK dump", __func__); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG, @@ -2620,33 +2620,33 @@ void wma_roam_update_vdev(tp_wma_handle wma, tAddStaParams *add_sta_params; uint8_t vdev_id; - del_bss_params = cdf_mem_malloc(sizeof(*del_bss_params)); - del_sta_params = cdf_mem_malloc(sizeof(*del_sta_params)); - set_link_params = cdf_mem_malloc(sizeof(*set_link_params)); - add_sta_params = cdf_mem_malloc(sizeof(*add_sta_params)); + del_bss_params = qdf_mem_malloc(sizeof(*del_bss_params)); + del_sta_params = qdf_mem_malloc(sizeof(*del_sta_params)); + set_link_params = qdf_mem_malloc(sizeof(*set_link_params)); + add_sta_params = qdf_mem_malloc(sizeof(*add_sta_params)); if (!del_bss_params || !del_sta_params || !set_link_params || !add_sta_params) { WMA_LOGE("%s: failed to allocate memory", __func__); return; } vdev_id = roam_synch_ind_ptr->roamedVdevId; - cdf_mem_zero(del_bss_params, sizeof(*del_bss_params)); - cdf_mem_zero(del_sta_params, sizeof(*del_sta_params)); - cdf_mem_zero(set_link_params, sizeof(*set_link_params)); - cdf_mem_zero(add_sta_params, sizeof(*add_sta_params)); + qdf_mem_zero(del_bss_params, sizeof(*del_bss_params)); + qdf_mem_zero(del_sta_params, sizeof(*del_sta_params)); + qdf_mem_zero(set_link_params, sizeof(*set_link_params)); + qdf_mem_zero(add_sta_params, sizeof(*add_sta_params)); del_bss_params->smesessionId = vdev_id; del_sta_params->smesessionId = vdev_id; - cdf_mem_copy(del_bss_params->bssid, wma->interfaces[vdev_id].bssid, + qdf_mem_copy(del_bss_params->bssid, wma->interfaces[vdev_id].bssid, IEEE80211_ADDR_LEN); set_link_params->state = eSIR_LINK_PREASSOC_STATE; - cdf_mem_copy(set_link_params->selfMacAddr, wma->myaddr, + qdf_mem_copy(set_link_params->selfMacAddr, wma->myaddr, IEEE80211_ADDR_LEN); - cdf_mem_copy(set_link_params->bssid, roam_synch_ind_ptr->bssid.bytes, + qdf_mem_copy(set_link_params->bssid, roam_synch_ind_ptr->bssid.bytes, IEEE80211_ADDR_LEN); add_sta_params->staType = STA_ENTRY_SELF; add_sta_params->smesessionId = vdev_id; - cdf_mem_copy(&add_sta_params->bssId, &roam_synch_ind_ptr->bssid.bytes, + qdf_mem_copy(&add_sta_params->bssId, &roam_synch_ind_ptr->bssid.bytes, IEEE80211_ADDR_LEN); add_sta_params->staIdx = STA_INVALID_IDX; add_sta_params->assocId = roam_synch_ind_ptr->aid; @@ -2657,12 +2657,12 @@ void wma_roam_update_vdev(tp_wma_handle wma, wma_add_bss(wma, (tpAddBssParams)roam_synch_ind_ptr->add_bss_params); wma_add_sta(wma, add_sta_params); wma->interfaces[vdev_id].vdev_up = true; - cdf_mem_copy(wma->interfaces[vdev_id].bssid, + qdf_mem_copy(wma->interfaces[vdev_id].bssid, roam_synch_ind_ptr->bssid.bytes, IEEE80211_ADDR_LEN); - cdf_mem_free(del_bss_params); - cdf_mem_free(del_sta_params); - cdf_mem_free(set_link_params); - cdf_mem_free(add_sta_params); + qdf_mem_free(del_bss_params); + qdf_mem_free(del_sta_params); + qdf_mem_free(set_link_params); + qdf_mem_free(add_sta_params); } /** @@ -2716,14 +2716,14 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event, synch_event->bcn_probe_rsp_len + synch_event->reassoc_rsp_len + synch_event->reassoc_req_len; roam_synch_ind_ptr = - (roam_offload_synch_ind *) cdf_mem_malloc(len); + (roam_offload_synch_ind *) qdf_mem_malloc(len); if (!roam_synch_ind_ptr) { WMA_LOGE("%s: failed to allocate memory for roam_synch_event", __func__); QDF_ASSERT(roam_synch_ind_ptr != NULL); return -ENOMEM; } - cdf_mem_zero(roam_synch_ind_ptr, len); + qdf_mem_zero(roam_synch_ind_ptr, len); wma_fill_roam_synch_buffer(wma, roam_synch_ind_ptr, param_buf); /* 24 byte MAC header and 12 byte to ssid IE */ @@ -2735,8 +2735,8 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event, WMA_LOGE("LFR3: Invalid Beacon Length"); goto cleanup_label; } - bss_desc_ptr = cdf_mem_malloc(sizeof(tSirBssDescription) + ie_len); - roam_synch_ind_ptr->join_rsp = cdf_mem_malloc(sizeof(tSirSmeJoinRsp)); + bss_desc_ptr = qdf_mem_malloc(sizeof(tSirBssDescription) + ie_len); + roam_synch_ind_ptr->join_rsp = qdf_mem_malloc(sizeof(tSirSmeJoinRsp)); if ((NULL == roam_synch_ind_ptr->join_rsp) || (NULL == bss_desc_ptr)) { WMA_LOGE("LFR3: mem alloc failed!"); QDF_ASSERT(bss_desc_ptr != NULL); @@ -2744,8 +2744,8 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event, status = -ENOMEM; goto cleanup_label; } - cdf_mem_zero(roam_synch_ind_ptr->join_rsp, sizeof(tSirSmeJoinRsp)); - cdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len); + qdf_mem_zero(roam_synch_ind_ptr->join_rsp, sizeof(tSirSmeJoinRsp)); + qdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len); wma->pe_roam_synch_cb((tpAniSirGlobal)wma->mac_context, roam_synch_ind_ptr, bss_desc_ptr); wma_roam_update_vdev(wma, roam_synch_ind_ptr); @@ -2754,11 +2754,11 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event, wma_process_roam_synch_complete(wma, synch_event->vdev_id); cleanup_label: if (roam_synch_ind_ptr->join_rsp) - cdf_mem_free(roam_synch_ind_ptr->join_rsp); + qdf_mem_free(roam_synch_ind_ptr->join_rsp); if (roam_synch_ind_ptr) - cdf_mem_free(roam_synch_ind_ptr); + qdf_mem_free(roam_synch_ind_ptr); if (bss_desc_ptr) - cdf_mem_free(bss_desc_ptr); + qdf_mem_free(bss_desc_ptr); wma->interfaces[synch_event->vdev_id].roam_synch_in_progress = false; return 0; @@ -2837,7 +2837,7 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle, tSirMacExtendedHTCapabilityInfo extHtCapInfo; } uHTCapabilityInfo; - cdf_mem_set(&macQosInfoSta, sizeof(tSirMacQosInfoStation), 0); + qdf_mem_set(&macQosInfoSta, sizeof(tSirMacQosInfoStation), 0); /* Roaming is done only for INFRA STA type. * So, ess will be one and ibss will be Zero */ pMac = cds_get_context(QDF_MODULE_ID_PE); @@ -3045,10 +3045,10 @@ void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts) /* Fill the tsinfo in the format expected by firmware */ #ifndef ANI_LITTLE_BIT_ENDIAN - cdf_mem_copy(((uint8_t *) &tspec_param->ts_info) + 1, + qdf_mem_copy(((uint8_t *) &tspec_param->ts_info) + 1, ((uint8_t *) &ptspecIE->tsinfo) + 1, 2); #else - cdf_mem_copy(((uint8_t *) &tspec_param->ts_info), + qdf_mem_copy(((uint8_t *) &tspec_param->ts_info), ((uint8_t *) &ptspecIE->tsinfo) + 1, 2); #endif /* ANI_LITTLE_BIT_ENDIAN */ @@ -3156,7 +3156,7 @@ static void wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id) cds_msg_t sme_msg = { 0 }; QDF_STATUS qdf_status; - ho_failure_ind = cdf_mem_malloc(sizeof(tSirSmeHOFailureInd)); + ho_failure_ind = qdf_mem_malloc(sizeof(tSirSmeHOFailureInd)); if (NULL == ho_failure_ind) { WMA_LOGE("%s: Memory allocation failure", __func__); @@ -3170,7 +3170,7 @@ static void wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id) qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("Fail to post eWNI_SME_HO_FAIL_IND msg to SME"); - cdf_mem_free(ho_failure_ind); + qdf_mem_free(ho_failure_ind); return; } return; @@ -3256,7 +3256,7 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params) peer = ol_txrx_find_peer_by_addr(pdev, intr[vdev_id].bssid, &peer_id); - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.vdev_id = vdev_id; msg = wma_fill_vdev_req(wma, req.vdev_id, WMA_CHNL_SWITCH_REQ, WMA_TARGET_REQ_TYPE_VDEV_START, params, @@ -3441,7 +3441,7 @@ QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno) /* Copy ssid and it's length */ nlo_list[i].ssid.valid = true; nlo_list[i].ssid.ssid.ssid_len = pno->aNetworks[i].ssId.length; - cdf_mem_copy(nlo_list[i].ssid.ssid.ssid, + qdf_mem_copy(nlo_list[i].ssid.ssid.ssid, pno->aNetworks[i].ssId.ssId, nlo_list[i].ssid.ssid.ssid_len); WMA_LOGD("index: %d ssid: %.*s len: %d", i, @@ -3604,7 +3604,7 @@ void wma_config_pno(tp_wma_handle wma, tpSirPNOScanReq pno) /* SME expects WMA to free tpSirPNOScanReq memory after * processing PNO request. */ - cdf_mem_free(pno); + qdf_mem_free(pno); } #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) @@ -3795,7 +3795,7 @@ void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm) /* SME expects WMA to free tpSirPlmReq memory after * processing PLM request. */ - cdf_mem_free(plm); + qdf_mem_free(plm); plm = NULL; } #endif @@ -3834,7 +3834,7 @@ void wma_scan_cache_updated_ind(tp_wma_handle wma, uint8_t sessionId) WMA_LOGD("Posting PNO completion to umac"); len = sizeof(tSirPrefNetworkFoundInd); - nw_found_ind = (tSirPrefNetworkFoundInd *) cdf_mem_malloc(len); + nw_found_ind = (tSirPrefNetworkFoundInd *) qdf_mem_malloc(len); if (NULL == nw_found_ind) { WMA_LOGE("%s: Memory allocation failure", __func__); @@ -3853,7 +3853,7 @@ void wma_scan_cache_updated_ind(tp_wma_handle wma, uint8_t sessionId) if (status != QDF_STATUS_SUCCESS) { WMA_LOGE("%s: Failed to post PNO completion match event to SME", __func__); - cdf_mem_free(nw_found_ind); + qdf_mem_free(nw_found_ind); } } @@ -4082,7 +4082,7 @@ int wma_nlo_scan_cmp_evt_handler(void *handle, uint8_t *event, WIFI_POWER_EVENT_WAKELOCK_PNO); scan_event = (tSirScanOffloadEvent *) - cdf_mem_malloc(sizeof(tSirScanOffloadEvent)); + qdf_mem_malloc(sizeof(tSirScanOffloadEvent)); if (scan_event) { /* Posting scan completion msg would take scan cache result * from LIM module and update in scan cache maintained in SME.*/ @@ -4090,7 +4090,7 @@ int wma_nlo_scan_cmp_evt_handler(void *handle, uint8_t *event, qdf_wake_lock_timeout_acquire(&wma->pno_wake_lock, WMA_PNO_SCAN_COMPLETE_WAKE_LOCK_TIMEOUT, WIFI_POWER_EVENT_WAKELOCK_PNO); - cdf_mem_zero(scan_event, sizeof(tSirScanOffloadEvent)); + qdf_mem_zero(scan_event, sizeof(tSirScanOffloadEvent)); scan_event->reasonCode = eSIR_PNO_SCAN_SUCCESS; scan_event->event = SCAN_EVENT_COMPLETED; scan_event->sessionId = nlo_event->vdev_id; @@ -4195,7 +4195,7 @@ int wma_extscan_start_stop_event_handler(void *handle, return -EINVAL; } event = param_buf->fixed_param; - extscan_ind = cdf_mem_malloc(sizeof(*extscan_ind)); + extscan_ind = qdf_mem_malloc(sizeof(*extscan_ind)); if (!extscan_ind) { WMA_LOGE("%s: extscan memory allocation failed", __func__); return -ENOMEM; @@ -4250,14 +4250,14 @@ int wma_extscan_start_stop_event_handler(void *handle, default: WMA_LOGE("%s: Unknown event(%d) from target", __func__, event->status); - cdf_mem_free(extscan_ind); + qdf_mem_free(extscan_ind); return -EINVAL; } pMac->sme.pExtScanIndCb(pMac->hHdd, event_type, extscan_ind); WMA_LOGD("%s: sending event to umac for requestid %u" "with status %d", __func__, extscan_ind->request_id, extscan_ind->status); - cdf_mem_free(extscan_ind); + qdf_mem_free(extscan_ind); return 0; } @@ -4296,10 +4296,10 @@ int wma_extscan_operations_event_handler(void *handle, return -EINVAL; } oprn_event = param_buf->fixed_param; - oprn_ind = cdf_mem_malloc(sizeof(*oprn_ind)); + oprn_ind = qdf_mem_malloc(sizeof(*oprn_ind)); if (!oprn_ind) { WMA_LOGE("%s: extscan memory allocation failed", __func__); - cdf_mem_free(oprn_ind); + qdf_mem_free(oprn_ind); return -ENOMEM; } @@ -4326,14 +4326,14 @@ int wma_extscan_operations_event_handler(void *handle, default: WMA_LOGE("%s: Unknown event(%d) from target", __func__, oprn_event->event); - cdf_mem_free(oprn_ind); + qdf_mem_free(oprn_ind); return -EINVAL; } pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, oprn_ind); WMA_LOGI("%s: sending scan progress event to hdd", __func__); exit_handler: - cdf_mem_free(oprn_ind); + qdf_mem_free(oprn_ind); return 0; } @@ -4371,7 +4371,7 @@ int wma_extscan_table_usage_event_handler(void *handle, return -EINVAL; } event = param_buf->fixed_param; - tbl_usg_ind = cdf_mem_malloc(sizeof(*tbl_usg_ind)); + tbl_usg_ind = qdf_mem_malloc(sizeof(*tbl_usg_ind)); if (!tbl_usg_ind) { WMA_LOGE("%s: table usage allocation failed", __func__); return -ENOMEM; @@ -4383,7 +4383,7 @@ int wma_extscan_table_usage_event_handler(void *handle, eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, tbl_usg_ind); WMA_LOGI("%s: sending scan_res available event to hdd", __func__); - cdf_mem_free(tbl_usg_ind); + qdf_mem_free(tbl_usg_ind); return 0; } @@ -4433,7 +4433,7 @@ int wma_extscan_capabilities_event_handler(void *handle, WMA_LOGE("%s: Invalid capabilities list", __func__); return -EINVAL; } - dest_capab = cdf_mem_malloc(sizeof(*dest_capab)); + dest_capab = qdf_mem_malloc(sizeof(*dest_capab)); if (!dest_capab) { WMA_LOGE("%s: Allocation failed for capabilities buffer", __func__); @@ -4490,7 +4490,7 @@ int wma_extscan_capabilities_event_handler(void *handle, pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_GET_CAPABILITIES_IND, dest_capab); WMA_LOGI("%s: sending capabilities event to hdd", __func__); - cdf_mem_free(dest_capab); + qdf_mem_free(dest_capab); return 0; } @@ -4539,7 +4539,7 @@ int wma_extscan_hotlist_match_event_handler(void *handle, WMA_LOGE("%s: Hotlist AP's list invalid", __func__); return -EINVAL; } - dest_hotlist = cdf_mem_malloc(sizeof(*dest_hotlist) + + dest_hotlist = qdf_mem_malloc(sizeof(*dest_hotlist) + sizeof(*dest_ap) * numap); if (!dest_hotlist) { WMA_LOGE("%s: Allocation failed for hotlist buffer", __func__); @@ -4575,7 +4575,7 @@ int wma_extscan_hotlist_match_event_handler(void *handle, dest_ap->ieLength = src_hotlist->ie_length; WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid, dest_ap->bssid.bytes); - cdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid, + qdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid, src_hotlist->ssid.ssid_len); dest_ap->ssid[src_hotlist->ssid.ssid_len] = '\0'; dest_ap++; @@ -4585,7 +4585,7 @@ int wma_extscan_hotlist_match_event_handler(void *handle, pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_HOTLIST_MATCH_IND, dest_hotlist); WMA_LOGI("%s: sending hotlist match event to hdd", __func__); - cdf_mem_free(dest_hotlist); + qdf_mem_free(dest_hotlist); return 0; } @@ -4720,10 +4720,10 @@ static int wma_group_num_bss_to_scan_id(const u_int8_t *cmd_param_info, for (i = 0; i < t_cached_result->num_scan_ids; i++) { WMA_LOGD("%s: num_results:%d", __func__, t_scan_id_grp->num_results); - t_scan_id_grp->ap = cdf_mem_malloc(t_scan_id_grp->num_results * + t_scan_id_grp->ap = qdf_mem_malloc(t_scan_id_grp->num_results * sizeof(*ap)); if (!t_scan_id_grp->ap) { - WMA_LOGD("%s: cdf_mem_malloc failed", __func__); + WMA_LOGD("%s: qdf_mem_malloc failed", __func__); return -ENOMEM; } @@ -4746,7 +4746,7 @@ static int wma_group_num_bss_to_scan_id(const u_int8_t *cmd_param_info, WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid, ap->bssid.bytes); - cdf_mem_copy(ap->ssid, src_hotlist->ssid.ssid, + qdf_mem_copy(ap->ssid, src_hotlist->ssid.ssid, src_hotlist->ssid.ssid_len); ap->ssid[src_hotlist->ssid.ssid_len] = '\0'; ap++; @@ -4814,12 +4814,12 @@ int wma_extscan_cached_results_event_handler(void *handle, else moredata = 0; - dest_cachelist = cdf_mem_malloc(sizeof(*dest_cachelist)); + dest_cachelist = qdf_mem_malloc(sizeof(*dest_cachelist)); if (!dest_cachelist) { - WMA_LOGE("%s: cdf_mem_malloc failed", __func__); + WMA_LOGE("%s: qdf_mem_malloc failed", __func__); return -ENOMEM; } - cdf_mem_zero(dest_cachelist, sizeof(*dest_cachelist)); + qdf_mem_zero(dest_cachelist, sizeof(*dest_cachelist)); dest_cachelist->request_id = event->request_id; dest_cachelist->more_data = moredata; @@ -4828,10 +4828,10 @@ int wma_extscan_cached_results_event_handler(void *handle, dest_cachelist->num_scan_ids = scan_ids_cnt; buf_len = sizeof(*dest_result) * scan_ids_cnt; - dest_cachelist->result = cdf_mem_malloc(buf_len); + dest_cachelist->result = qdf_mem_malloc(buf_len); if (!dest_cachelist->result) { WMA_LOGE("%s: Allocation failed for scanid grouping", __func__); - cdf_mem_free(dest_cachelist); + qdf_mem_free(dest_cachelist); return -ENOMEM; } @@ -4845,11 +4845,11 @@ int wma_extscan_cached_results_event_handler(void *handle, WMA_LOGI("%s: sending cached results event", __func__); dest_result = dest_cachelist->result; for (i = 0; i < dest_cachelist->num_scan_ids; i++) { - cdf_mem_free(dest_result->ap); + qdf_mem_free(dest_result->ap); dest_result++; } - cdf_mem_free(dest_cachelist->result); - cdf_mem_free(dest_cachelist); + qdf_mem_free(dest_cachelist->result); + qdf_mem_free(dest_cachelist); return 0; noresults: @@ -4924,7 +4924,7 @@ int wma_extscan_change_results_event_handler(void *handle, } else { moredata = 0; } - dest_chglist = cdf_mem_malloc(sizeof(*dest_chglist) + + dest_chglist = qdf_mem_malloc(sizeof(*dest_chglist) + sizeof(*dest_ap) * numap + sizeof(int32_t) * rssi_num); if (!dest_chglist) { @@ -4954,7 +4954,7 @@ int wma_extscan_change_results_event_handler(void *handle, eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, dest_chglist); WMA_LOGI("%s: sending change monitor results", __func__); - cdf_mem_free(dest_chglist); + qdf_mem_free(dest_chglist); return 0; } @@ -4998,10 +4998,10 @@ int wma_passpoint_match_event_handler(void *handle, event = param_buf->fixed_param; buf_ptr = (uint8_t *)param_buf->fixed_param; - dest_match = cdf_mem_malloc(sizeof(*dest_match) + + dest_match = qdf_mem_malloc(sizeof(*dest_match) + event->ie_length + event->anqp_length); if (!dest_match) { - WMA_LOGE("%s: cdf_mem_malloc failed", __func__); + WMA_LOGE("%s: qdf_mem_malloc failed", __func__); return -EINVAL; } dest_ap = &dest_match->ap; @@ -5020,12 +5020,12 @@ int wma_passpoint_match_event_handler(void *handle, dest_ap->capability = event->capability; dest_ap->ieLength = event->ie_length; WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->bssid, dest_ap->bssid.bytes); - cdf_mem_copy(dest_ap->ssid, event->ssid.ssid, + qdf_mem_copy(dest_ap->ssid, event->ssid.ssid, event->ssid.ssid_len); dest_ap->ssid[event->ssid.ssid_len] = '\0'; - cdf_mem_copy(dest_ap->ieData, buf_ptr + sizeof(*event) + + qdf_mem_copy(dest_ap->ieData, buf_ptr + sizeof(*event) + WMI_TLV_HDR_SIZE, dest_ap->ieLength); - cdf_mem_copy(dest_match->anqp, buf_ptr + sizeof(*event) + + qdf_mem_copy(dest_match->anqp, buf_ptr + sizeof(*event) + WMI_TLV_HDR_SIZE + dest_ap->ieLength, dest_match->anqp_len); @@ -5033,7 +5033,7 @@ int wma_passpoint_match_event_handler(void *handle, eSIR_PASSPOINT_NETWORK_FOUND_IND, dest_match); WMA_LOGI("%s: sending passpoint match event to hdd", __func__); - cdf_mem_free(dest_match); + qdf_mem_free(dest_match); return 0; } @@ -5085,7 +5085,7 @@ wma_extscan_hotlist_ssid_match_event_handler(void *handle, return -EINVAL; } - dest_hotlist = cdf_mem_malloc(sizeof(*dest_hotlist) + + dest_hotlist = qdf_mem_malloc(sizeof(*dest_hotlist) + sizeof(*dest_ap) * numap); if (!dest_hotlist) { WMA_LOGE("%s: Allocation failed for hotlist buffer", @@ -5117,7 +5117,7 @@ wma_extscan_hotlist_ssid_match_event_handler(void *handle, dest_ap->ieLength = src_hotlist->ie_length; WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid, dest_ap->bssid.bytes); - cdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid, + qdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid, src_hotlist->ssid.ssid_len); dest_ap->ssid[src_hotlist->ssid.ssid_len] = '\0'; dest_ap++; @@ -5129,7 +5129,7 @@ wma_extscan_hotlist_ssid_match_event_handler(void *handle, eSIR_EXTSCAN_HOTLIST_SSID_MATCH_IND, dest_hotlist); WMA_LOGI("%s: sending hotlist ssid match event", __func__); - cdf_mem_free(dest_hotlist); + qdf_mem_free(dest_hotlist); return 0; } @@ -6190,7 +6190,7 @@ QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma, /* Copy ssid and it's length */ nlo_list[i].ssid.valid = true; nlo_list[i].ssid.ssid.ssid_len = req->networks[i].ssid.length; - cdf_mem_copy(nlo_list[i].ssid.ssid.ssid, + qdf_mem_copy(nlo_list[i].ssid.ssid.ssid, req->networks[i].ssid.ssId, nlo_list[i].ssid.ssid.ssid_len); WMA_LOGD("index: %d ssid: %.*s len: %d", i, @@ -6288,7 +6288,7 @@ QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma, wmi_passpoint_config_cmd_fixed_param)); cmd->id = req->networks[i].id; WMA_LOGD("%s: network id: %u", __func__, cmd->id); - cdf_mem_copy(cmd->realm, req->networks[i].realm, + qdf_mem_copy(cmd->realm, req->networks[i].realm, strlen(req->networks[i].realm) + 1); WMA_LOGD("%s: realm: %s", __func__, cmd->realm); for (j = 0; j < PASSPOINT_ROAMING_CONSORTIUM_ID_NUM; j++) { @@ -6297,11 +6297,11 @@ QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma, j, bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7]); - cdf_mem_copy(&cmd->roaming_consortium_ids[j], + qdf_mem_copy(&cmd->roaming_consortium_ids[j], &req->networks[i].roaming_consortium_ids[j], PASSPOINT_ROAMING_CONSORTIUM_ID_LEN); } - cdf_mem_copy(cmd->plmn, req->networks[i].plmn, + qdf_mem_copy(cmd->plmn, req->networks[i].plmn, PASSPOINT_PLMN_ID_LEN); WMA_LOGD("%s: plmn: %02x:%02x:%02x", __func__, cmd->plmn[0], cmd->plmn[1], cmd->plmn[2]); @@ -6463,7 +6463,7 @@ wma_set_ssid_hotlist(tp_wma_handle wma, WMITLV_GET_STRUCT_TLVLEN (wmi_extscan_hotlist_ssid_entry)); entry->ssid.ssid_len = request->ssids[i].ssid.length; - cdf_mem_copy(entry->ssid.ssid, + qdf_mem_copy(entry->ssid.ssid, request->ssids[i].ssid.ssId, request->ssids[i].ssid.length); entry->band = request->ssids[i].band; @@ -6522,7 +6522,7 @@ QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui) (wmi_scan_prob_req_oui_cmd_fixed_param)); oui_buf = &cmd->prob_req_oui; - cdf_mem_zero(oui_buf, sizeof(cmd->prob_req_oui)); + qdf_mem_zero(oui_buf, sizeof(cmd->prob_req_oui)); *oui_buf = psetoui->oui[0] << 16 | psetoui->oui[1] << 8 | psetoui->oui[2]; WMA_LOGD("%s: wma:oui received from hdd %08x", __func__, @@ -6563,7 +6563,7 @@ int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, vdev_id = wmi_event->vdev_id; scan_id = wma_handle->interfaces[vdev_id].scan_info.scan_id; - scan_event = (tSirScanOffloadEvent *) cdf_mem_malloc + scan_event = (tSirScanOffloadEvent *) qdf_mem_malloc (sizeof(tSirScanOffloadEvent)); if (!scan_event) { WMA_LOGE("Memory allocation failed for tSirScanOffloadEvent"); @@ -6658,7 +6658,7 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id) wma_stop_scan(wma, &abortScan); } - candidate_ind = cdf_mem_malloc(sizeof(tSirSmeCandidateFoundInd)); + candidate_ind = qdf_mem_malloc(sizeof(tSirSmeCandidateFoundInd)); if (!candidate_ind) { WMA_LOGE("%s: Alloc failed for tSirSmeCandidateFoundInd", __func__); @@ -6676,7 +6676,7 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id) if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg)) { - cdf_mem_free(candidate_ind); + qdf_mem_free(candidate_ind); QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR, FL("Failed to post candidate ind to SME")); } @@ -6862,9 +6862,9 @@ QDF_STATUS wma_set_gateway_params(tp_wma_handle wma, wmi_roam_subnet_change_config_fixed_param)); cmd->vdev_id = req->session_id; - cdf_mem_copy(&cmd->inet_gw_ip_v4_addr, req->ipv4_addr, + qdf_mem_copy(&cmd->inet_gw_ip_v4_addr, req->ipv4_addr, QDF_IPV4_ADDR_SIZE); - cdf_mem_copy(&cmd->inet_gw_ip_v6_addr, req->ipv6_addr, + qdf_mem_copy(&cmd->inet_gw_ip_v6_addr, req->ipv6_addr, QDF_IPV6_ADDR_SIZE); WMI_CHAR_ARRAY_TO_MAC_ADDR(req->gw_mac_addr.bytes, &cmd->inet_gw_mac_addr); diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 907b50bde005..6f6af9b1ba98 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -48,7 +48,7 @@ #include "cdf_nbuf.h" #include "qdf_types.h" #include "ol_txrx_api.h" -#include "cdf_memory.h" +#include "qdf_mem.h" #include "ol_txrx_types.h" #include "ol_txrx_peer_find.h" @@ -356,7 +356,7 @@ int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, alloc_len = sizeof(tSirStatsExtEvent); alloc_len += stats_ext_info->data_len; - stats_ext_event = (tSirStatsExtEvent *) cdf_mem_malloc(alloc_len); + stats_ext_event = (tSirStatsExtEvent *) qdf_mem_malloc(alloc_len); if (NULL == stats_ext_event) { WMA_LOGE("%s: Memory allocation failure", __func__); return -ENOMEM; @@ -366,7 +366,7 @@ int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, stats_ext_event->vdev_id = stats_ext_info->vdev_id; stats_ext_event->event_data_len = stats_ext_info->data_len; - cdf_mem_copy(stats_ext_event->event_data, + qdf_mem_copy(stats_ext_event->event_data, buf_ptr, stats_ext_event->event_data_len); cds_msg.type = eWNI_SME_STATS_EXT_EVENT; @@ -376,7 +376,7 @@ int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf, status = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg); if (status != QDF_STATUS_SUCCESS) { WMA_LOGE("%s: Failed to post stats ext event to SME", __func__); - cdf_mem_free(stats_ext_event); + qdf_mem_free(stats_ext_event); return -EFAULT; } @@ -535,7 +535,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, (fixed_param->num_peers * peer_info_size) + (num_rates * rate_stats_size); - link_stats_results = cdf_mem_malloc(link_stats_results_size); + link_stats_results = qdf_mem_malloc(link_stats_results_size); if (NULL == link_stats_results) { WMA_LOGD("%s: could not allocate mem for stats results-len %zu", __func__, link_stats_results_size); @@ -548,7 +548,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, fixed_param->request_id, fixed_param->num_peers, fixed_param->peer_event_number, fixed_param->more_data); - cdf_mem_zero(link_stats_results, link_stats_results_size); + qdf_mem_zero(link_stats_results, link_stats_results_size); link_stats_results->paramId = WMI_LINK_STATS_ALL_PEER; link_stats_results->rspId = fixed_param->request_id; @@ -557,7 +557,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, link_stats_results->peer_event_number = fixed_param->peer_event_number; link_stats_results->moreResultToFollow = fixed_param->more_data; - cdf_mem_copy(link_stats_results->results, + qdf_mem_copy(link_stats_results->results, &fixed_param->num_peers, peer_stats_size); results = (uint8_t *) link_stats_results->results; @@ -572,7 +572,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, peer_stats->peer_type, peer_stats->capabilities, peer_stats->num_rates); - cdf_mem_copy(results + next_res_offset, + qdf_mem_copy(results + next_res_offset, t_peer_stats + next_peer_offset, peer_info_size); next_res_offset += peer_info_size; @@ -588,7 +588,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, rate_stats->retries_long); rate_stats++; - cdf_mem_copy(results + next_res_offset, + qdf_mem_copy(results + next_res_offset, t_rate_stats + next_rate_offset, rate_stats_size); next_res_offset += rate_stats_size; @@ -606,7 +606,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle, WMA_LINK_LAYER_STATS_RESULTS_RSP, link_stats_results); WMA_LOGD("%s: Peer Stats event posted to HDD", __func__); - cdf_mem_free(link_stats_results); + qdf_mem_free(link_stats_results); return 0; } @@ -674,7 +674,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle, link_stats_results_size = sizeof(*link_stats_results) + radio_stats_size + (radio_stats->num_channels * chan_stats_size); - link_stats_results = cdf_mem_malloc(link_stats_results_size); + link_stats_results = qdf_mem_malloc(link_stats_results_size); if (NULL == link_stats_results) { WMA_LOGD("%s: could not allocate mem for stats results-len %zu", __func__, link_stats_results_size); @@ -699,7 +699,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle, radio_stats->on_time_pno_scan, radio_stats->on_time_hs20, radio_stats->num_channels); - cdf_mem_zero(link_stats_results, link_stats_results_size); + qdf_mem_zero(link_stats_results, link_stats_results_size); link_stats_results->paramId = WMI_LINK_STATS_RADIO; link_stats_results->rspId = fixed_param->request_id; @@ -712,7 +712,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle, t_radio_stats = (uint8_t *) radio_stats; t_channel_stats = (uint8_t *) channel_stats; - cdf_mem_copy(results, t_radio_stats + WMI_TLV_HDR_SIZE, + qdf_mem_copy(results, t_radio_stats + WMI_TLV_HDR_SIZE, radio_stats_size); next_res_offset = radio_stats_size; @@ -729,7 +729,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle, channel_stats->cca_busy_time); channel_stats++; - cdf_mem_copy(results + next_res_offset, + qdf_mem_copy(results + next_res_offset, t_channel_stats + next_chan_offset, chan_stats_size); next_res_offset += chan_stats_size; @@ -744,7 +744,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle, WMA_LINK_LAYER_STATS_RESULTS_RSP, link_stats_results); WMA_LOGD("%s: Radio Stats event posted to HDD", __func__); - cdf_mem_free(link_stats_results); + qdf_mem_free(link_stats_results); return 0; } @@ -807,7 +807,7 @@ QDF_STATUS wma_process_ll_stats_clear_req } buf_ptr = (uint8_t *) wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); cmd = (wmi_clear_link_stats_cmd_fixed_param *) buf_ptr; WMITLV_SET_HDR(&cmd->tlv_header, @@ -871,7 +871,7 @@ QDF_STATUS wma_process_ll_stats_set_req } buf_ptr = (uint8_t *) wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); cmd = (wmi_start_link_stats_cmd_fixed_param *) buf_ptr; WMITLV_SET_HDR(&cmd->tlv_header, @@ -929,7 +929,7 @@ QDF_STATUS wma_process_ll_stats_get_req } buf_ptr = (uint8_t *) wmi_buf_data(buf); - cdf_mem_zero(buf_ptr, len); + qdf_mem_zero(buf_ptr, len); cmd = (wmi_request_link_stats_cmd_fixed_param *) buf_ptr; WMITLV_SET_HDR(&cmd->tlv_header, @@ -1024,7 +1024,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle, ac_stats_size = sizeof(tSirWifiWmmAcStat); link_stats_results_size = sizeof(*link_stats_results) + link_stats_size; - link_stats_results = cdf_mem_malloc(link_stats_results_size); + link_stats_results = qdf_mem_malloc(link_stats_results_size); if (!link_stats_results) { WMA_LOGD("%s: could not allocate mem for stats results-len %zu", __func__, link_stats_results_size); @@ -1057,7 +1057,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle, link_stats->avg_rx_frms_leaked, link_stats->rx_leak_window); - cdf_mem_zero(link_stats_results, link_stats_results_size); + qdf_mem_zero(link_stats_results, link_stats_results_size); link_stats_results->paramId = WMI_LINK_STATS_IFACE; link_stats_results->rspId = fixed_param->request_id; @@ -1074,10 +1074,10 @@ int wma_unified_link_iface_stats_event_handler(void *handle, roaming_offset = offsetof(tSirWifiInterfaceInfo, roaming); roaming_size = member_size(tSirWifiInterfaceInfo, roaming); - cdf_mem_copy(results + roaming_offset, &link_stats->roam_state, + qdf_mem_copy(results + roaming_offset, &link_stats->roam_state, roaming_size); - cdf_mem_copy(results + iface_info_size, + qdf_mem_copy(results + iface_info_size, t_link_stats + WMI_TLV_HDR_SIZE, link_stats_size - iface_info_size - WIFI_AC_MAX * ac_stats_size); @@ -1103,7 +1103,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle, ac_stats->contention_num_samples); ac_stats++; - cdf_mem_copy(results + next_res_offset, + qdf_mem_copy(results + next_res_offset, t_ac_stats + next_ac_offset, ac_stats_size); next_res_offset += ac_stats_size; next_ac_offset += sizeof(*ac_stats); @@ -1117,7 +1117,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle, WMA_LINK_LAYER_STATS_RESULTS_RSP, link_stats_results); WMA_LOGD("%s: Iface Stats event posted to HDD", __func__); - cdf_mem_free(link_stats_results); + qdf_mem_free(link_stats_results); return 0; } @@ -1250,7 +1250,7 @@ static void wma_update_vdev_stats(tp_wma_handle wma, pGetRssiReq->pDevContext); } - cdf_mem_free(pGetRssiReq); + qdf_mem_free(pGetRssiReq); wma->pGetRssiReq = NULL; } @@ -1271,7 +1271,7 @@ static void wma_update_vdev_stats(tp_wma_handle wma, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("%s: Fail to post snr ind msg", __func__); - cdf_mem_free(p_snr_req); + qdf_mem_free(p_snr_req); } node->psnr_req = NULL; @@ -1389,7 +1389,7 @@ void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus, qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("%s: Fail to post link status ind msg", __func__); - cdf_mem_free(pGetLinkStatus); + qdf_mem_free(pGetLinkStatus); } } @@ -1527,7 +1527,7 @@ QDF_STATUS wma_send_link_speed(uint32_t link_speed) QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; cds_msg_t sme_msg = { 0 }; tSirLinkSpeedInfo *ls_ind = - (tSirLinkSpeedInfo *) cdf_mem_malloc(sizeof(tSirLinkSpeedInfo)); + (tSirLinkSpeedInfo *) qdf_mem_malloc(sizeof(tSirLinkSpeedInfo)); if (!ls_ind) { WMA_LOGE("%s: Memory allocation failed.", __func__); qdf_status = QDF_STATUS_E_NOMEM; @@ -1541,7 +1541,7 @@ QDF_STATUS wma_send_link_speed(uint32_t link_speed) if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { WMA_LOGE("%s: Fail to post linkspeed ind msg", __func__); - cdf_mem_free(ls_ind); + qdf_mem_free(ls_ind); } } return qdf_status; @@ -1832,7 +1832,7 @@ int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle, WMA_LOGE("%s:Invalid vdev handle", __func__); return -EINVAL; } - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.stats_type_reset_mask = value; ol_txrx_fw_stats_get(vdev, &req, false); @@ -1867,7 +1867,7 @@ int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle, WMA_LOGE("%s:Invalid vdev handle", __func__); return -EINVAL; } - cdf_mem_zero(&req, sizeof(req)); + qdf_mem_zero(&req, sizeof(req)); req.print.verbose = 1; switch (value) { @@ -2035,14 +2035,14 @@ static tAniGetPEStatsRsp *wma_get_stats_rsp_buf temp_mask >>= 1; } - stats_rsp_params = (tAniGetPEStatsRsp *) cdf_mem_malloc(len); + stats_rsp_params = (tAniGetPEStatsRsp *) qdf_mem_malloc(len); if (!stats_rsp_params) { WMA_LOGE("memory allocation failed for tAniGetPEStatsRsp"); QDF_ASSERT(0); return NULL; } - cdf_mem_zero(stats_rsp_params, len); + qdf_mem_zero(stats_rsp_params, len); stats_rsp_params->staId = get_stats_param->staId; stats_rsp_params->statsMask = get_stats_param->statsMask; stats_rsp_params->msgType = WMA_GET_STATISTICS_RSP; @@ -2081,7 +2081,7 @@ void wma_get_stats_req(WMA_HANDLE handle, get_stats_param->statsMask); goto end; } else { - cdf_mem_free(node->stats_rsp); + qdf_mem_free(node->stats_rsp); node->stats_rsp = NULL; node->fw_stats_set = 0; } @@ -2128,7 +2128,7 @@ failed: wma_send_msg(wma_handle, WMA_GET_STATISTICS_RSP, pGetPEStatsRspParams, 0); end: - cdf_mem_free(get_stats_param); + qdf_mem_free(get_stats_param); WMA_LOGD("%s: Exit", __func__); return; } @@ -2173,7 +2173,7 @@ void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size) qdf_spin_lock_bh(&beacon->lock); buf_size = cdf_nbuf_len(beacon->buf); - buf = cdf_mem_malloc(buf_size); + buf = qdf_mem_malloc(buf_size); if (!buf) { qdf_spin_unlock_bh(&beacon->lock); @@ -2181,7 +2181,7 @@ void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size) return NULL; } - cdf_mem_copy(buf, cdf_nbuf_data(beacon->buf), buf_size); + qdf_mem_copy(buf, cdf_nbuf_data(beacon->buf), buf_size); qdf_spin_unlock_bh(&beacon->lock); @@ -2276,7 +2276,7 @@ int wma_utf_rsp(tp_wma_handle wma_handle, uint8_t **payload, uint32_t *len) * The first 4 bytes holds the payload size * and the actual payload sits next to it */ - *payload = (uint8_t *) cdf_mem_malloc((uint32_t) payload_len + *payload = (uint8_t *) qdf_mem_malloc((uint32_t) payload_len + sizeof(A_UINT32)); *(A_UINT32 *) &(*payload[0]) = wma_handle->utf_event_info.length; @@ -2317,7 +2317,7 @@ static void wma_post_ftm_response(tp_wma_handle wma_handle) if (status != QDF_STATUS_SUCCESS) { WMA_LOGE("failed to post ftm response to SYS"); - cdf_mem_free(payload); + qdf_mem_free(payload); } } @@ -2399,7 +2399,7 @@ wma_process_utf_event(WMA_HANDLE handle, uint8_t *datap, uint32_t dataplen) void wma_utf_detach(tp_wma_handle wma_handle) { if (wma_handle->utf_event_info.data) { - cdf_mem_free(wma_handle->utf_event_info.data); + qdf_mem_free(wma_handle->utf_event_info.data); wma_handle->utf_event_info.data = NULL; wma_handle->utf_event_info.length = 0; wmi_unified_unregister_event_handler(wma_handle->wmi_handle, @@ -2418,7 +2418,7 @@ void wma_utf_attach(tp_wma_handle wma_handle) int ret; wma_handle->utf_event_info.data = (unsigned char *) - cdf_mem_malloc(MAX_UTF_EVENT_LENGTH); + qdf_mem_malloc(MAX_UTF_EVENT_LENGTH); wma_handle->utf_event_info.length = 0; ret = wmi_unified_register_event_handler(wma_handle->wmi_handle, @@ -2552,8 +2552,8 @@ wma_process_ftm_command(tp_wma_handle wma_handle, if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) { WMA_LOGE("FTM command issued in non-FTM mode"); - cdf_mem_free(msg_buffer->data); - cdf_mem_free(msg_buffer); + qdf_mem_free(msg_buffer->data); + qdf_mem_free(msg_buffer); return QDF_STATUS_E_NOSUPPORT; } @@ -2562,8 +2562,8 @@ wma_process_ftm_command(tp_wma_handle wma_handle, ret = wma_utf_cmd(wma_handle, data, len); - cdf_mem_free(msg_buffer->data); - cdf_mem_free(msg_buffer); + qdf_mem_free(msg_buffer->data); + qdf_mem_free(msg_buffer); if (ret) return QDF_STATUS_E_FAILURE; diff --git a/core/wma/src/wma_utils_ut.c b/core/wma/src/wma_utils_ut.c index 845a39b36469..45db586d9f9f 100644 --- a/core/wma/src/wma_utils_ut.c +++ b/core/wma/src/wma_utils_ut.c @@ -62,7 +62,7 @@ void wma_set_dbs_capability_ut(uint32_t dbs) if (wma->hw_mode.hw_mode_list == NULL) { wma->num_dbs_hw_modes = 1; wma->hw_mode.hw_mode_list = - cdf_mem_malloc(sizeof(*wma->hw_mode.hw_mode_list) * + qdf_mem_malloc(sizeof(*wma->hw_mode.hw_mode_list) * wma->num_dbs_hw_modes); if (!wma->hw_mode.hw_mode_list) { WMA_LOGE("%s: Memory allocation failed for UT-DBS", diff --git a/core/wmi/wmi_tlv_platform.c b/core/wmi/wmi_tlv_platform.c index 3351b01510e3..5e0795ce7ec0 100644 --- a/core/wmi/wmi_tlv_platform.c +++ b/core/wmi/wmi_tlv_platform.c @@ -30,7 +30,7 @@ */ #include "ol_if_athvar.h" -#include <cdf_memory.h> /* cdf_mem_malloc,free, etc. */ +#include <qdf_mem.h> /* qdf_mem_malloc,free, etc. */ #include <osdep.h> #include "htc_api.h" #include "wmi.h" @@ -54,5 +54,5 @@ { \ (ptr) = os_malloc(NULL, (numBytes), GFP_ATOMIC); \ } -#define wmi_tlv_os_mem_free cdf_mem_free +#define wmi_tlv_os_mem_free qdf_mem_free #endif diff --git a/core/wmi/wmi_unified.c b/core/wmi/wmi_unified.c index e80a0299a144..b081a5d5afd6 100644 --- a/core/wmi/wmi_unified.c +++ b/core/wmi/wmi_unified.c @@ -68,7 +68,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_command_buf_idx) \ g_wmi_command_buf_idx = 0; \ wmi_command_log_buffer[g_wmi_command_buf_idx].command = a; \ - cdf_mem_copy(wmi_command_log_buffer[g_wmi_command_buf_idx].data, b, 16); \ + qdf_mem_copy(wmi_command_log_buffer[g_wmi_command_buf_idx].data, b, 16); \ wmi_command_log_buffer[g_wmi_command_buf_idx].time = \ qdf_get_log_timestamp(); \ g_wmi_command_buf_idx++; \ @@ -78,7 +78,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_command_tx_cmp_buf_idx) \ g_wmi_command_tx_cmp_buf_idx = 0; \ wmi_command_tx_cmp_log_buffer[g_wmi_command_tx_cmp_buf_idx].command = a; \ - cdf_mem_copy(wmi_command_tx_cmp_log_buffer \ + qdf_mem_copy(wmi_command_tx_cmp_log_buffer \ [g_wmi_command_tx_cmp_buf_idx].data, b, 16); \ wmi_command_tx_cmp_log_buffer[g_wmi_command_tx_cmp_buf_idx].time = \ qdf_get_log_timestamp(); \ @@ -89,7 +89,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_event_buf_idx) \ g_wmi_event_buf_idx = 0; \ wmi_event_log_buffer[g_wmi_event_buf_idx].event = a; \ - cdf_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b, 16); \ + qdf_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b, 16); \ wmi_event_log_buffer[g_wmi_event_buf_idx].time = \ qdf_get_log_timestamp(); \ g_wmi_event_buf_idx++; \ @@ -99,7 +99,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_rx_event_buf_idx) \ g_wmi_rx_event_buf_idx = 0; \ wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].event = a; \ - cdf_mem_copy(wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].data, b, 16); \ + qdf_mem_copy(wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].data, b, 16); \ wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].time = \ qdf_get_log_timestamp(); \ g_wmi_rx_event_buf_idx++; \ @@ -126,7 +126,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; g_wmi_mgmt_command_buf_idx) \ g_wmi_mgmt_command_buf_idx = 0; \ wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].command = a; \ - cdf_mem_copy( \ + qdf_mem_copy( \ wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].data,\ b, 16); \ wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].time = \ @@ -140,7 +140,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; g_wmi_mgmt_command_tx_cmp_buf_idx = 0; \ wmi_mgmt_command_tx_cmp_log_buffer[g_wmi_mgmt_command_tx_cmp_buf_idx].\ command = a; \ - cdf_mem_copy(wmi_mgmt_command_tx_cmp_log_buffer \ + qdf_mem_copy(wmi_mgmt_command_tx_cmp_log_buffer \ [g_wmi_mgmt_command_tx_cmp_buf_idx].data, b, 16); \ wmi_mgmt_command_tx_cmp_log_buffer[g_wmi_mgmt_command_tx_cmp_buf_idx].\ time =\ @@ -152,7 +152,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; if (WMI_MGMT_EVENT_DEBUG_MAX_ENTRY <= g_wmi_mgmt_event_buf_idx) \ g_wmi_mgmt_event_buf_idx = 0; \ wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].event = a; \ - cdf_mem_copy(wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].data,\ + qdf_mem_copy(wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].data,\ b, 16); \ wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].time = \ qdf_get_log_timestamp(); \ @@ -844,7 +844,7 @@ int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, int len, return -EBUSY; } - pkt = cdf_mem_malloc(sizeof(*pkt)); + pkt = qdf_mem_malloc(sizeof(*pkt)); if (!pkt) { qdf_atomic_dec(&wmi_handle->pending_cmds); pr_err("%s, Failed to alloc htc packet %x, no memory\n", @@ -1312,7 +1312,7 @@ void wmi_htc_tx_complete(void *ctx, HTC_PACKET *htc_pkt) qdf_spin_unlock_bh(&wmi_handle->wmi_record_lock); #endif cdf_nbuf_free(wmi_cmd_buf); - cdf_mem_free(htc_pkt); + qdf_mem_free(htc_pkt); qdf_atomic_dec(&wmi_handle->pending_cmds); } |
