qcacmn: Add cdp api to update the packet capture mode

Add a CDP api to update the packet capture mode in dp_soc
when it get updated by user using vendor command.

Change-Id: Id0856aeeb5e1a77e1ce6fb23562fdbff4a2fb320
CRs-Fixed: 3048344
This commit is contained in:
Surabhi Vishnoi
2021-09-29 18:05:28 +05:30
committato da Madan Koyyalamudi
parent b3dfd1cbfa
commit 449ae318e0
3 ha cambiato i file con 44 aggiunte e 0 eliminazioni

Vedi File

@@ -2672,4 +2672,32 @@ cdp_get_free_desc_poolsize(ol_txrx_soc_handle soc)
return soc->ops->cmn_drv_ops->get_free_desc_poolsize(soc);
}
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
/**
* cdp_set_pkt_capture_mode() - set pkt capture mode in dp ctx
* @soc: opaque soc handle
* @val: value to be set
*/
static inline void
cdp_set_pkt_capture_mode(ol_txrx_soc_handle soc, bool val)
{
if (!soc || !soc->ops) {
dp_cdp_debug("Invalid Instance");
QDF_BUG(0);
return;
}
if (!soc->ops->cmn_drv_ops ||
!soc->ops->cmn_drv_ops->set_pkt_capture_mode)
return;
soc->ops->cmn_drv_ops->set_pkt_capture_mode(soc, val);
}
#else
static inline void
cdp_set_pkt_capture_mode(ol_txrx_soc_handle soc, bool val)
{
}
#endif
#endif /* _CDP_TXRX_CMN_H_ */

Vedi File

@@ -587,6 +587,9 @@ struct cdp_cmn_ops {
uint32_t stat_type,
uint32_t mac_id);
#endif /* WLAN_SYSFS_DP_STATS */
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
void (*set_pkt_capture_mode)(struct cdp_soc_t *soc, bool val);
#endif
};
struct cdp_ctrl_ops {

Vedi File

@@ -10961,6 +10961,16 @@ static void dp_drain_txrx(struct cdp_soc_t *soc_handle)
}
#endif
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
static void
dp_set_pkt_capture_mode(struct cdp_soc_t *soc_handle, bool val)
{
struct dp_soc *soc = (struct dp_soc *)soc_handle;
soc->wlan_cfg_ctx->pkt_capture_mode = val;
}
#endif
static struct cdp_cmn_ops dp_ops_cmn = {
.txrx_soc_attach_target = dp_soc_attach_target_wifi3,
.txrx_vdev_attach = dp_vdev_attach_wifi3,
@@ -11067,6 +11077,9 @@ static struct cdp_cmn_ops dp_ops_cmn = {
.txrx_sysfs_fill_stats = dp_sysfs_fill_stats,
.txrx_sysfs_set_stat_type = dp_sysfs_set_stat_type,
#endif /* WLAN_SYSFS_DP_STATS */
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
.set_pkt_capture_mode = dp_set_pkt_capture_mode,
#endif
};
static struct cdp_ctrl_ops dp_ops_ctrl = {