diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 57e880bed67f..6d397d09994c 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1003,8 +1003,6 @@ struct dfs_rcac_params { * @wlan_dfs_debug_timer: Dfs debug timer. * @dfs_bangradar_type: Radar simulation type. * @is_radar_found_on_secondary_seg: Radar on second segment. - * @dfs_radar_found_for_fo: Radar found event for FO(Full Offload) is - * received. * @is_radar_during_precac: Radar found during precac. * @dfs_precac_lock: Lock to protect precac lists. * @dfs_precac_secondary_freq: Second segment freq for precac. @@ -1180,7 +1178,6 @@ struct wlan_dfs { qdf_timer_t wlan_dfs_debug_timer; enum dfs_bangradar_types dfs_bangradar_type; bool is_radar_found_on_secondary_seg; - bool dfs_radar_found_for_fo; bool is_radar_during_precac; qdf_spinlock_t dfs_precac_lock; bool dfs_precac_enable; diff --git a/umac/dfs/core/src/filtering/dfs_process_radarevent.c b/umac/dfs/core/src/filtering/dfs_process_radarevent.c index ef3aadac9272..bbb75d8cddc3 100644 --- a/umac/dfs/core/src/filtering/dfs_process_radarevent.c +++ b/umac/dfs/core/src/filtering/dfs_process_radarevent.c @@ -1377,6 +1377,25 @@ void dfs_false_radarfound_reset_vars( dfs->dfs_phyerr_queued_count = 0; } +/** + * dfs_process_radarevent() - For Full Offload, FW sends segment id,freq_offset + * and chirp information and gets assigned when there is radar detect. In + * case of radartool bangradar enhanced command and real radar for DA and PO, + * we assign these information here. + * + * @dfs: Pointer to wlan_dfs structure. + * @radar_found: Pointer to radar_found_info structure. + */ + +static void +dfs_fill_radar_found_info(struct wlan_dfs *dfs, + struct radar_found_info *radar_found) +{ + radar_found->segment_id = dfs->dfs_seg_id; + radar_found->freq_offset = dfs->dfs_freq_offset; + radar_found->is_chirp = dfs->dfs_is_chirp; +} + void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id) { struct radar_found_info *radar_found; @@ -1391,6 +1410,7 @@ void dfs_radarfound_action_generic(struct wlan_dfs *dfs, uint8_t seg_id) radar_found->pdev_id = wlan_objmgr_pdev_get_pdev_id(dfs->dfs_pdev_obj); + dfs_fill_radar_found_info(dfs, radar_found); dfs_process_radar_ind(dfs, radar_found); qdf_mem_free(radar_found); } 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 3b4569b4ae74..707b936ec89a 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 @@ -1092,17 +1092,6 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs, goto exit; } - /* For Full Offload, FW sends segment id,freq_offset and chirp - * information and gets assigned when there is radar detect. In - * case of radartool bangradar enhanced command and real radar - * for DA and PO, we assign these information here. - */ - if (!(dfs->dfs_is_offload_enabled && dfs->dfs_radar_found_for_fo)) { - radar_found->segment_id = dfs->dfs_seg_id; - radar_found->freq_offset = dfs->dfs_freq_offset; - radar_found->is_chirp = dfs->dfs_is_chirp; - } - dfs_compute_radar_found_cfreq(dfs, radar_found, &freq_center); radarfound_freq = freq_center + radar_found->freq_offset; diff --git a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c index 1f280a5cf407..515fe048ac93 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c @@ -654,10 +654,8 @@ QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev, return status; } - dfs->dfs_radar_found_for_fo = 1; dfs_translate_radar_params(dfs, radar_found); status = dfs_process_radar_ind(dfs, radar_found); - dfs->dfs_radar_found_for_fo = 0; return status; }