qcacld-3.0: fix dp memory pre-allocation failure
fix dp memory pre-allocation failure as below, (1) add pre-allocated memory for extra contexts of DP_RX_RING_HIST_TYPE on beryllium. (2) add extra RXDMA_BUF type's memory for SW2RXDMA ring and size same as RX refill ring size for now. (3) add pre-allocated memory for REO_STATUS & RXDMA_MONITOR_STATUS ring. (4) add pre-allocated memory for DP_MON_PDEV_TYPE. Change-Id: I038d946cf1b8c9dc67c1539ea972bda8239def4d CRs-Fixed: 3314198
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c9c2bf5cfc
commit
71d2520f79
@@ -28,6 +28,9 @@
|
|||||||
#include <ce_internal.h>
|
#include <ce_internal.h>
|
||||||
#include <wlan_cfg.h>
|
#include <wlan_cfg.h>
|
||||||
#include "wlan_dp_prealloc.h"
|
#include "wlan_dp_prealloc.h"
|
||||||
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
|
#include <dp_mon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DP_MEM_PRE_ALLOC
|
#ifdef DP_MEM_PRE_ALLOC
|
||||||
|
|
||||||
@@ -138,6 +141,17 @@ static struct dp_prealloc_context g_dp_context_allocs[] = {
|
|||||||
NULL},
|
NULL},
|
||||||
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
||||||
NULL},
|
NULL},
|
||||||
|
#ifdef CONFIG_BERYLLIUM
|
||||||
|
/* 4 extra Rx ring history */
|
||||||
|
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
||||||
|
NULL},
|
||||||
|
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
||||||
|
NULL},
|
||||||
|
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
||||||
|
NULL},
|
||||||
|
{DP_RX_RING_HIST_TYPE, sizeof(struct dp_rx_history), false, false,
|
||||||
|
NULL},
|
||||||
|
#endif /* CONFIG_BERYLLIUM */
|
||||||
/* 1 Rx error ring history */
|
/* 1 Rx error ring history */
|
||||||
{DP_RX_ERR_RING_HIST_TYPE, sizeof(struct dp_rx_err_history),
|
{DP_RX_ERR_RING_HIST_TYPE, sizeof(struct dp_rx_err_history),
|
||||||
false, false, NULL},
|
false, false, NULL},
|
||||||
@@ -221,6 +235,10 @@ static struct dp_prealloc_context g_dp_context_allocs[] = {
|
|||||||
{DP_MON_STATUS_BUF_HIST_TYPE, sizeof(struct dp_mon_status_ring_history),
|
{DP_MON_STATUS_BUF_HIST_TYPE, sizeof(struct dp_mon_status_ring_history),
|
||||||
false, false, NULL},
|
false, false, NULL},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WIFI_MONITOR_SUPPORT
|
||||||
|
{DP_MON_PDEV_TYPE, sizeof(struct dp_mon_pdev),
|
||||||
|
false, false, NULL},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dp_consistent_prealloc g_dp_consistent_allocs[] = {
|
static struct dp_consistent_prealloc g_dp_consistent_allocs[] = {
|
||||||
@@ -260,10 +278,17 @@ static struct dp_consistent_prealloc g_dp_consistent_allocs[] = {
|
|||||||
{RXDMA_DST, 0, 0, NULL, NULL, 0, 0},
|
{RXDMA_DST, 0, 0, NULL, NULL, 0, 0},
|
||||||
{RXDMA_DST, 0, 0, NULL, NULL, 0, 0},
|
{RXDMA_DST, 0, 0, NULL, NULL, 0, 0},
|
||||||
/* REFILL ring 0 */
|
/* REFILL ring 0 */
|
||||||
{RXDMA_BUF, (sizeof(struct wbm_buffer_ring)) *
|
{RXDMA_BUF, 0, 0, NULL, NULL, 0, 0},
|
||||||
WLAN_CFG_RXDMA_REFILL_RING_SIZE, 0, NULL, NULL, 0, 0},
|
/* 2 RXDMA buffer rings */
|
||||||
|
{RXDMA_BUF, 0, 0, NULL, NULL, 0, 0},
|
||||||
|
{RXDMA_BUF, 0, 0, NULL, NULL, 0, 0},
|
||||||
/* REO Exception ring */
|
/* REO Exception ring */
|
||||||
{REO_EXCEPTION, 0, 0, NULL, NULL, 0, 0},
|
{REO_EXCEPTION, 0, 0, NULL, NULL, 0, 0},
|
||||||
|
/* 1 REO status ring */
|
||||||
|
{REO_STATUS, 0, 0, NULL, NULL, 0, 0},
|
||||||
|
/* 2 monitor status rings */
|
||||||
|
{RXDMA_MONITOR_STATUS, 0, 0, NULL, NULL, 0, 0},
|
||||||
|
{RXDMA_MONITOR_STATUS, 0, 0, NULL, NULL, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Number of HW link descriptors needed (rounded to power of 2) */
|
/* Number of HW link descriptors needed (rounded to power of 2) */
|
||||||
@@ -517,6 +542,23 @@ dp_update_mem_size_by_ring_type(struct wlan_dp_prealloc_cfg *cfg,
|
|||||||
*mem_size = (sizeof(struct reo_destination_ring)) *
|
*mem_size = (sizeof(struct reo_destination_ring)) *
|
||||||
cfg->num_reo_exception_ring_entries;
|
cfg->num_reo_exception_ring_entries;
|
||||||
return;
|
return;
|
||||||
|
case REO_DST:
|
||||||
|
*mem_size = (sizeof(struct reo_destination_ring)) *
|
||||||
|
cfg->num_reo_dst_ring_entries;
|
||||||
|
return;
|
||||||
|
case RXDMA_BUF:
|
||||||
|
*mem_size = (sizeof(struct wbm_buffer_ring)) *
|
||||||
|
cfg->num_rxdma_refill_ring_entries;
|
||||||
|
return;
|
||||||
|
case REO_STATUS:
|
||||||
|
*mem_size = (sizeof(struct tlv_32_hdr) +
|
||||||
|
sizeof(struct reo_get_queue_stats_status)) *
|
||||||
|
cfg->num_reo_status_ring_entries;
|
||||||
|
return;
|
||||||
|
case RXDMA_MONITOR_STATUS:
|
||||||
|
*mem_size = (sizeof(struct wbm_buffer_ring)) *
|
||||||
|
cfg->num_mon_status_ring_entries;
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user