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

Commit ccfb0efc authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge d9ce8a22 on remote branch

Change-Id: I714be9437f61f5be75d63224de6ba5c9c879d718
parents 8545efef d9ce8a22
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -2709,4 +2709,25 @@ cdp_wds_ext_set_peer_rx(ol_txrx_soc_handle soc, uint8_t vdev_id,
			(soc, vdev_id, mac, rx, osif_peer);
}
#endif /* QCA_SUPPORT_WDS_EXTENDED */

/**
 * cdp_drain_txrx() - drain TX/RX SRNGs
 * @soc: opaque soc handle
 */
static inline void
cdp_drain_txrx(ol_txrx_soc_handle soc)
{
	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->txrx_drain)
		return;

	return soc->ops->cmn_drv_ops->txrx_drain(soc);
}
#endif /* _CDP_TXRX_CMN_H_ */
+19 −0
Original line number Diff line number Diff line
@@ -818,6 +818,25 @@ cdp_request_rx_hw_stats(ol_txrx_soc_handle soc, uint8_t vdev_id)
	return QDF_STATUS_SUCCESS;
}

/**
 * cdp_reset_rx_hw_ext_stats(): reset rx hw ext stats
 * @soc: soc handle
 *
 * Return: none
 */
static inline void
cdp_reset_rx_hw_ext_stats(ol_txrx_soc_handle soc)
{
	if (!soc || !soc->ops || !soc->ops->misc_ops) {
		QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG,
			  "%s: Invalid Instance:", __func__);
		return;
	}

	if (soc->ops->misc_ops->reset_rx_hw_ext_stats)
		soc->ops->misc_ops->reset_rx_hw_ext_stats(soc);
}

/**
 * cdp_vdev_inform_ll_conn() - Inform DP about the low latency connection
 * @soc: soc handle
+2 −0
Original line number Diff line number Diff line
@@ -566,6 +566,7 @@ struct cdp_cmn_ops {
					  ol_txrx_rx_fp rx,
					  ol_osif_peer_handle osif_peer);
#endif /* QCA_SUPPORT_WDS_EXTENDED */
	void (*txrx_drain)(ol_txrx_soc_handle soc);
};

struct cdp_ctrl_ops {
@@ -1277,6 +1278,7 @@ struct cdp_misc_ops {
					     struct cdp_txrx_ext_stats *req);
	QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl,
					  uint8_t vdev_id);
	void (*reset_rx_hw_ext_stats)(struct cdp_soc_t *soc_hdl);
	QDF_STATUS (*vdev_inform_ll_conn)(struct cdp_soc_t *soc_hdl,
					  uint8_t vdev_id,
					  enum vdev_ll_conn_actions action);
