فهرست منبع

qcacld-3.0: Replace typedef tSirSmeTsmIEInd

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 tSirSmeTsmIEInd 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: I41b8b340fa3f781973d78edde3b54b7a5f0bd30d
CRs-Fixed: 2394254
Jeff Johnson 6 سال پیش
والد
کامیت
e21b0ebb12
3فایلهای تغییر یافته به همراه8 افزوده شده و 6 حذف شده
  1. 3 2
      core/mac/inc/sir_api.h
  2. 4 3
      core/mac/src/pe/lim/lim_assoc_utils.c
  3. 1 1
      core/sme/src/common/sme_api.c

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

@@ -784,10 +784,11 @@ struct tsm_ie {
 	uint16_t msmt_interval;
 };
 
-typedef struct sSirSmeTsmIEInd {
+struct tsm_ie_ind {
 	struct tsm_ie tsm_ie;
 	uint8_t sessionId;
-} tSirSmeTsmIEInd, *tpSirSmeTsmIEInd;
+};
+
 typedef struct sAniTrafStrmMetrics {
 	uint16_t UplinkPktQueueDly;
 	uint16_t UplinkPktQueueDlyHist[4];

+ 4 - 3
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -4743,16 +4743,17 @@ void lim_send_sme_unprotected_mgmt_frame_ind(struct mac_context *mac, uint8_t fr
    \param  measurementInterval - measurement interval
    \return none
    -------------------------------------------------------------*/
-void lim_send_sme_tsm_ie_ind(struct mac_context *mac, struct pe_session *pe_session,
+void lim_send_sme_tsm_ie_ind(struct mac_context *mac,
+			     struct pe_session *pe_session,
 			     uint8_t tid, uint8_t state, uint16_t measInterval)
 {
 	struct scheduler_msg mmhMsg = {0};
-	tpSirSmeTsmIEInd pSirSmeTsmIeInd = NULL;
+	struct tsm_ie_ind *pSirSmeTsmIeInd = NULL;
 
 	if (!mac || !pe_session)
 		return;
 
-	pSirSmeTsmIeInd = qdf_mem_malloc(sizeof(tSirSmeTsmIEInd));
+	pSirSmeTsmIeInd = qdf_mem_malloc(sizeof(*pSirSmeTsmIeInd));
 	if (!pSirSmeTsmIeInd)
 		return;
 

+ 1 - 1
core/sme/src/common/sme_api.c

@@ -1550,7 +1550,7 @@ send_plm_start:
  * Return: QDF_STATUS enumeration
  */
 static QDF_STATUS sme_tsm_ie_ind(struct mac_context *mac,
-				 tSirSmeTsmIEInd *pSmeTsmIeInd)
+				 struct tsm_ie_ind *pSmeTsmIeInd)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct csr_roam_info roam_info = { 0 };