From 294c9b62c6937cd6c28392f8a3b32cefbde87629 Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Tue, 14 Aug 2018 12:28:27 +0530 Subject: [PATCH] qcacmn: Rename dfs timer free function 1. Rename XXX_timer_free() dfs functions as XXX_timer_detach(). 2. Remove the code to free precac_nol_list from dfs_zero_cac_timer_detach(). This is the redundant code since dfs_reset() already frees the precac_nol_list. Change-Id: I878f396795ce0e5c04af379a6db253d07ca66a83 CRs-Fixed: 2262081 --- umac/dfs/core/src/dfs.h | 16 ++++++------- umac/dfs/core/src/dfs_filter_init.h | 10 ++++---- umac/dfs/core/src/dfs_partial_offload_radar.h | 6 ++--- umac/dfs/core/src/dfs_zero_cac.h | 6 ++--- umac/dfs/core/src/misc/dfs.c | 18 +++++++-------- umac/dfs/core/src/misc/dfs_cac.c | 2 +- umac/dfs/core/src/misc/dfs_filter_init.c | 4 ++-- umac/dfs/core/src/misc/dfs_nol.c | 2 +- umac/dfs/core/src/misc/dfs_zero_cac.c | 23 +------------------ 9 files changed, 33 insertions(+), 54 deletions(-) diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 3b9122a55cfc..9f2fb7aa5d9f 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1382,10 +1382,10 @@ void dfs_nol_update(struct wlan_dfs *dfs); void dfs_nol_timer_cleanup(struct wlan_dfs *dfs); /** - * dfs_nol_timer_free() - Free NOL timer. + * dfs_nol_timer_detach() - Free NOL timer. * @dfs: Pointer to wlan_dfs structure. */ -void dfs_nol_timer_free(struct wlan_dfs *dfs); +void dfs_nol_timer_detach(struct wlan_dfs *dfs); /** * dfs_nol_workqueue_cleanup() - Flushes NOL workqueue. @@ -2018,10 +2018,10 @@ void dfs_cac_attach(struct wlan_dfs *dfs); void dfs_cac_timer_reset(struct wlan_dfs *dfs); /** - * dfs_cac_timer_free() - Free dfs cac timers. + * dfs_cac_timer_detach() - Free dfs cac timers. * @dfs: Pointer to wlan_dfs structure. */ -void dfs_cac_timer_free(struct wlan_dfs *dfs); +void dfs_cac_timer_detach(struct wlan_dfs *dfs); /** * dfs_nol_timer_init() - Initialize NOL timers. @@ -2341,14 +2341,14 @@ void dfs_task_testtimer_reset(struct wlan_dfs *dfs); bool dfs_freq_is_in_nol(struct wlan_dfs *dfs, uint32_t freq); /** - * dfs_task_testtimer_free() - Free dfs test timer. + * dfs_task_testtimer_detach() - Free dfs test timer. * @dfs: Pointer to wlan_dfs structure. */ -void dfs_task_testtimer_free(struct wlan_dfs *dfs); +void dfs_task_testtimer_detach(struct wlan_dfs *dfs); /** - * dfs_timer_free() - Free dfs timers. + * dfs_timer_detach() - Free dfs timers. * @dfs: Pointer to wlan_dfs structure. */ -void dfs_timer_free(struct wlan_dfs *dfs); +void dfs_timer_detach(struct wlan_dfs *dfs); #endif /* _DFS_H_ */ diff --git a/umac/dfs/core/src/dfs_filter_init.h b/umac/dfs/core/src/dfs_filter_init.h index 657a9c35246a..1db3e40b02cd 100644 --- a/umac/dfs/core/src/dfs_filter_init.h +++ b/umac/dfs/core/src/dfs_filter_init.h @@ -58,7 +58,7 @@ static inline void dfs_main_detach(struct wlan_dfs *dfs) #if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) int dfs_start_host_based_bangradar(struct wlan_dfs *dfs); #else -static int dfs_start_host_based_bangradar(struct wlan_dfs *dfs) +static inline int dfs_start_host_based_bangradar(struct wlan_dfs *dfs) { return 0; } @@ -71,19 +71,19 @@ static int dfs_start_host_based_bangradar(struct wlan_dfs *dfs) #if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) void dfs_main_timer_reset(struct wlan_dfs *dfs); #else -static void dfs_main_timer_reset(struct wlan_dfs *dfs) +static inline void dfs_main_timer_reset(struct wlan_dfs *dfs) { } #endif /** - * dfs_main_timer_free() - Free dfs timers. + * dfs_main_timer_detach() - Free dfs timers. * @dfs: Pointer to wlan_dfs structure. */ #if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) -void dfs_main_timer_free(struct wlan_dfs *dfs); +void dfs_main_timer_detach(struct wlan_dfs *dfs); #else -static void dfs_main_timer_free(struct wlan_dfs *dfs) +static inline void dfs_main_timer_detach(struct wlan_dfs *dfs) { } #endif diff --git a/umac/dfs/core/src/dfs_partial_offload_radar.h b/umac/dfs/core/src/dfs_partial_offload_radar.h index 92f7903da2f0..cbc1bd628a1a 100644 --- a/umac/dfs/core/src/dfs_partial_offload_radar.h +++ b/umac/dfs/core/src/dfs_partial_offload_radar.h @@ -68,13 +68,13 @@ static inline void dfs_host_wait_timer_init(struct wlan_dfs *dfs) #endif /** - * dfs_host_wait_timer_free() - Free dfs host status wait timer. + * dfs_host_wait_timer_detach() - Free dfs host status wait timer. * @dfs: Pointer to wlan_dfs structure. */ #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) -void dfs_host_wait_timer_free(struct wlan_dfs *dfs); +void dfs_host_wait_timer_detach(struct wlan_dfs *dfs); #else -static inline void dfs_host_wait_timer_free(struct wlan_dfs *dfs) +static inline void dfs_host_wait_timer_detach(struct wlan_dfs *dfs) { } #endif diff --git a/umac/dfs/core/src/dfs_zero_cac.h b/umac/dfs/core/src/dfs_zero_cac.h index 74b361d036d9..86127103280b 100644 --- a/umac/dfs/core/src/dfs_zero_cac.h +++ b/umac/dfs/core/src/dfs_zero_cac.h @@ -185,13 +185,13 @@ static inline void dfs_zero_cac_reset(struct wlan_dfs *dfs) #endif /** - * dfs_zero_cac_timer_free() - Free Zero cac DFS variables. + * dfs_zero_cac_timer_detach() - Free Zero cac DFS variables. * @dfs: Pointer to wlan_dfs structure. */ #if defined(WLAN_DFS_PARTIAL_OFFLOAD) -void dfs_zero_cac_timer_free(struct wlan_dfs *dfs); +void dfs_zero_cac_timer_detach(struct wlan_dfs *dfs); #else -static inline void dfs_zero_cac_timer_free(struct wlan_dfs *dfs) +static inline void dfs_zero_cac_timer_detach(struct wlan_dfs *dfs) { } #endif diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index 537081ebc56e..b6f9cc1a9eb7 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -145,7 +145,7 @@ void dfs_task_testtimer_reset(struct wlan_dfs *dfs) } } -void dfs_task_testtimer_free(struct wlan_dfs *dfs) +void dfs_task_testtimer_detach(struct wlan_dfs *dfs) { qdf_timer_free(&dfs->wlan_dfstesttimer); dfs->wlan_dfstest = 0; @@ -168,23 +168,23 @@ void dfs_reset(struct wlan_dfs *dfs) dfs_task_testtimer_reset(dfs); } -void dfs_timer_free(struct wlan_dfs *dfs) +void dfs_timer_detach(struct wlan_dfs *dfs) { - dfs_cac_timer_free(dfs); - dfs_zero_cac_timer_free(dfs); + dfs_cac_timer_detach(dfs); + dfs_zero_cac_timer_detach(dfs); if (!dfs->dfs_is_offload_enabled) { - dfs_main_timer_free(dfs); - dfs_host_wait_timer_free(dfs); + dfs_main_timer_detach(dfs); + dfs_host_wait_timer_detach(dfs); } - dfs_task_testtimer_free(dfs); - dfs_nol_timer_free(dfs); + dfs_task_testtimer_detach(dfs); + dfs_nol_timer_detach(dfs); } void dfs_detach(struct wlan_dfs *dfs) { - dfs_timer_free(dfs); + dfs_timer_detach(dfs); if (!dfs->dfs_is_offload_enabled) dfs_main_detach(dfs); dfs_etsi_precac_detach(dfs); diff --git a/umac/dfs/core/src/misc/dfs_cac.c b/umac/dfs/core/src/misc/dfs_cac.c index 88b9b6dd6744..afed5094604c 100644 --- a/umac/dfs/core/src/misc/dfs_cac.c +++ b/umac/dfs/core/src/misc/dfs_cac.c @@ -186,7 +186,7 @@ void dfs_cac_timer_reset(struct wlan_dfs *dfs) } -void dfs_cac_timer_free(struct wlan_dfs *dfs) +void dfs_cac_timer_detach(struct wlan_dfs *dfs) { qdf_timer_free(&dfs->dfs_cac_timer); diff --git a/umac/dfs/core/src/misc/dfs_filter_init.c b/umac/dfs/core/src/misc/dfs_filter_init.c index 41aa44d0e8da..ff6054d0c896 100644 --- a/umac/dfs/core/src/misc/dfs_filter_init.c +++ b/umac/dfs/core/src/misc/dfs_filter_init.c @@ -224,14 +224,14 @@ void dfs_main_timer_reset(struct wlan_dfs *dfs) } } -void dfs_main_timer_free(struct wlan_dfs *dfs) +void dfs_main_timer_detach(struct wlan_dfs *dfs) { qdf_timer_free(&dfs->wlan_dfs_task_timer); dfs->wlan_radar_tasksched = 0; } #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) -void dfs_host_wait_timer_free(struct wlan_dfs *dfs) +void dfs_host_wait_timer_detach(struct wlan_dfs *dfs) { qdf_timer_free(&dfs->dfs_host_wait_timer); } diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index f94fea714f63..fe63ec1dbc54 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -160,7 +160,7 @@ void dfs_nol_detach(struct wlan_dfs *dfs) WLAN_DFSNOL_LOCK_DESTROY(dfs); } -void dfs_nol_timer_free(struct wlan_dfs *dfs) +void dfs_nol_timer_detach(struct wlan_dfs *dfs) { qdf_timer_free(&dfs->dfs_nol_timer); } diff --git a/umac/dfs/core/src/misc/dfs_zero_cac.c b/umac/dfs/core/src/misc/dfs_zero_cac.c index 17aa18079be0..81a651e0a5fb 100644 --- a/umac/dfs/core/src/misc/dfs_zero_cac.c +++ b/umac/dfs/core/src/misc/dfs_zero_cac.c @@ -119,30 +119,9 @@ void dfs_zero_cac_reset(struct wlan_dfs *dfs) PRECAC_LIST_UNLOCK(dfs); } -void dfs_zero_cac_timer_free(struct wlan_dfs *dfs) +void dfs_zero_cac_timer_detach(struct wlan_dfs *dfs) { - struct dfs_precac_entry *tmp_precac_entry, *precac_entry; - - dfs_get_override_precac_timeout(dfs, - &dfs->dfs_precac_timeout_override); - qdf_timer_free(&dfs->dfs_precac_timer); - - dfs->dfs_precac_primary_freq = 0; - dfs->dfs_precac_secondary_freq = 0; - - PRECAC_LIST_LOCK(dfs); - if (!TAILQ_EMPTY(&dfs->dfs_precac_nol_list)) - TAILQ_FOREACH_SAFE(precac_entry, - &dfs->dfs_precac_nol_list, - pe_list, - tmp_precac_entry) { - qdf_timer_free(&precac_entry->precac_nol_timer); - TAILQ_REMOVE(&dfs->dfs_precac_required_list, - precac_entry, pe_list); - qdf_mem_free(precac_entry); - } - PRECAC_LIST_UNLOCK(dfs); } int dfs_override_precac_timeout(struct wlan_dfs *dfs, int precac_timeout)