qcacld-3.0: Replace typedef tSirSmeJoinRsp
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 tSirSmeJoinRsp 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: I05b813c376cc837fa4580f5000a977ff0907c8a9
CRs-Fixed: 2394997
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index e2718ad..f3b9b15 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -1003,7 +1003,7 @@
/* / Definition for response message to previously issued join request */
/* / MAC ---> */
-typedef struct sSirSmeJoinRsp {
+struct join_rsp {
uint16_t messageType; /* eWNI_SME_JOIN_RSP */
uint16_t length;
uint8_t sessionId; /* Session ID */
@@ -1054,7 +1054,7 @@
struct fils_join_rsp_params *fils_join_rsp;
#endif
uint8_t frames[1];
-} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
+};
typedef struct sSirSmeChanInfo {
uint8_t chan_id;
@@ -3153,7 +3153,7 @@
uint16_t next_erp_seq_num;
uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
void *add_bss_params;
- tpSirSmeJoinRsp join_rsp;
+ struct join_rsp *join_rsp;
uint16_t aid;
struct sir_hw_mode_trans_ind hw_mode_trans_ind;
uint8_t nss;
diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h
index cf348a7..4060cb4 100644
--- a/core/mac/src/pe/include/lim_api.h
+++ b/core/mac/src/pe/include/lim_api.h
@@ -353,10 +353,12 @@
*/
void lim_process_sme_addts_rsp_timeout(struct mac_context *mac, uint32_t param);
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
-void lim_fill_join_rsp_ht_caps(struct pe_session *session, tpSirSmeJoinRsp rsp);
+void lim_fill_join_rsp_ht_caps(struct pe_session *session,
+ struct join_rsp *rsp);
#else
-static inline void lim_fill_join_rsp_ht_caps(struct pe_session *session,
- tpSirSmeJoinRsp rsp)
+static inline
+void lim_fill_join_rsp_ht_caps(struct pe_session *session,
+ struct join_rsp *rsp)
{}
#endif
QDF_STATUS lim_update_ext_cap_ie(struct mac_context *mac_ctx,
diff --git a/core/mac/src/pe/include/lim_process_fils.h b/core/mac/src/pe/include/lim_process_fils.h
index d8f426b..7492a96 100644
--- a/core/mac/src/pe/include/lim_process_fils.h
+++ b/core/mac/src/pe/include/lim_process_fils.h
@@ -131,7 +131,7 @@
*/
void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
- tpSirSmeJoinRsp sme_join_rsp);
+ struct join_rsp *sme_join_rsp);
/**
* aead_encrypt_assoc_req() - Encrypt FILS IE's in assoc request
@@ -250,7 +250,7 @@
static inline void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
- tpSirSmeJoinRsp sme_join_rsp)
+ struct join_rsp *sme_join_rsp)
{ }
static inline QDF_STATUS aead_encrypt_assoc_req(struct mac_context *mac_ctx,
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 42709b7..c2500a3 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -1886,7 +1886,7 @@
* Return: None
*/
void lim_fill_join_rsp_ht_caps(struct pe_session *session,
- tpSirSmeJoinRsp join_rsp)
+ struct join_rsp *join_rsp)
{
struct ht_profile *ht_profile;
@@ -2321,7 +2321,7 @@
ft_session_ptr->limMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
lim_init_tdls_data(mac_ctx, ft_session_ptr);
join_rsp_len = ft_session_ptr->RICDataLen +
- sizeof(tSirSmeJoinRsp) - sizeof(uint8_t);
+ sizeof(struct join_rsp) - sizeof(uint8_t);
#ifdef FEATURE_WLAN_ESE
join_rsp_len += ft_session_ptr->tspecLen;
diff --git a/core/mac/src/pe/lim/lim_process_fils.c b/core/mac/src/pe/lim/lim_process_fils.c
index 51e8f5c..7362123 100644
--- a/core/mac/src/pe/lim/lim_process_fils.c
+++ b/core/mac/src/pe/lim/lim_process_fils.c
@@ -1233,7 +1233,7 @@
void populate_fils_connect_params(struct mac_context *mac_ctx,
struct pe_session *session,
- tpSirSmeJoinRsp sme_join_rsp)
+ struct join_rsp *sme_join_rsp)
{
struct fils_join_rsp_params *fils_join_rsp;
struct pe_fils_session *fils_info = session->fils_info;
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 b03ed54..86203e1 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
@@ -56,10 +56,6 @@
#include "lim_process_fils.h"
#include "wma.h"
-static void lim_handle_join_rsp_status(struct mac_context *mac_ctx,
- struct pe_session *session_entry, tSirResultCodes result_code,
- tpSirSmeJoinRsp sme_join_rsp);
-
/**
* lim_send_sme_rsp() - Send Response to upper layers
* @mac_ctx: Pointer to Global MAC structure
@@ -165,21 +161,21 @@
/**
* lim_send_sme_join_reassoc_rsp_after_resume() - Send Response to SME
- * @mac_ctx Pointer to Global MAC structure
- * @status Resume link status
- * @ctx context passed while calling resmune link.
- * (join response to be sent)
+ * @mac_ctx: Pointer to Global MAC structure
+ * @status: Resume link status
+ * @sme_join_rsp: Join response to be sent
*
* This function is called to send Join/Reassoc rsp
* message to SME after the resume link.
*
* Return: None
*/
-static void lim_send_sme_join_reassoc_rsp_after_resume(struct mac_context *mac_ctx,
- QDF_STATUS status, uint32_t *ctx)
+static void
+lim_send_sme_join_reassoc_rsp_after_resume(struct mac_context *mac_ctx,
+ QDF_STATUS status,
+ struct join_rsp *sme_join_rsp)
{
struct scheduler_msg msg = {0};
- tpSirSmeJoinRsp sme_join_rsp = (tpSirSmeJoinRsp) ctx;
msg.type = sme_join_rsp->messageType;
msg.bodyptr = sme_join_rsp;
@@ -202,8 +198,9 @@
* Return: None
*/
static void lim_handle_join_rsp_status(struct mac_context *mac_ctx,
- struct pe_session *session_entry, tSirResultCodes result_code,
- tpSirSmeJoinRsp sme_join_rsp)
+ struct pe_session *session_entry,
+ tSirResultCodes result_code,
+ struct join_rsp *sme_join_rsp)
{
uint16_t bss_ie_len;
void *bss_ies;
@@ -377,7 +374,8 @@
*
* Return: None
*/
-static void lim_add_bss_info(tpDphHashNode sta_ds, tpSirSmeJoinRsp sme_join_rsp)
+static void lim_add_bss_info(tpDphHashNode sta_ds,
+ struct join_rsp *sme_join_rsp)
{
struct parsed_ies *parsed_ies = &sta_ds->parsed_ies;
@@ -394,14 +392,14 @@
}
#ifdef WLAN_FEATURE_FILS_SK
-static void lim_update_fils_seq_num(tpSirSmeJoinRsp sme_join_rsp,
+static void lim_update_fils_seq_num(struct join_rsp *sme_join_rsp,
struct pe_session *session_entry)
{
sme_join_rsp->fils_seq_num =
session_entry->fils_info->sequence_number;
}
#else
-static inline void lim_update_fils_seq_num(tpSirSmeJoinRsp sme_join_rsp,
+static inline void lim_update_fils_seq_num(struct join_rsp *sme_join_rsp,
struct pe_session *session_entry)
{}
#endif
@@ -429,7 +427,7 @@
struct pe_session *session_entry, uint8_t sme_session_id,
uint16_t sme_transaction_id)
{
- tpSirSmeJoinRsp sme_join_rsp;
+ struct join_rsp *sme_join_rsp;
uint32_t rsp_len;
tpDphHashNode sta_ds = NULL;
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM /* FEATURE_WLAN_DIAG_SUPPORT */
@@ -445,7 +443,7 @@
lim_msg_str(msg_type), lim_result_code_str(result_code));
if (session_entry == NULL) {
- rsp_len = sizeof(tSirSmeJoinRsp);
+ rsp_len = sizeof(*sme_join_rsp);
sme_join_rsp = qdf_mem_malloc(rsp_len);
if (!sme_join_rsp)
return;
@@ -460,7 +458,7 @@
#ifdef FEATURE_WLAN_ESE
session_entry->tspecLen +
#endif
- sizeof(tSirSmeJoinRsp) - sizeof(uint8_t);
+ sizeof(*sme_join_rsp) - sizeof(uint8_t);
sme_join_rsp = qdf_mem_malloc(rsp_len);
if (!sme_join_rsp)
return;
@@ -525,7 +523,7 @@
sme_join_rsp->transactionId = sme_transaction_id;
lim_send_sme_join_reassoc_rsp_after_resume(mac_ctx, QDF_STATUS_SUCCESS,
- (uint32_t *)sme_join_rsp);
+ sme_join_rsp);
}
/**
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index f1dab78..053b3ce 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1424,11 +1424,11 @@
#ifdef FEATURE_WLAN_TDLS
void csr_roam_fill_tdls_info(struct mac_context *mac_ctx,
struct csr_roam_info *roam_info,
- tpSirSmeJoinRsp join_rsp);
+ struct join_rsp *join_rsp);
#else
static inline void csr_roam_fill_tdls_info(struct mac_context *mac_ctx,
struct csr_roam_info *roam_info,
- tpSirSmeJoinRsp join_rsp)
+ struct join_rsp *join_rsp)
{}
#endif
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 441766d..87cedf9 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -6562,7 +6562,7 @@
*/
static QDF_STATUS populate_fils_params_join_rsp(struct mac_context *mac_ctx,
struct csr_roam_info *roam_info,
- tSirSmeJoinRsp *join_rsp)
+ struct join_rsp *join_rsp)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct fils_join_rsp_params *roam_fils_info,
@@ -6646,7 +6646,7 @@
uint32_t session_id,
struct csr_roam_info *roam_info,
tSirBssDescription *bss_desc,
- tSirSmeJoinRsp *join_rsp)
+ struct join_rsp *join_rsp)
{
tSirMacAddr bcast_mac = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
QDF_STATUS status;
@@ -6696,7 +6696,7 @@
uint32_t session_id,
struct csr_roam_info *roam_info,
tSirBssDescription *bss_desc,
- tSirSmeJoinRsp *join_rsp)
+ struct join_rsp *join_rsp)
{}
#endif
@@ -6732,7 +6732,7 @@
tDot11fBeaconIEs *ies_ptr = NULL;
struct csr_roam_info roam_info;
struct ps_global_info *ps_global_info = &mac_ctx->sme.ps_global_info;
- tSirSmeJoinRsp *join_rsp = (tSirSmeJoinRsp *) context;
+ struct join_rsp *join_rsp = context;
uint32_t len;
struct bss_info bss_info;
@@ -8537,7 +8537,7 @@
}
static void csr_roam_join_rsp_processor(struct mac_context *mac,
- tSirSmeJoinRsp *pSmeJoinRsp)
+ struct join_rsp *pSmeJoinRsp)
{
tListElem *pEntry = NULL;
tSmeCmd *pCommand = NULL;
@@ -8946,7 +8946,7 @@
}
static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac,
- tpSirSmeJoinRsp pSmeJoinRsp)
+ struct join_rsp *pSmeJoinRsp)
{
enum csr_roamcomplete_result result;
tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
@@ -9456,13 +9456,13 @@
if (CSR_IS_ROAM_SUBSTATE_JOIN_REQ(mac, pSmeRsp->sessionId))
/* We sent a JOIN_REQ */
csr_roam_join_rsp_processor(mac,
- (tSirSmeJoinRsp *) pSmeRsp);
+ (struct join_rsp *)pSmeRsp);
break;
case eWNI_SME_REASSOC_RSP:
/* or the Reassociation response message... */
if (CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(mac, pSmeRsp->sessionId))
csr_roam_roaming_state_reassoc_rsp_processor(mac,
- (tpSirSmeJoinRsp) pSmeRsp);
+ (struct join_rsp *)pSmeRsp);
break;
case eWNI_SME_STOP_BSS_RSP:
/* or the Stop Bss response message... */
@@ -20558,7 +20558,7 @@
*/
void csr_roam_fill_tdls_info(struct mac_context *mac_ctx,
struct csr_roam_info *roam_info,
- tpSirSmeJoinRsp join_rsp)
+ struct join_rsp *join_rsp)
{
roam_info->tdls_prohibited = join_rsp->tdls_prohibited;
roam_info->tdls_chan_swit_prohibited =