qcacld-3.0: Print BTM RSP and initial roam info in kmsg

The event WMI_ROAM_STATS_EVENTID is received after
every roam, once the roam synch complete is sent by the host.
This event contains details regarding the btm response.

This helps in debugging/understanding the scenario when roam
failure happens.

Print the info received related to btm rsp and roam initial
info into kmsg.

Change-Id: Icb2058eed5df3265018b3c53548d123f3a4faf4f
CRs-Fixed: 2728267
This commit is contained in:
Abhinav Kumar
2020-06-29 01:01:01 +05:30
committed by snandini
parent 9a80ee261b
commit 87a292e54a
8 changed files with 287 additions and 2 deletions

View File

@@ -988,16 +988,107 @@ send_vdev_set_pcl_cmd_tlv(wmi_unified_t wmi_handle,
return QDF_STATUS_SUCCESS;
}
/**
* extract_roam_btm_response_stats_tlv() - Extract the btm rsp stats
* from the WMI_ROAM_STATS_EVENTID
* @wmi_handle: wmi handle
* @evt_buf: Pointer to the event buffer
* @dst: Pointer to destination structure to fill data
* @idx: TLV id
*/
static QDF_STATUS
extract_roam_btm_response_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
struct roam_btm_response_data *dst,
uint8_t idx)
{
WMI_ROAM_STATS_EVENTID_param_tlvs *param_buf;
wmi_roam_btm_response_info *src_data = NULL;
param_buf = (WMI_ROAM_STATS_EVENTID_param_tlvs *)evt_buf;
if (!param_buf || !param_buf->roam_btm_response_info ||
!param_buf->num_roam_btm_response_info ||
idx >= param_buf->num_roam_btm_response_info) {
WMI_LOGD("%s: Empty btm response param buf", __func__);
return QDF_STATUS_SUCCESS;
}
src_data = &param_buf->roam_btm_response_info[idx];
dst->present = true;
dst->btm_status = src_data->btm_status;
WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_data->target_bssid,
dst->target_bssid.bytes);
dst->vsie_reason = src_data->vsie_reason;
return QDF_STATUS_SUCCESS;
}
/**
* extract_roam_initial_info_tlv() - Extract the roam initial info
* from the WMI_ROAM_STATS_EVENTID
* @wmi_handle: wmi handle
* @evt_buf: Pointer to the event buffer
* @dst: Pointer to destination structure to fill data
* @idx: TLV id
*/
static QDF_STATUS
extract_roam_initial_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
struct roam_initial_data *dst, uint8_t idx)
{
WMI_ROAM_STATS_EVENTID_param_tlvs *param_buf;
wmi_roam_initial_info *src_data = NULL;
param_buf = (WMI_ROAM_STATS_EVENTID_param_tlvs *)evt_buf;
if (!param_buf || !param_buf->roam_initial_info ||
!param_buf->num_roam_initial_info ||
idx >= param_buf->num_roam_initial_info) {
WMI_LOGD("%s: Empty roam_initial_info param buf", __func__);
return QDF_STATUS_SUCCESS;
}
src_data = &param_buf->roam_initial_info[idx];
dst->present = true;
dst->roam_full_scan_count = src_data->roam_full_scan_count;
dst->rssi_th = src_data->rssi_th;
dst->cu_th = src_data->cu_th;
dst->fw_cancel_timer_bitmap = src_data->timer_canceled;
return QDF_STATUS_SUCCESS;
}
void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
{
struct wmi_ops *ops = wmi_handle->ops;
ops->extract_roam_btm_response_stats =
extract_roam_btm_response_stats_tlv;
ops->extract_roam_initial_info = extract_roam_initial_info_tlv;
ops->send_set_ric_req_cmd = send_set_ric_req_cmd_tlv;
ops->send_process_roam_synch_complete_cmd =
send_process_roam_synch_complete_cmd_tlv;
ops->send_roam_invoke_cmd = send_roam_invoke_cmd_tlv;
ops->send_vdev_set_pcl_cmd = send_vdev_set_pcl_cmd_tlv;
}
#else
static inline QDF_STATUS
extract_roam_btm_response_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
struct roam_btm_response_data *dst,
uint8_t idx)
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
extract_roam_initial_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
struct roam_initial_data *dst, uint8_t idx)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#if defined(WLAN_FEATURE_FILS_SK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)