Pārlūkot izejas kodu

qcacld-3.0: Replace typedef tSirSmeStopBssReq

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 tSirSmeStopBssReq 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: I6a93406e7920ed6128228bcff3cdb88e8930b451
CRs-Fixed: 2395994
Jeff Johnson 6 gadi atpakaļ
vecāks
revīzija
206721c41a

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

@@ -1331,14 +1331,14 @@ struct deauth_cnf {
 };
 
 /* / Definition for stop BSS request message */
-typedef struct sSirSmeStopBssReq {
+struct stop_bss_req {
 	uint16_t messageType;   /* eWNI_SME_STOP_BSS_REQ */
 	uint16_t length;
 	uint8_t sessionId;      /* Session ID */
 	uint16_t transactionId; /* tranSaction ID for cmd */
 	tSirResultCodes reasonCode;
 	struct qdf_mac_addr bssid;      /* Self BSSID */
-} tSirSmeStopBssReq, *tpSirSmeStopBssReq;
+};
 
 /* / Definition for stop BSS response message */
 typedef struct sSirSmeStopBssRsp {

+ 7 - 7
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2996,16 +2996,16 @@ static void lim_delete_peers_and_send_vdev_stop(struct pe_session *session)
 static void
 __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *pMsgBuf)
 {
-	tSirSmeStopBssReq stopBssReq;
+	struct stop_bss_req stop_bss_req;
 	tLimSmeStates prevState;
 	struct pe_session *pe_session;
 	uint8_t smesessionId;
 	uint8_t sessionId;
 	uint16_t smetransactionId;
 
-	qdf_mem_copy(&stopBssReq, pMsgBuf, sizeof(tSirSmeStopBssReq));
-	smesessionId = stopBssReq.sessionId;
-	smetransactionId = stopBssReq.transactionId;
+	qdf_mem_copy(&stop_bss_req, pMsgBuf, sizeof(stop_bss_req));
+	smesessionId = stop_bss_req.sessionId;
+	smetransactionId = stop_bss_req.transactionId;
 
 	if (!lim_is_sme_stop_bss_req_valid(pMsgBuf)) {
 		pe_warn("received invalid SME_STOP_BSS_REQ message");
@@ -3017,7 +3017,7 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *pMsgBuf)
 	}
 
 	pe_session = pe_find_session_by_bssid(mac,
-				stopBssReq.bssid.bytes,
+				stop_bss_req.bssid.bytes,
 				&sessionId);
 	if (pe_session == NULL) {
 		pe_err("session does not exist for given BSSID");
@@ -3053,7 +3053,7 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *pMsgBuf)
 		lim_wpspbc_close(mac, pe_session);
 
 	pe_debug("RECEIVED STOP_BSS_REQ with reason code=%d",
-		stopBssReq.reasonCode);
+		stop_bss_req.reasonCode);
 
 	prevState = pe_session->limSmeState;
 	pe_session->limPrevSmeState = prevState;
@@ -3072,7 +3072,7 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *pMsgBuf)
 	    !LIM_IS_NDI_ROLE(pe_session)) {
 		tSirMacAddr bcAddr = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 
-		if (stopBssReq.reasonCode == eSIR_SME_MIC_COUNTER_MEASURES)
+		if (stop_bss_req.reasonCode == eSIR_SME_MIC_COUNTER_MEASURES)
 			/* Send disassoc all stations associated thru TKIP */
 			__lim_counter_measures(mac, pe_session);
 		else

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

@@ -15853,7 +15853,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
 QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
 					uint32_t sessionId)
 {
-	tSirSmeStopBssReq *pMsg;
+	struct stop_bss_req *pMsg;
 	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
 
 	if (!pSession) {
@@ -15861,12 +15861,12 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(struct mac_context *mac,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pMsg = qdf_mem_malloc(sizeof(tSirSmeStopBssReq));
+	pMsg = qdf_mem_malloc(sizeof(*pMsg));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 	pMsg->messageType = eWNI_SME_STOP_BSS_REQ;
 	pMsg->sessionId = sessionId;
-	pMsg->length = sizeof(tSirSmeStopBssReq);
+	pMsg->length = sizeof(*pMsg);
 	pMsg->transactionId = 0;
 	pMsg->reasonCode = 0;
 	qdf_copy_macaddr(&pMsg->bssid, &pSession->connectedProfile.bssid);