diff --git a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c index c9e3ef5be0..47a100b1cf 100644 --- a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c +++ b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c @@ -1022,6 +1022,11 @@ dfs_process_radar_ind_on_home_chan(struct wlan_dfs *dfs, WLAN_EV_RADAR_DETECTED); if (!dfs->dfs_use_nol) { + if (!dfs->dfs_is_offload_enabled) { + dfs_radar_disable(dfs); + dfs_second_segment_radar_disable(dfs); + dfs_flush_additional_pulses(dfs); + } dfs_reset_bangradar(dfs); dfs_send_csa_to_current_chan(dfs); status = QDF_STATUS_SUCCESS; diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h index e5ab2a869d..6cb15b61bb 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h @@ -968,4 +968,15 @@ QDF_STATUS dfs_init_chan_state_array(struct wlan_objmgr_pdev *pdev) return QDF_STATUS_E_NOSUPPORT; } #endif /* WLAN_DISP_CHAN_INFO */ + +/** + * utils_dfs_radar_enable() - Enables the radar. + * @pdev: Pointer to DFS pdev object. + * + * This is called each time for eCSA occurs but don't change channel due + * to channel switch disabled in dfs test mode. + * + * Return: QDF_STATUS. + */ +QDF_STATUS utils_dfs_radar_enable(struct wlan_objmgr_pdev *pdev); #endif /* _WLAN_DFS_UTILS_API_H_ */ diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 027700d402..7b8a8926a5 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -1583,3 +1583,8 @@ QDF_STATUS utils_dfs_update_chan_state_array(struct wlan_objmgr_pdev *pdev, return utils_dfs_update_chan_state_array_element(dfs, freq, state); } #endif /* WLAN_DISP_CHAN_INFO */ + +QDF_STATUS utils_dfs_radar_enable(struct wlan_objmgr_pdev *pdev) +{ + return tgt_dfs_radar_enable(pdev, 0, 0, true); +} diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c index ab0389325a..26a5f451d2 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c +++ b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c @@ -1358,7 +1358,7 @@ static bool mlme_vdev_subst_suspend_csa_restart_event(void *ctx, * change in channel i.e. only Beacon Probe response template * is updated (CSA / ECSA IE is removed). */ - + mlme_vdev_chan_switch_disable_notify_dfs(vdev_mlme); mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_UP); mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_UP_HOST_RESTART, diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h index 77be773f26..68e65d589a 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h +++ b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h @@ -24,6 +24,8 @@ #define _VDEV_MLME_SM_H_ #include +#include + /** * mlme_vdev_sm_deliver_event() - Delivers event to VDEV MLME SM * @vdev_mlme: MLME VDEV comp object @@ -623,6 +625,18 @@ static inline QDF_STATUS mlme_vdev_dfs_cac_wait_notify( return ret; } +/** + * mlme_vdev_chan_switch_disable_notify_dfs - Notifies DFS when channel + * switch is disabled + * @vdev_mlme: VDEV MLME comp object + * + * Return: QDF_STATUS. + */ +static inline QDF_STATUS mlme_vdev_chan_switch_disable_notify_dfs( + struct vdev_mlme_obj *vdev_mlme) +{ + return utils_dfs_radar_enable(wlan_vdev_get_pdev(vdev_mlme->vdev)); +} #ifdef WLAN_FEATURE_11BE_MLO /** * mlme_vdev_up_notify_mlo_mgr - notify mlo link is ready to up