qcacld-3.0: Replace typedef tSirSmeDisassocRsp
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 tSirSmeDisassocRsp 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: I5ba0f485b53e39d158e0bfb40b74edcccc5a08c9
CRs-Fixed: 2395988
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 3cac8b8..f7f8423 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
@@ -1236,7 +1236,7 @@
struct pe_session *session;
extern bool send_disassoc_frame;
tLimMlmStates mlm_state;
- tSirSmeDisassocRsp *sme_disassoc_rsp;
+ struct disassoc_rsp *sme_disassoc_rsp;
if (QDF_STATUS_SUCCESS != suspend_status)
pe_err("Suspend Status is not success %X",
@@ -1274,7 +1274,7 @@
* disassociation
*/
sme_disassoc_rsp =
- qdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
+ qdf_mem_malloc(sizeof(*sme_disassoc_rsp));
if (!sme_disassoc_rsp) {
qdf_mem_free(mlm_disassocreq);
return;
@@ -1286,7 +1286,7 @@
mlm_disassocreq->peer_macaddr.bytes));
sme_disassoc_rsp->messageType = eWNI_SME_DISASSOC_RSP;
- sme_disassoc_rsp->length = sizeof(tSirSmeDisassocRsp);
+ sme_disassoc_rsp->length = sizeof(*sme_disassoc_rsp);
sme_disassoc_rsp->sessionId =
mlm_disassocreq->sessionId;
sme_disassoc_rsp->transactionId = 0;
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 58f4077..668f161 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
@@ -735,7 +735,7 @@
{
uint8_t *pBuf;
- tSirSmeDisassocRsp *pSirSmeDisassocRsp;
+ struct disassoc_rsp *pSirSmeDisassocRsp;
tSirSmeDisassocInd *pSirSmeDisassocInd;
uint32_t *pMsg = NULL;
bool failure = false;
@@ -796,7 +796,7 @@
* host triggered disassociation
*/
- pSirSmeDisassocRsp = qdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
+ pSirSmeDisassocRsp = qdf_mem_malloc(sizeof(struct disassoc_rsp));
if (!pSirSmeDisassocRsp) {
failure = true;
goto error;
@@ -804,7 +804,7 @@
pe_debug("send eWNI_SME_DISASSOC_RSP with retCode: %d for " MAC_ADDRESS_STR,
reasonCode, MAC_ADDR_ARRAY(peerMacAddr));
pSirSmeDisassocRsp->messageType = eWNI_SME_DISASSOC_RSP;
- pSirSmeDisassocRsp->length = sizeof(tSirSmeDisassocRsp);
+ pSirSmeDisassocRsp->length = sizeof(struct disassoc_rsp);
/* sessionId */
pBuf = (uint8_t *) &pSirSmeDisassocRsp->sessionId;
*pBuf = smesessionId;