diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index e12ab55220..da97192197 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -338,10 +338,16 @@ WLAN_DFSNOL_UNLOCK(dfs); \ } while (0) +/* + * Free the NOL element in a thread. This is to avoid freeing the + * timer object from within timer callback function . The nol element + * contains the timer Object. + */ #define DFS_NOL_DELETE_CHAN_LOCKED(dfs, freq, chwidth) \ do { \ WLAN_DFSNOL_LOCK(dfs); \ dfs_nol_delete(dfs, freq, chwidth); \ + qdf_sched_work(NULL, &dfs->dfs_nol_elem_free_work); \ WLAN_DFSNOL_UNLOCK(dfs); \ } while (0) diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index 5a81f5c4dc..92bc2439b1 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -254,13 +254,6 @@ static os_timer_func(dfs_remove_from_nol) utils_dfs_reg_update_nol_ch(dfs->dfs_pdev_obj, &chan, 1, DFS_NOL_RESET); utils_dfs_save_nol(dfs->dfs_pdev_obj); - - /* - * Free the NOL element in a thread. This is to avoid freeing the - * timer object from within timer callback function . The nol element - * contains the timer Object. - */ - qdf_sched_work(NULL, &dfs->dfs_nol_elem_free_work); } void dfs_print_nol(struct wlan_dfs *dfs)