qcacld-3.0: Fix kernel checkpatch warnings in sme_ft_api.c

Fix kernel checkpatch warnings in sme_ft_api.c

Change-Id: I77e1c833d7a5a4a06e1e4d174bad35188bb21995
CRs-Fixed: 2025503
这个提交包含在:
Nishank Aggarwal
2017-04-04 12:46:22 +05:30
提交者 snandini
父节点 d3485ed710
当前提交 359dde8ae0

查看文件

@@ -30,9 +30,7 @@
#include <csr_neighbor_roam.h> #include <csr_neighbor_roam.h>
#include <sir_api.h> #include <sir_api.h>
/*-------------------------------------------------------------------------- /* Initialize the FT context. */
Initialize the FT context.
------------------------------------------------------------------------*/
void sme_ft_open(tHalHandle hHal, uint32_t sessionId) void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
{ {
tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -57,8 +55,8 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
qdf_mc_timer_init(&pSession->ftSmeContext. qdf_mc_timer_init(&pSession->ftSmeContext.
preAuthReassocIntvlTimer, preAuthReassocIntvlTimer,
QDF_TIMER_TYPE_SW, QDF_TIMER_TYPE_SW,
sme_preauth_reassoc_intvl_timer_callback, sme_preauth_reassoc_intvl_timer_callback,
(void *)pSession->ftSmeContext.pUsrCtx); (void *)pSession->ftSmeContext.pUsrCtx);
if (QDF_STATUS_SUCCESS != status) { if (QDF_STATUS_SUCCESS != status) {
sme_err("Preauth Reassoc interval Timer allocation failed"); sme_err("Preauth Reassoc interval Timer allocation failed");
@@ -69,9 +67,7 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId)
} }
} }
/*-------------------------------------------------------------------------- /* Cleanup the SME FT Global context. */
Cleanup the SME FT Global context.
------------------------------------------------------------------------*/
void sme_ft_close(tHalHandle hHal, uint32_t sessionId) void sme_ft_close(tHalHandle hHal, uint32_t sessionId)
{ {
tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -90,10 +86,8 @@ void sme_ft_close(tHalHandle hHal, uint32_t sessionId)
preAuthReassocIntvlTimer); preAuthReassocIntvlTimer);
} }
if (QDF_STATUS_SUCCESS != qdf_mc_timer_destroy(&pSession->ftSmeContext.
qdf_mc_timer_destroy(&pSession->ftSmeContext. preAuthReassocIntvlTimer);
preAuthReassocIntvlTimer)) {
}
if (pSession->ftSmeContext.pUsrCtx != NULL) { if (pSession->ftSmeContext.pUsrCtx != NULL) {
qdf_mem_free(pSession->ftSmeContext.pUsrCtx); qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
@@ -106,6 +100,7 @@ void sme_set_ft_pre_auth_state(tHalHandle hHal, uint32_t sessionId, bool state)
{ {
tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
if (pSession) if (pSession)
pSession->ftSmeContext.setFTPreAuthState = state; pSession->ftSmeContext.setFTPreAuthState = state;
} }
@@ -113,8 +108,8 @@ void sme_set_ft_pre_auth_state(tHalHandle hHal, uint32_t sessionId, bool state)
bool sme_get_ft_pre_auth_state(tHalHandle hHal, uint32_t sessionId) bool sme_get_ft_pre_auth_state(tHalHandle hHal, uint32_t sessionId)
{ {
tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
if (pSession) if (pSession)
return pSession->ftSmeContext.setFTPreAuthState; return pSession->ftSmeContext.setFTPreAuthState;
@@ -337,9 +332,9 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
} }
status = sme_acquire_global_lock(&pMac->sme); status = sme_acquire_global_lock(&pMac->sme);
if (!(QDF_IS_STATUS_SUCCESS(status))) { if (!(QDF_IS_STATUS_SUCCESS(status)))
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
}
sme_debug("sme_ft_update_key is received in state %d", sme_debug("sme_ft_update_key is received in state %d",
pSession->ftSmeContext.FTState); pSession->ftSmeContext.FTState);
@@ -347,8 +342,8 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
switch (pSession->ftSmeContext.FTState) { switch (pSession->ftSmeContext.FTState) {
case eFT_SET_KEY_WAIT: case eFT_SET_KEY_WAIT:
if (sme_get_ft_pre_auth_state(hHal, sessionId) == true) { if (sme_get_ft_pre_auth_state(hHal, sessionId) == true) {
status = status = sme_ft_send_update_key_ind(pMac, sessionId,
sme_ft_send_update_key_ind(pMac, sessionId, pFTKeyInfo); pFTKeyInfo);
if (status != 0) { if (status != 0) {
sme_err("Key set failure: %d", status); sme_err("Key set failure: %d", status);
pSession->ftSmeContext.setFTPTKState = false; pSession->ftSmeContext.setFTPTKState = false;
@@ -376,13 +371,11 @@ QDF_STATUS sme_ft_update_key(tHalHandle hHal, uint32_t sessionId,
return status; return status;
} }
/*-------------------------------------------------------------------------- /*
* * HDD Interface to SME. SME now sends the Auth 2 and RIC IEs up to the
* HDD Interface to SME. SME now sends the Auth 2 and RIC IEs up to the supplicant. * supplicant. The supplicant will then proceed to send down the
* The supplicant will then proceed to send down the
* Reassoc Req. * Reassoc Req.
* */
*------------------------------------------------------------------------*/
void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId, void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId,
uint8_t *ft_ies, uint32_t ft_ies_ip_len, uint8_t *ft_ies, uint32_t ft_ies_ip_len,
uint16_t *ft_ies_length) uint16_t *ft_ies_length)
@@ -420,22 +413,19 @@ void sme_get_ft_pre_auth_response(tHalHandle hHal, uint32_t sessionId,
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length); pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length);
*ft_ies_length = QDF_MAC_ADDR_SIZE + *ft_ies_length = QDF_MAC_ADDR_SIZE +
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length; pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length;
pSession->ftSmeContext.FTState = eFT_REASSOC_REQ_WAIT; pSession->ftSmeContext.FTState = eFT_REASSOC_REQ_WAIT;
sme_debug("Filled auth resp: %d", *ft_ies_length); sme_debug("Filled auth resp: %d", *ft_ies_length);
sme_release_global_lock(&pMac->sme); sme_release_global_lock(&pMac->sme);
return;
} }
/*-------------------------------------------------------------------------- /*
*
* SME now sends the RIC IEs up to the supplicant. * SME now sends the RIC IEs up to the supplicant.
* The supplicant will then proceed to send down the * The supplicant will then proceed to send down the
* Reassoc Req. * Reassoc Req.
* */
*------------------------------------------------------------------------*/
void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies, void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies,
uint32_t ric_ies_ip_len, uint32_t *ric_ies_length) uint32_t ric_ies_ip_len, uint32_t *ric_ies_length)
{ {
@@ -471,31 +461,24 @@ void sme_get_rici_es(tHalHandle hHal, uint32_t sessionId, uint8_t *ric_ies,
sme_debug("Filled ric ies: %d", *ric_ies_length); sme_debug("Filled ric ies: %d", *ric_ies_length);
sme_release_global_lock(&pMac->sme); sme_release_global_lock(&pMac->sme);
return;
} }
/*-------------------------------------------------------------------------- /*
* * Timer callback for the timer that is started between the preauth completion
* Timer callback for the timer that is started between the preauth completion and * and reassoc request to the PE. In this interval, it is expected that the
* reassoc request to the PE. In this interval, it is expected that the pre-auth response * pre-auth response and RIC IEs are passed up to the WPA supplicant and
* and RIC IEs are passed up to the WPA supplicant and received back the necessary FTIEs * received back the necessary FTIEs required to be sent in the reassoc request
* required to be sent in the reassoc request */
*
*------------------------------------------------------------------------*/
void sme_preauth_reassoc_intvl_timer_callback(void *context) void sme_preauth_reassoc_intvl_timer_callback(void *context)
{ {
tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *) context; tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *) context;
if (pUsrCtx) { if (pUsrCtx)
csr_neighbor_roam_request_handoff(pUsrCtx->pMac, csr_neighbor_roam_request_handoff(pUsrCtx->pMac,
pUsrCtx->sessionId); pUsrCtx->sessionId);
}
return;
} }
/*-------------------------------------------------------------------------- /* Reset the FT context. */
Reset the FT context.
------------------------------------------------------------------------*/
void sme_ft_reset(tHalHandle hHal, uint32_t sessionId) void sme_ft_reset(tHalHandle hHal, uint32_t sessionId)
{ {
tpAniSirGlobal pMac = PMAC_STRUCT(hHal); tpAniSirGlobal pMac = PMAC_STRUCT(hHal);