qcacmn: Do not update nbuf_count when mem debug disabled runtime
Don not update nbuf_count when mem debug disabled runtime Change-Id: Ib9c09210e5b91fd1db160444c0e3e2e315e12853 CRs-Fixed: 2618970
This commit is contained in:
@@ -114,7 +114,7 @@ static uint32_t nbuf_tx_data[QDF_NBUF_TX_PKT_STATE_MAX];
|
||||
static qdf_atomic_t nbuf_count;
|
||||
#endif
|
||||
|
||||
#if defined(NBUF_MEMORY_DEBUG)
|
||||
#if defined(NBUF_MEMORY_DEBUG) || defined(QDF_NBUF_GLOBAL_COUNT)
|
||||
static bool is_initial_mem_debug_disabled;
|
||||
#endif
|
||||
|
||||
@@ -340,7 +340,12 @@ qdf_export_symbol(__qdf_nbuf_count_get);
|
||||
void __qdf_nbuf_count_inc(qdf_nbuf_t nbuf)
|
||||
{
|
||||
int num_nbuf = 1;
|
||||
qdf_nbuf_t ext_list = qdf_nbuf_get_ext_list(nbuf);
|
||||
qdf_nbuf_t ext_list;
|
||||
|
||||
if (qdf_likely(is_initial_mem_debug_disabled))
|
||||
return;
|
||||
|
||||
ext_list = qdf_nbuf_get_ext_list(nbuf);
|
||||
|
||||
/* Take care to account for frag_list */
|
||||
while (ext_list) {
|
||||
@@ -364,6 +369,9 @@ void __qdf_nbuf_count_dec(__qdf_nbuf_t nbuf)
|
||||
qdf_nbuf_t ext_list;
|
||||
int num_nbuf;
|
||||
|
||||
if (qdf_likely(is_initial_mem_debug_disabled))
|
||||
return;
|
||||
|
||||
if (qdf_nbuf_get_users(nbuf) > 1)
|
||||
return;
|
||||
|
||||
@@ -4444,6 +4452,7 @@ qdf_export_symbol(qdf_nbuf_init_fast);
|
||||
*/
|
||||
void __qdf_nbuf_mod_init(void)
|
||||
{
|
||||
is_initial_mem_debug_disabled = qdf_mem_debug_config_get();
|
||||
qdf_atomic_init(&nbuf_count);
|
||||
qdf_debugfs_create_atomic(NBUF_DEBUGFS_NAME, S_IRUSR, NULL, &nbuf_count);
|
||||
}
|
||||
|
Reference in New Issue
Block a user