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/inc/sir_api.h b/core/mac/inc/sir_api.h
index d99d778..38a71e9 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -1234,7 +1234,7 @@
};
/* / Definition for Disassociation response */
-typedef struct sSirSmeDisassocRsp {
+struct disassoc_rsp {
uint16_t messageType; /* eWNI_SME_DISASSOC_RSP */
uint16_t length;
uint8_t sessionId; /* Session ID */
@@ -1242,7 +1242,7 @@
tSirResultCodes statusCode;
struct qdf_mac_addr peer_macaddr;
uint16_t staId;
-} tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
+};
/* / Definition for Disassociation indication from peer */
typedef struct sSirSmeDisassocInd {
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;
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index ca70114..c28695f 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -493,7 +493,7 @@
static QDF_STATUS csr_roam_get_qos_info_from_bss(struct mac_context *mac,
tSirBssDescription *pBssDesc);
static void csr_ser_des_unpack_diassoc_rsp(uint8_t *pBuf,
- tSirSmeDisassocRsp *pRsp);
+ struct disassoc_rsp *pRsp);
static void csr_init_operating_classes(struct mac_context *mac);
static void csr_add_len_of_social_channels(struct mac_context *mac,
@@ -9227,7 +9227,7 @@
static
void csr_roam_roaming_state_disassoc_rsp_processor(struct mac_context *mac,
- tSirSmeDisassocRsp *pSmeRsp)
+ struct disassoc_rsp *pSmeRsp)
{
tScanResultHandle hBSSList;
struct csr_roam_info *roamInfo;
@@ -9238,7 +9238,7 @@
uint32_t sessionId;
struct csr_roam_session *pSession;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
- tSirSmeDisassocRsp SmeDisassocRsp;
+ struct disassoc_rsp SmeDisassocRsp;
csr_ser_des_unpack_diassoc_rsp((uint8_t *) pSmeRsp, &SmeDisassocRsp);
sessionId = SmeDisassocRsp.sessionId;
@@ -9486,7 +9486,7 @@
mac_trace_getcsr_roam_sub_state(
mac->roam.curSubState[pSmeRsp->sessionId]));
csr_roam_roaming_state_disassoc_rsp_processor(mac,
- (tSirSmeDisassocRsp *) pSmeRsp);
+ (struct disassoc_rsp *) pSmeRsp);
}
break;
case eWNI_SME_DEAUTH_RSP:
@@ -11027,7 +11027,7 @@
* session id is invalid here so cant use it to access the array
* curSubstate as index
*/
- tSirSmeDisassocRsp *pDisassocRsp = (tSirSmeDisassocRsp *) msg_ptr;
+ struct disassoc_rsp *pDisassocRsp = (struct disassoc_rsp *) msg_ptr;
qdf_mem_zero(&roam_info, sizeof(roam_info));
sme_debug("eWNI_SME_DISASSOC_RSP from SME ");
@@ -19526,8 +19526,8 @@
* The rest is conditionally defined of (WNI_POLARIS_FW_PRODUCT == AP)
* and not used
*/
-static void csr_ser_des_unpack_diassoc_rsp(uint8_t *pBuf, tSirSmeDisassocRsp
- *pRsp)
+static void csr_ser_des_unpack_diassoc_rsp(uint8_t *pBuf,
+ struct disassoc_rsp *pRsp)
{
if (pBuf && pRsp) {
pBuf += 4; /* skip type and length */