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

Commit 5dae8928 authored by Sourav Mohapatra's avatar Sourav Mohapatra Committed by Gerrit - the friendly Code Review server
Browse files

qcacmn: Do not assert for ref leak if SSR/PDR is ongoing

The driver uses a timer to check if there is a potential ref leak by
inducing assert if a given module does not release ref even when the
object is in L-state. But in case there is SSR/PDR, it might take more
time to clean up/release the refs. In this case, no assert should be
triggered.

Add a check in wlan_objmgr_iterate_log_del_obj_handler before calling
the assert API.

Change-Id: Ifb7568e11bff2b9fc610633af730461e33dc5539
CRs-Fixed: 2468301
parent e564e183
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -26,11 +26,15 @@
#include <wlan_objmgr_peer_obj.h>
#include "wlan_objmgr_global_obj_i.h"
#include <qdf_mem.h>
#include <qdf_platform.h>

#define LOG_DEL_OBJ_TIMEOUT_VALUE_MSEC   5000
#define LOG_DEL_OBJ_DESTROY_DURATION_SEC 5
/* The max duration for which a obj can be allowed to remain in L-state */
#define LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC 10
/*
 * The max duration for which a obj can be allowed to remain in L-state
 * The duration  should be higher than the psoc idle timeout.
 */
#define LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC 15
#define LOG_DEL_OBJ_LIST_MAX_COUNT       (3 + 5 + 48 + 4096)

/**
@@ -360,8 +364,10 @@ static void wlan_objmgr_iterate_log_del_obj_handler(void *timer_arg)
		wlan_objmgr_print_pending_refs(del_obj->obj, obj_type);

		if (cur_tstamp > del_obj->tstamp +
		    LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC)
		    LOG_DEL_OBJ_DESTROY_ASSERT_DURATION_SEC) {
			if (!qdf_is_recovering() && !qdf_is_fw_down())
				wlan_objmgr_debug_obj_destroyed_panic(obj_name);
		}

		status = qdf_list_peek_next(log_del_obj_list, node, &node);