From dcf9571a817aacd14926d16b34a64e1cffc2d16c Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 30 Nov 2021 06:00:45 -0800 Subject: [PATCH] fw-api: CL 16530757 - update fw common interface files Change-Id: I81e4daa4a721d95b36e879b9357afefff487480e WMI: add cal fail event TLV in FLUSH_COMPLETE_EVENT msg CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 4 ++- fw/wmi_unified.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 82 insertions(+), 2 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 17765cb898e9..13290dd0e880 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1217,6 +1217,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param, + WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param, } WMITLV_TAG_ID; /* @@ -5284,7 +5285,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_MESG_EVENTID); #define WMITLV_TABLE_WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID(id,op,buf,len)\ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param, wmi_debug_mesg_flush_complete_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_debug_mesg_fw_data_stall_param, data_stall, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_debug_mesg_fw_data_stall_param, data_stall, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_debug_mesg_fw_cal_failure_param, cal_failure, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID); #define WMITLV_TABLE_WMI_RSSI_BREACH_EVENTID(id,op,buf,len)\ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 3d4b5d137321..ceb5dcd153cb 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -8906,6 +8906,15 @@ typedef struct { A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */ } wmi_debug_mesg_fw_data_stall_param; +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */ + A_UINT32 tlv_header; + /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */ + A_UINT32 cal_type; + /* wmi_cal_failure_reason_code enum defines possible failure reason codes */ + A_UINT32 cal_failure_reason_code; +} wmi_debug_mesg_fw_cal_failure_param; + typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/ A_UINT32 reserved0; /** placeholder for future */ @@ -10248,6 +10257,24 @@ typedef struct { A_UINT32 wl_tx_req_cntr; } wmi_ctrl_path_btcoex_stats_struct; +/* Send diag event based on trigger reasons */ +typedef enum { + WMI_DIAG_TRIGGER_MIN = 0x1000, + + WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN, + WMI_DIAG_TRIGGER_BEACON_MISS, + WMI_DIAG_TRIGGER_SCAN_FAIL, + WMI_DIAG_TRIGGER_DISCONNECT, + WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL, + WMI_DIAG_TRIGGER_BUFFER_FULL, + WMI_DIAG_TRIGGER_DATA_STALL, + WMI_DIAG_TRIGGER_TIMER_TRIGGERED, + WMI_DIAG_TRIGGER_REMOTE_COPY, + WMI_DIAG_TRIGGER_CAL_FAILURE, + + WMI_DIAG_TRIGGER_MAX, +} wmi_diag_trigger_e; + typedef enum { WMI_CTRL_PATH_STATS_ARENA_HRAM, WMI_CTRL_PATH_STATS_ARENA_HCRAM, @@ -10394,6 +10421,31 @@ typedef enum { WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID = 0xFF } wmi_ctrl_path_stats_periodic_cal_type_ids; +typedef enum { + WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0, + /* DPD failure reasons */ + WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1, + WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2, + WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3, + WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4, + /* RXDCO failure reasons */ + WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5, + WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6, + WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7, + /* ADC failure reasons */ + WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8, + /* BWFILTER failure reasons */ + WMI_CAL_FAILURE_REASON_TXBBF = 0x9, + WMI_CAL_FAILURE_REASON_RXBBF = 0xa, + /* PKDET failure reasons */ + WMI_CAL_FAILURE_REASON_PKDET = 0xb, + /* COMBCAL failure reasons */ + WMI_CAL_FAILURE_REASON_COMB = 0xc, + + /* add new cal failure error reasons above this line */ + WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff, +} wmi_cal_failure_reason_code; + /* * Used by some hosts to print names of cal profile, based on * wmi_ctrl_path_cal_profile_ids values specified in @@ -10475,6 +10527,32 @@ static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 perio return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN"; } +/* + * Used by some hosts to print names of cal failure reason code, based on + * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg + */ +static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code) +{ + switch (cal_failure_reason_code) + { + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET); + WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB); + } + + return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN"; +} + typedef struct { /** TLV tag and len; tag equals * WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 0dea899da63c..e66c26a70982 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1083 +#define __WMI_REVISION_ 1084 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work