qcacmn: Add Diag Log support for cold boot cal event

Add Diag log support for logging cold boot calibration
data sent by firmware via cold boot cal wmi event.

Change-Id: I932fd5f87667498b77ee13ca5b3ce08d6001cdf0
CRs-Fixed: 2413451
This commit is contained in:
Yeshwanth Sriram Guntuka
2019-03-06 15:06:10 +05:30
committed by nshrivas
parent 47eba668fe
commit 07e2c48abe
4 changed files with 32 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2017, 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -57,9 +57,14 @@ extern "C" {
#define HOST_LOG_MAX_WOW_PTRN_MASK_SIZE (16)
#define VOS_LOG_PKT_LOG_SIZE (2048)
#define HOST_LOG_PKT_LOG_THRESHOLD 40960
#define HOST_LOG_MAX_COLD_BOOT_CAL_DATA_SIZE (2048)
/* Version to be updated whenever format of vos_log_pktlog_info changes */
#define VERSION_LOG_WLAN_PKT_LOG_INFO_C 1
/* Version to be updated whenever format of host_log_cold_boot_cal_data_type
* changes
*/
#define VERSION_LOG_WLAN_COLD_BOOT_CAL_DATA_C 1
/*---------------------------------------------------------------------------
This packet contains the scan results of the recent scan operation
@@ -259,6 +264,26 @@ struct host_log_pktlog_info {
uint8_t buf[];
};
/**
* struct host_log_cold_boot_cal_data_type - Cold boot cal log info
* @hdr: Log header
* @version: version
* @flags: Flag to indicate if more data follows
* @cb_cal_data_len: Length of the cal data
* @cb_cal_data: Cold boot cal data
*
* Structure containing the cold boot calibration data
* log information
* LOG_WLAN_COLD_BOOT_CAL_DATA_C 0x1A18
*/
struct host_log_cold_boot_cal_data_type {
log_hdr_type hdr;
uint32_t version;
uint32_t flags;
uint32_t cb_cal_data_len;
uint8_t cb_cal_data[HOST_LOG_MAX_COLD_BOOT_CAL_DATA_SIZE];
};
/*-------------------------------------------------------------------------
Function declarations and documenation
------------------------------------------------------------------------*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -2001,6 +2001,8 @@
/* The last defined DMSS log code */
#define LOG_1X_LAST_C ((0x8E0) + LOG_1X_BASE_C)
#define LOG_WLAN_COLD_BOOT_CAL_DATA_C ((0xA18) + LOG_1X_BASE_C)
/* This is only here for old (pre equipment ID update) logging code */
#define LOG_LAST_C (LOG_1X_LAST_C & 0xFFF)

View File

@@ -4757,6 +4757,7 @@ typedef enum {
wmi_roam_blacklist_event_id,
wmi_wlm_stats_event_id,
wmi_peer_cfr_capture_event_id,
wmi_pdev_cold_boot_cal_event_id,
wmi_events_max,
} wmi_conv_event_id;

View File

@@ -11557,6 +11557,8 @@ static void populate_tlv_events_id(uint32_t *event_ids)
event_ids[wmi_roam_blacklist_event_id] = WMI_ROAM_BLACKLIST_EVENTID;
event_ids[wmi_wlm_stats_event_id] = WMI_WLM_STATS_EVENTID;
event_ids[wmi_peer_cfr_capture_event_id] = WMI_PEER_CFR_CAPTURE_EVENTID;
event_ids[wmi_pdev_cold_boot_cal_event_id] =
WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID;
}
/**