diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h index 2d5fb3ad8d7e..9bbbedf7ce3b 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_public_struct.h @@ -34,6 +34,9 @@ * @segment_id: segment id. * @timestamp: timestamp. * @is_chirp: is chirp or not. + * @chan_freq: channel frequency. + * @radar_freq: radar frequency. + * @sidx: sidx value. */ struct radar_found_info { uint32_t pdev_id; @@ -44,6 +47,9 @@ struct radar_found_info { uint32_t segment_id; uint32_t timestamp; uint32_t is_chirp; + uint32_t chan_freq; + uint32_t radar_freq; + int32_t sidx; }; /** diff --git a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c index 2d5d1239b922..a832ac2ec01d 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_tgt_api.c @@ -245,23 +245,42 @@ QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_E_FAILURE; } - if (dfs->dfs_use_nol) { - dfs_process_radar_found_indication(dfs, radar_found); - dfs_mlme_mark_dfs(pdev, dfs->dfs_curchan->dfs_ch_ieee, + if (radar_found->detection_mode != 0) { + + /* + * Display information about individual pulse for + * debug purposes + */ + dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "time_stamp=%d, pulse_dur=%d, RSSI=%d false_radar=%d, false_check=%d, seg=%d, sidx=%d, chirp=%d\n", + radar_found->timestamp, + radar_found->chan_freq, + radar_found->chan_width, + radar_found->detector_id, + radar_found->freq_offset, + radar_found->segment_id, + radar_found->sidx, + radar_found->is_chirp); + } else { + if (dfs->dfs_use_nol) { + dfs_process_radar_found_indication(dfs, radar_found); + dfs_mlme_mark_dfs(pdev, dfs->dfs_curchan->dfs_ch_ieee, dfs->dfs_curchan->dfs_ch_freq, dfs->dfs_curchan->dfs_ch_vhtop_ch_freq_seg2, dfs->dfs_curchan->dfs_ch_flags); - } else{ + } else{ - /* We are in test mode and should send a CSA back - * to same channel. - */ - qdf_timer_stop(&dfs->wlan_dfstesttimer); - dfs->wlan_dfstest = 1; - dfs->wlan_dfstest_ieeechan = dfs->dfs_curchan->dfs_ch_ieee; - dfs->wlan_dfstesttime = 1; /* 1ms */ - qdf_timer_mod(&dfs->wlan_dfstesttimer, dfs->wlan_dfstesttime); + /* We are in test mode and should send a CSA back + * to same channel. */ + qdf_timer_stop(&dfs->wlan_dfstesttimer); + dfs->wlan_dfstest = 1; + dfs->wlan_dfstest_ieeechan = + dfs->dfs_curchan->dfs_ch_ieee; + dfs->wlan_dfstesttime = 1; /* 1ms */ + qdf_timer_mod(&dfs->wlan_dfstesttimer, + dfs->wlan_dfstesttime); + } } + return QDF_STATUS_SUCCESS; } EXPORT_SYMBOL(tgt_dfs_process_radar_ind); diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 7d9abf211c98..406569994c86 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -18915,17 +18915,31 @@ static QDF_STATUS extract_dfs_radar_detection_event_tlv( } radar_event = param_tlv->fixed_param; - radar_found->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host( - radar_event->pdev_id); + radar_found->pdev_id = wmi_handle->ops-> + convert_pdev_id_target_to_host(radar_event->pdev_id); radar_found->detection_mode = radar_event->detection_mode; - radar_found->freq_offset = radar_event->chan_freq; + radar_found->chan_freq = radar_event->chan_freq; radar_found->chan_width = radar_event->chan_width; radar_found->detector_id = radar_event->detector_id; radar_found->segment_id = radar_event->segment_id; radar_found->timestamp = radar_event->timestamp; radar_found->is_chirp = radar_event->is_chirp; + radar_found->freq_offset = radar_event->freq_offset; + radar_found->sidx = radar_event->sidx; + WMI_LOGD("processed radar found event pdev %d", radar_event->pdev_id); + WMI_LOGD("Radar Event Info:"); + WMI_LOGD("pdev_id %d", radar_event->pdev_id); + WMI_LOGD("detection mode %d", radar_event->detection_mode); + WMI_LOGD("chan_freq (dur) %d", radar_event->chan_freq); + WMI_LOGD("chan_width (RSSI) %d", radar_event->chan_width); + WMI_LOGD("detector_id (false_radar) %d", radar_event->detector_id); + WMI_LOGD("segment_id %d", radar_event->segment_id); + WMI_LOGD("timestamp %d", radar_event->timestamp); + WMI_LOGD("is_chirp %d", radar_event->is_chirp); + WMI_LOGD("freq_offset (radar_check) %d", radar_event->freq_offset); + WMI_LOGD("sidx %d", radar_event->sidx); return QDF_STATUS_SUCCESS; }