+13 −8
Original line number Diff line number Diff line
@@ -755,6 +755,7 @@ QDF_STATUS dp_ipa_set_doorbell_paddr(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
			soc->reo_dest_ring[IPA_REO_DEST_RING_IDX].hal_srng;
	uint32_t tx_comp_doorbell_dmaaddr;
	uint32_t rx_ready_doorbell_dmaaddr;
	int ret = 0;

	if (!pdev) {
		dp_err("Invalid instance");
@@ -773,13 +774,19 @@ QDF_STATUS dp_ipa_set_doorbell_paddr(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
				ioremap(ipa_res->tx_comp_doorbell_paddr, 4);

	if (qdf_mem_smmu_s1_enabled(soc->osdev)) {
		pld_smmu_map(soc->osdev->dev, ipa_res->tx_comp_doorbell_paddr,
			     &tx_comp_doorbell_dmaaddr, sizeof(uint32_t));
		ret = pld_smmu_map(soc->osdev->dev,
				   ipa_res->tx_comp_doorbell_paddr,
				   &tx_comp_doorbell_dmaaddr,
				   sizeof(uint32_t));
		ipa_res->tx_comp_doorbell_paddr = tx_comp_doorbell_dmaaddr;
		qdf_assert_always(!ret);

		pld_smmu_map(soc->osdev->dev, ipa_res->rx_ready_doorbell_paddr,
			     &rx_ready_doorbell_dmaaddr, sizeof(uint32_t));
		ret = pld_smmu_map(soc->osdev->dev,
				   ipa_res->rx_ready_doorbell_paddr,
				   &rx_ready_doorbell_dmaaddr,
				   sizeof(uint32_t));
		ipa_res->rx_ready_doorbell_paddr = rx_ready_doorbell_dmaaddr;
		qdf_assert_always(!ret);
	}

	hal_srng_dst_set_hp_paddr(wbm_srng, ipa_res->tx_comp_doorbell_paddr);
@@ -1702,14 +1709,12 @@ QDF_STATUS dp_ipa_cleanup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
		ret = pld_smmu_unmap(soc->osdev->dev,
				     ipa_res->rx_ready_doorbell_paddr,
				     sizeof(uint32_t));
		if (ret)
			dp_err_rl("IPA RX DB smmu unmap failed");
		qdf_assert_always(!ret);

		ret = pld_smmu_unmap(soc->osdev->dev,
				     ipa_res->tx_comp_doorbell_paddr,
				     sizeof(uint32_t));
		if (ret)
			dp_err_rl("IPA TX DB smmu unmap failed");
		qdf_assert_always(!ret);
	}

exit:
+60 −0
Original line number Diff line number Diff line
@@ -9978,11 +9978,25 @@ void dp_update_rx_soft_irq_limit_params(struct dp_soc *soc,
		soc->wlan_cfg_ctx->rx_enable_eol_data_check,
		soc->wlan_cfg_ctx->rx_hp_oos_update_limit);
}

static void dp_update_soft_irq_limits(struct dp_soc *soc, uint32_t tx_limit,
				      uint32_t rx_limit)
{
	soc->wlan_cfg_ctx->tx_comp_loop_pkt_limit = tx_limit;
	soc->wlan_cfg_ctx->rx_reap_loop_pkt_limit = rx_limit;
}

#else
static inline
void dp_update_rx_soft_irq_limit_params(struct dp_soc *soc,
					struct cdp_config_params *params)
{ }

static inline
void dp_update_soft_irq_limits(struct dp_soc *soc, uint32_t tx_limit,
			       uint32_t rx_limit)
{
}
#endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */

/**
@@ -11016,6 +11030,32 @@ dp_config_full_mon_mode(struct cdp_soc_t *soc_handle,
}
#endif

#if defined(FEATURE_RUNTIME_PM) || defined(DP_POWER_SAVE)
static void dp_drain_txrx(struct cdp_soc_t *soc_handle)
{
	struct dp_soc *soc = (struct dp_soc *)soc_handle;
	uint32_t cur_tx_limit, cur_rx_limit;
	uint32_t budget = 0xffff;
	int i;

	cur_tx_limit = soc->wlan_cfg_ctx->tx_comp_loop_pkt_limit;
	cur_rx_limit = soc->wlan_cfg_ctx->rx_reap_loop_pkt_limit;

	/* Temporarily increase soft irq limits when going to drain
	 * the UMAC/LMAC SRNGs and restore them after polling.
	 * Though the budget is on higher side, the TX/RX reaping loops
	 * will not execute longer as both TX and RX would be suspended
	 * by the time this API is called.
	 */
	dp_update_soft_irq_limits(soc, budget, budget);

	for (i = 0; i < wlan_cfg_get_num_contexts(soc->wlan_cfg_ctx); i++)
		dp_service_srngs(&soc->intr_ctx[i], budget);

	dp_update_soft_irq_limits(soc, cur_tx_limit, cur_rx_limit);
}
#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,
@@ -11114,6 +11154,10 @@ static struct cdp_cmn_ops dp_ops_cmn = {
	.get_wds_ext_peer_id = dp_wds_ext_get_peer_id,
	.set_wds_ext_peer_rx = dp_wds_ext_set_peer_rx,
#endif /* QCA_SUPPORT_WDS_EXTENDED */

#if defined(FEATURE_RUNTIME_PM) || defined(DP_POWER_SAVE)
	.txrx_drain = dp_drain_txrx,
#endif
};

static struct cdp_ctrl_ops dp_ops_ctrl = {
@@ -11653,6 +11697,21 @@ dp_request_rx_hw_stats(struct cdp_soc_t *soc_hdl, uint8_t vdev_id)

	return status;
}

/**
 * dp_reset_rx_hw_ext_stats - Reset rx hardware ext stats
 * @soc_hdl: soc handle
 *
 * Return: None
 */
static
void dp_reset_rx_hw_ext_stats(struct cdp_soc_t *soc_hdl)
{
	struct dp_soc *soc = (struct dp_soc *)soc_hdl;

	soc->ext_stats.rx_mpdu_received = 0;
	soc->ext_stats.rx_mpdu_missed = 0;
}
#endif /* WLAN_FEATURE_STATS_EXT */

#ifdef DP_PEER_EXTENDED_API
@@ -11678,6 +11737,7 @@ static struct cdp_misc_ops dp_ops_misc = {
#ifdef WLAN_FEATURE_STATS_EXT
	.txrx_ext_stats_request = dp_txrx_ext_stats_request,
	.request_rx_hw_stats = dp_request_rx_hw_stats,
	.reset_rx_hw_ext_stats = dp_reset_rx_hw_ext_stats,
#endif /* WLAN_FEATURE_STATS_EXT */
	.vdev_inform_ll_conn = dp_vdev_inform_ll_conn,
#ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
Loading