qcacld-3.0: Replace typedef tSirSmeDeauthInd

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 tSirSmeDeauthInd 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: I4d98feee8da17ba53b199d37092a4b3bafe25d54
CRs-Fixed: 2395993
This commit is contained in:
Jeff Johnson 2019-02-04 13:12:08 -08:00 committed by nshrivas
parent 15ae0c1534
commit fec0871738
5 changed files with 19 additions and 18 deletions

View File

@ -1306,7 +1306,7 @@ struct deauth_rsp {
};
/* / Definition for Deauthetication indication from peer */
typedef struct sSirSmeDeauthInd {
struct deauth_ind {
uint16_t messageType; /* eWNI_SME_DEAUTH_IND */
uint16_t length;
uint8_t sessionId; /* Added for BT-AMP */
@ -1318,7 +1318,7 @@ typedef struct sSirSmeDeauthInd {
uint16_t staId;
uint32_t reasonCode;
int8_t rssi;
} tSirSmeDeauthInd, *tpSirSmeDeauthInd;
};
/* / Definition for Deauthetication confirm */
struct deauth_cnf {

View File

@ -965,14 +965,14 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode sta,
struct pe_session *pe_session)
{
struct scheduler_msg mmhMsg = {0};
tSirSmeDeauthInd *pSirSmeDeauthInd;
struct deauth_ind *pSirSmeDeauthInd;
pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
pSirSmeDeauthInd = qdf_mem_malloc(sizeof(*pSirSmeDeauthInd));
if (!pSirSmeDeauthInd)
return;
pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd);
pSirSmeDeauthInd->length = sizeof(*pSirSmeDeauthInd);
pSirSmeDeauthInd->sessionId = pe_session->smeSessionId;
pSirSmeDeauthInd->transactionId = pe_session->transactionId;
@ -980,7 +980,7 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode sta,
pSirSmeDeauthInd->statusCode =
(tSirResultCodes) sta->mlmStaContext.cleanupTrigger;
} else {
/* Need to indicatet he reascon code over the air */
/* Need to indicate the reason code over the air */
pSirSmeDeauthInd->statusCode =
(tSirResultCodes) sta->mlmStaContext.disassocReason;
}
@ -1176,7 +1176,7 @@ lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
{
uint8_t *pBuf;
struct deauth_rsp *pSirSmeDeauthRsp;
tSirSmeDeauthInd *pSirSmeDeauthInd;
struct deauth_ind *pSirSmeDeauthInd;
struct pe_session *pe_session;
uint8_t sessionId;
uint32_t *pMsg = NULL;
@ -1228,13 +1228,14 @@ lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
* frame reception from peer entity or due to
* loss of link with peer entity.
*/
pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
pSirSmeDeauthInd = qdf_mem_malloc(sizeof(*pSirSmeDeauthInd));
if (!pSirSmeDeauthInd)
return;
pe_debug("send eWNI_SME_DEAUTH_IND with retCode: %d for " MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pe_debug("send eWNI_SME_DEAUTH_IND with retCode: %d for "
MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd);
pSirSmeDeauthInd->length = sizeof(*pSirSmeDeauthInd);
pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
/* sessionId */

View File

@ -318,7 +318,7 @@ struct setkey_cmd {
struct wmstatus_changecmd {
enum csr_roam_wmstatus_changetypes Type;
union {
tSirSmeDeauthInd DeauthIndMsg;
struct deauth_ind DeauthIndMsg;
struct disassoc_ind DisassocIndMsg;
} u;

View File

@ -10824,12 +10824,12 @@ csr_roam_chk_lnk_deauth_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
struct csr_roam_session *session;
uint32_t sessionId = CSR_SESSION_ID_INVALID;
QDF_STATUS status;
tSirSmeDeauthInd *pDeauthInd;
struct deauth_ind *pDeauthInd;
struct csr_roam_info roam_info;
qdf_mem_zero(&roam_info, sizeof(roam_info));
sme_debug("DEAUTHENTICATION Indication from MAC");
pDeauthInd = (tpSirSmeDeauthInd) msg_ptr;
pDeauthInd = (struct deauth_ind *)msg_ptr;
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&pDeauthInd->bssid,
&sessionId);
@ -12091,7 +12091,7 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
uint32_t type, tSirSmeRsp *pSirMsg)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tSirSmeDeauthInd *pDeauthIndMsg = NULL;
struct deauth_ind *pDeauthIndMsg = NULL;
struct disassoc_ind *pDisassocIndMsg = NULL;
eCsrRoamResult result = eCSR_ROAM_RESULT_LOSTLINK;
struct csr_roam_info roamInfo;
@ -12113,7 +12113,7 @@ QDF_STATUS csr_roam_lost_link(struct mac_context *mac, uint32_t sessionId,
&pDisassocIndMsg->peer_macaddr);
} else if (eWNI_SME_DEAUTH_IND == type) {
result = eCSR_ROAM_RESULT_DEAUTH_IND;
pDeauthIndMsg = (tSirSmeDeauthInd *) pSirMsg;
pDeauthIndMsg = (struct deauth_ind *)pSirMsg;
pSession->roamingStatusCode = pDeauthIndMsg->statusCode;
pSession->joinFailStatusCode.reasonCode =
pDeauthIndMsg->reasonCode;
@ -15445,7 +15445,7 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(struct mac_context *mac,
}
QDF_STATUS csr_send_mb_deauth_cnf_msg(struct mac_context *mac,
tpSirSmeDeauthInd pDeauthInd)
struct deauth_ind *pDeauthInd)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct deauth_cnf *pMsg;

View File

@ -310,7 +310,7 @@ QDF_STATUS csr_send_mb_deauth_req_msg(struct mac_context *mac, uint32_t sessionI
QDF_STATUS csr_send_mb_disassoc_cnf_msg(struct mac_context *mac,
struct disassoc_ind *pDisassocInd);
QDF_STATUS csr_send_mb_deauth_cnf_msg(struct mac_context *mac,
tpSirSmeDeauthInd pDeauthInd);
struct deauth_ind *pDeauthInd);
QDF_STATUS csr_send_assoc_cnf_msg(struct mac_context *mac,
struct assoc_ind *pAssocInd,
QDF_STATUS status);