qcacld-3.0: Print roam message 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 roam RSSI TH reset. This helps in debugging/understanding the scenario when roam failure happens. Print the info received related to roam RSSI TH reset into kmsg. Change-Id: Ibee9fc6e9220511d6679efb24080c79bcd807ab8 CRs-Fixed: 2826321
This commit is contained in:
@@ -2487,6 +2487,7 @@ struct wlan_mlme_sae_single_pmk {
|
|||||||
* @data_11kv: Neighbor report/BTM parameters.
|
* @data_11kv: Neighbor report/BTM parameters.
|
||||||
* @btm_rsp: BTM response information
|
* @btm_rsp: BTM response information
|
||||||
* @roam_init_info: Roam initial info
|
* @roam_init_info: Roam initial info
|
||||||
|
* @roam_msg_info: roam related message information
|
||||||
*/
|
*/
|
||||||
struct mlme_roam_debug_info {
|
struct mlme_roam_debug_info {
|
||||||
struct wmi_roam_trigger_info trigger;
|
struct wmi_roam_trigger_info trigger;
|
||||||
@@ -2495,6 +2496,7 @@ struct mlme_roam_debug_info {
|
|||||||
struct wmi_neighbor_report_data data_11kv;
|
struct wmi_neighbor_report_data data_11kv;
|
||||||
struct roam_btm_response_data btm_rsp;
|
struct roam_btm_response_data btm_rsp;
|
||||||
struct roam_initial_data roam_init_info;
|
struct roam_initial_data roam_init_info;
|
||||||
|
struct roam_msg_info roam_msg_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -406,6 +406,19 @@ wlan_cm_roam_extract_roam_initial_info(wmi_unified_t wmi, void *evt_buf,
|
|||||||
struct roam_initial_data *dst,
|
struct roam_initial_data *dst,
|
||||||
uint8_t idx);
|
uint8_t idx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cm_roam_extract_roam_msg_info() - Extract Roam msg stats
|
||||||
|
* @wmi: wmi handle
|
||||||
|
* @evt_buf: Pointer to the event buffer
|
||||||
|
* @dst: Pointer to destination structure to fill data
|
||||||
|
* @idx: TLV id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_cm_roam_extract_roam_msg_info(wmi_unified_t wmi, void *evt_buf,
|
||||||
|
struct roam_msg_info *dst, uint8_t idx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cm_roam_activate_pcl_per_vdev() - Set the PCL command to be sent per
|
* wlan_cm_roam_activate_pcl_per_vdev() - Set the PCL command to be sent per
|
||||||
* vdev instead of pdev.
|
* vdev instead of pdev.
|
||||||
@@ -559,7 +572,7 @@ wlan_cm_roam_extract_btm_response(wmi_unified_t wmi, void *evt_buf,
|
|||||||
struct roam_btm_response_data *dst,
|
struct roam_btm_response_data *dst,
|
||||||
uint8_t idx)
|
uint8_t idx)
|
||||||
{
|
{
|
||||||
return true;
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
@@ -567,7 +580,14 @@ wlan_cm_roam_extract_roam_initial_info(wmi_unified_t wmi, void *evt_buf,
|
|||||||
struct roam_initial_data *dst,
|
struct roam_initial_data *dst,
|
||||||
uint8_t idx)
|
uint8_t idx)
|
||||||
{
|
{
|
||||||
return true;
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
wlan_cm_roam_extract_roam_msg_info(wmi_unified_t wmi, void *evt_buf,
|
||||||
|
struct roam_msg_info *dst, uint8_t idx)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@@ -1218,6 +1218,25 @@ struct roam_initial_data {
|
|||||||
uint32_t fw_cancel_timer_bitmap;
|
uint32_t fw_cancel_timer_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct roam_msg_info - Roam message related information
|
||||||
|
* @present: Flag to check if the roam msg info tlv is present
|
||||||
|
* @timestamp: Timestamp is the absolute time w.r.t host timer which is
|
||||||
|
* synchronized between the host and target
|
||||||
|
* @msg_id: Message ID from WMI_ROAM_MSG_ID
|
||||||
|
* @msg_param1: msg_param1, values is based on the host & FW
|
||||||
|
* understanding and depend on the msg ID
|
||||||
|
* @msg_param2: msg_param2 value is based on the host & FW understanding
|
||||||
|
* and depend on the msg ID
|
||||||
|
*/
|
||||||
|
struct roam_msg_info {
|
||||||
|
bool present;
|
||||||
|
uint32_t timestamp;
|
||||||
|
uint32_t msg_id;
|
||||||
|
uint32_t msg_param1;
|
||||||
|
uint32_t msg_param2;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum wlan_cm_rso_control_requestor - Driver disabled roaming requestor that
|
* enum wlan_cm_rso_control_requestor - Driver disabled roaming requestor that
|
||||||
* will request the roam module to disable roaming based on the mlme operation
|
* will request the roam module to disable roaming based on the mlme operation
|
||||||
|
@@ -254,6 +254,16 @@ wlan_cm_roam_extract_roam_initial_info(wmi_unified_t wmi, void *evt_buf,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wlan_cm_roam_extract_roam_msg_info(wmi_unified_t wmi, void *evt_buf,
|
||||||
|
struct roam_msg_info *dst, uint8_t idx)
|
||||||
|
{
|
||||||
|
if (wmi->ops->extract_roam_msg_info)
|
||||||
|
return wmi->ops->extract_roam_msg_info(wmi, evt_buf, dst, idx);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
|
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
|
||||||
uint8_t vdev_id, bool pcl_per_vdev)
|
uint8_t vdev_id, bool pcl_per_vdev)
|
||||||
{
|
{
|
||||||
|
@@ -1452,6 +1452,41 @@ extract_roam_initial_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_roam_msg_info_tlv() - Extract the roam message 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_msg_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
struct roam_msg_info *dst, uint8_t idx)
|
||||||
|
{
|
||||||
|
WMI_ROAM_STATS_EVENTID_param_tlvs *param_buf;
|
||||||
|
wmi_roam_msg_info *src_data = NULL;
|
||||||
|
|
||||||
|
param_buf = (WMI_ROAM_STATS_EVENTID_param_tlvs *)evt_buf;
|
||||||
|
|
||||||
|
if (!param_buf || !param_buf->roam_msg_info ||
|
||||||
|
!param_buf->num_roam_msg_info ||
|
||||||
|
idx >= param_buf->num_roam_msg_info) {
|
||||||
|
wmi_debug("Empty roam_msg_info param buf");
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
src_data = ¶m_buf->roam_msg_info[idx];
|
||||||
|
|
||||||
|
dst->present = true;
|
||||||
|
dst->timestamp = src_data->timestamp;
|
||||||
|
dst->msg_id = src_data->msg_id;
|
||||||
|
dst->msg_param1 = src_data->msg_param1;
|
||||||
|
dst->msg_param2 = src_data->msg_param2;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
|
void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
|
||||||
{
|
{
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
struct wmi_ops *ops = wmi_handle->ops;
|
||||||
@@ -1459,6 +1494,7 @@ void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle)
|
|||||||
ops->extract_roam_btm_response_stats =
|
ops->extract_roam_btm_response_stats =
|
||||||
extract_roam_btm_response_stats_tlv;
|
extract_roam_btm_response_stats_tlv;
|
||||||
ops->extract_roam_initial_info = extract_roam_initial_info_tlv;
|
ops->extract_roam_initial_info = extract_roam_initial_info_tlv;
|
||||||
|
ops->extract_roam_msg_info = extract_roam_msg_info_tlv;
|
||||||
|
|
||||||
ops->send_set_ric_req_cmd = send_set_ric_req_cmd_tlv;
|
ops->send_set_ric_req_cmd = send_set_ric_req_cmd_tlv;
|
||||||
ops->send_process_roam_synch_complete_cmd =
|
ops->send_process_roam_synch_complete_cmd =
|
||||||
@@ -1483,6 +1519,12 @@ extract_roam_initial_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
return QDF_STATUS_E_NOSUPPORT;
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
extract_roam_msg_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
struct roam_msg_info *dst, uint8_t idx)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
|
}
|
||||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||||
|
|
||||||
#define ROAM_OFFLOAD_PMK_EXT_BYTES 16
|
#define ROAM_OFFLOAD_PMK_EXT_BYTES 16
|
||||||
|
@@ -1913,6 +1913,29 @@ wma_rso_print_roam_initial_info(struct roam_initial_data *data,
|
|||||||
data->cu_th, data->fw_cancel_timer_bitmap);
|
data->cu_th, data->fw_cancel_timer_bitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wma_rso_print_roam_msg_info - Roaming related message details
|
||||||
|
* @data: Pointer to the btm rsp data
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
*
|
||||||
|
* Prints the vdev, msg_id, msg_param1, msg_param2 and timer
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void wma_rso_print_roam_msg_info(struct roam_msg_info *data,
|
||||||
|
uint8_t vdev_id)
|
||||||
|
{
|
||||||
|
char time[TIME_STRING_LEN];
|
||||||
|
static const char msg_id1_str[] = "Roam RSSI TH Reset";
|
||||||
|
|
||||||
|
if (data->msg_id == WMI_ROAM_MSG_RSSI_RECOVERED) {
|
||||||
|
mlme_get_converted_timestamp(data->timestamp, time);
|
||||||
|
wma_info("%s [ROAM MSG INFO]: VDEV[%d] %s, Current rssi: %d dbm, next_rssi_threshold: %d dbm",
|
||||||
|
time, vdev_id, msg_id1_str, data->msg_param1,
|
||||||
|
data->msg_param2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_log_roam_scan_candidates - Print roam scan candidate AP info
|
* wma_log_roam_scan_candidates - Print roam scan candidate AP info
|
||||||
* @ap: Pointer to the candidate AP list
|
* @ap: Pointer to the candidate AP list
|
||||||
@@ -2122,7 +2145,7 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
|
|||||||
wmi_roam_stats_event_fixed_param *fixed_param;
|
wmi_roam_stats_event_fixed_param *fixed_param;
|
||||||
struct mlme_roam_debug_info *roam_info = NULL;
|
struct mlme_roam_debug_info *roam_info = NULL;
|
||||||
uint8_t vdev_id, i;
|
uint8_t vdev_id, i;
|
||||||
uint8_t num_tlv = 0, num_chan = 0, num_ap = 0, num_rpt = 0;
|
uint8_t num_tlv = 0, num_chan = 0, num_ap = 0, num_rpt = 0, rem_tlv = 0;
|
||||||
uint32_t rem_len;
|
uint32_t rem_len;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
@@ -2216,28 +2239,14 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!num_tlv) {
|
rem_len -= param_buf->num_roam_initial_info *
|
||||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
sizeof(wmi_roam_initial_info);
|
||||||
if (!roam_info)
|
if (rem_len < param_buf->num_roam_msg_info *
|
||||||
return -ENOMEM;
|
sizeof(wmi_roam_msg_info)) {
|
||||||
|
wma_err_rl("Invalid roam msg info");
|
||||||
status = wmi_unified_extract_roam_11kv_stats(
|
|
||||||
wma->wmi_handle, event,
|
|
||||||
&roam_info->data_11kv, 0, 0);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
wma_debug_rl("Roam 11kv stats extract failed vdev %d",
|
|
||||||
vdev_id);
|
|
||||||
qdf_mem_free(roam_info);
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roam_info->data_11kv.present)
|
|
||||||
wma_rso_print_11kv_info(&roam_info->data_11kv, vdev_id);
|
|
||||||
|
|
||||||
qdf_mem_free(roam_info);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < num_tlv; i++) {
|
for (i = 0; i < num_tlv; i++) {
|
||||||
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||||
if (!roam_info)
|
if (!roam_info)
|
||||||
@@ -2305,6 +2314,17 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Roam message info */
|
||||||
|
status = wlan_cm_roam_extract_roam_msg_info(
|
||||||
|
wma->wmi_handle, event,
|
||||||
|
&roam_info->roam_msg_info, i);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
wma_err("roam msg stats extract fail vdev %d",
|
||||||
|
vdev_id);
|
||||||
|
qdf_mem_free(roam_info);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* BTM req/resp or Neighbor report/response info */
|
/* BTM req/resp or Neighbor report/response info */
|
||||||
status = wmi_unified_extract_roam_11kv_stats(
|
status = wmi_unified_extract_roam_11kv_stats(
|
||||||
wma->wmi_handle, event,
|
wma->wmi_handle, event,
|
||||||
@@ -2341,9 +2361,60 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
|
|||||||
wma_rso_print_roam_initial_info(
|
wma_rso_print_roam_initial_info(
|
||||||
&roam_info->roam_init_info, vdev_id);
|
&roam_info->roam_init_info, vdev_id);
|
||||||
|
|
||||||
|
if (roam_info->roam_msg_info.present) {
|
||||||
|
rem_tlv++;
|
||||||
|
wma_rso_print_roam_msg_info(
|
||||||
|
&roam_info->roam_msg_info, vdev_id);
|
||||||
|
}
|
||||||
|
|
||||||
qdf_mem_free(roam_info);
|
qdf_mem_free(roam_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!num_tlv) {
|
||||||
|
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||||
|
if (!roam_info)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
status = wmi_unified_extract_roam_11kv_stats(
|
||||||
|
wma->wmi_handle, event,
|
||||||
|
&roam_info->data_11kv, 0, 0);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
wma_err("Roam 11kv stats extract failed vdev %d",
|
||||||
|
vdev_id);
|
||||||
|
qdf_mem_free(roam_info);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (roam_info->data_11kv.present)
|
||||||
|
wma_rso_print_11kv_info(&roam_info->data_11kv, vdev_id);
|
||||||
|
|
||||||
|
qdf_mem_free(roam_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (param_buf->roam_msg_info && param_buf->num_roam_msg_info &&
|
||||||
|
param_buf->num_roam_msg_info - rem_tlv) {
|
||||||
|
for (i = 0; i < (param_buf->num_roam_msg_info - rem_tlv); i++) {
|
||||||
|
roam_info = qdf_mem_malloc(sizeof(*roam_info));
|
||||||
|
if (!roam_info)
|
||||||
|
return -ENOMEM;
|
||||||
|
status = wlan_cm_roam_extract_roam_msg_info(
|
||||||
|
wma->wmi_handle, event,
|
||||||
|
&roam_info->roam_msg_info, rem_tlv + i);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
wma_err("roam msg stats extract fail vdev %d",
|
||||||
|
vdev_id);
|
||||||
|
qdf_mem_free(roam_info);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (roam_info->roam_msg_info.present)
|
||||||
|
wma_rso_print_roam_msg_info(
|
||||||
|
&roam_info->roam_msg_info,
|
||||||
|
vdev_id);
|
||||||
|
qdf_mem_free(roam_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
Reference in New Issue
Block a user