Browse Source

qcacld-3.0: Replace typedef tSirSmeHOFailureInd

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 tSirSmeHOFailureInd 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: I313e1155aa463bc55ae2467539755fd75cf8a8eb
CRs-Fixed: 2399109
Jeff Johnson 6 years ago
parent
commit
10cde6968b
3 changed files with 11 additions and 10 deletions
  1. 3 3
      core/mac/inc/sir_api.h
  2. 5 4
      core/sme/src/csr/csr_api_roam.c
  3. 3 3
      core/wma/src/wma_scan_roam.c

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

@@ -3139,9 +3139,9 @@ struct roam_offload_synch_ind {
 };
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-typedef struct sSirSmeHOFailureInd {
-	uint8_t sessionId;
-} tSirSmeHOFailureInd, *tpSirSmeHOFailureInd;
+struct handoff_failure_ind {
+	uint8_t vdev_id;
+};
 
 struct roam_offload_synch_fail {
 	uint8_t session_id;

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

@@ -19983,16 +19983,17 @@ void csr_roaming_report_diag_event(struct mac_context *mac_ctx,
  */
 void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *pMsgBuf)
 {
-	tSirSmeHOFailureInd *pSmeHOFailInd = (tSirSmeHOFailureInd *) pMsgBuf;
+	struct handoff_failure_ind *pSmeHOFailInd = pMsgBuf;
 	uint32_t sessionId;
 
-	if (pSmeHOFailInd)
-		sessionId = pSmeHOFailInd->sessionId;
-	else {
+	if (!pSmeHOFailInd) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "LFR3: Hand-Off Failure Ind is NULL");
 		return;
 	}
+
+	sessionId = pSmeHOFailInd->vdev_id;
+
 	/* Roaming is supported only on Infra STA Mode. */
 	if (!csr_roam_is_sta_mode(mac_ctx, sessionId)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,

+ 3 - 3
core/wma/src/wma_scan_roam.c

@@ -3022,15 +3022,15 @@ int wma_rssi_breached_event_handler(void *handle,
  */
 static void wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id)
 {
-	tSirSmeHOFailureInd *ho_failure_ind;
+	struct handoff_failure_ind *ho_failure_ind;
 	struct scheduler_msg sme_msg = { 0 };
 	QDF_STATUS qdf_status;
 
-	ho_failure_ind = qdf_mem_malloc(sizeof(tSirSmeHOFailureInd));
+	ho_failure_ind = qdf_mem_malloc(sizeof(*ho_failure_ind));
 	if (!ho_failure_ind)
 		return;
 
-	ho_failure_ind->sessionId = vdev_id;
+	ho_failure_ind->vdev_id = vdev_id;
 	sme_msg.type = eWNI_SME_HO_FAIL_IND;
 	sme_msg.bodyptr = ho_failure_ind;
 	sme_msg.bodyval = 0;