From c2fc6d09c64392bb172b3883e1f166fa48ec2ed5 Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Sat, 19 Aug 2017 12:20:17 +0530 Subject: [PATCH] qcacmn: Fix DFS kernel panic Analysis: dfs_nol_timer_cleanup() calls dfs_nol_update(), which internally calls a legacy function to update the scan channel list and sends a WMI command to FW. However, from WIN side dfs_nol_timer_cleanup() is also called after target stop, which leads to a kernel panic. Solution: Call dfs_nol_update() prior to target stop. Initalize precac channel list during dfs reset. Change-Id: If856d436ad215efa46cfc166d95bf3ccb4e7bf99 CRs-Fixed: 2096256 --- umac/dfs/core/src/misc/dfs.c | 1 - umac/dfs/core/src/misc/dfs_nol.c | 1 - umac/dfs/dispatcher/src/wlan_dfs_utils_api.c | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index 868b974022da..6e3cf4a3c043 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -331,7 +331,6 @@ int dfs_attach(struct wlan_dfs *dfs) void dfs_stop(struct wlan_dfs *dfs) { - dfs_init_precac_list(dfs); dfs_nol_timer_cleanup(dfs); dfs_clear_nolhistory(dfs); } diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index 7d9636444dd4..72d74dbeb22d 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -495,7 +495,6 @@ void dfs_nol_timer_cleanup(struct wlan_dfs *dfs) } } dfs->dfs_nol = NULL; - dfs_nol_update(dfs); } int dfs_get_rn_use_nol(struct wlan_dfs *dfs) diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 35ce4465400e..c8c2e390b22a 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -46,6 +46,8 @@ QDF_STATUS utils_dfs_reset(struct wlan_objmgr_pdev *pdev) return QDF_STATUS_E_FAILURE; dfs_reset(dfs); + dfs_nol_update(dfs); + dfs_init_precac_list(dfs); return QDF_STATUS_SUCCESS; } @@ -662,6 +664,7 @@ void dfs_clear_nol_channels(struct wlan_objmgr_pdev *pdev) /* clear local cache first */ dfs_nol_timer_cleanup(dfs); + dfs_nol_update(dfs); /* * update platform driver nol list with local cache which is zero,