mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
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:
parent
854f611aa4
commit
e23020bd46
3 changed files with 45 additions and 0 deletions
|
|
@ -2730,4 +2730,33 @@ cdp_drain_txrx(ol_txrx_soc_handle soc)
|
|||
|
||||
return soc->ops->cmn_drv_ops->txrx_drain(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) {
|
||||
QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: Invalid Instance", __func__);
|
||||
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_ */
|
||||
|
|
|
|||
|
|
@ -578,6 +578,9 @@ struct cdp_cmn_ops {
|
|||
ol_osif_peer_handle osif_peer);
|
||||
#endif /* QCA_SUPPORT_WDS_EXTENDED */
|
||||
void (*txrx_drain)(ol_txrx_soc_handle soc);
|
||||
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
||||
void (*set_pkt_capture_mode)(struct cdp_soc_t *soc, bool val);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct cdp_ctrl_ops {
|
||||
|
|
|
|||
|
|
@ -11294,6 +11294,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,
|
||||
|
|
@ -11396,6 +11406,9 @@ static struct cdp_cmn_ops dp_ops_cmn = {
|
|||
#if defined(FEATURE_RUNTIME_PM) || defined(DP_POWER_SAVE)
|
||||
.txrx_drain = dp_drain_txrx,
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
||||
.set_pkt_capture_mode = dp_set_pkt_capture_mode,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct cdp_ctrl_ops dp_ops_ctrl = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue