qcacld-3.0: Add QDF utils
Replace CDF utils with QDF utils.
Change-Id: Ib6b3ad56b3268b1be438f3204f91d995f8bb3900
CRs-Fixed: 981188
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index d8dae1f..074ba2f 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -755,7 +755,7 @@
lim_log(pMac, LOGW,
FL("Lim Posting DEAUTH_CNF to Sme. Trigger: %d"),
mlmStaContext.cleanupTrigger);
- cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr, &sta_dsaddr);
+ qdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr, &sta_dsaddr);
mlmDeauthCnf.resultCode = statusCode;
mlmDeauthCnf.deauthTrigger = mlmStaContext.cleanupTrigger;
/* PE session Id */
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index b0c042c..ea9da9d 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -1494,7 +1494,7 @@
extSetStaKeyParam;
cdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq));
- cdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
+ qdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
&pKeyInfo->bssid);
pMlmSetKeysReq->sessionId = psessionEntry->peSessionId;
pMlmSetKeysReq->smesessionId = psessionEntry->smeSessionId;
@@ -1545,7 +1545,7 @@
FL("BSSID = " MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(pKeyInfo->bssid.bytes));)
- cdf_copy_macaddr(&pAddBssParams->extSetStaKeyParam.peer_macaddr,
+ qdf_copy_macaddr(&pAddBssParams->extSetStaKeyParam.peer_macaddr,
&pKeyInfo->bssid);
pAddBssParams->extSetStaKeyParam.sendRsp = false;
diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c
index 3a7dba6..443f932 100644
--- a/core/mac/src/pe/lim/lim_p2p.c
+++ b/core/mac/src/pe/lim/lim_p2p.c
@@ -98,10 +98,10 @@
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
- cdf_copy_macaddr(&pScanOffloadReq->selfMacAddr,
+ qdf_copy_macaddr(&pScanOffloadReq->selfMacAddr,
&pRemOnChnReq->selfMacAddr);
- cdf_set_macaddr_broadcast(&pScanOffloadReq->bssId);
+ qdf_set_macaddr_broadcast(&pScanOffloadReq->bssId);
pScanOffloadReq->scanType = eSIR_PASSIVE_SCAN;
pScanOffloadReq->p2pScanType = P2P_SCAN_TYPE_LISTEN;
pScanOffloadReq->minChannelTime = pRemOnChnReq->duration;
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 8bc3232..8b11676 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -389,7 +389,7 @@
}
/* Now copy over the information to the OEM DATA REQ to HAL */
- cdf_copy_macaddr(&start_oem_data_req->selfMacAddr,
+ qdf_copy_macaddr(&start_oem_data_req->selfMacAddr,
&mac_ctx->lim.gpLimMlmOemDataReq->selfMacAddr);
start_oem_data_req->data_len =
@@ -1618,7 +1618,7 @@
switch (GET_LIM_SYSTEM_ROLE(session)) {
case eLIM_STA_ROLE:
case eLIM_BT_AMP_STA_ROLE:
- if (!cdf_is_macaddr_equal(&mlm_disassocreq->peer_macaddr,
+ if (!qdf_is_macaddr_equal(&mlm_disassocreq->peer_macaddr,
&curr_bssid)) {
lim_log(mac_ctx, LOGW,
FL("received MLM_DISASSOC_REQ with invalid BSS id"));
@@ -1650,7 +1650,7 @@
sme_disassoc_rsp->transactionId = 0;
sme_disassoc_rsp->statusCode = eSIR_SME_DEAUTH_STATUS;
- cdf_copy_macaddr(&sme_disassoc_rsp->peer_macaddr,
+ qdf_copy_macaddr(&sme_disassoc_rsp->peer_macaddr,
&mlm_disassocreq->peer_macaddr);
msg = (uint32_t *)sme_disassoc_rsp;
@@ -2147,7 +2147,7 @@
session, true);
return;
end:
- cdf_copy_macaddr(&mlm_deauth_cnf.peer_macaddr,
+ qdf_copy_macaddr(&mlm_deauth_cnf.peer_macaddr,
&mlm_deauth_req->peer_macaddr);
mlm_deauth_cnf.deauthTrigger = mlm_deauth_req->deauthTrigger;
mlm_deauth_cnf.aid = mlm_deauth_req->aid;
@@ -2271,9 +2271,9 @@
* check if TDLS is enabled.
*/
#ifndef FEATURE_WLAN_TDLS
- if ((!cdf_is_macaddr_broadcast(
+ if ((!qdf_is_macaddr_broadcast(
&mlm_set_keys_req->peer_macaddr)) &&
- (!cdf_is_macaddr_equal(&mlm_set_keys_req->peer_macaddr,
+ (!qdf_is_macaddr_equal(&mlm_set_keys_req->peer_macaddr,
&curr_bssid))) {
lim_log(mac_ctx, LOGW,
FL("Received MLM_SETKEYS_REQ with invalid BSSID"
@@ -2306,7 +2306,7 @@
* mlm_set_keys_req->key.unicast = 0 -> Multicast/broadcast
* mlm_set_keys_req->key.unicast - 1 -> Unicast keys are being set
*/
- if (cdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
+ if (qdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
lim_log(mac_ctx, LOG1, FL("Trying to set Group Keys...%d "),
mlm_set_keys_req->sessionId);
/*
@@ -2379,7 +2379,7 @@
FL("Trying to set keys for STA Index [%d], using default_key_id [%d]"),
sta_idx, default_key_id);
- if (cdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
+ if (qdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
session->limPrevMlmState = session->limMlmState;
session->limMlmState = eLIM_MLM_WT_SET_BSS_KEY_STATE;
MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE,
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index ea57afd..04edc0c 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -3260,7 +3260,7 @@
(tpLimMlmSetKeysReq) mac_ctx->lim.gpLimMlmSetKeysReq;
/* Prepare and Send LIM_MLM_SETKEYS_CNF */
if (NULL != lpLimMlmSetKeysReq) {
- cdf_copy_macaddr(&mlm_set_key_cnf.peer_macaddr,
+ qdf_copy_macaddr(&mlm_set_key_cnf.peer_macaddr,
&lpLimMlmSetKeysReq->peer_macaddr);
/*
* Free the buffer cached for the global
@@ -3348,7 +3348,7 @@
/* Prepare and Send LIM_MLM_SETKEYS_CNF */
if (NULL != set_key_req) {
- cdf_copy_macaddr(&set_key_cnf.peer_macaddr,
+ qdf_copy_macaddr(&set_key_cnf.peer_macaddr,
&set_key_req->peer_macaddr);
/*
* Free the buffer cached for the
diff --git a/core/mac/src/pe/lim/lim_process_probe_req_frame.c b/core/mac/src/pe/lim/lim_process_probe_req_frame.c
index 2812253..b270237 100644
--- a/core/mac/src/pe/lim/lim_process_probe_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_probe_req_frame.c
@@ -81,7 +81,7 @@
cur_time = (uint32_t) (cdf_mc_timer_get_system_ticks() /
QDF_TICKS_PER_SECOND);
- cdf_zero_macaddr(&addr);
+ qdf_zero_macaddr(&addr);
cdf_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)
@@ -89,7 +89,7 @@
count++;
if (count > 1)
break;
- cdf_copy_macaddr(&addr, &pbc->addr);
+ qdf_copy_macaddr(&addr, &pbc->addr);
cdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e,
SIR_WPS_UUID_LEN);
}
@@ -159,7 +159,7 @@
prev = pbc = session_entry->pAPWPSPBCSession;
while (pbc) {
- if (cdf_is_macaddr_equal(&pbc->addr, &remove_mac)) {
+ if (qdf_is_macaddr_equal(&pbc->addr, &remove_mac)) {
prev->next = pbc->next;
if (pbc == session_entry->pAPWPSPBCSession)
session_entry->pAPWPSPBCSession = pbc->next;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 4111fbb..60cd82f 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -358,7 +358,7 @@
static inline uint8_t __lim_is_sme_assoc_cnf_valid(tpSirSmeAssocCnf pAssocCnf)
{
- if (cdf_is_macaddr_group(&pAssocCnf->peer_macaddr))
+ if (qdf_is_macaddr_group(&pAssocCnf->peer_macaddr))
return false;
else
return true;
@@ -1232,7 +1232,7 @@
msg.bodyptr = pScanOffloadReq;
msg.bodyval = 0;
- cdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
+ qdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
if (pScanReq->numSsid > SIR_SCAN_MAX_NUM_SSID) {
lim_log(pMac, LOGE,
@@ -1251,7 +1251,7 @@
}
pScanOffloadReq->hiddenSsid = pScanReq->hiddenSsid;
- cdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
+ qdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
pScanOffloadReq->bssType = pScanReq->bssType;
pScanOffloadReq->dot11mode = pScanReq->dot11mode;
pScanOffloadReq->scanType = pScanReq->scanType;
@@ -1461,7 +1461,7 @@
return;
}
- cdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr,
+ qdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr,
&pOemDataReq->selfMacAddr);
pMlmOemDataReq->data_len = pOemDataReq->data_len;
cdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data,
@@ -2538,7 +2538,7 @@
return;
}
- cdf_copy_macaddr(&pMlmDisassocReq->peer_macaddr,
+ qdf_copy_macaddr(&pMlmDisassocReq->peer_macaddr,
&smeDisassocReq.peer_macaddr);
pMlmDisassocReq->reasonCode = reasonCode;
@@ -2874,7 +2874,7 @@
return;
}
- cdf_copy_macaddr(&mlm_deauth_req->peer_macaddr,
+ qdf_copy_macaddr(&mlm_deauth_req->peer_macaddr,
&sme_deauth_req.peer_macaddr);
mlm_deauth_req->reasonCode = reason_code;
@@ -2990,7 +2990,7 @@
"no.of keys exceeded max num of default keys limit"));
goto end;
}
- cdf_copy_macaddr(&mlm_set_key_req->peer_macaddr,
+ qdf_copy_macaddr(&mlm_set_key_req->peer_macaddr,
&set_context_req->peer_macaddr);
cdf_mem_copy((uint8_t *) &mlm_set_key_req->key,
@@ -3211,7 +3211,7 @@
sap_event.sapHddEventCode = eSAP_GET_WPSPBC_SESSION_EVENT;
sap_get_wpspbc_event->module = QDF_MODULE_ID_PE;
- if (cdf_is_macaddr_zero(&get_wps_pbc_sessions_req.remove_mac)) {
+ if (qdf_is_macaddr_zero(&get_wps_pbc_sessions_req.remove_mac)) {
lim_get_wpspbc_sessions(mac_ctx,
sap_get_wpspbc_event->addr,
sap_get_wpspbc_event->UUID_E,
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index d373967..ed749a9 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -2862,7 +2862,7 @@
}
pTdlsLinkEstablishReqRsp->statusCode = status;
if (peermac)
- cdf_copy_macaddr(&pTdlsLinkEstablishReqRsp->peermac, peermac);
+ qdf_copy_macaddr(&pTdlsLinkEstablishReqRsp->peermac, peermac);
pTdlsLinkEstablishReqRsp->sessionId = sessionId;
mmhMsg.type = eWNI_SME_TDLS_LINK_ESTABLISH_RSP;
@@ -2898,7 +2898,7 @@
} else
pDelSta->staId = STA_INVALID_IDX;
- cdf_copy_macaddr(&pDelSta->peermac, &peerMac);
+ qdf_copy_macaddr(&pDelSta->peermac, &peerMac);
pDelSta->length = sizeof(tSirTdlsDelStaRsp);
pDelSta->messageType = eWNI_SME_TDLS_DEL_STA_RSP;
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index 40d5132..aa1f8ff 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -108,7 +108,7 @@
return false;
} else
- return ((algoEnable > 0 ? true : false));
+ return algoEnable > 0 ? true : false;
} else {
if (LIM_IS_AP_ROLE(psessionEntry)) {
@@ -138,8 +138,7 @@
} else
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED,
- &privacyOptImp) != eSIR_SUCCESS)
- {
+ &privacyOptImp) != eSIR_SUCCESS) {
/**
* Could not get PrivacyOptionImplemented value
* from CFG. Log error.
@@ -150,7 +149,7 @@
return false;
}
- return (algoEnable && privacyOptImp);
+ return algoEnable && privacyOptImp;
}
} /****** end lim_is_auth_algo_supported() ******/
@@ -775,7 +774,7 @@
tLimMlmSetKeysCnf *mlmSetKeysCnf)
{
/* Prepare and Send LIM_MLM_SETKEYS_CNF */
- cdf_copy_macaddr(&mlmSetKeysCnf->peer_macaddr,
+ qdf_copy_macaddr(&mlmSetKeysCnf->peer_macaddr,
&pMlmSetKeysReq->peer_macaddr);
/* Free up buffer allocated for mlmSetKeysReq */
@@ -882,7 +881,8 @@
lim_log(pMac, LOGW, FL("Sending WMA_SET_BSSKEY_REQ..."));
MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
- if (eSIR_SUCCESS != (retCode = wma_post_ctrl_msg(pMac, &msgQ))) {
+ retCode = wma_post_ctrl_msg(pMac, &msgQ);
+ if (eSIR_SUCCESS != retCode) {
lim_log(pMac, LOGE,
FL("Posting SET_BSSKEY to HAL failed, reason=%X"),
retCode);
@@ -964,7 +964,7 @@
pSetStaKeyParams->defWEPIdx = defWEPIdx;
pSetStaKeyParams->smesessionId = pMlmSetKeysReq->smesessionId;
- cdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
+ qdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
&pMlmSetKeysReq->peer_macaddr);
if (sendRsp == true) {
@@ -1056,7 +1056,8 @@
lim_log(pMac, LOG1, FL("Sending WMA_SET_STAKEY_REQ..."));
MTRACE(mac_trace_msg_tx(pMac, sessionEntry->peSessionId, msgQ.type));
- if (eSIR_SUCCESS != (retCode = wma_post_ctrl_msg(pMac, &msgQ))) {
+ retCode = wma_post_ctrl_msg(pMac, &msgQ);
+ if (eSIR_SUCCESS != retCode) {
lim_log(pMac, LOGE,
FL("Posting SET_STAKEY to HAL failed, reason=%X"),
retCode);
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 44eb433..b108064 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -3111,7 +3111,7 @@
}
return QDF_STATUS_SUCCESS;
end:
- cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr,
+ qdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr,
&pMlmDeauthReq->peer_macaddr);
mlmDeauthCnf.deauthTrigger = pMlmDeauthReq->deauthTrigger;
mlmDeauthCnf.aid = pMlmDeauthReq->aid;
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 54dcee7..f793449 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -1581,7 +1581,7 @@
pSirSmeSetContextRsp->length = sizeof(tSirSmeSetContextRsp);
pSirSmeSetContextRsp->statusCode = resultCode;
- cdf_copy_macaddr(&pSirSmeSetContextRsp->peer_macaddr, &peer_macaddr);
+ qdf_copy_macaddr(&pSirSmeSetContextRsp->peer_macaddr, &peer_macaddr);
/* Update SME session and transaction Id */
pSirSmeSetContextRsp->sessionId = smesessionId;
@@ -1769,7 +1769,7 @@
if (psessionEntry != NULL) {
rsp->aid = delts->aid;
- cdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
+ qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
sizeof(tSirDeltsReqInfo));
}
diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c
index 9f38251..88c021e 100644
--- a/core/mac/src/pe/lim/lim_sme_req_utils.c
+++ b/core/mac/src/pe/lim/lim_sme_req_utils.c
@@ -585,8 +585,8 @@
tpSirSmeDisassocReq pDisassocReq,
tpPESession psessionEntry)
{
- if (cdf_is_macaddr_group(&pDisassocReq->peer_macaddr) &&
- !cdf_is_macaddr_broadcast(&pDisassocReq->peer_macaddr))
+ if (qdf_is_macaddr_group(&pDisassocReq->peer_macaddr) &&
+ !qdf_is_macaddr_broadcast(&pDisassocReq->peer_macaddr))
return false;
return true;
@@ -618,7 +618,7 @@
tpSirSmeDisassocCnf pDisassocCnf,
tpPESession psessionEntry)
{
- if (cdf_is_macaddr_group(&pDisassocCnf->peer_macaddr))
+ if (qdf_is_macaddr_group(&pDisassocCnf->peer_macaddr))
return false;
return true;
@@ -648,8 +648,8 @@
lim_is_sme_deauth_req_valid(tpAniSirGlobal pMac, tpSirSmeDeauthReq pDeauthReq,
tpPESession psessionEntry)
{
- if (cdf_is_macaddr_group(&pDeauthReq->peer_macaddr) &&
- !cdf_is_macaddr_broadcast(&pDeauthReq->peer_macaddr))
+ if (qdf_is_macaddr_group(&pDeauthReq->peer_macaddr) &&
+ !qdf_is_macaddr_broadcast(&pDeauthReq->peer_macaddr))
return false;
return true;
@@ -699,8 +699,8 @@
lim_log(pMac, LOGE, FL("Invalid BSS Type"));
valid = false;
}
- if (cdf_is_macaddr_group(&pScanReq->bssId) &&
- !cdf_is_macaddr_broadcast(&pScanReq->bssId)) {
+ if (qdf_is_macaddr_group(&pScanReq->bssId) &&
+ !qdf_is_macaddr_broadcast(&pScanReq->bssId)) {
valid = false;
lim_log(pMac, LOGE,
FL("BSSID is group addr and is not Broadcast Addr"));
@@ -923,5 +923,5 @@
pBuf += sizeof(uint16_t); /* skip length of BSS description */
- return (pBuf);
+ return pBuf;
} /*** end lim_get_bss_id_from_sme_join_req_msg() ***/
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 2971942..05af857 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -216,7 +216,7 @@
tpPESession pSessionEntry;
uint8_t sessionId, i;
- if (cdf_is_macaddr_broadcast(&pMaxTxParams->bssId)) {
+ if (qdf_is_macaddr_broadcast(&pMaxTxParams->bssId)) {
for (i = 0; i < pMac->lim.maxBssId; i++) {
if ((pMac->lim.gpSession[i].valid == true)) {
pSessionEntry = &pMac->lim.gpSession[i];