Explorar el Código

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
Shashikala Prabhu hace 6 años
padre
commit
294c9b62c6

+ 8 - 8
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_ */

+ 5 - 5
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

+ 3 - 3
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

+ 3 - 3
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

+ 9 - 9
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);

+ 1 - 1
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);
 

+ 2 - 2
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);
 }

+ 1 - 1
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);
 }

+ 1 - 22
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)