浏览代码

qcacld-3.0: Remove usage of sta_id in TSM stats path

Currently driver passes sta_id through out the call for getting the TSM
stats. Although passed, the sta_id is not used anywhere in the call
stack. As part of removing the sta_id usage, this sta_id can also be
removed safely.

Remove the usage of sta_id in get TSM stats path.

Change-Id: I1efbb1bfdc8df84e9b6a71dcd5bd39ea93ced21a
CRs-Fixed: 2484701
Sourav Mohapatra 5 年之前
父节点
当前提交
dcd8f8d1f8

+ 1 - 2
core/hdd/src/wlan_hdd_ioctl.c

@@ -175,7 +175,7 @@ struct tsm_priv {
 };
 
 static void hdd_get_tsm_stats_cb(tAniTrafStrmMetrics tsm_metrics,
-				 const uint32_t sta_id, void *context)
+				 void *context)
 {
 	struct osif_request *request;
 	struct tsm_priv *priv;
@@ -225,7 +225,6 @@ static int hdd_get_tsm_stats(struct hdd_adapter *adapter,
 	cookie = osif_request_cookie(request);
 
 	status = sme_get_tsm_stats(hdd_ctx->mac_handle, hdd_get_tsm_stats_cb,
-				   hdd_sta_ctx->conn_info.sta_id[0],
 				   hdd_sta_ctx->conn_info.bssid,
 				   cookie, tid);
 	if (QDF_STATUS_SUCCESS != status) {

+ 0 - 5
core/mac/inc/sir_api.h

@@ -797,7 +797,6 @@ typedef struct sAniGetTsmStatsReq {
 	/* Common for all types are requests */
 	uint16_t msgType;       /* message type is same as the request type */
 	uint16_t msgLen;        /* length of the entire request */
-	uint8_t staId;
 	uint8_t tid;            /* traffic id */
 	struct qdf_mac_addr bssId;
 	void *tsmStatsCallback;
@@ -816,10 +815,6 @@ typedef struct sAniGetTsmStatsRsp {
 				 */
 	uint8_t sessionId;
 	uint32_t rc;            /* success/failure */
-	uint32_t staId;         /*
-				 * Per STA stats request must
-				 * contain valid
-				 */
 	struct qdf_mac_addr bssid; /* bssid to get the tsm stats for */
 	tAniTrafStrmMetrics tsmMetrics;
 	void *tsmStatsReq;      /* tsm stats request backup */

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

@@ -1373,8 +1373,8 @@ void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac,
 		/* Fill the Session Id */
 		pPeStats->sessionId = pPeSessionEntry->smeSessionId;
 	} else {
-		pe_err("Session not found for the Sta id: %d",
-		       pPeStats->staId);
+		pe_err("Session not found for the Sta peer:" QDF_MAC_ADDR_STR,
+		       QDF_MAC_ADDR_ARRAY(pPeStats->bssid.bytes));
 		qdf_mem_free(pPeStats->tsmStatsReq);
 		qdf_mem_free(pPeStats);
 		return;

+ 1 - 1
core/sme/inc/csr_api.h

@@ -1423,7 +1423,7 @@ const char *csr_phy_mode_str(eCsrPhyMode phy_mode);
 
 #ifdef FEATURE_WLAN_ESE
 typedef void (*tCsrTsmStatsCallback)(tAniTrafStrmMetrics tsmMetrics,
-				     uint32_t staId, void *pContext);
+				     void *pContext);
 #endif /* FEATURE_WLAN_ESE */
 typedef void (*tCsrSnrCallback)(int8_t snr, void *pContext);
 

+ 0 - 1
core/sme/inc/csr_internal.h

@@ -971,7 +971,6 @@ bool csr_roam_is_ese_assoc(struct mac_context *mac, uint32_t sessionId);
 bool csr_roam_is_ese_ini_feature_enabled(struct mac_context *mac);
 QDF_STATUS csr_get_tsm_stats(struct mac_context *mac,
 		tCsrTsmStatsCallback callback,
-		uint8_t staId,
 		struct qdf_mac_addr bssId,
 		void *pContext, uint8_t tid);
 #endif

+ 1 - 1
core/sme/inc/sme_api.h

@@ -591,7 +591,7 @@ QDF_STATUS sme_get_snr(mac_handle_t mac_handle,
 #ifdef FEATURE_WLAN_ESE
 QDF_STATUS sme_get_tsm_stats(mac_handle_t mac_handle,
 		tCsrTsmStatsCallback callback,
-		uint8_t staId, struct qdf_mac_addr bssId,
+		struct qdf_mac_addr bssId,
 		void *pContext, uint8_t tid);
 QDF_STATUS sme_set_cckm_ie(mac_handle_t mac_handle,
 		uint8_t sessionId,

+ 2 - 2
core/sme/src/common/sme_api.c

@@ -1701,7 +1701,7 @@ QDF_STATUS sme_set_ese_beacon_request(mac_handle_t mac_handle,
  */
 QDF_STATUS sme_get_tsm_stats(mac_handle_t mac_handle,
 			     tCsrTsmStatsCallback callback,
-			     uint8_t staId, struct qdf_mac_addr bssId,
+			     struct qdf_mac_addr bssId,
 			     void *pContext, uint8_t tid)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
@@ -1710,7 +1710,7 @@ QDF_STATUS sme_get_tsm_stats(mac_handle_t mac_handle,
 	status = sme_acquire_global_lock(&mac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		status = csr_get_tsm_stats(mac, callback,
-					   staId, bssId, pContext,
+					   bssId, pContext,
 					   tid);
 		sme_release_global_lock(&mac->sme);
 	}

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

@@ -1811,8 +1811,6 @@ static void csr_tsm_stats_rsp_processor(struct mac_context *mac, void *pMsg)
 				((tCsrTsmStatsCallback)
 				 (reqBkp->tsmStatsCallback))(pTsmStatsRsp->
 							     tsmMetrics,
-							     pTsmStatsRsp->
-							     staId,
 							     reqBkp->
 							     pDevContext);
 				reqBkp->tsmStatsCallback = NULL;
@@ -1889,7 +1887,6 @@ static void csr_send_ese_adjacent_ap_rep_ind(struct mac_context *mac,
  */
 QDF_STATUS csr_get_tsm_stats(struct mac_context *mac,
 			     tCsrTsmStatsCallback callback,
-			     uint8_t staId,
 			     struct qdf_mac_addr bssId,
 			     void *pContext, uint8_t tid)
 {
@@ -1903,7 +1900,6 @@ QDF_STATUS csr_get_tsm_stats(struct mac_context *mac,
 	/* need to initiate a stats request to PE */
 	pMsg->msgType = eWNI_SME_GET_TSM_STATS_REQ;
 	pMsg->msgLen = (uint16_t) sizeof(tAniGetTsmStatsReq);
-	pMsg->staId = staId;
 	pMsg->tid = tid;
 	qdf_copy_macaddr(&pMsg->bssId, &bssId);
 	pMsg->tsmStatsCallback = callback;

+ 0 - 1
core/wma/src/wma_features.c

@@ -2889,7 +2889,6 @@ QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
 		qdf_mem_free(pTsmStatsMsg);
 		return QDF_STATUS_E_NOMEM;
 	}
-	pTsmRspParams->staId = pStats->staId;
 	qdf_copy_macaddr(&pTsmRspParams->bssid, &pStats->bssId);
 	pTsmRspParams->rc = QDF_STATUS_E_FAILURE;
 	pTsmRspParams->tsmStatsReq = pStats;