Kaynağa Gözat

qcacld-3.0: Converge on struct add_ts_param

The driver currently defines two different data structures to hold
Add Tspec parameters:
- tAddTsParams
- struct add_ts_param

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: I298202748b8a0f6c2a9f8a36ca7cdee071d000bf
CRs-Fixed: 2371914
Jeff Johnson 6 yıl önce
ebeveyn
işleme
9851fcc55b

+ 5 - 5
core/mac/src/pe/lim/lim_admit_control.c

@@ -821,7 +821,7 @@ lim_send_hal_msg_add_ts(struct mac_context *mac,
 #endif
 {
 	struct scheduler_msg msg = {0};
-	tpAddTsParams pAddTsParam;
+	struct add_ts_param *pAddTsParam;
 
 	struct pe_session *pe_session = pe_find_session_by_session_id(mac, sessionId);
 
@@ -831,7 +831,7 @@ lim_send_hal_msg_add_ts(struct mac_context *mac,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pAddTsParam = qdf_mem_malloc(sizeof(tAddTsParams));
+	pAddTsParam = qdf_mem_malloc(sizeof(*pAddTsParam));
 	if (!pAddTsParam)
 		return QDF_STATUS_E_NOMEM;
 
@@ -949,7 +949,7 @@ err:
 void lim_process_hal_add_ts_rsp(struct mac_context *mac,
 				struct scheduler_msg *limMsg)
 {
-	tpAddTsParams pAddTsRspMsg = NULL;
+	struct add_ts_param *pAddTsRspMsg = NULL;
 	tpDphHashNode pSta = NULL;
 	uint16_t assocId = 0;
 	tSirMacAddr peerMacAddr;
@@ -961,12 +961,12 @@ void lim_process_hal_add_ts_rsp(struct mac_context *mac,
 	 */
 	SET_LIM_PROCESS_DEFD_MESGS(mac, true);
 
-	if (NULL == limMsg->bodyptr) {
+	if (!limMsg->bodyptr) {
 		pe_err("Received WMA_ADD_TS_RSP with NULL");
 		goto end;
 	}
 
-	pAddTsRspMsg = (tpAddTsParams) (limMsg->bodyptr);
+	pAddTsRspMsg = limMsg->bodyptr;
 
 	/* 090803: Use pe_find_session_by_session_id() to obtain the PE session context */
 	/* from the sessionId in the Rsp Msg from HAL */

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

@@ -862,7 +862,7 @@ void lim_process_ft_aggr_qos_rsp(struct mac_context *mac,
 				 struct scheduler_msg *limMsg)
 {
 	struct aggr_add_ts_param *pAggrQosRspMsg;
-	tAddTsParams addTsParam = { 0 };
+	struct add_ts_param addTsParam = { 0 };
 	tpDphHashNode pSta = NULL;
 	uint16_t assocId = 0;
 	tSirMacAddr peerMacAddr;

+ 0 - 26
core/wma/inc/wma_if.h

@@ -939,32 +939,6 @@ typedef struct sLinkStateParams {
 	bool status;
 } tLinkStateParams, *tpLinkStateParams;
 
-/**
- * struct tAddTsParams - ADDTS related parameters
- * @staIdx: station index
- * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
- * @tspec: tspec value
- * @status: QDF status
- * @sessionId: session id
- * @tsm_interval: TSM interval period passed from lim to WMA
- * @setRICparams: RIC parameters
- * @sme_session_id: sme session id
- */
-typedef struct {
-	uint16_t staIdx;
-	uint16_t tspecIdx;
-	struct mac_tspec_ie tspec;
-	QDF_STATUS status;
-	uint8_t sessionId;
-#ifdef FEATURE_WLAN_ESE
-	uint16_t tsm_interval;
-#endif /* FEATURE_WLAN_ESE */
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-	uint8_t setRICparams;
-#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
-	uint8_t sme_session_id;
-} tAddTsParams, *tpAddTsParams;
-
 /**
  * struct tDelTsParams - DELTS related parameters
  * @staIdx: station index

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

@@ -1090,7 +1090,7 @@ void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg);
 void wma_aggr_qos_req(tp_wma_handle wma,
 		      struct aggr_add_ts_param *pAggrQosRspMsg);
 
-void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg);
+void wma_add_ts_req(tp_wma_handle wma, struct add_ts_param *msg);
 
 #ifdef FEATURE_WLAN_ESE
 QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,

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

@@ -3028,7 +3028,7 @@ void wma_aggr_qos_req(tp_wma_handle wma,
  *
  * Return: QDF_STATUS_E_FAILURE or QDF_STATUS_SUCCESS
  */
-static QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
+static QDF_STATUS wma_set_tsm_interval(struct add_ts_param *req)
 {
 	/*
 	 * msmt_interval is in unit called TU (1 TU = 1024 us)
@@ -3052,7 +3052,7 @@ static QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
 	return QDF_STATUS_SUCCESS;
 }
 #else
-static inline QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
+static inline QDF_STATUS wma_set_tsm_interval(struct add_ts_param *req)
 {
 	return QDF_STATUS_SUCCESS;
 }
@@ -3065,7 +3065,7 @@ static inline QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
  *
  * Return: none
  */
-void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
+void wma_add_ts_req(tp_wma_handle wma, struct add_ts_param *msg)
 {
 	struct add_ts_param cmd = {0};
 

+ 1 - 1
core/wma/src/wma_main.c

@@ -8174,7 +8174,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 		break;
 
 	case WMA_ADD_TS_REQ:
-		wma_add_ts_req(wma_handle, (tAddTsParams *) msg->bodyptr);
+		wma_add_ts_req(wma_handle, msg->bodyptr);
 		break;
 
 	case WMA_DEL_TS_REQ: