瀏覽代碼

qcacld-3.0: Replace typedef tSirSmeChanInfo

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 tSirSmeChanInfo 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, as well as to be more specific on how the
struct is used.

Change-Id: Ic9a596d05a7c4c0727264c33e865edd4a9786dac
CRs-Fixed: 2394998
Jeff Johnson 6 年之前
父節點
當前提交
a7d5b54c7e

+ 2 - 2
core/hdd/inc/wlan_hdd_main.h

@@ -3101,7 +3101,7 @@ static inline void hdd_send_peer_status_ind_to_app(
 					uint8_t peer_status,
 					uint8_t peer_timing_meas_cap,
 					uint8_t sessionId,
-					tSirSmeChanInfo *chan_info,
+					struct oem_channel_info *chan_info,
 					enum QDF_OPMODE dev_mode)
 {
 	struct wifi_pos_ch_info ch_info;
@@ -3134,7 +3134,7 @@ static inline void hdd_send_peer_status_ind_to_app(
 					uint8_t peer_status,
 					uint8_t peer_timing_meas_cap,
 					uint8_t sessionId,
-					tSirSmeChanInfo *chan_info,
+					struct oem_channel_info *chan_info,
 					enum QDF_OPMODE dev_mode)
 {
 	hdd_send_peer_status_ind_to_oem_app(peer_mac, peer_status,

+ 2 - 2
core/hdd/inc/wlan_hdd_oemdata.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -171,7 +171,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
 					 uint8_t peerStatus,
 					 uint8_t peerTimingMeasCap,
 					 uint8_t sessionId,
-					 struct sSirSmeChanInfo *chan_info,
+					 struct oem_channel_info *chan_info,
 					 enum QDF_OPMODE dev_mode);
 
 int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,

+ 1 - 1
core/hdd/src/wlan_hdd_assoc.c

@@ -1353,7 +1353,7 @@ static void hdd_send_association_event(struct net_device *dev,
 		}
 #endif
 	if (eConnectionState_Associated == sta_ctx->conn_info.connState) {
-		tSirSmeChanInfo chan_info = {0};
+		struct oem_channel_info chan_info = {0};
 
 		if (!pCsrRoamInfo || !pCsrRoamInfo->pBssDesc) {
 			hdd_warn("STA in associated state but pCsrRoamInfo is null");

+ 1 - 1
core/hdd/src/wlan_hdd_oemdata.c

@@ -682,7 +682,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
 					 uint8_t peerStatus,
 					 uint8_t peerTimingMeasCap,
 					 uint8_t sessionId,
-					 tSirSmeChanInfo *chan_info,
+					 struct oem_channel_info *chan_info,
 					 enum QDF_OPMODE dev_mode)
 {
 	struct sk_buff *skb;

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

@@ -1056,7 +1056,7 @@ struct join_rsp {
 	uint8_t frames[1];
 };
 
-typedef struct sSirSmeChanInfo {
+struct oem_channel_info {
 	uint8_t chan_id;
 	uint32_t mhz;
 	uint32_t band_center_freq1;
@@ -1068,7 +1068,7 @@ typedef struct sSirSmeChanInfo {
 	uint32_t rate_flags;
 	uint8_t sec_ch_offset;
 	enum phy_ch_width ch_width;
-} tSirSmeChanInfo, *tpSirSmeChanInfo;
+};
 
 enum sir_sme_phy_mode {
 	SIR_SME_PHY_MODE_LEGACY = 0,
@@ -1110,7 +1110,7 @@ typedef struct sSirSmeAssocInd {
 
 	/* Timing measurement capability */
 	uint8_t timingMeasCap;
-	tSirSmeChanInfo chan_info;
+	struct oem_channel_info chan_info;
 	bool ampdu;
 	bool sgi_enable;
 	bool tx_stbc;

+ 1 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -736,7 +736,7 @@ lim_fill_assoc_ind_params(struct mac_context *mac_ctx,
 			assoc_ind->supportedChannels.numChnl);
 	}
 	qdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info,
-		sizeof(tSirSmeChanInfo));
+		sizeof(struct oem_channel_info));
 	/* Fill in WmmInfo */
 	sme_assoc_ind->wmmEnabledSta = assoc_ind->WmmStaInfoPresent;
 	sme_assoc_ind->ampdu = assoc_ind->ampdu;

+ 1 - 1
core/mac/src/pe/lim/lim_types.h

@@ -227,7 +227,7 @@ typedef struct sLimMlmAssocInd {
 	uint8_t *beaconPtr;
 	uint32_t assocReqLength;
 	uint8_t *assocReqPtr;
-	tSirSmeChanInfo chan_info;
+	struct oem_channel_info chan_info;
 	bool ampdu;
 	bool sgi_enable;
 	bool tx_stbc;

+ 1 - 1
core/sap/inc/sap_api.h

@@ -267,7 +267,7 @@ typedef struct sap_StationAssocReassocCompleteEvent_s {
 	uint32_t statusCode;
 	bool wmmEnabled;
 	uint8_t timingMeasCap;
-	tSirSmeChanInfo chan_info;
+	struct oem_channel_info chan_info;
 	bool ampdu;
 	bool sgi_enable;
 	bool tx_stbc;

+ 1 - 1
core/sap/src/sap_fsm.c

@@ -1357,7 +1357,7 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	tSap_Event sap_ap_event = {0};
 	struct mac_context *mac_ctx;
-	tSirSmeChanInfo *chaninfo;
+	struct oem_channel_info *chaninfo;
 	tSap_StationAssocIndication *assoc_ind;
 	tSap_StartBssCompleteEvent *bss_complete;
 	struct sap_ch_selected_s *acs_selected;

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

@@ -1137,7 +1137,7 @@ struct csr_roam_info {
 	uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
 	uint8_t subnet_change_status;
 #endif
-	tSirSmeChanInfo chan_info;
+	struct oem_channel_info chan_info;
 	uint8_t target_channel;
 
 #ifdef WLAN_FEATURE_NAN
@@ -1194,7 +1194,7 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf {
 	uint8_t reassocReq;     /* set to true if reassoc */
 	/* Timing and fine Timing measurement capability clubbed together */
 	uint8_t timingMeasCap;
-	tSirSmeChanInfo chan_info;
+	struct oem_channel_info chan_info;
 	uint8_t target_channel;
 	bool ampdu;
 	bool sgi_enable;

+ 3 - 3
core/sme/src/csr/csr_api_roam.c

@@ -9621,7 +9621,7 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
 			pUpperLayerAssocCnf->timingMeasCap;
 		qdf_mem_copy(&roam_info->chan_info,
 			     &pUpperLayerAssocCnf->chan_info,
-			     sizeof(tSirSmeChanInfo));
+			     sizeof(struct oem_channel_info));
 		roam_info->ampdu = pUpperLayerAssocCnf->ampdu;
 		roam_info->sgi_enable = pUpperLayerAssocCnf->sgi_enable;
 		roam_info->tx_stbc = pUpperLayerAssocCnf->tx_stbc;
@@ -10579,7 +10579,7 @@ csr_roam_chk_lnk_assoc_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
 	roam_info_ptr->ecsa_capable = pAssocInd->ecsa_capable;
 	qdf_mem_copy(&roam_info_ptr->chan_info,
 		     &pAssocInd->chan_info,
-		     sizeof(tSirSmeChanInfo));
+		     sizeof(struct oem_channel_info));
 
 	if (pAssocInd->HTCaps.present)
 		qdf_mem_copy(&roam_info_ptr->ht_caps,
@@ -15585,7 +15585,7 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(struct mac_context *mac,
 		/* chan_info */
 		pBuf = (uint8_t *)&pMsg->chan_info;
 		qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
-			sizeof(tSirSmeChanInfo));
+			sizeof(struct oem_channel_info));
 		/* ampdu */
 		pBuf = (uint8_t *)&pMsg->ampdu;
 		*((bool *)pBuf) = pAssocInd->ampdu;