Selaa lähdekoodia

qcacld-3.0: Converge on struct delts_req_info

The driver currently defines two different data structures to hold
Delete Tspec Request parameters:
- tSirDeltsReqInfo
- struct delts_req_info

In this case having two different structures to provide the same
functionality is pointless. Furthermore, due to the way in which these
structures are used, there is an implicit requirement that they be
exactly identical. This approach is very fragile. To align with the
converged software architecture and to improve code maintainability
remove the legacy typedef and exclusively use the unified WMI
structure.

Change-Id: I0951c8da636bcbf81a335c0ea1250d721ca5c573
CRs-Fixed: 2371913
Jeff Johnson 6 vuotta sitten
vanhempi
sitoutus
cf2ec16b6a

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

@@ -1640,14 +1640,6 @@ typedef struct sSirAddtsRspInfo {
 	uint8_t schedulePresent:1;
 	uint8_t schedulePresent:1;
 } tSirAddtsRspInfo, *tpSirAddtsRspInfo;
 } tSirAddtsRspInfo, *tpSirAddtsRspInfo;
 
 
-typedef struct sSirDeltsReqInfo {
-	struct mac_ts_info tsinfo;
-	struct mac_tspec_ie tspec;
-	uint8_t wmeTspecPresent:1;
-	uint8_t wsmTspecPresent:1;
-	uint8_t lleTspecPresent:1;
-} tSirDeltsReqInfo, *tpSirDeltsReqInfo;
-
 /* / Add a tspec as defined */
 /* / Add a tspec as defined */
 typedef struct sSirAddtsReq {
 typedef struct sSirAddtsReq {
 	uint16_t messageType;   /* eWNI_SME_ADDTS_REQ */
 	uint16_t messageType;   /* eWNI_SME_ADDTS_REQ */
@@ -1678,7 +1670,7 @@ typedef struct sSirDeltsReq {
 	uint16_t aid;           /* use 0 if macAddr is being specified */
 	uint16_t aid;           /* use 0 if macAddr is being specified */
 	struct qdf_mac_addr macaddr;    /* only on AP to specify the STA */
 	struct qdf_mac_addr macaddr;    /* only on AP to specify the STA */
 	uint8_t rspReqd;
 	uint8_t rspReqd;
-	tSirDeltsReqInfo req;
+	struct delts_req_info req;
 } tSirDeltsReq, *tpSirDeltsReq;
 } tSirDeltsReq, *tpSirDeltsReq;
 
 
 typedef struct sSirDeltsRsp {
 typedef struct sSirDeltsRsp {
@@ -1689,7 +1681,7 @@ typedef struct sSirDeltsRsp {
 	uint32_t rc;
 	uint32_t rc;
 	uint16_t aid;           /* use 0 if macAddr is being specified */
 	uint16_t aid;           /* use 0 if macAddr is being specified */
 	struct qdf_mac_addr macaddr;    /* only on AP to specify the STA */
 	struct qdf_mac_addr macaddr;    /* only on AP to specify the STA */
-	tSirDeltsReqInfo rsp;
+	struct delts_req_info rsp;
 } tSirDeltsRsp, *tpSirDeltsRsp;
 } tSirDeltsRsp, *tpSirDeltsRsp;
 
 
 #define SIR_QOS_NUM_AC_MAX 4
 #define SIR_QOS_NUM_AC_MAX 4

+ 1 - 1
core/mac/src/include/parser_api.h

@@ -626,7 +626,7 @@ sir_convert_addts_rsp2_struct(struct mac_context *mac,
 QDF_STATUS
 QDF_STATUS
 sir_convert_delts_req2_struct(struct mac_context *mac,
 sir_convert_delts_req2_struct(struct mac_context *mac,
 			uint8_t *frame, uint32_t len,
 			uint8_t *frame, uint32_t len,
-			tSirDeltsReqInfo *delTs);
+			struct delts_req_info *delTs);
 QDF_STATUS
 QDF_STATUS
 sir_convert_qos_map_configure_frame2_struct(struct mac_context *mac,
 sir_convert_qos_map_configure_frame2_struct(struct mac_context *mac,
 					uint8_t *pFrame, uint32_t nFrame,
 					uint8_t *pFrame, uint32_t nFrame,

+ 1 - 1
core/mac/src/pe/include/lim_admit_control.h

@@ -89,7 +89,7 @@ QDF_STATUS lim_send_hal_msg_add_ts(struct mac_context *mac,
 QDF_STATUS lim_send_hal_msg_del_ts(struct mac_context *mac,
 QDF_STATUS lim_send_hal_msg_del_ts(struct mac_context *mac,
 				      uint16_t staIdx,
 				      uint16_t staIdx,
 				      uint8_t tspecIdx,
 				      uint8_t tspecIdx,
-				      tSirDeltsReqInfo delts,
+				      struct delts_req_info delts,
 				      uint8_t sessionId, uint8_t *bssId);
 				      uint8_t sessionId, uint8_t *bssId);
 void lim_process_hal_add_ts_rsp(struct mac_context *mac,
 void lim_process_hal_add_ts_rsp(struct mac_context *mac,
 				struct scheduler_msg *limMsg);
 				struct scheduler_msg *limMsg);

+ 3 - 2
core/mac/src/pe/lim/lim_admit_control.c

@@ -884,7 +884,8 @@ QDF_STATUS
 lim_send_hal_msg_del_ts(struct mac_context *mac,
 lim_send_hal_msg_del_ts(struct mac_context *mac,
 			uint16_t staIdx,
 			uint16_t staIdx,
 			uint8_t tspecIdx,
 			uint8_t tspecIdx,
-			tSirDeltsReqInfo delts, uint8_t sessionId, uint8_t *bssId)
+			struct delts_req_info delts,
+			uint8_t sessionId, uint8_t *bssId)
 {
 {
 	struct scheduler_msg msg = {0};
 	struct scheduler_msg msg = {0};
 	tpDelTsParams pDelTsParam;
 	tpDelTsParams pDelTsParam;
@@ -918,7 +919,7 @@ lim_send_hal_msg_del_ts(struct mac_context *mac,
 	if (mac->mlme_cfg->lfr.lfr3_roaming_offload &&
 	if (mac->mlme_cfg->lfr.lfr3_roaming_offload &&
 	    pe_session->is11Rconnection) {
 	    pe_session->is11Rconnection) {
 		qdf_mem_copy(&pDelTsParam->delTsInfo, &delts,
 		qdf_mem_copy(&pDelTsParam->delTsInfo, &delts,
-			     sizeof(tSirDeltsReqInfo));
+			     sizeof(struct delts_req_info));
 		pDelTsParam->setRICparams = 1;
 		pDelTsParam->setRICparams = 1;
 	}
 	}
 #endif
 #endif

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

@@ -896,7 +896,7 @@ static void __lim_process_del_ts_req(struct mac_context *mac_ctx,
 		uint8_t *rx_pkt_info, struct pe_session *session)
 		uint8_t *rx_pkt_info, struct pe_session *session)
 {
 {
 	QDF_STATUS retval;
 	QDF_STATUS retval;
-	tSirDeltsReqInfo delts;
+	struct delts_req_info delts;
 	tpSirMacMgmtHdr mac_hdr;
 	tpSirMacMgmtHdr mac_hdr;
 	tpDphHashNode sta_ptr;
 	tpDphHashNode sta_ptr;
 	uint32_t frame_len;
 	uint32_t frame_len;

+ 3 - 3
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1494,7 +1494,7 @@ lim_send_sme_delts_rsp(struct mac_context *mac, tpSirDeltsReq delts, uint32_t st
 		rsp->aid = delts->aid;
 		rsp->aid = delts->aid;
 		qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
 		qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
 		qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
 		qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
-			     sizeof(tSirDeltsReqInfo));
+			     sizeof(struct delts_req_info));
 	}
 	}
 
 
 	rsp->messageType = eWNI_SME_DELTS_RSP;
 	rsp->messageType = eWNI_SME_DELTS_RSP;
@@ -1523,8 +1523,8 @@ lim_send_sme_delts_rsp(struct mac_context *mac, tpSirDeltsReq delts, uint32_t st
 }
 }
 
 
 void
 void
-lim_send_sme_delts_ind(struct mac_context *mac, tpSirDeltsReqInfo delts, uint16_t aid,
-		       struct pe_session *pe_session)
+lim_send_sme_delts_ind(struct mac_context *mac, struct delts_req_info *delts,
+		       uint16_t aid, struct pe_session *pe_session)
 {
 {
 	tpSirDeltsRsp rsp;
 	tpSirDeltsRsp rsp;
 	struct scheduler_msg mmhMsg = {0};
 	struct scheduler_msg mmhMsg = {0};

+ 2 - 1
core/mac/src/pe/lim/lim_send_sme_rsp_messages.h

@@ -85,7 +85,8 @@ void lim_send_sme_addts_rsp(struct mac_context *mac,
 void lim_send_sme_delts_rsp(struct mac_context *mac, tpSirDeltsReq delts,
 void lim_send_sme_delts_rsp(struct mac_context *mac, tpSirDeltsReq delts,
 			    uint32_t status, struct pe_session *pe_session,
 			    uint32_t status, struct pe_session *pe_session,
 			    uint8_t smessionId, uint16_t smetransactionId);
 			    uint8_t smessionId, uint16_t smetransactionId);
-void lim_send_sme_delts_ind(struct mac_context *mac, tpSirDeltsReqInfo delts,
+void lim_send_sme_delts_ind(struct mac_context *mac,
+			    struct delts_req_info *delts,
 			    uint16_t aid, struct pe_session *);
 			    uint16_t aid, struct pe_session *);
 void lim_send_sme_stats_rsp(struct mac_context *mac, uint16_t msgtype,
 void lim_send_sme_stats_rsp(struct mac_context *mac, uint16_t msgtype,
 			    void *stats);
 			    void *stats);

+ 2 - 2
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -4433,7 +4433,7 @@ sir_convert_addts_rsp2_struct(struct mac_context *mac,
 QDF_STATUS
 QDF_STATUS
 sir_convert_delts_req2_struct(struct mac_context *mac,
 sir_convert_delts_req2_struct(struct mac_context *mac,
 			      uint8_t *pFrame,
 			      uint8_t *pFrame,
-			      uint32_t nFrame, tSirDeltsReqInfo *pDelTs)
+			      uint32_t nFrame, struct delts_req_info *pDelTs)
 {
 {
 	tDot11fDelTS delts = { {0} };
 	tDot11fDelTS delts = { {0} };
 	tDot11fWMMDelTS wmmdelts = { {0} };
 	tDot11fWMMDelTS wmmdelts = { {0} };
@@ -4447,7 +4447,7 @@ sir_convert_delts_req2_struct(struct mac_context *mac,
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 	}
 	}
 	/* Zero-init our [out] parameter, */
 	/* Zero-init our [out] parameter, */
-	qdf_mem_set((uint8_t *) pDelTs, sizeof(tSirDeltsReqInfo), 0);
+	qdf_mem_set(pDelTs, sizeof(*pDelTs), 0);
 
 
 	/* delegate to the framesc-generated code, */
 	/* delegate to the framesc-generated code, */
 	switch (*pFrame) {
 	switch (*pFrame) {

+ 1 - 1
core/wma/inc/wma_if.h

@@ -982,7 +982,7 @@ typedef struct {
 	uint8_t sessionId;
 	uint8_t sessionId;
 	uint8_t userPrio;
 	uint8_t userPrio;
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-	tSirDeltsReqInfo delTsInfo;
+	struct delts_req_info delTsInfo;
 	uint8_t setRICparams;
 	uint8_t setRICparams;
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 } tDelTsParams, *tpDelTsParams;
 } tDelTsParams, *tpDelTsParams;