From 31dfdf84bf5c032acacc6ace82b045f3b6d1b6c4 Mon Sep 17 00:00:00 2001 From: Vijay Krishnan Date: Tue, 9 Feb 2021 17:41:06 +0530 Subject: [PATCH] qcacmn: Enable dfs_err logs on default During wifi load and unload, multiple memory allocations and deallocations are done in the path of dfs_deinit_precac_list, and at a particular instance there is a crash seen due to an invalid paging request. The QDF_TRACE_LEVEL_ERROR logs are not enabled by default. These prints can be useful in debugging the issue when it occurs the next time. Hence, the dfs_err prints are enabled by default. When a crash occurs with the dfs_precac list functionality, debugging the crash with dumps in T32 is difficult. During wifi unload, the api wlan_dfs_pdev_obj_destroy_notification is called. On first step, the pdev component is detached making the pdev component as NULL and after that dfs component is detached. So when crash happens at this point, pdev component is already NULL and analysing dumps with T32 is useless at this stage. Therefore, modify the order of dfs detach in wlan_dfs_pdev_obj_destroy_notification. First detach the dfs component and then detach the pdev component. CRs-Fixed: 2872097 Change-Id: I157c6e6272bf4dd3676588b7ee6889fdb2efa5dc --- umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c index b96aefc87b..0c7f8cb2e7 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c @@ -327,6 +327,10 @@ QDF_STATUS dfs_init(void) QDF_TRACE_LEVEL_DEBUG, true); + status = qdf_print_set_category_verbose(qdf_get_pidx(), + QDF_MODULE_ID_DFS, + QDF_TRACE_LEVEL_ERROR, + true); if (QDF_IS_STATUS_ERROR(status)) { dfs_err(NULL, WLAN_DEBUG_DFS_ALWAYS, "Failed to set verbose for category"); @@ -502,11 +506,11 @@ QDF_STATUS wlan_dfs_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, /* DFS is NULL during unload. should we call this function before */ if (dfs) { + dfs_detach(dfs); global_dfs_to_mlme.pdev_component_obj_detach(pdev, WLAN_UMAC_COMP_DFS, (void *)dfs); - dfs_detach(dfs); dfs->dfs_pdev_obj = NULL; dfs_destroy_object(dfs); }