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
This commit is contained in:
Rachit Kankane
2022-11-02 16:59:04 +05:30
committed by Madan Koyyalamudi
parent 0dd0da3ac0
commit 58ee0d8e0b
3 changed files with 15 additions and 10 deletions

View File

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

View File

@@ -1221,7 +1221,8 @@ struct cdp_host_stats_ops {
(struct cdp_soc_t *soc, uint8_t *mac_addr); (struct cdp_soc_t *soc, uint8_t *mac_addr);
QDF_STATUS QDF_STATUS
(*get_pdev_obss_stats)(struct cdp_soc_t *soc, uint8_t pdev_id, (*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, QDF_STATUS (*clear_pdev_obss_pd_stats)(struct cdp_soc_t *soc,
uint8_t pdev_id); uint8_t pdev_id);
}; };

View File

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