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
This commit is contained in:
@@ -1234,7 +1234,7 @@ struct disassoc_req {
|
||||
};
|
||||
|
||||
/* / 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 @@ typedef struct sSirSmeDisassocRsp {
|
||||
tSirResultCodes statusCode;
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
uint16_t staId;
|
||||
} tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
|
||||
};
|
||||
|
||||
/* / Definition for Disassociation indication from peer */
|
||||
typedef struct sSirSmeDisassocInd {
|
||||
|
@@ -1236,7 +1236,7 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx,
|
||||
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 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx,
|
||||
* 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 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx,
|
||||
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;
|
||||
|
@@ -735,7 +735,7 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
||||
{
|
||||
|
||||
uint8_t *pBuf;
|
||||
tSirSmeDisassocRsp *pSirSmeDisassocRsp;
|
||||
struct disassoc_rsp *pSirSmeDisassocRsp;
|
||||
tSirSmeDisassocInd *pSirSmeDisassocInd;
|
||||
uint32_t *pMsg = NULL;
|
||||
bool failure = false;
|
||||
@@ -796,7 +796,7 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
||||
* 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 @@ lim_send_sme_disassoc_ntf(struct mac_context *mac,
|
||||
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;
|
||||
|
@@ -493,7 +493,7 @@ static QDF_STATUS csr_roam_issue_set_key_command(struct mac_context *mac,
|
||||
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 @@ csr_check_profile_in_scan_cache(struct mac_context *mac_ctx,
|
||||
|
||||
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 @@ void csr_roam_roaming_state_disassoc_rsp_processor(struct mac_context *mac,
|
||||
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 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
|
||||
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 @@ csr_roam_chk_lnk_disassoc_rsp(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
||||
* 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 @@ QDF_STATUS csr_roam_update_config(struct mac_context *mac_ctx, uint8_t session_i
|
||||
* 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 */
|
||||
|
Reference in New Issue
Block a user