diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h index 797c2f89321d..e90ab570599a 100644 --- a/target/inc/wmi_tlv_defs.h +++ b/target/inc/wmi_tlv_defs.h @@ -699,6 +699,7 @@ typedef enum { WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT, WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES, WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param, } WMITLV_TAG_ID; /* @@ -1129,7 +1130,8 @@ typedef enum { OP(WMI_NDP_END_INDICATION_EVENTID) \ OP(WMI_PDEV_SET_HW_MODE_RESP_EVENTID) \ OP(WMI_PDEV_HW_MODE_TRANSITION_EVENTID) \ - OP(WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID) + OP(WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID) \ + OP(WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID) /* TLV definitions of WMI commands */ @@ -3198,8 +3200,7 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_LINK_STATS_EVENTID); #define WMITLV_TABLE_WMI_RADIO_LINK_STATS_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param, wmi_radio_link_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_radio_link_stats, radio_stats, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_channel_stats, channel_stats, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ext_tx_time_per_power_level, WMITLV_SIZE_VAR) + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_channel_stats, channel_stats, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_LINK_STATS_EVENTID); @@ -3637,6 +3638,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_STA_PS_STATECHG_EVENTID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param, wmi_inst_rssi_stats_resp_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_INST_RSSI_STATS_EVENTID); +#define WMITLV_TABLE_WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param, wmi_tx_power_level_stats_evt_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, tx_time_per_power_level, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID) + + #ifdef __cplusplus } #endif diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h index 78f198fabf82..61a9185e9f6b 100644 --- a/target/inc/wmi_unified.h +++ b/target/inc/wmi_unified.h @@ -1168,9 +1168,12 @@ typedef enum { /** Event indicating the DIAG logs/events supported by FW */ WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID, - /* Instantaneous RSSI event */ + /** Instantaneous RSSI event */ WMI_INST_RSSI_STATS_EVENTID, + /** FW update tx power levels event */ + WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID, + /** NLO specific events */ /** NLO match event after the first match */ WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), @@ -4425,42 +4428,48 @@ typedef struct { /** number of channels */ A_UINT32 num_channels; /* - * tx time (in milliseconds) per TPC level - * TPC levels require a board-specific translation to determine what - * actual power corresponds to each power level. - * Just as the host has a BDF file available, the host should also have - * a data file available that provides the - * power level --> power - * translations. + * tx time per TPC level - DEPRECATED + * This field is deprecated. + * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID + * message. */ A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS]; +} wmi_radio_link_stats; + +/** tx time per power level statistics */ +typedef struct { /* - * number of tx power levels, including both tx_time_per_tpc and - * ext_tx_time_per_power_level - * Each power level consumes one A_UINT32. - * If num_tx_power_levels <= MAX_TPC_LEVELs, only tx_time_per_tpc is - * used. - * If num_tx_power_levels > MAX_TPC_LEVELS, the first MAX_TPC_LEVELS - * values - * are stored in tx_time_per_tpc, and the remaining - * (num_tx_power_levels - MAX_TPC_LEVELS) values are stored in - * ext_tx_time_per_power_level. + * TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */ + A_UINT32 tlv_header; + /* total number of tx power levels */ + A_UINT32 total_num_tx_power_levels; + /* number of tx power levels that are carried in this event */ A_UINT32 num_tx_power_levels; /* - * This TLV will be followed by a TLV containing a variable-length - * array of A_UINT32 with any additional tx time per power level data, - * if there are more than MAX_TPC_LEVELS elements of tx time per TPC to - * report. Note that at most one wmi_radio_link_stats object will be - * present in the WMI_RADIO_LINK_STATS message. Thus, even though there - * is only one ext_tx_time_per_power_level array in the - * WMI_RADIO_LINK_STATS message, it only holds the extra data for a - * single wmi_radio_link_stats object. - * - * A_UINT32 - * ext_tx_time_per_power_level[num_tx_power_levels - MAX_TPC_LEVELS] + * offset of current stats + * If ((num_tx_power_levels + power_level_offset)) == + * total_num_tx_power_levels) + * this message completes the report of tx time per power levels. + * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID + * messages will be sent by the target to deliver the remainder of the + * tx time per power level stats. */ -} wmi_radio_link_stats; + A_UINT32 power_level_offset; + /* + * This TLV will be followed by a TLV containing a variable-length + * array of A_UINT32 with tx time per power level data + * A_UINT32 tx_time_per_power_level[num_tx_power_levels] + * The tx time is in units of milliseconds. + * The power levels are board-specific values; a board-specific + * translation has to be applied to determine what actual power + * corresponds to each power level. + * Just as the host has a BDF file available, the host should also have + * a data file available that provides the power level to power + * translations. + */ +} wmi_tx_power_level_stats_evt_fixed_param; /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */ typedef struct { diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h index 6695b204ad61..8adda0c639d4 100644 --- a/target/inc/wmi_version.h +++ b/target/inc/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_ 235 +#define __WMI_REVISION_ 236 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work