Browse Source

qcacmn: Add an API to process spoof completion

Add function declaration for mlme_proc_spoof_success API and its
corresponding function pointers. This API is used to process spoof
completion status from FW.

Change-Id: Ia25ffd01619a0c9d1e5a1bc4c20623b75ee8d75e
Priyadarshnee 4 years ago
parent
commit
ae12eefb50

+ 3 - 3
umac/dfs/core/src/filtering/dfs_partial_offload_radar.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  * Copyright (c) 2011, Atheros Communications Inc.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -703,9 +703,9 @@ static void dfs_action_on_spoof_success(struct wlan_dfs *dfs)
 	if (dfs->dfs_radar_found_chan.dfs_ch_freq ==
 			dfs->dfs_curchan->dfs_ch_freq) {
 		dfs_debug(dfs, WLAN_DEBUG_DFS_ALWAYS,
-			  "cac timer started for channel %d",
+			  "Handling spoof success on chan: %d",
 			  dfs->dfs_curchan->dfs_ch_ieee);
-		dfs_start_cac_timer(dfs);
+		dfs_mlme_proc_spoof_success(dfs->dfs_pdev_obj);
 	} else {
 		dfs_remove_spoof_channel_from_nol(dfs);
 	}

+ 14 - 1
umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -52,6 +52,19 @@ void dfs_mlme_mark_dfs(struct wlan_objmgr_pdev *pdev,
 			uint16_t vhtop_ch_freq_seg2,
 			uint64_t flags);
 
+#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
+/**
+ * dfs_mlme_proc_spoof_success() - Process Spoof Completion status
+ * @pdev: Pointer to DFS pdev object.
+ */
+void dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev);
+#else
+static inline void
+dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev)
+{
+}
+#endif
+
 /**
  * dfs_mlme_start_csa() - Sends CSA in ieeeChan
  * @pdev: Pointer to DFS pdev object.

+ 3 - 1
umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -252,6 +252,8 @@ struct dfs_to_mlme {
 			(struct wlan_objmgr_pdev *pdev);
 	void (*mlme_release_radar_mode_switch_lock)
 			(struct wlan_objmgr_pdev *pdev);
+	QDF_STATUS (*mlme_proc_spoof_success)
+			(struct wlan_objmgr_pdev *pdev);
 };
 
 extern struct dfs_to_mlme global_dfs_to_mlme;

+ 3 - 1
umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -169,6 +169,8 @@ void register_dfs_callbacks(void)
 		mlme_release_radar_mode_switch_lock;
 	tmp_dfs_to_mlme->mlme_mark_dfs =
 		mlme_dfs_mark_dfs;
+	tmp_dfs_to_mlme->mlme_proc_spoof_success =
+		mlme_dfs_proc_spoof_success;
 	/*
 	 * Register precac auto channel switch feature related callbacks
 	 */

+ 9 - 1
umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -40,6 +40,14 @@ void dfs_mlme_start_rcsa(struct wlan_objmgr_pdev *pdev,
 }
 #endif
 
+#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
+void dfs_mlme_proc_spoof_success(struct wlan_objmgr_pdev *pdev)
+{
+	if (global_dfs_to_mlme.mlme_proc_spoof_success)
+		global_dfs_to_mlme.mlme_proc_spoof_success(pdev);
+}
+#endif
+
 #ifndef QCA_MCL_DFS_SUPPORT
 void dfs_mlme_mark_dfs(struct wlan_objmgr_pdev *pdev,
 		uint8_t ieee,