qcacmn: Add change to clear per MAC OBSS stats

Add change to pass mac_id for which clear OBSS
request was received.

Change-Id: I715f57018c162c3ba7bfea8d709a888538f8f4ce
CRs-Fixed: 3346387
This commit is contained in:
Amit Mehta
2022-11-24 22:11:09 -08:00
committed by Madan Koyyalamudi
parent cdbbb3ed59
commit a9e2233d1d
3 changed files with 16 additions and 11 deletions

View File

@@ -1095,12 +1095,14 @@ static inline QDF_STATUS cdp_get_pdev_obss_pd_stats(
* cdp_clear_pdev_obss_pd_stats(): function to clear pdev obss stats * cdp_clear_pdev_obss_pd_stats(): function to clear pdev obss stats
* @soc: soc handle * @soc: soc handle
* @pdev_id: pdev id * @pdev_id: pdev id
* @req: Pointer to CDP TxRx stats request. mac_id will be pre-filled
* and should not be overwritten
* *
* return: status * return: status
*/ */
static inline QDF_STATUS cdp_clear_pdev_obss_pd_stats( static inline QDF_STATUS cdp_clear_pdev_obss_pd_stats(
ol_txrx_soc_handle soc, ol_txrx_soc_handle soc,
uint8_t pdev_id) uint8_t pdev_id, struct cdp_txrx_stats_req *req)
{ {
if (!soc || !soc->ops) { if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance"); dp_cdp_debug("Invalid Instance");
@@ -1113,6 +1115,6 @@ static inline QDF_STATUS cdp_clear_pdev_obss_pd_stats(
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
return soc->ops->host_stats_ops->clear_pdev_obss_pd_stats( return soc->ops->host_stats_ops->clear_pdev_obss_pd_stats(
soc, pdev_id); soc, pdev_id, req);
} }
#endif /* _CDP_TXRX_HOST_STATS_H_ */ #endif /* _CDP_TXRX_HOST_STATS_H_ */

View File

@@ -1225,7 +1225,8 @@ struct cdp_host_stats_ops {
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);
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,
struct cdp_txrx_stats_req *req);
}; };
struct cdp_wds_ops { struct cdp_wds_ops {

View File

@@ -11659,13 +11659,15 @@ dp_get_obss_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
* dp_clear_pdev_obss_pd_stats(): Clear pdev obss stats * dp_clear_pdev_obss_pd_stats(): Clear pdev obss stats
* @soc: DP soc handle * @soc: DP soc handle
* @pdev_id: id of DP_PDEV handle * @pdev_id: id of DP_PDEV handle
* @req: Pointer to CDP TxRx stats request mac_id will be
* pre-filled and should not be overwritten
* *
* Return: status * Return: status
*/ */
static QDF_STATUS static QDF_STATUS
dp_clear_pdev_obss_pd_stats(struct cdp_soc_t *soc, uint8_t pdev_id) dp_clear_pdev_obss_pd_stats(struct cdp_soc_t *soc, uint8_t pdev_id,
struct cdp_txrx_stats_req *req)
{ {
struct cdp_txrx_stats_req req = {0};
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,
pdev_id); pdev_id);
@@ -11684,13 +11686,13 @@ dp_clear_pdev_obss_pd_stats(struct cdp_soc_t *soc, uint8_t pdev_id)
* - config_param2 : stats bmask from start offset + 32 * - config_param2 : stats bmask from start offset + 32
* - config_param3 : stats bmask from start offset + 64 * - config_param3 : stats bmask from start offset + 64
*/ */
req.stats = (enum cdp_stats)HTT_DBG_EXT_STATS_RESET; req->stats = (enum cdp_stats)HTT_DBG_EXT_STATS_RESET;
req.param0 = HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS; req->param0 = HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS;
req.param1 = 0x00000001; req->param1 = 0x00000001;
return dp_h2t_ext_stats_msg_send(pdev, req.stats, req.param0, return dp_h2t_ext_stats_msg_send(pdev, req->stats, req->param0,
req.param1, req.param2, req.param3, 0, req->param1, req->param2, req->param3, 0,
cookie_val, 0); cookie_val, req->mac_id);
} }
/** /**