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
This commit is contained in:
Jeff Johnson
2019-02-02 23:30:25 -08:00
committad av nshrivas
förälder 701444f61d
incheckning 2df04b8430
8 ändrade filer med 42 tillägg och 42 borttagningar

Visa fil

@@ -1003,7 +1003,7 @@ struct join_req {
/* / 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 @@ typedef struct sSirSmeJoinRsp {
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 @@ typedef struct sSirSmeRoamOffloadSynchInd {
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;

Visa fil

@@ -353,10 +353,12 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *, uint32_t, uint32_t *)
*/
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,

Visa fil

@@ -131,7 +131,7 @@ static inline void lim_increase_fils_sequence_number(struct pe_session *session_
*/
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 bool lim_is_fils_connection(struct pe_session *pe_session)
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,

Visa fil

@@ -1886,7 +1886,7 @@ void lim_ps_offload_handle_missed_beacon_ind(struct mac_context *mac,
* 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 @@ QDF_STATUS pe_roam_synch_callback(struct mac_context *mac_ctx,
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;

Visa fil

@@ -1233,7 +1233,7 @@ uint32_t lim_create_fils_auth_data(struct mac_context *mac_ctx,
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;

Visa fil

@@ -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 @@ uint32_t lim_get_max_rate_flags(struct mac_context *mac_ctx, tpDphHashNode sta_d
/**
* 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 @@ static void lim_send_sme_join_reassoc_rsp_after_resume(struct mac_context *mac_c
* 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 @@ static void lim_handle_join_rsp_status(struct mac_context *mac_ctx,
*
* 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 @@ static void lim_add_bss_info(tpDphHashNode sta_ds, tpSirSmeJoinRsp sme_join_rsp)
}
#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 @@ lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
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_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
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 @@ lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
#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 @@ lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
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);
}
/**

Visa fil

@@ -1424,11 +1424,11 @@ typedef void (*csr_link_status_callback)(uint8_t status, void *context);
#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

Visa fil

@@ -6562,7 +6562,7 @@ static void csr_roam_process_start_bss_success(struct mac_context *mac_ctx,
*/
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 @@ static void csr_process_fils_join_rsp(struct mac_context *mac_ctx,
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 @@ static inline void csr_process_fils_join_rsp(struct mac_context *mac_ctx,
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 @@ static void csr_roam_process_join_res(struct mac_context *mac_ctx,
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 @@ bool is_disconnect_pending(struct mac_context *pmac,
}
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 @@ csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
}
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 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
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 @@ fail:
*/
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 =