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

Commit 432f91e8 authored by Jinwei Chen's avatar Jinwei Chen Committed by snandini
Browse files

qcacmn: Fix compile error while enable CONFIG_REMOVE_PKT_LOG

Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting

Change-Id: I493fbddec865fe20789022445b0f155201772119
CRs-Fixed: 2723733
parent ff13a5f2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1613,6 +1613,11 @@ static inline QDF_STATUS dp_h2t_cfg_stats_msg_send(struct dp_pdev *pdev,
	return 0;
}

static inline void
dp_pkt_log_init(struct cdp_soc_t *soc_hdl, uint8_t pdev_id, void *scn)
{
}

static inline void
dp_hif_update_pipe_callback(struct dp_soc *dp_soc, void *cb_context,
			    QDF_STATUS (*callback)(void *, qdf_nbuf_t, uint8_t),
+27 −20
Original line number Diff line number Diff line
@@ -474,26 +474,6 @@ static void dp_pkt_log_con_service(struct cdp_soc_t *soc_hdl,
	pktlog_htc_attach();
}

/**
 * dp_get_num_rx_contexts() - get number of RX contexts
 * @soc_hdl: cdp opaque soc handle
 *
 * Return: number of RX contexts
 */
static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
{
	int i;
	int num_rx_contexts = 0;

	struct dp_soc *soc = (struct dp_soc *)soc_hdl;

	for (i = 0; i < wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx); i++)
		if (wlan_cfg_get_rx_ring_mask(soc->wlan_cfg_ctx, i))
			num_rx_contexts++;

	return num_rx_contexts;
}

/**
 * dp_pktlogmod_exit() - API to cleanup pktlog info
 * @pdev: Pdev handle
@@ -518,7 +498,34 @@ static void dp_pktlogmod_exit(struct dp_pdev *pdev)
	pktlogmod_exit(scn);
	pdev->pkt_log_init = false;
}
#else
static void dp_pkt_log_con_service(struct cdp_soc_t *soc_hdl,
				   uint8_t pdev_id, void *scn)
{
}

static void dp_pktlogmod_exit(struct dp_pdev *handle) { }
#endif
/**
 * dp_get_num_rx_contexts() - get number of RX contexts
 * @soc_hdl: cdp opaque soc handle
 *
 * Return: number of RX contexts
 */
static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
{
	int i;
	int num_rx_contexts = 0;

	struct dp_soc *soc = (struct dp_soc *)soc_hdl;

	for (i = 0; i < wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx); i++)
		if (wlan_cfg_get_rx_ring_mask(soc->wlan_cfg_ctx, i))
			num_rx_contexts++;

	return num_rx_contexts;
}

#else
static void dp_pktlogmod_exit(struct dp_pdev *handle) { }

+2 −0
Original line number Diff line number Diff line
@@ -4153,6 +4153,7 @@ void dp_peer_stats_update_protocol_cnt(struct cdp_soc_t *soc,
}
#endif

#ifdef WDI_EVENT_ENABLE
QDF_STATUS dp_peer_stats_notify(struct dp_pdev *dp_pdev, struct dp_peer *peer)
{
	struct cdp_interface_peer_stats peer_stats_intf;
@@ -4187,6 +4188,7 @@ QDF_STATUS dp_peer_stats_notify(struct dp_pdev *dp_pdev, struct dp_peer *peer)

	return QDF_STATUS_SUCCESS;
}
#endif

#ifdef QCA_ENH_V3_STATS_SUPPORT
/**
+0 −4
Original line number Diff line number Diff line
@@ -110,13 +110,11 @@

#define REO_CMD_EVENT_HIST_MAX 64

#ifndef REMOVE_PKT_LOG
enum rx_pktlog_mode {
	DP_RX_PKTLOG_DISABLED = 0,
	DP_RX_PKTLOG_FULL,
	DP_RX_PKTLOG_LITE,
};
#endif

struct msdu_list {
	qdf_nbuf_t head;
@@ -1733,10 +1731,8 @@ struct dp_pdev {
	/* map this pdev to a particular Reo Destination ring */
	enum cdp_host_reo_dest_ring reo_dest;

#ifndef REMOVE_PKT_LOG
	/* Packet log mode */
	uint8_t rx_pktlog_mode;
#endif

	/* WDI event handlers */
	struct wdi_event_subscribe_t **wdi_event_list;