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/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);
}
/**