Browse Source

qcacld-3.0: Replace typedef tSirChangeBIParams

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 tSirChangeBIParams 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: Ie9e2f4191461a9a4f33d8affbddc187bb3700726
CRs-Fixed: 2396059
Jeff Johnson 6 years ago
parent
commit
2482c7911b

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

@@ -1927,13 +1927,13 @@ struct sir_create_session {
 };
 
 /* Beacon Interval */
-typedef struct sSirChangeBIParams {
+struct change_bi_params {
 	uint16_t messageType;
 	uint16_t length;
 	uint16_t beaconInterval;        /* Beacon Interval */
 	struct qdf_mac_addr bssid;
 	uint8_t sessionId;      /* Session ID */
-} tSirChangeBIParams, *tpSirChangeBIParams;
+};
 
 #ifdef QCA_HT_2040_COEX
 typedef struct sSirSetHT2040Mode {

+ 5 - 4
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3886,9 +3886,10 @@ static void __lim_process_sme_session_update(struct mac_context *mac_ctx,
 /*
    Update the beacon Interval dynamically if beaconInterval is different in MCC
  */
-static void __lim_process_sme_change_bi(struct mac_context *mac, uint32_t *pMsgBuf)
+static void __lim_process_sme_change_bi(struct mac_context *mac,
+					uint32_t *pMsgBuf)
 {
-	tpSirChangeBIParams pChangeBIParams;
+	struct change_bi_params *pChangeBIParams;
 	struct pe_session *pe_session;
 	uint8_t sessionId = 0;
 	tUpdateBeaconParams beaconParams;
@@ -3901,7 +3902,7 @@ static void __lim_process_sme_change_bi(struct mac_context *mac, uint32_t *pMsgB
 	}
 
 	qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
-	pChangeBIParams = (tpSirChangeBIParams) pMsgBuf;
+	pChangeBIParams = (struct change_bi_params *)pMsgBuf;
 
 	pe_session = pe_find_session_by_bssid(mac,
 				pChangeBIParams->bssid.bytes,
@@ -3942,7 +3943,7 @@ static void __lim_process_sme_change_bi(struct mac_context *mac, uint32_t *pMsgB
 	}
 
 	return;
-} /*** end __lim_process_sme_change_bi(struct mac_context *mac, uint32_t *pMsgBuf) ***/
+} /*** end __lim_process_sme_change_bi() ***/
 
 #ifdef QCA_HT_2040_COEX
 static void __lim_process_sme_set_ht2040_mode(struct mac_context *mac,

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

@@ -15284,7 +15284,7 @@ QDF_STATUS csr_send_mb_disassoc_req_msg(struct mac_context *mac,
 QDF_STATUS csr_send_chng_mcc_beacon_interval(struct mac_context *mac,
 						uint32_t sessionId)
 {
-	tpSirChangeBIParams pMsg;
+	struct change_bi_params *pMsg;
 	uint16_t len = 0;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
@@ -15303,7 +15303,7 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(struct mac_context *mac,
 		false;
 
 	/* Create the message and send to lim */
-	len = sizeof(tSirChangeBIParams);
+	len = sizeof(*pMsg);
 	pMsg = qdf_mem_malloc(len);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;