qcacmn: Initialize only 1 RXDMA DST ring for WCN7850
WCN7850 has only one RXDMA DST ring, as opposed to other lithium family chipsets, which had 2 RXDMA DST ring. Refactor the code to pick the number of rxdma destination rings from CFG context. Change-Id: I20d475c02690043e969bc7a78605809b8c6814ae CRs-Fixed: 3084440
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e9f0077a00
commit
63233c05dd
@@ -2380,6 +2380,7 @@ static void dp_queue_ring_stats(struct dp_pdev *pdev)
|
|||||||
int mac_id;
|
int mac_id;
|
||||||
int lmac_id;
|
int lmac_id;
|
||||||
uint32_t j = 0;
|
uint32_t j = 0;
|
||||||
|
struct dp_soc *soc = pdev->soc;
|
||||||
struct dp_soc_srngs_state * soc_srngs_state = NULL;
|
struct dp_soc_srngs_state * soc_srngs_state = NULL;
|
||||||
struct dp_soc_srngs_state *drop_srngs_state = NULL;
|
struct dp_soc_srngs_state *drop_srngs_state = NULL;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
@@ -2544,7 +2545,7 @@ static void dp_queue_ring_stats(struct dp_pdev *pdev)
|
|||||||
qdf_assert_always(++j < DP_MAX_SRNGS);
|
qdf_assert_always(++j < DP_MAX_SRNGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0; i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
lmac_id = dp_get_lmac_id_for_pdev_id(pdev->soc,
|
lmac_id = dp_get_lmac_id_for_pdev_id(pdev->soc,
|
||||||
i, pdev->pdev_id);
|
i, pdev->pdev_id);
|
||||||
|
|
||||||
|
@@ -5643,6 +5643,16 @@ static void dp_soc_detach_wifi3(struct cdp_soc_t *txrx_soc)
|
|||||||
* Return: zero on success, non-zero on failure
|
* Return: zero on success, non-zero on failure
|
||||||
*/
|
*/
|
||||||
#ifdef QCA_HOST2FW_RXBUF_RING
|
#ifdef QCA_HOST2FW_RXBUF_RING
|
||||||
|
static inline void
|
||||||
|
dp_htt_setup_rxdma_err_dst_ring(struct dp_soc *soc, int mac_id,
|
||||||
|
int lmac_id)
|
||||||
|
{
|
||||||
|
if (soc->rxdma_err_dst_ring[lmac_id].hal_srng)
|
||||||
|
htt_srng_setup(soc->htt_handle, mac_id,
|
||||||
|
soc->rxdma_err_dst_ring[lmac_id].hal_srng,
|
||||||
|
RXDMA_DST);
|
||||||
|
}
|
||||||
|
|
||||||
static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
|
static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -5716,11 +5726,8 @@ static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
|
|||||||
RXDMA_BUF);
|
RXDMA_BUF);
|
||||||
|
|
||||||
if (!soc->rxdma2sw_rings_not_supported)
|
if (!soc->rxdma2sw_rings_not_supported)
|
||||||
htt_srng_setup(soc->htt_handle,
|
dp_htt_setup_rxdma_err_dst_ring(soc,
|
||||||
mac_for_pdev,
|
mac_for_pdev, lmac_id);
|
||||||
soc->rxdma_err_dst_ring[lmac_id]
|
|
||||||
.hal_srng,
|
|
||||||
RXDMA_DST);
|
|
||||||
|
|
||||||
/* Configure monitor mode rings */
|
/* Configure monitor mode rings */
|
||||||
status = dp_monitor_htt_srng_setup(soc, pdev,
|
status = dp_monitor_htt_srng_setup(soc, pdev,
|
||||||
@@ -13491,7 +13498,8 @@ static void dp_pdev_srng_deinit(struct dp_pdev *pdev)
|
|||||||
pdev->lmac_id);
|
pdev->lmac_id);
|
||||||
|
|
||||||
if (!soc->rxdma2sw_rings_not_supported) {
|
if (!soc->rxdma2sw_rings_not_supported) {
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0;
|
||||||
|
i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||||
pdev->pdev_id);
|
pdev->pdev_id);
|
||||||
|
|
||||||
@@ -13541,7 +13549,8 @@ static QDF_STATUS dp_pdev_srng_init(struct dp_pdev *pdev)
|
|||||||
pdev = soc->pdev_list[0];
|
pdev = soc->pdev_list[0];
|
||||||
|
|
||||||
if (!soc->rxdma2sw_rings_not_supported) {
|
if (!soc->rxdma2sw_rings_not_supported) {
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0;
|
||||||
|
i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||||
pdev->pdev_id);
|
pdev->pdev_id);
|
||||||
struct dp_srng *srng =
|
struct dp_srng *srng =
|
||||||
@@ -13585,7 +13594,8 @@ static void dp_pdev_srng_free(struct dp_pdev *pdev)
|
|||||||
dp_srng_free(soc, &soc->rx_refill_buf_ring[pdev->lmac_id]);
|
dp_srng_free(soc, &soc->rx_refill_buf_ring[pdev->lmac_id]);
|
||||||
|
|
||||||
if (!soc->rxdma2sw_rings_not_supported) {
|
if (!soc->rxdma2sw_rings_not_supported) {
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0;
|
||||||
|
i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||||
pdev->pdev_id);
|
pdev->pdev_id);
|
||||||
|
|
||||||
@@ -13628,7 +13638,8 @@ static QDF_STATUS dp_pdev_srng_alloc(struct dp_pdev *pdev)
|
|||||||
pdev = soc->pdev_list[0];
|
pdev = soc->pdev_list[0];
|
||||||
|
|
||||||
if (!soc->rxdma2sw_rings_not_supported) {
|
if (!soc->rxdma2sw_rings_not_supported) {
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0;
|
||||||
|
i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, i,
|
||||||
pdev->pdev_id);
|
pdev->pdev_id);
|
||||||
struct dp_srng *srng =
|
struct dp_srng *srng =
|
||||||
@@ -14141,6 +14152,7 @@ static void dp_soc_cfg_init(struct dp_soc *soc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
soc->wlan_cfg_ctx->rxdma1_enable = 0;
|
||||||
|
soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = 1;
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_QCA8074:
|
case TARGET_TYPE_QCA8074:
|
||||||
wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true);
|
wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, true);
|
||||||
|
@@ -5293,6 +5293,7 @@ void dp_print_mon_ring_stat_from_hal(struct dp_pdev *pdev, uint8_t mac_id)
|
|||||||
void
|
void
|
||||||
dp_print_ring_stats(struct dp_pdev *pdev)
|
dp_print_ring_stats(struct dp_pdev *pdev)
|
||||||
{
|
{
|
||||||
|
struct dp_soc *soc = pdev->soc;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
int mac_id;
|
int mac_id;
|
||||||
int lmac_id;
|
int lmac_id;
|
||||||
@@ -5372,7 +5373,7 @@ dp_print_ring_stats(struct dp_pdev *pdev)
|
|||||||
dp_print_mon_ring_stat_from_hal(pdev, lmac_id);
|
dp_print_mon_ring_stat_from_hal(pdev, lmac_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++) {
|
for (i = 0; i < soc->wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev; i++) {
|
||||||
lmac_id = dp_get_lmac_id_for_pdev_id(pdev->soc,
|
lmac_id = dp_get_lmac_id_for_pdev_id(pdev->soc,
|
||||||
i, pdev->pdev_id);
|
i, pdev->pdev_id);
|
||||||
|
|
||||||
|
@@ -2002,6 +2002,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
|||||||
wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
|
wlan_cfg_ctx->pkt_capture_mode = cfg_get(psoc, CFG_PKT_CAPTURE_MODE) &
|
||||||
PKT_CAPTURE_MODE_DATA_ONLY;
|
PKT_CAPTURE_MODE_DATA_ONLY;
|
||||||
#endif
|
#endif
|
||||||
|
wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
|
||||||
|
|
||||||
return wlan_cfg_ctx;
|
return wlan_cfg_ctx;
|
||||||
}
|
}
|
||||||
|
@@ -404,6 +404,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
bool vdev_stats_hw_offload_config;
|
bool vdev_stats_hw_offload_config;
|
||||||
int vdev_stats_hw_offload_timer;
|
int vdev_stats_hw_offload_timer;
|
||||||
#endif
|
#endif
|
||||||
|
uint8_t num_rxdma_dst_rings_per_pdev;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user