Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0fad75b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcacmn: Add cdp api to update the packet capture mode" into wlan-cmn.driver.lnx.2.0.8.r3-rel

parents 192d7161 000c0d1c
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -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_ */
+3 −0
Original line number Diff line number Diff line
@@ -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 {
+13 −0
Original line number Diff line number Diff line
@@ -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 = {