mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: Add QDF mem API's
Replace CDF mem API's with QDF mem API's Change-Id: Icf247b4dc5b26f4b960dcb98e323b096c1d6076c CRs-Fixed: 981188
This commit is contained in:
parent
df2b26883d
commit
600c3a00be
167 changed files with 4972 additions and 6125 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) */
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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]));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -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() ***/
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) !=
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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)"),
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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() ******/
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue