From 7717473137207ed6ce508bf361d72dead6a20ae2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 12 Dec 2017 14:00:00 -0800 Subject: [PATCH] fw-api: CL 3850357 - update fw common interface files Add def of WMI_SAR2_RESULT_EVENT message Change-Id: I0960fd702499d0b59e2d68d50db6f224edc2eaf1 CRs-Fixed: 1107600 --- fw/wmi_tlv_defs.h | 9 ++++++++- fw/wmi_unified.h | 41 +++++++++++++++++++++++++++++++++++++++-- fw/wmi_version.h | 2 +- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index b7939a97aa..3f5c9101d7 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -871,6 +871,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update, WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param, + WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES, } WMITLV_TAG_ID; /* @@ -2880,6 +2882,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MODEM_POWER_STATE_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_sar_limit_cmd_row, sar_limits, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_SAR_LIMITS_CMDID); +#define WMITLV_TABLE_WMI_SAR2_RESULT_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param, wmi_sar2_result_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_SAR2_RESULT_EVENTID); + /* get estimated link speed cmd */ #define WMITLV_TABLE_WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_get_estimated_linkspeed_cmd_fixed_param, wmi_peer_get_estimated_linkspeed_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -3538,7 +3544,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_AVAILABLE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_HAL_REG_CAPABILITIES_EXT, hal_reg_caps, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_MAC_PHY_CHAINMASK_COMBO, mac_phy_chainmask_combo, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_MAC_PHY_CHAINMASK_CAPABILITY, mac_phy_chainmask_caps, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_OEM_DMA_RING_CAPABILITIES, oem_dma_ring_caps, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_OEM_DMA_RING_CAPABILITIES, oem_dma_ring_caps, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES, WMI_SAR_CAPABILITIES, sar_caps, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EXT_EVENTID); /* Ready event */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 5a48b1e419..4dd71fdcec 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1482,6 +1482,9 @@ typedef enum { /* WMI UNIT TEST event */ WMI_UNIT_TEST_EVENTID, + /** event to report result of host configure SAR2 */ + WMI_SAR2_RESULT_EVENTID, + /* GPIO Event */ WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), /** upload H_CV info WMI event @@ -13029,6 +13032,19 @@ typedef struct { */ } wmi_avoid_freq_ranges_event_fixed_param; +enum { + WMI_SAR2_SUCCESS = 0, + WMI_SAR2_INVALID_ANTENNA_INDEX = 1, + WMI_SAR2_INVALID_TABLE_INDEX = 2, + WMI_SAR2_STATE_ERROR = 4, + WMI_SAR2_BDF_NO_TABLE = 8, +}; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */ + A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */ +} wmi_sar2_result_event_fixed_param; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */ /** Reserved for future use */ @@ -15622,6 +15638,7 @@ enum wmi_sar_feature_state_flags { WMI_SAR_FEATURE_ON_SET_4, WMI_SAR_FEATURE_NO_CHANGE, WMI_SAR_FEATURE_ON_USER_DEFINED, + WMI_SAR_FEATURE_ON_SAR_V2_0, }; typedef struct { @@ -15637,8 +15654,22 @@ typedef struct { /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */ A_UINT32 mod_id; - /** actual power limit value, in steps of 0.5 dBm */ - A_UINT32 limit_value; + /** + * To be backwards-compatible with older code use a union with + * limit_value & limit_index as alternate names / interpretations + * of the same message information element. + * The older code still uses limit_value, while the new code will + * use limit_index. + * The interpretation of the field as value or index depends on + * WMI_SAR_FEATURE_ON_* + * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case + * still use it as value. + */ + union { + /** actual power limit value, in steps of 0.5 dBm */ + A_UINT32 limit_value; + A_UINT32 limit_index; + }; /** in case the OEM doesn't care about one of the qualifiers from above, * the bit for that qualifier within the validity_bitmap can be set to 0 @@ -20091,6 +20122,12 @@ typedef struct { /* Minimum alignment in bytes of each buffer in the OEM DMA ring */ } WMI_OEM_DMA_RING_CAPABILITIES; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/ + /* sar version in bdf */ + A_UINT32 active_version; +} WMI_SAR_CAPABILITIES; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */ /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 33a6bfd542..b1e528b97e 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_ 476 +#define __WMI_REVISION_ 477 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work