Browse Source

qcacmn: Add MAC ID to get per MAC stats

Add MAC ID to which the Spatial Reuse stats is requested from.
Pass this MAC ID to FW to get the respective Spatial Reuse stats.

Change-Id: Ief2434bf1f2fc82d9339ee38933effbd580088af
CRs-Fixed: 3328686
Rachit Kankane 2 năm trước cách đây
mục cha
commit
58ee0d8e0b
3 tập tin đã thay đổi với 15 bổ sung10 xóa
  1. 4 2
      dp/inc/cdp_txrx_host_stats.h
  2. 2 1
      dp/inc/cdp_txrx_ops.h
  3. 9 7
      dp/wifi3.0/dp_main.c

+ 4 - 2
dp/inc/cdp_txrx_host_stats.h

@@ -1067,13 +1067,15 @@ static inline QDF_STATUS cdp_get_peer_extd_rate_link_stats(
  * @soc: soc handle
  * @pdev_id: pdev id
  * @stats: pointer to pdev obss stats
+ * @req: Pointer to CDP TxRx stats
  *
  * return: status
  */
 static inline QDF_STATUS cdp_get_pdev_obss_pd_stats(
 				ol_txrx_soc_handle soc,
 				uint8_t pdev_id,
-				struct cdp_pdev_obss_pd_stats_tlv *stats)
+				struct cdp_pdev_obss_pd_stats_tlv *stats,
+				struct cdp_txrx_stats_req *req)
 {
 	if (!soc || !soc->ops) {
 		dp_cdp_debug("Invalid Instance");
@@ -1086,7 +1088,7 @@ static inline QDF_STATUS cdp_get_pdev_obss_pd_stats(
 		return QDF_STATUS_E_FAILURE;
 
 	return soc->ops->host_stats_ops->get_pdev_obss_stats(
-					soc, pdev_id, stats);
+				     soc, pdev_id, stats, req);
 }
 
 /**

+ 2 - 1
dp/inc/cdp_txrx_ops.h

@@ -1221,7 +1221,8 @@ struct cdp_host_stats_ops {
 				(struct cdp_soc_t *soc, uint8_t *mac_addr);
 	QDF_STATUS
 		(*get_pdev_obss_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
-				       struct cdp_pdev_obss_pd_stats_tlv *buf);
+				       struct cdp_pdev_obss_pd_stats_tlv *buf,
+				       struct cdp_txrx_stats_req *req);
 	QDF_STATUS (*clear_pdev_obss_pd_stats)(struct cdp_soc_t *soc,
 					       uint8_t pdev_id);
 };

+ 9 - 7
dp/wifi3.0/dp_main.c

@@ -11508,14 +11508,15 @@ dp_txrx_stats_publish(struct cdp_soc_t *soc, uint8_t pdev_id,
  * @soc: DP soc handle
  * @pdev_id: id of DP_PDEV handle
  * @buf: to hold pdev obss stats
+ * @req: Pointer to CDP TxRx stats
  *
  * Return: status
  */
 static QDF_STATUS
 dp_get_obss_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
-		  struct cdp_pdev_obss_pd_stats_tlv *buf)
+		  struct cdp_pdev_obss_pd_stats_tlv *buf,
+		  struct cdp_txrx_stats_req *req)
 {
-	struct cdp_txrx_stats_req req = {0};
 	QDF_STATUS status;
 	struct dp_pdev *pdev =
 		dp_get_pdev_from_soc_pdev_id_wifi3((struct dp_soc *)soc,
@@ -11528,12 +11529,13 @@ dp_get_obss_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
 		return QDF_STATUS_E_AGAIN;
 
 	pdev->pending_fw_obss_stats_response = true;
-	req.stats = (enum cdp_stats)HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS;
-	req.cookie_val = DBG_STATS_COOKIE_HTT_OBSS;
+	req->stats = (enum cdp_stats)HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS;
+	req->cookie_val = DBG_STATS_COOKIE_HTT_OBSS;
 	qdf_event_reset(&pdev->fw_obss_stats_event);
-	status = dp_h2t_ext_stats_msg_send(pdev, req.stats, req.param0,
-					   req.param1, req.param2, req.param3,
-					   0, req.cookie_val, 0);
+	status = dp_h2t_ext_stats_msg_send(pdev, req->stats, req->param0,
+					   req->param1, req->param2,
+					   req->param3, 0, req->cookie_val,
+					   req->mac_id);
 	if (QDF_IS_STATUS_ERROR(status)) {
 		pdev->pending_fw_obss_stats_response = false;
 		return status;