Przeglądaj źródła

qcacld-3.0: Replace typedef tSirHTConfig

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 tSirHTConfig 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: I567cc4502a2332b391efc0b09c7802afd88bee5b
CRs-Fixed: 2393728
Jeff Johnson 6 lat temu
rodzic
commit
72ac2c8cb1

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

@@ -470,7 +470,7 @@ typedef enum eSirNwType {
 } tSirNwType;
 
 /* HT configuration values */
-typedef struct sSirHtConfig {
+struct ht_config {
 	/* Enable/Disable receiving LDPC coded packets */
 	uint32_t ht_rx_ldpc:1;
 	/* Enable/Disable TX STBC */
@@ -481,7 +481,7 @@ typedef struct sSirHtConfig {
 	uint32_t ht_sgi20:1;
 	uint32_t ht_sgi40:1;
 	uint32_t unused:27;
-} qdf_packed tSirHTConfig, *tpSirHTConfig;
+};
 
 /**
  * struct sir_vht_config - VHT capabilities
@@ -597,7 +597,7 @@ typedef struct sSirSmeStartBssReq {
 	tSirNwType nwType;      /* Indicates 11a/b/g */
 	tSirMacRateSet operationalRateSet;      /* Has 11a or 11b rates */
 	tSirMacRateSet extendedRateSet; /* Has 11g rates */
-	tSirHTConfig htConfig;
+	struct ht_config htConfig;
 	struct sir_vht_config vht_config;
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_config;
@@ -954,7 +954,7 @@ typedef struct sSirSmeJoinReq {
 	bool isFastRoamIniFeatureEnabled;
 
 	uint8_t txLdpcIniFeatureEnabled;
-	tSirHTConfig htConfig;
+	struct ht_config htConfig;
 	struct sir_vht_config vht_config;
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_config;

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

@@ -377,7 +377,7 @@ struct pe_session {
 	uint8_t max_amsdu_num;
 	uint8_t isCoalesingInIBSSAllowed;
 
-	tSirHTConfig htConfig;
+	struct ht_config htConfig;
 	struct sir_vht_config vht_config;
 	/*
 	 * Place holder for StartBssReq message

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

@@ -656,7 +656,7 @@ struct csr_roam_session {
 	tCsrEseCckmIe suppCckmIeInfo;
 #endif
 	uint8_t bRefAssocStartCnt;      /* Tracking assoc start indication */
-	tSirHTConfig htConfig;
+	struct ht_config htConfig;
 	struct sir_vht_config vht_config;
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_config;

+ 4 - 10
core/sme/src/csr/csr_api_roam.c

@@ -14961,10 +14961,8 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
 					       pBssDescription->channelId,
 					       mac->mlme_cfg->ht_caps.
 					       ht_cap_info.adv_coding_cap);
-		qdf_mem_copy(&csr_join_req->htConfig,
-				&pSession->htConfig, sizeof(tSirHTConfig));
-		qdf_mem_copy(&csr_join_req->vht_config, &pSession->vht_config,
-				sizeof(pSession->vht_config));
+		csr_join_req->htConfig = pSession->htConfig;
+		csr_join_req->vht_config = pSession->vht_config;
 		sme_debug("ht capability 0x%x VHT capability 0x%x",
 			(unsigned int)(*(uint32_t *) &csr_join_req->htConfig),
 			(unsigned int)(*(uint32_t *) &csr_join_req->
@@ -15794,12 +15792,8 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
 				       mac->mlme_cfg->ht_caps.
 				       ht_cap_info.adv_coding_cap);
 
-	qdf_mem_copy(&pMsg->vht_config,
-		     &pSession->vht_config,
-		     sizeof(pSession->vht_config));
-	qdf_mem_copy(&pMsg->htConfig,
-		     &pSession->htConfig,
-		     sizeof(tSirHTConfig));
+	pMsg->vht_config = pSession->vht_config;
+	pMsg->htConfig = pSession->htConfig;
 
 	value = mac->mlme_cfg->vht_caps.vht_cap_info.su_bformee;
 	pMsg->vht_config.su_beam_formee =