|
@@ -47,7 +47,7 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
|
|
|
qdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx));
|
|
|
|
|
|
if (NULL == pSession->ftSmeContext.pUsrCtx) {
|
|
|
- sms_log(pMac, LOGE, FL("Memory allocation failure"));
|
|
|
+ sme_err("Memory allocation failure");
|
|
|
return;
|
|
|
}
|
|
|
pSession->ftSmeContext.pUsrCtx->pMac = pMac;
|
|
@@ -61,9 +61,7 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
|
|
|
(void *)pSession->ftSmeContext.pUsrCtx);
|
|
|
|
|
|
if (QDF_STATUS_SUCCESS != status) {
|
|
|
- sms_log(pMac, LOGE,
|
|
|
- FL
|
|
|
- ("Preauth Reassoc interval Timer allocation failed"));
|
|
|
+ sme_err("Preauth Reassoc interval Timer allocation failed");
|
|
|
qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
|
|
|
pSession->ftSmeContext.pUsrCtx = NULL;
|
|
|
return;
|
|
@@ -95,14 +93,9 @@ void sme_ft_close(tHalHandle hHal, uint32_t sessionId)
|
|
|
if (QDF_STATUS_SUCCESS !=
|
|
|
qdf_mc_timer_destroy(&pSession->ftSmeContext.
|
|
|
preAuthReassocIntvlTimer)) {
|
|
|
- sms_log(pMac, LOGE,
|
|
|
- FL("preAuthReAssocTimer destroy failed"));
|
|
|
}
|
|
|
|
|
|
if (pSession->ftSmeContext.pUsrCtx != NULL) {
|
|
|
- sms_log(pMac, LOG1,
|
|
|
- FL
|
|
|
- ("Freeing ftSmeContext.pUsrCtx and setting to NULL"));
|
|
|
qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
|
|
|
pSession->ftSmeContext.pUsrCtx = NULL;
|
|
|
}
|
|
@@ -148,7 +141,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
if (NULL == session || NULL == ft_ies) {
|
|
|
- sms_log(mac_ctx, LOGE, FL(" ft ies or session is NULL"));
|
|
|
+ sme_err("ft ies or session is NULL");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -156,8 +149,8 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
if (!(QDF_IS_STATUS_SUCCESS(status)))
|
|
|
return;
|
|
|
|
|
|
- sms_log(mac_ctx, LOG1, "FT IEs Req is received in state %d",
|
|
|
- session->ftSmeContext.FTState);
|
|
|
+ sme_debug("FT IEs Req is received in state %d",
|
|
|
+ session->ftSmeContext.FTState);
|
|
|
|
|
|
/* Global Station FT State */
|
|
|
switch (session->ftSmeContext.FTState) {
|
|
@@ -174,8 +167,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
session->ftSmeContext.auth_ft_ies =
|
|
|
qdf_mem_malloc(ft_ies_length);
|
|
|
if (NULL == session->ftSmeContext.auth_ft_ies) {
|
|
|
- sms_log(mac_ctx, LOGE,
|
|
|
- FL("Mem alloc failed for auth_ft_ies"));
|
|
|
+ sme_err("Mem alloc failed for auth_ft_ies");
|
|
|
sme_release_global_lock(&mac_ctx->sme);
|
|
|
return;
|
|
|
}
|
|
@@ -184,8 +176,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
ft_ies, ft_ies_length);
|
|
|
session->ftSmeContext.FTState = eFT_AUTH_REQ_READY;
|
|
|
|
|
|
- sms_log(mac_ctx, LOG1,
|
|
|
- FL("ft_ies_length=%d"), ft_ies_length);
|
|
|
+ sme_debug("ft_ies_length: %d", ft_ies_length);
|
|
|
break;
|
|
|
|
|
|
case eFT_AUTH_COMPLETE:
|
|
@@ -197,12 +188,10 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
* pre-auth list. Delete the pre-auth node locally. Set
|
|
|
* your self back to restart pre-auth
|
|
|
*/
|
|
|
- sms_log(mac_ctx, LOG1,
|
|
|
- FL("Preauth done & rcving AUTHREQ in state %d"),
|
|
|
- session->ftSmeContext.FTState);
|
|
|
- sms_log(mac_ctx, LOG1,
|
|
|
- FL("Unhandled reception of FT IES in state %d"),
|
|
|
- session->ftSmeContext.FTState);
|
|
|
+ sme_debug("Preauth done & rcving AUTHREQ in state %d",
|
|
|
+ session->ftSmeContext.FTState);
|
|
|
+ sme_debug("Unhandled reception of FT IES in state %d",
|
|
|
+ session->ftSmeContext.FTState);
|
|
|
break;
|
|
|
|
|
|
case eFT_REASSOC_REQ_WAIT:
|
|
@@ -211,7 +200,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
* reassoc req. This is the new FT Roaming in place At
|
|
|
* this juncture we'r ready to start sending Reassoc req
|
|
|
*/
|
|
|
- sms_log(mac_ctx, LOG1, FL("New Reassoc Req=%p in state %d"),
|
|
|
+ sme_debug("New Reassoc Req: %p in state %d",
|
|
|
ft_ies, session->ftSmeContext.FTState);
|
|
|
if ((session->ftSmeContext.reassoc_ft_ies) &&
|
|
|
(session->ftSmeContext.reassoc_ft_ies_length)) {
|
|
@@ -223,8 +212,7 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
session->ftSmeContext.reassoc_ft_ies =
|
|
|
qdf_mem_malloc(ft_ies_length);
|
|
|
if (NULL == session->ftSmeContext.reassoc_ft_ies) {
|
|
|
- sms_log(mac_ctx, LOGE,
|
|
|
- FL("Mem alloc fail for reassoc_ft_ie"));
|
|
|
+ sme_err("Mem alloc fail for reassoc_ft_ie");
|
|
|
sme_release_global_lock(&mac_ctx->sme);
|
|
|
return;
|
|
|
}
|
|
@@ -234,15 +222,13 @@ void sme_set_ft_ies(tHalHandle hal_ptr, uint32_t session_id,
|
|
|
ft_ies, ft_ies_length);
|
|
|
|
|
|
session->ftSmeContext.FTState = eFT_SET_KEY_WAIT;
|
|
|
- sms_log(mac_ctx, LOG1,
|
|
|
- FL("ft_ies_length=%d state=%d"), ft_ies_length,
|
|
|
- session->ftSmeContext.FTState);
|
|
|
+ sme_debug("ft_ies_length: %d state: %d", ft_ies_length,
|
|
|
+ session->ftSmeContext.FTState);
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- sms_log(mac_ctx, LOGE, FL("Unhandled state=%d"),
|
|
|
- session->ftSmeContext.FTState);
|
|
|
+ sme_warn("Unhandled state: %d", session->ftSmeContext.FTState);
|
|
|
break;
|
|
|
}
|
|
|
sme_release_global_lock(&mac_ctx->sme);
|
|
@@ -267,13 +253,11 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id,
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
tSirKeyMaterial *keymaterial = NULL;
|
|
|
tAniEdType ed_type;
|
|
|
- tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
|
|
|
|
|
- sms_log(mac_ctx, LOG1, FL("keyLength %d"), ftkey_info->keyLength);
|
|
|
+ sme_debug("keyLength: %d", ftkey_info->keyLength);
|
|
|
|
|
|
if (ftkey_info->keyLength > CSR_MAX_KEY_LEN) {
|
|
|
- sms_log(mac_ctx, LOGE, FL("invalid keyLength %d"),
|
|
|
- ftkey_info->keyLength);
|
|
|
+ sme_err("invalid keyLength: %d", ftkey_info->keyLength);
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
msglen = sizeof(tSirFTUpdateKeyInfo);
|
|
@@ -305,8 +289,7 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id,
|
|
|
|
|
|
qdf_copy_macaddr(&msg->bssid, &ftkey_info->peerMac);
|
|
|
msg->smeSessionId = session_id;
|
|
|
- sms_log(mac_ctx, LOG1, "BSSID = " MAC_ADDRESS_STR,
|
|
|
- MAC_ADDR_ARRAY(msg->bssid.bytes));
|
|
|
+ sme_debug("BSSID = " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(msg->bssid.bytes));
|
|
|
status = umac_send_mb_message_to_mac(msg);
|
|
|
|
|
|
return status;
|
|
@@ -318,7 +301,7 @@ bool sme_get_ftptk_state(tHalHandle hHal, uint32_t sessionId)
|
|
|
tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
|
|
|
|
|
|
if (!pSession) {
|
|
|
- sms_log(pMac, LOGE, FL("pSession is NULL"));
|
|
|
+ sme_err("pSession is NULL");
|
|
|
return false;
|
|
|
}
|
|
|
return pSession->ftSmeContext.setFTPTKState;
|
|
@@ -330,7 +313,7 @@ void sme_set_ftptk_state(tHalHandle hHal, uint32_t sessionId, bool state)
|
|
|
tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
|
|
|
|
|
|
if (!pSession) {
|
|
|
- sms_log(pMac, LOGE, FL("pSession is NULL"));
|
|
|
+ sme_err("pSession is NULL");
|
|
|
return;
|
|
|
}
|
|
|
pSession->ftSmeContext.setFTPTKState = state;
|
|
@@ -344,12 +327,12 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
if (!pSession) {
|
|
|
- sms_log(pMac, LOGE, FL("pSession is NULL"));
|
|
|
+ sme_err("pSession is NULL");
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
if (pFTKeyInfo == NULL) {
|
|
|
- sms_log(pMac, LOGE, "%s: pFTKeyInfo is NULL", __func__);
|
|
|
+ sme_err("pFTKeyInfo is NULL");
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
@@ -357,8 +340,8 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
|
|
|
if (!(QDF_IS_STATUS_SUCCESS(status))) {
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
- sms_log(pMac, LOG1, "sme_ft_update_key is received in state %d",
|
|
|
- pSession->ftSmeContext.FTState);
|
|
|
+ sme_debug("sme_ft_update_key is received in state %d",
|
|
|
+ pSession->ftSmeContext.FTState);
|
|
|
|
|
|
/* Global Station FT State */
|
|
|
switch (pSession->ftSmeContext.FTState) {
|
|
@@ -367,27 +350,24 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
|
|
|
status =
|
|
|
sme_ft_send_update_key_ind(pMac, sessionId, pFTKeyInfo);
|
|
|
if (status != 0) {
|
|
|
- sms_log(pMac, LOGE, "%s: Key set failure %d",
|
|
|
- __func__, status);
|
|
|
+ sme_err("Key set failure: %d", status);
|
|
|
pSession->ftSmeContext.setFTPTKState = false;
|
|
|
status = QDF_STATUS_FT_PREAUTH_KEY_FAILED;
|
|
|
} else {
|
|
|
pSession->ftSmeContext.setFTPTKState = true;
|
|
|
status = QDF_STATUS_FT_PREAUTH_KEY_SUCCESS;
|
|
|
- sms_log(pMac, LOG1, "%s: Key set success",
|
|
|
- __func__);
|
|
|
+ sme_debug("Key set success");
|
|
|
}
|
|
|
sme_set_ft_pre_auth_state(hHal, sessionId, false);
|
|
|
}
|
|
|
|
|
|
pSession->ftSmeContext.FTState = eFT_START_READY;
|
|
|
- sms_log(pMac, LOG1, "%s: state changed to %d status %d",
|
|
|
- __func__, pSession->ftSmeContext.FTState, status);
|
|
|
+ sme_debug("state changed to %d status %d",
|
|
|
+ pSession->ftSmeContext.FTState, status);
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- sms_log(pMac, LOGW, "%s: Unhandled state=%d", __func__,
|
|
|
- pSession->ftSmeContext.FTState);
|
|
|
+ sme_warn("Unhandled state: %d", pSession->ftSmeContext.FTState);
|
|
|
status = QDF_STATUS_E_FAILURE;
|
|
|
break;
|
|
|
}
|
|
@@ -412,7 +392,7 @@ void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId,
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
if (!pSession) {
|
|
|
- sms_log(pMac, LOGE, FL("pSession is NULL"));
|
|
|
+ sme_err("pSession is NULL");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -444,7 +424,7 @@ void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId,
|
|
|
|
|
|
pSession->ftSmeContext.FTState = eFT_REASSOC_REQ_WAIT;
|
|
|
|
|
|
- sms_log(pMac, LOG1, FL(" Filled auth resp = %d"), *ft_ies_length);
|
|
|
+ sme_debug("Filled auth resp: %d", *ft_ies_length);
|
|
|
sme_release_global_lock(&pMac->sme);
|
|
|
return;
|
|
|
}
|
|
@@ -464,7 +444,7 @@ void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies,
|
|
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
if (!pSession) {
|
|
|
- sms_log(pMac, LOGE, FL("pSession is NULL"));
|
|
|
+ sme_err("pSession is NULL");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -488,7 +468,7 @@ void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies,
|
|
|
*ric_ies_length =
|
|
|
pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies_length;
|
|
|
|
|
|
- sms_log(pMac, LOG1, FL(" Filled ric ies = %d"), *ric_ies_length);
|
|
|
+ sme_debug("Filled ric ies: %d", *ric_ies_length);
|
|
|
|
|
|
sme_release_global_lock(&pMac->sme);
|
|
|
return;
|
|
@@ -530,27 +510,18 @@ void sme_ft_reset(tHalHandle hHal, uint32_t sessionId)
|
|
|
pSession = CSR_GET_SESSION(pMac, sessionId);
|
|
|
if (NULL != pSession) {
|
|
|
if (pSession->ftSmeContext.auth_ft_ies != NULL) {
|
|
|
- sms_log(pMac, LOG1,
|
|
|
- FL("Free FT Auth IE %p and set to NULL"),
|
|
|
- pSession->ftSmeContext.auth_ft_ies);
|
|
|
qdf_mem_free(pSession->ftSmeContext.auth_ft_ies);
|
|
|
pSession->ftSmeContext.auth_ft_ies = NULL;
|
|
|
}
|
|
|
pSession->ftSmeContext.auth_ft_ies_length = 0;
|
|
|
|
|
|
if (pSession->ftSmeContext.reassoc_ft_ies != NULL) {
|
|
|
- sms_log(pMac, LOG1,
|
|
|
- FL("Free FT Reassoc IE %p and set to NULL"),
|
|
|
- pSession->ftSmeContext.reassoc_ft_ies);
|
|
|
qdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies);
|
|
|
pSession->ftSmeContext.reassoc_ft_ies = NULL;
|
|
|
}
|
|
|
pSession->ftSmeContext.reassoc_ft_ies_length = 0;
|
|
|
|
|
|
if (pSession->ftSmeContext.psavedFTPreAuthRsp != NULL) {
|
|
|
- sms_log(pMac, LOG1,
|
|
|
- FL("Free FtPreAuthRsp %p and set to NULL"),
|
|
|
- pSession->ftSmeContext.psavedFTPreAuthRsp);
|
|
|
qdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp);
|
|
|
pSession->ftSmeContext.psavedFTPreAuthRsp = NULL;
|
|
|
}
|