Parcourir la source

qcacld-3.0: Replace typedef tCsrConfigParam

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 tCsrConfigParam typedef does
not meet any of those criteria, so replace it with a reference to the
underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names so in
conjunction rename the underlying struct to be in compliance.

Change-Id: If6f07ced0a8f92ddf06bc40a042efd6584df147b
CRs-Fixed: 2428991
Jeff Johnson il y a 6 ans
Parent
commit
dd821156a1

+ 4 - 3
core/sme/inc/csr_api.h

@@ -951,7 +951,7 @@ struct csr_neighbor_report_offload_params {
 	uint32_t max_neighbor_report_req_cap;
 };
 
-typedef struct tagCsrConfigParam {
+struct csr_config_params {
 	/* keep this uint32_t. This gets converted to ePhyChannelBondState */
 	uint32_t channelBondingMode24GHz;
 	uint32_t channelBondingMode5GHz;
@@ -1033,7 +1033,7 @@ typedef struct tagCsrConfigParam {
 	uint32_t offload_11k_enable_bitmask;
 	bool wep_tkip_in_he;
 	struct csr_neighbor_report_offload_params neighbor_report_offload;
-} tCsrConfigParam;
+};
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 #define csr_is_roam_offload_enabled(mac) \
@@ -1387,7 +1387,8 @@ typedef QDF_STATUS (*csr_session_close_cb)(uint8_t session_id);
 #define CSR_IS_AUTH_TYPE_SAE(auth_type) (false)
 #endif
 
-QDF_STATUS csr_set_channels(struct mac_context *mac, tCsrConfigParam *pParam);
+QDF_STATUS csr_set_channels(struct mac_context *mac,
+			    struct csr_config_params *pParam);
 
 /* enum to string conversion for debug output */
 const char *get_e_roam_cmd_status_str(eRoamCmdStatus val);

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

@@ -945,9 +945,9 @@ QDF_STATUS csr_get_rssi(struct mac_context *mac, tCsrRssiCallback callback,
 QDF_STATUS csr_get_snr(struct mac_context *mac, tCsrSnrCallback callback,
 		uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
 QDF_STATUS csr_get_config_param(struct mac_context *mac,
-					  tCsrConfigParam *pParam);
+					  struct csr_config_params *pParam);
 QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
-		tCsrConfigParam *pParam);
+		struct csr_config_params *pParam);
 QDF_STATUS csr_msg_processor(struct mac_context *mac, void *pMsgBuf);
 QDF_STATUS csr_open(struct mac_context *mac);
 QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2);

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

@@ -132,7 +132,7 @@
   Type declarations
   ------------------------------------------------------------------------*/
 struct sme_config_params {
-	tCsrConfigParam csrConfig;
+	struct csr_config_params csrConfig;
 };
 
 #ifdef FEATURE_WLAN_TDLS

+ 3 - 2
core/sme/src/common/sme_api.c

@@ -851,8 +851,9 @@ void sme_update_fine_time_measurement_capab(mac_handle_t mac_handle,
  *
  * Return: None
  */
-static void sme_update_neighbor_report_config(struct mac_context *mac,
-					      tCsrConfigParam *csr_config)
+static void
+sme_update_neighbor_report_config(struct mac_context *mac,
+				  struct csr_config_params *csr_config)
 {
 	struct wlan_fwol_neighbor_report_cfg fwol_neighbor_report_cfg = {0};
 	QDF_STATUS status;

+ 7 - 5
core/sme/src/csr/csr_api_roam.c

@@ -707,7 +707,8 @@ QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2)
 	return status;
 }
 
-QDF_STATUS csr_set_channels(struct mac_context *mac, tCsrConfigParam *pParam)
+QDF_STATUS csr_set_channels(struct mac_context *mac,
+			    struct csr_config_params *pParam)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	uint8_t index = 0;
@@ -2402,7 +2403,7 @@ void csr_start_bss_copy_he_cap(struct start_bss_req *req,
  */
 static
 void csr_set_11k_offload_config_param(struct csr_config *csr_config,
-					tCsrConfigParam *param)
+					struct csr_config_params *param)
 {
 	csr_config->offload_11k_enable_bitmask =
 		param->offload_11k_enable_bitmask;
@@ -2445,7 +2446,7 @@ csr_copy_mawc_config(struct mac_context *mac,
 }
 
 QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
-					   tCsrConfigParam *pParam)
+					   struct csr_config_params *pParam)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
@@ -2642,7 +2643,7 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
  */
 static
 void csr_get_11k_offload_config_param(struct csr_config *csr_config,
-					tCsrConfigParam *param)
+					struct csr_config_params *param)
 {
 	param->offload_11k_enable_bitmask =
 		csr_config->offload_11k_enable_bitmask;
@@ -2664,7 +2665,8 @@ void csr_get_11k_offload_config_param(struct csr_config *csr_config,
 		max_neighbor_report_req_cap;
 }
 
-QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam)
+QDF_STATUS csr_get_config_param(struct mac_context *mac,
+				struct csr_config_params *pParam)
 {
 	struct csr_config *cfg_params = &mac->roam.configParam;