qcacld-3.0: Replace typedef tSirSmeDeauthRsp
The Linux Coding Style enumerates a few special cases where typedefs are useful, but stresses "NEVER EVER use a typedef unless you can clearly match one of those rules." The tSirSmeDeauthRsp typedef does not meet any of those criteria, so replace it (and the "tp" variant) with a reference to the underlying struct. Further note the Linux Coding Style frowns upon mixed-case names and so-called Hungarian notation, so in conjunction rename the underlying struct to be in compliance. Change-Id: I6c04ecb351bc22aae748dc04c2cb0110c111a760 CRs-Fixed: 2395992
This commit is contained in:
@@ -1296,14 +1296,14 @@ struct deauth_req {
|
||||
};
|
||||
|
||||
/* / Definition for Deauthetication response */
|
||||
typedef struct sSirSmeDeauthRsp {
|
||||
struct deauth_rsp {
|
||||
uint16_t messageType; /* eWNI_SME_DEAUTH_RSP */
|
||||
uint16_t length;
|
||||
uint8_t sessionId; /* Session ID */
|
||||
uint16_t transactionId; /* Transaction ID for cmd */
|
||||
tSirResultCodes statusCode;
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
} tSirSmeDeauthRsp, *tpSirSmeDeauthRsp;
|
||||
};
|
||||
|
||||
/* / Definition for Deauthetication indication from peer */
|
||||
typedef struct sSirSmeDeauthInd {
|
||||
|
||||
@@ -1575,7 +1575,7 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx,
|
||||
tLimMlmDeauthReq *mlm_deauth_req;
|
||||
tLimMlmDeauthCnf mlm_deauth_cnf;
|
||||
struct pe_session *session;
|
||||
tSirSmeDeauthRsp *sme_deauth_rsp;
|
||||
struct deauth_rsp *sme_deauth_rsp;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != suspend_status)
|
||||
pe_err("Suspend Status is not success %X",
|
||||
@@ -1624,7 +1624,7 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx,
|
||||
* deauthentication
|
||||
*/
|
||||
sme_deauth_rsp =
|
||||
qdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
|
||||
qdf_mem_malloc(sizeof(*sme_deauth_rsp));
|
||||
if (!sme_deauth_rsp) {
|
||||
qdf_mem_free(mlm_deauth_req);
|
||||
return;
|
||||
@@ -1638,7 +1638,7 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx,
|
||||
sme_deauth_rsp->messageType =
|
||||
eWNI_SME_DEAUTH_RSP;
|
||||
sme_deauth_rsp->length =
|
||||
sizeof(tSirSmeDeauthRsp);
|
||||
sizeof(*sme_deauth_rsp);
|
||||
sme_deauth_rsp->statusCode =
|
||||
eSIR_SME_DEAUTH_STATUS;
|
||||
sme_deauth_rsp->sessionId =
|
||||
|
||||
@@ -1175,7 +1175,7 @@ lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
uint16_t smetransactionId)
|
||||
{
|
||||
uint8_t *pBuf;
|
||||
tSirSmeDeauthRsp *pSirSmeDeauthRsp;
|
||||
struct deauth_rsp *pSirSmeDeauthRsp;
|
||||
tSirSmeDeauthInd *pSirSmeDeauthInd;
|
||||
struct pe_session *pe_session;
|
||||
uint8_t sessionId;
|
||||
@@ -1189,13 +1189,14 @@ lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
||||
* Deauthentication response to host triggered
|
||||
* deauthentication.
|
||||
*/
|
||||
pSirSmeDeauthRsp = qdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
|
||||
pSirSmeDeauthRsp = qdf_mem_malloc(sizeof(*pSirSmeDeauthRsp));
|
||||
if (!pSirSmeDeauthRsp)
|
||||
return;
|
||||
pe_debug("send eWNI_SME_DEAUTH_RSP with retCode: %d for" MAC_ADDRESS_STR,
|
||||
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
||||
pe_debug("send eWNI_SME_DEAUTH_RSP with retCode: %d for "
|
||||
MAC_ADDRESS_STR,
|
||||
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
|
||||
pSirSmeDeauthRsp->messageType = eWNI_SME_DEAUTH_RSP;
|
||||
pSirSmeDeauthRsp->length = sizeof(tSirSmeDeauthRsp);
|
||||
pSirSmeDeauthRsp->length = sizeof(*pSirSmeDeauthRsp);
|
||||
pSirSmeDeauthRsp->statusCode = reasonCode;
|
||||
pSirSmeDeauthRsp->sessionId = smesessionId;
|
||||
pSirSmeDeauthRsp->transactionId = smetransactionId;
|
||||
|
||||
@@ -228,7 +228,7 @@ bool csr_is_nullssid(uint8_t *pBssSsid, uint8_t len);
|
||||
bool csr_is_infra_bss_desc(tSirBssDescription *pSirBssDesc);
|
||||
bool csr_is_ibss_bss_desc(tSirBssDescription *pSirBssDesc);
|
||||
bool csr_is_privacy(tSirBssDescription *pSirBssDesc);
|
||||
tSirResultCodes csr_get_de_auth_rsp_status_code(tSirSmeDeauthRsp *pSmeRsp);
|
||||
tSirResultCodes csr_get_de_auth_rsp_status_code(struct deauth_rsp *pSmeRsp);
|
||||
uint32_t csr_get_frag_thresh(struct mac_context *mac_ctx);
|
||||
uint32_t csr_get_rts_thresh(struct mac_context *mac_ctx);
|
||||
uint32_t csr_get11h_power_constraint(struct mac_context *mac_ctx,
|
||||
|
||||
@@ -9379,7 +9379,7 @@ POST_ROAM_FAILURE:
|
||||
}
|
||||
|
||||
static void csr_roam_roaming_state_deauth_rsp_processor(struct mac_context *mac,
|
||||
tSirSmeDeauthRsp *pSmeRsp)
|
||||
struct deauth_rsp *pSmeRsp)
|
||||
{
|
||||
tSirResultCodes statusCode;
|
||||
/* No one is sending eWNI_SME_DEAUTH_REQ to PE. */
|
||||
@@ -9496,7 +9496,7 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
|
||||
pSmeRsp->sessionId,
|
||||
eSmeCommandWmStatusChange);
|
||||
csr_roam_roaming_state_deauth_rsp_processor(mac,
|
||||
(tSirSmeDeauthRsp *) pSmeRsp);
|
||||
(struct deauth_rsp *) pSmeRsp);
|
||||
}
|
||||
break;
|
||||
case eWNI_SME_START_BSS_RSP:
|
||||
@@ -10992,7 +10992,7 @@ csr_roam_chk_lnk_deauth_rsp(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
||||
uint32_t sessionId = CSR_SESSION_ID_INVALID;
|
||||
QDF_STATUS status;
|
||||
struct csr_roam_info *roam_info_ptr = NULL;
|
||||
tSirSmeDeauthRsp *pDeauthRsp = (tSirSmeDeauthRsp *) msg_ptr;
|
||||
struct deauth_rsp *pDeauthRsp = (struct deauth_rsp *) msg_ptr;
|
||||
struct csr_roam_info roam_info;
|
||||
|
||||
qdf_mem_zero(&roam_info, sizeof(roam_info));
|
||||
|
||||
@@ -5758,7 +5758,7 @@ void csr_free_connect_bss_desc(struct mac_context *mac, uint32_t sessionId)
|
||||
}
|
||||
}
|
||||
|
||||
tSirResultCodes csr_get_de_auth_rsp_status_code(tSirSmeDeauthRsp *pSmeRsp)
|
||||
tSirResultCodes csr_get_de_auth_rsp_status_code(struct deauth_rsp *pSmeRsp)
|
||||
{
|
||||
uint8_t *pBuffer = (uint8_t *) pSmeRsp;
|
||||
uint32_t ret;
|
||||
|
||||
Reference in New Issue
Block a user