From ae12eefb50e920a9ccc3343f8dc1c42b54c91567 Mon Sep 17 00:00:00 2001 From: Priyadarshnee Date: Fri, 29 Jan 2021 18:25:10 +0530 Subject: [PATCH] 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 --- .../src/filtering/dfs_partial_offload_radar.c | 6 +++--- umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h | 15 ++++++++++++++- umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h | 4 +++- .../dfs/dispatcher/src/wlan_dfs_init_deinit_api.c | 4 +++- umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c | 10 +++++++++- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c index b371517aaf..a1f2cf0f4b 100644 --- a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c +++ b/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); } diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h index 02296ec8a2..78a0cb768b 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_mlme_api.h +++ b/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. diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h index de031130ad..d97efd9e0c 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h +++ b/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; diff --git a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c b/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c index a09161cdab..b96aefc87b 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c +++ b/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 */ diff --git a/umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c b/umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c index 926814955e..91e25d0ab4 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_mlme_api.c +++ b/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,