From c70a7a8d0f049f14d3d4a719149cb8599faabb9a Mon Sep 17 00:00:00 2001 From: Vijay Krishnan Date: Wed, 5 Aug 2020 02:33:29 +0530 Subject: [PATCH] qcacmn: Send VDEV_UP after spoof radar in Rep-AP In Partial-Offload, when a repeater is associated with Root-AP in DFS channel. The Repeater STA will get connected with Root-AP and then Repeater-AP comes up in the DFS channel but it does not send beacons. The reason is, when a STA vap is UP and in connected state, CAC is skipped. So, for Repeater-AP we send VDEV_UP before Spoof radar pulses event. FW rejects the VDEV_UP sent by host and therefore Repeater-AP will be in UP state but it does not send any beacons. The fix is, while checking the condition if STA vap is set to true, we also check whether spoof radar event is completed. If the spoof radar event is not completed, then we will not skip CAC and then VDEV UP will be sent after the Spoof radar event. CRs-Fixed: 2748740 Change-Id: If63f3118d3e40785b375a0bd59d46783c14fe433 --- .../core/src/filtering/dfs_partial_offload_radar.c | 2 +- umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h | 13 +++++++++++++ umac/dfs/dispatcher/src/wlan_dfs_utils_api.c | 11 +++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) 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 c5717f71857f..385823dad598 100644 --- a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c +++ b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c @@ -706,7 +706,7 @@ static void dfs_action_on_spoof_success(struct wlan_dfs *dfs) "cac timer started for channel %d", dfs->dfs_curchan->dfs_ch_ieee); dfs_start_cac_timer(dfs); - } else{ + } else { dfs_remove_spoof_channel_from_nol(dfs); } } diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h index 53e08d77ac14..36de6e9b8173 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h @@ -822,10 +822,17 @@ uint16_t utils_dfs_get_cur_rd(struct wlan_objmgr_pdev *pdev); * @is_spoof_check_failed: pointer containing the status. * * Return: QDF_STATUS. + + * utils_dfs_is_spoof_done() - get spoof check status. + * @pdev: pdev ptr + * + * Return: True if dfs_spoof_test_done is set. */ #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, bool *is_spoof_check_failed); + +bool utils_dfs_is_spoof_done(struct wlan_objmgr_pdev *pdev); #else static inline QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, @@ -833,6 +840,12 @@ QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, { return QDF_STATUS_SUCCESS; } + +static inline +bool utils_dfs_is_spoof_done(struct wlan_objmgr_pdev *pdev) +{ + return true; +} #endif /** diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 4bcdae12fcc8..85b95407c08f 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -1553,6 +1553,17 @@ QDF_STATUS utils_dfs_is_spoof_check_failed(struct wlan_objmgr_pdev *pdev, } qdf_export_symbol(utils_dfs_is_spoof_check_failed); + +bool utils_dfs_is_spoof_done(struct wlan_objmgr_pdev *pdev) +{ + struct wlan_dfs *dfs; + + dfs = wlan_pdev_get_dfs_obj(pdev); + if (!dfs) + return false; + + return !!dfs->dfs_spoof_test_done; +} #endif int dfs_get_num_chans(void)