1
0

qcacld-3.0: Replace typedef tSirSmeJoinReq

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 tSirSmeJoinReq 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: Ie13a540223f8f08ad725b26cd55204f1221a4faa
CRs-Fixed: 2394996
Este cometimento está contido em:
Jeff Johnson
2019-02-02 22:35:13 -08:00
cometido por nshrivas
ascendente b120a829a9
cometimento 701444f61d
16 ficheiros modificados com 64 adições e 86 eliminações

Ver ficheiro

@@ -516,17 +516,7 @@ typedef struct sAniSirLim {
#endif #endif
/* //////////////////////////////////////// MISC RELATED END /////////////////////////////////////////// */ /* //////////////////////////////////////// MISC RELATED END /////////////////////////////////////////// */
/* //////////////////////////////////////// ASSOC RELATED START /////////////////////////////////////////// */ /* ASSOC RELATED START */
/* Place holder for JoinReq message */
/* received by SME state machine */
/* tpSirSmeJoinReq gpLimJoinReq; */
/* Place holder for ReassocReq message */
/* received by SME state machine */
/* tpSirSmeReassocReq gpLimReassocReq; sep23 review */
/* Current Authentication type used at STA */
/* tAniAuthType gLimCurrentAuthType; */
/* Place holder for current authentication request */ /* Place holder for current authentication request */
/* being handled */ /* being handled */
@@ -553,7 +543,7 @@ typedef struct sAniSirLim {
tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE]; tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE]; tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
/* //////////////////////////////////////// ASSOC RELATED END /////////////////////////////////////////// */ /* ASSOC RELATED END */
/* ////////////////////////////// HT RELATED ////////////////////////////////////////// */ /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */
/* */ /* */

Ver ficheiro

