Browse Source

qcacld-3.0: Replace typedef tSirAddIeParams

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 tSirAddIeParams 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: I8454ba04318e6ef9bacc422138e5a41bd8769f05
CRs-Fixed: 2393730
Jeff Johnson 6 years ago
parent
commit
90542e5819

+ 3 - 3
core/mac/inc/sir_api.h

@@ -529,14 +529,14 @@ struct sir_vht_config {
 };
 
 
-typedef struct sSirAddIeParams {
+struct add_ie_params {
 	uint16_t probeRespDataLen;
 	uint8_t *probeRespData_buff;
 	uint16_t assocRespDataLen;
 	uint8_t *assocRespData_buff;
 	uint16_t probeRespBCNDataLen;
 	uint8_t *probeRespBCNData_buff;
-} tSirAddIeParams, *tpSirAddIeParams;
+};
 
 /* / Definition for kick starting BSS */
 /* / ---> MAC */
@@ -607,7 +607,7 @@ typedef struct sSirSmeStartBssReq {
 	bool pmfRequired;
 #endif
 
-	tSirAddIeParams addIeParams;
+	struct add_ie_params addIeParams;
 
 	bool obssEnabled;
 	uint8_t sap_dot11mc;

+ 1 - 1
core/mac/src/pe/include/lim_session.h

@@ -437,7 +437,7 @@ struct pe_session {
 
 	bool isCiscoVendorAP;
 
-	tSirAddIeParams addIeParams;
+	struct add_ie_params addIeParams;
 
 	uint8_t *pSchProbeRspTemplate;
 	/* Beginning portion of the beacon frame to be written to TFP */

+ 2 - 2
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -5499,7 +5499,7 @@ static void lim_process_modify_add_ies(struct mac_context *mac_ctx,
 	struct pe_session *session_entry;
 	uint8_t session_id;
 	bool ret = false;
-	tSirAddIeParams *add_ie_params;
+	struct add_ie_params *add_ie_params;
 
 	if (msg_buf == NULL) {
 		pe_err("msg_buf is NULL");
@@ -5588,7 +5588,7 @@ static void lim_process_update_add_ies(struct mac_context *mac_ctx,
 	tpSirUpdateIEsInd update_add_ies = (tpSirUpdateIEsInd)msg_buf;
 	uint8_t session_id;
 	struct pe_session *session_entry;
-	tSirAddIeParams *addn_ie;
+	struct add_ie_params *addn_ie;
 	uint16_t new_length = 0;
 	uint8_t *new_ptr = NULL;
 	tSirUpdateIE *update_ie;

+ 2 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -6896,7 +6896,7 @@ void lim_update_stads_he_caps(tpDphHashNode sta_ds, tpSirAssocRsp assoc_rsp,
 
 void lim_update_usr_he_cap(struct mac_context *mac_ctx, struct pe_session *session)
 {
-	tSirAddIeParams *add_ie = &session->addIeParams;
+	struct add_ie_params *add_ie = &session->addIeParams;
 	tDot11fIEhe_cap *he_cap = &session->he_config;
 	struct he_cap_network_endian *he_cap_from_ie;
 	uint8_t extracted_buff[DOT11F_IE_HE_CAP_MAX_LEN + 2];
@@ -6936,7 +6936,7 @@ void lim_decide_he_op(struct mac_context *mac_ctx, tpAddBssParams add_bss,
 	uint8_t color;
 	struct he_ops_network_endian *he_ops_from_ie;
 	tDot11fIEhe_op *he_ops = &add_bss->he_op;
-	tSirAddIeParams *add_ie = &session->addIeParams;
+	struct add_ie_params *add_ie = &session->addIeParams;
 	uint8_t extracted_buff[DOT11F_IE_HE_OP_MAX_LEN + 2];
 	QDF_STATUS status;
 

+ 1 - 1
core/sme/inc/csr_api.h

@@ -816,7 +816,7 @@ struct csr_roam_profile {
 	struct mobility_domain_info mdid;
 	enum QDF_OPMODE csrPersona;
 	/* addIe params */
-	tSirAddIeParams addIeParams;
+	struct add_ie_params addIeParams;
 	uint16_t beacon_tx_rate;
 	tSirMacRateSet  supported_rates;
 	tSirMacRateSet  extended_rates;

+ 1 - 1
core/sme/inc/csr_internal.h

@@ -267,7 +267,7 @@ struct csr_roamstart_bssparams {
 	bool mfpCapable;
 	bool mfpRequired;
 #endif
-	tSirAddIeParams addIeParams;
+	struct add_ie_params addIeParams;
 	uint8_t sap_dot11mc;
 	uint16_t beacon_tx_rate;
 	uint32_t cac_duration_ms;

+ 1 - 2
core/sme/src/csr/csr_api_roam.c

@@ -7496,8 +7496,7 @@ QDF_STATUS csr_roam_copy_profile(struct mac_context *mac,
 	pDstProfile->MFPCapable = pSrcProfile->MFPCapable;
 #endif
 	pDstProfile->mdid = pSrcProfile->mdid;
-	qdf_mem_copy(&pDstProfile->addIeParams, &pSrcProfile->addIeParams,
-			sizeof(tSirAddIeParams));
+	pDstProfile->addIeParams = pSrcProfile->addIeParams;
 
 	update_profile_fils_info(pDstProfile, pSrcProfile);