qcacmn: Handle dfs pulse information in host side

Adds support to dump dfs pulse information from firmware to host
for debug purpose.

Change-Id: I3b2042f8df6e077eed1a3847cd2d8550794bc6f7
CRs-fixed: 2121833
This commit is contained in:
Shaakir Mohamed 2017-10-04 17:09:07 -07:00 • committed by snandini
commit 03a8b15221
3 changed files with 55 additions and 16 deletions

View file

@ -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;
};
/**

View file

@ -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);

View file

@ -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;
}