@@ -900,7 +900,7 @@ struct plm_req {
/* / The Serdes function is the same and its */ /* / The Serdes function is the same and its */
/* / shared with REASSOC. So if we add a field */ /* / shared with REASSOC. So if we add a field */
/* here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC. */ /* here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC. */
typedef struct sSirSmeJoinReq { struct join_req {
uint16_t messageType; /* eWNI_SME_JOIN_REQ */ uint16_t messageType; /* eWNI_SME_JOIN_REQ */
uint16_t length; uint16_t length;
uint8_t sessionId; uint8_t sessionId;
@@ -996,10 +996,10 @@ typedef struct sSirSmeJoinReq {
tSirBssDescription bssDescription; tSirBssDescription bssDescription;
/* /*
* WARNING: Pls make bssDescription as last variable in struct * WARNING: Pls make bssDescription as last variable in struct
* tSirSmeJoinReq as it has ieFields followed after this bss * join_req as it has ieFields followed after this bss
* description. Adding a variable after this corrupts the ieFields * description. Adding a variable after this corrupts the ieFields
*/ */
} tSirSmeJoinReq, *tpSirSmeJoinReq; };
/* / Definition for response message to previously issued join request */ /* / Definition for response message to previously issued join request */
/* / MAC ---> */ /* / MAC ---> */

Ver ficheiro

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -88,7 +88,8 @@ QDF_STATUS lim_create_fils_rik(uint8_t *rrk, uint8_t rrk_len,
* *
* Return: None * Return: None
*/ */
void lim_update_fils_config(struct pe_session *session, tpSirSmeJoinReq sme_join_req); void lim_update_fils_config(struct pe_session *session,
struct join_req *sme_join_req);
/** /**
* lim_create_fils_auth_data()- This API creates the fils auth data * lim_create_fils_auth_data()- This API creates the fils auth data
@@ -231,8 +232,9 @@ static inline bool lim_is_valid_fils_auth_frame(struct mac_context *mac_ctx,
return true; return true;
} }
static inline void static inline
lim_update_fils_config(struct pe_session *session, tpSirSmeJoinReq sme_join_req) void lim_update_fils_config(struct pe_session *session,
struct join_req *sme_join_req)
{ } { }
static inline uint32_t lim_create_fils_auth_data(struct mac_context *mac_ctx, static inline uint32_t lim_create_fils_auth_data(struct mac_context *mac_ctx,

Ver ficheiro

@@ -134,8 +134,8 @@ struct pe_session {
uint8_t operMode; /* AP - 0; STA - 1 ; */ uint8_t operMode; /* AP - 0; STA - 1 ; */
tSirNwType nwType; tSirNwType nwType;
struct start_bss_req *pLimStartBssReq; /* handle to start bss req */ struct start_bss_req *pLimStartBssReq; /* handle to start bss req */
tpSirSmeJoinReq pLimJoinReq; /* handle to sme join req */ struct join_req *pLimJoinReq; /* handle to sme join req */
tpSirSmeJoinReq pLimReAssocReq; /* handle to sme reassoc req */ struct join_req *pLimReAssocReq; /* handle to sme reassoc req */
tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */ tpLimMlmJoinReq pLimMlmJoinReq; /* handle to MLM join Req */
void *pLimMlmReassocRetryReq; /* keep reasoc req for retry */ void *pLimMlmReassocRetryReq; /* keep reasoc req for retry */
void *pLimMlmReassocReq; /* handle to MLM reassoc Req */ void *pLimMlmReassocReq; /* handle to MLM reassoc Req */

Ver ficheiro

@@ -82,5 +82,5 @@ rrm_process_beacon_report_xmit(struct mac_context *mac_ctx,
tpSirBeaconReportXmitInd beacon_xmit_ind); tpSirBeaconReportXmitInd beacon_xmit_ind);
void lim_update_rrm_capability(struct mac_context *mac_ctx, void lim_update_rrm_capability(struct mac_context *mac_ctx,
tpSirSmeJoinReq join_req); struct join_req *join_req);
#endif #endif

Ver ficheiro

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -1106,16 +1106,8 @@ bool lim_process_fils_auth_frame2(struct mac_context *mac_ctx,
return true; return true;
} }
/**
* lim_update_fils_config()- This API update fils session info to csr config
* from join request.
* @session: PE session
* @sme_join_req: pointer to join request
*
* Return: None
*/
void lim_update_fils_config(struct pe_session *session, void lim_update_fils_config(struct pe_session *session,
tpSirSmeJoinReq sme_join_req) struct join_req *sme_join_req)
{ {
struct pe_fils_session *csr_fils_info; struct pe_fils_session *csr_fils_info;
struct cds_fils_connection_info *fils_config_info; struct cds_fils_connection_info *fils_config_info;

Ver ficheiro

@@ -1115,7 +1115,7 @@ void lim_get_random_bssid(struct mac_context *mac, uint8_t *data)
* Return: None * Return: None
*/ */
static void lim_update_sae_config(struct pe_session *session, static void lim_update_sae_config(struct pe_session *session,
tpSirSmeJoinReq sme_join_req) struct join_req *sme_join_req)
{ {
session->sae_pmk_cached = sme_join_req->sae_pmk_cached; session->sae_pmk_cached = sme_join_req->sae_pmk_cached;
@@ -1125,7 +1125,7 @@ static void lim_update_sae_config(struct pe_session *session,
} }
#else #else
static inline void lim_update_sae_config(struct pe_session *session, static inline void lim_update_sae_config(struct pe_session *session,
tpSirSmeJoinReq sme_join_req) struct join_req *sme_join_req)
{} {}
#endif #endif
@@ -1241,7 +1241,7 @@ static QDF_STATUS lim_send_ft_reassoc_req(struct pe_session *session,
static void static void
__lim_process_sme_join_req(struct mac_context *mac_ctx, uint32_t *msg_buf) __lim_process_sme_join_req(struct mac_context *mac_ctx, uint32_t *msg_buf)
{ {
tpSirSmeJoinReq sme_join_req = NULL; struct join_req *sme_join_req = NULL;
tLimMlmJoinReq *mlm_join_req; tLimMlmJoinReq *mlm_join_req;
tSirResultCodes ret_code = eSIR_SME_SUCCESS; tSirResultCodes ret_code = eSIR_SME_SUCCESS;
uint32_t val = 0; uint32_t val = 0;
@@ -1756,11 +1756,11 @@ uint8_t lim_get_max_tx_power(int8_t regMax, int8_t apTxPower,
*/ */
static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx, static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
uint32_t *msg_buf) uint32_t *msg_buf)
{ {
uint16_t caps; uint16_t caps;
uint32_t val; uint32_t val;
tpSirSmeJoinReq reassoc_req = NULL; struct join_req *reassoc_req;
tLimMlmReassocReq *mlm_reassoc_req; tLimMlmReassocReq *mlm_reassoc_req;
tSirResultCodes ret_code = eSIR_SME_SUCCESS; tSirResultCodes ret_code = eSIR_SME_SUCCESS;
struct pe_session *session_entry = NULL; struct pe_session *session_entry = NULL;
@@ -1778,10 +1778,9 @@ static void __lim_process_sme_reassoc_req(struct mac_context *mac_ctx,
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE; ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end; goto end;
} }
(void)qdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size); qdf_mem_copy(reassoc_req, msg_buf, size);
if (!lim_is_sme_join_req_valid(mac_ctx, if (!lim_is_sme_join_req_valid(mac_ctx, reassoc_req)) {
(tpSirSmeJoinReq)reassoc_req)) {
/* /*
* Received invalid eWNI_SME_REASSOC_REQ * Received invalid eWNI_SME_REASSOC_REQ
*/ */

Ver ficheiro

@@ -183,7 +183,7 @@ void lim_send_reassoc_req_with_ft_ies_mgmt_frame(struct mac_context *mac_ctx,
/* /*
* The join request *should* contain zero or one of the WPA and RSN * The join request *should* contain zero or one of the WPA and RSN
* IEs. The payload send along with the request is a * IEs. The payload send along with the request is a
* 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie': * 'struct join_req'; the IE portion is held inside a 'tSirRSNie':
* *
* typedef struct sSirRSNie * typedef struct sSirRSNie
* { * {
@@ -636,7 +636,7 @@ void lim_send_reassoc_req_mgmt_frame(struct mac_context *mac,
populate_dot11f_rrm_ie(mac, &frm->RRMEnabledCap, pe_session); populate_dot11f_rrm_ie(mac, &frm->RRMEnabledCap, pe_session);
/* The join request *should* contain zero or one of the WPA and RSN */ /* The join request *should* contain zero or one of the WPA and RSN */
/* IEs. The payload send along with the request is a */ /* IEs. The payload send along with the request is a */
/* 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie': */ /* 'struct join_req'; the IE portion is held inside a 'tSirRSNie': */
/* typedef struct sSirRSNie */ /* typedef struct sSirRSNie */
/* { */ /* { */

Ver ficheiro

@@ -1721,7 +1721,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
/* /*
* The join request *should* contain zero or one of the WPA and RSN * The join request *should* contain zero or one of the WPA and RSN
* IEs. The payload send along with the request is a * IEs. The payload send along with the request is a
* 'tSirSmeJoinReq'; the IE portion is held inside a 'tSirRSNie': * 'struct join_req'; the IE portion is held inside a 'tSirRSNie':
* typedef struct sSirRSNie * typedef struct sSirRSNie
* { * {
* uint16_t length; * uint16_t length;

Ver ficheiro

@@ -208,7 +208,7 @@ static void lim_handle_join_rsp_status(struct mac_context *mac_ctx,
uint16_t bss_ie_len; uint16_t bss_ie_len;
void *bss_ies; void *bss_ies;
bool is_vendor_ap_1_present; bool is_vendor_ap_1_present;
tpSirSmeJoinReq join_reassoc_req = NULL; struct join_req *join_reassoc_req = NULL;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
struct ht_profile *ht_profile; struct ht_profile *ht_profile;

Ver ficheiro

@@ -453,27 +453,8 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
return true; return true;
} }
/** uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
* lim_is_sme_join_req_valid() struct join_req *pJoinReq)
*
***FUNCTION:
* This function is called by lim_process_sme_req_messages() upon
* receiving SME_JOIN_REQ message from application.
*
***LOGIC:
* Message validity checks are performed in this function
*
***ASSUMPTIONS:
*
***NOTE:
*
* @param mac Pointer to Global MAC structure
* @param pJoinReq Pointer to received SME_JOIN_REQ message
* @return true when received SME_JOIN_REQ is formatted correctly
* false otherwise
*/
uint8_t lim_is_sme_join_req_valid(struct mac_context *mac, tpSirSmeJoinReq pJoinReq)
{ {
uint8_t valid = true; uint8_t valid = true;

Ver ficheiro

@@ -50,7 +50,21 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx,
uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *, uint8_t lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(struct mac_context *,
tpSirRSNie, struct pe_session *); tpSirRSNie, struct pe_session *);
uint8_t lim_is_sme_join_req_valid(struct mac_context *, tpSirSmeJoinReq);
/**
* lim_is_sme_join_req_valid() - Verify join request message is valid
* @mac: Pointer to Global MAC structure
* @pJoinReq: Pointer to received SME_JOIN_REQ message
*
* This function is called by lim_process_sme_req_messages() upon
* receiving SME_JOIN_REQ message from application.
*
* Return: true when received SME_JOIN_REQ is formatted correctly
* false otherwise
*/
uint8_t lim_is_sme_join_req_valid(struct mac_context *mac,
struct join_req *pJoinReq);
uint8_t lim_is_sme_disassoc_req_valid(struct mac_context *, tpSirSmeDisassocReq, uint8_t lim_is_sme_disassoc_req_valid(struct mac_context *, tpSirSmeDisassocReq,
struct pe_session *); struct pe_session *);
uint8_t lim_is_sme_deauth_req_valid(struct mac_context *, tpSirSmeDeauthReq, struct pe_session *); uint8_t lim_is_sme_deauth_req_valid(struct mac_context *, tpSirSmeDeauthReq, struct pe_session *);

Ver ficheiro

@@ -6992,7 +6992,7 @@ void lim_copy_bss_he_cap(struct pe_session *session,
} }
void lim_copy_join_req_he_cap(struct pe_session *session, void lim_copy_join_req_he_cap(struct pe_session *session,
tpSirSmeJoinReq sme_join_req) struct join_req *sme_join_req)
{ {
qdf_mem_copy(&(session->he_config), &(sme_join_req->he_config), qdf_mem_copy(&(session->he_config), &(sme_join_req->he_config),
sizeof(session->he_config)); sizeof(session->he_config));

Ver ficheiro

@@ -957,7 +957,7 @@ void lim_copy_bss_he_cap(struct pe_session *session,
* Return: None * Return: None
*/ */
void lim_copy_join_req_he_cap(struct pe_session *session, void lim_copy_join_req_he_cap(struct pe_session *session,
tpSirSmeJoinReq sme_join_req); struct join_req *sme_join_req);
/** /**
* lim_log_he_op() - Print HE Operation * lim_log_he_op() - Print HE Operation
@@ -1200,7 +1200,7 @@ void lim_copy_bss_he_cap(struct pe_session *session,
} }
static inline void lim_copy_join_req_he_cap(struct pe_session *session, static inline void lim_copy_join_req_he_cap(struct pe_session *session,
tpSirSmeJoinReq sme_join_req) struct join_req *sme_join_req)
{ {
} }

Ver ficheiro

@@ -1349,7 +1349,7 @@ QDF_STATUS rrm_cleanup(struct mac_context *mac)
* Return: None * Return: None
*/ */
void lim_update_rrm_capability(struct mac_context *mac_ctx, void lim_update_rrm_capability(struct mac_context *mac_ctx,
tpSirSmeJoinReq join_req) struct join_req *join_req)
{ {
mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled; mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled;
qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps, qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps,

Ver ficheiro

@@ -2296,8 +2296,8 @@ uint32_t csr_convert_phy_cb_state_to_ini_value(ePhyChanBondState phyCbState)
* *
* Return: None * Return: None
*/ */
static void csr_join_req_copy_he_cap(tSirSmeJoinReq *csr_join_req, static void csr_join_req_copy_he_cap(struct join_req *csr_join_req,
struct csr_roam_session *session) struct csr_roam_session *session)
{ {
qdf_mem_copy(&csr_join_req->he_config, &session->he_config, qdf_mem_copy(&csr_join_req->he_config, &session->he_config,
sizeof(session->he_config)); sizeof(session->he_config));
@@ -2345,7 +2345,7 @@ void csr_update_session_he_cap(struct mac_context *mac_ctx,
#define CSR_REVISE_REQ_HE_CAP_PER_BAND(_req, _pmac, _channelid) /* no op */ #define CSR_REVISE_REQ_HE_CAP_PER_BAND(_req, _pmac, _channelid) /* no op */
static inline static inline
void csr_join_req_copy_he_cap(tSirSmeJoinReq *csr_join_req, void csr_join_req_copy_he_cap(struct join_req *csr_join_req,
struct csr_roam_session *session) struct csr_roam_session *session)
{ {
} }
@@ -14102,7 +14102,7 @@ bool csr_is_mfpc_capable(struct sDot11fIERSN *rsn)
*/ */
static void csr_set_mgmt_enc_type(struct csr_roam_profile *profile, static void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
tDot11fBeaconIEs *ies, tDot11fBeaconIEs *ies,
tSirSmeJoinReq *csr_join_req) struct join_req *csr_join_req)
{ {
sme_debug("mgmt encryption type %d MFPe %d MFPr %d", sme_debug("mgmt encryption type %d MFPe %d MFPr %d",
profile->mgmt_encryption_type, profile->mgmt_encryption_type,
@@ -14122,7 +14122,7 @@ static void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
#else #else
static inline void csr_set_mgmt_enc_type(struct csr_roam_profile *profile, static inline void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
tDot11fBeaconIEs *pIes, tDot11fBeaconIEs *pIes,
tSirSmeJoinReq *csr_join_req) struct join_req *csr_join_req)
{ {
} }
#endif #endif
@@ -14136,7 +14136,7 @@ static inline void csr_set_mgmt_enc_type(struct csr_roam_profile *profile,
* Return: None * Return: None
*/ */
static void csr_update_fils_connection_info(struct csr_roam_profile *profile, static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
tSirSmeJoinReq *csr_join_req) struct join_req *csr_join_req)
{ {
if (!profile->fils_con_info) if (!profile->fils_con_info)
return; return;
@@ -14152,7 +14152,7 @@ static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
} }
#else #else
static void csr_update_fils_connection_info(struct csr_roam_profile *profile, static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
tSirSmeJoinReq *csr_join_req) struct join_req *csr_join_req)
{ } { }
#endif #endif
@@ -14164,7 +14164,7 @@ static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
* *
* Return: None * Return: None
*/ */
static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req, static void csr_update_sae_config(struct join_req *csr_join_req,
struct mac_context *mac, struct csr_roam_session *session) struct mac_context *mac, struct csr_roam_session *session)
{ {
tPmkidCacheInfo pmkid_cache; tPmkidCacheInfo pmkid_cache;
@@ -14181,7 +14181,7 @@ static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req,
MAC_ADDR_ARRAY(csr_join_req->bssDescription.bssId)); MAC_ADDR_ARRAY(csr_join_req->bssDescription.bssId));
} }
#else #else
static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req, static void csr_update_sae_config(struct join_req *csr_join_req,
struct mac_context *mac, struct csr_roam_session *session) struct mac_context *mac, struct csr_roam_session *session)
{ } { }
#endif #endif
@@ -14319,9 +14319,9 @@ static bool csr_enable_twt(struct mac_context *mac_ctx, tDot11fBeaconIEs *ie)
/** /**
* The communication between HDD and LIM is thru mailbox (MB). * The communication between HDD and LIM is thru mailbox (MB).
* Both sides will access the data structure "tSirSmeJoinReq". * Both sides will access the data structure "struct join_req".
* The rule is, while the components of "tSirSmeJoinReq" can be accessed in the * The rule is, while the components of "struct join_req" can be accessed in the
* regular way like tSirSmeJoinReq.assocType, this guideline stops at component * regular way like struct join_req.assocType, this guideline stops at component
* tSirRSNie; * tSirRSNie;
* any acces to the components after tSirRSNie is forbidden because the space * any acces to the components after tSirRSNie is forbidden because the space
* from tSirRSNie is squeezed with the component "tSirBssDescription" and since * from tSirRSNie is squeezed with the component "tSirBssDescription" and since
@@ -14342,7 +14342,7 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
uint32_t dw_tmp, dot11mode = 0; uint32_t dw_tmp, dot11mode = 0;
uint8_t *wpaRsnIE = NULL; uint8_t *wpaRsnIE = NULL;
uint8_t txBFCsnValue = 0; uint8_t txBFCsnValue = 0;
tSirSmeJoinReq *csr_join_req; struct join_req *csr_join_req;
tSirMacCapabilityInfo *pAP_capabilityInfo; tSirMacCapabilityInfo *pAP_capabilityInfo;
bool fTmp; bool fTmp;
int8_t pwrLimit = 0; int8_t pwrLimit = 0;
@@ -14383,16 +14383,16 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
qdf_mem_copy(&pSession->joinFailStatusCode.bssId, qdf_mem_copy(&pSession->joinFailStatusCode.bssId,
&pBssDescription->bssId, sizeof(tSirMacAddr)); &pBssDescription->bssId, sizeof(tSirMacAddr));
/* /*
* the tSirSmeJoinReq which includes a single * the struct join_req which includes a single
* bssDescription. it includes a single uint32_t for the * bssDescription. it includes a single uint32_t for the
* IE fields, but the length field in the bssDescription * IE fields, but the length field in the bssDescription
* needs to be interpreted to determine length of IE fields * needs to be interpreted to determine length of IE fields
* So, take the size of the tSirSmeJoinReq, subtract size of * So, take the size of the struct join_req, subtract size of
* bssDescription, add the number of bytes indicated by the * bssDescription, add the number of bytes indicated by the
* length field of the bssDescription, add the size of length * length field of the bssDescription, add the size of length
* field because it not included in the length field. * field because it not included in the length field.
*/ */
msgLen = sizeof(tSirSmeJoinReq) - sizeof(*pBssDescription) + msgLen = sizeof(struct join_req) - sizeof(*pBssDescription) +
pBssDescription->length + pBssDescription->length +
sizeof(pBssDescription->length) + sizeof(pBssDescription->length) +
/* /*