diff options
| author | gaolez <gaolez@codeaurora.org> | 2017-05-04 15:43:05 +0800 |
|---|---|---|
| committer | gaolez <gaolez@codeaurora.org> | 2017-05-04 15:44:16 +0800 |
| commit | a5c3e9fc6744224f5ec4d3362aaf3550f33d908b (patch) | |
| tree | fe4111af659a623859cfd7573de9b21d6f6b5b4e | |
| parent | ac032670f9b0f783b46e807627c909e597330197 (diff) | |
qcacld-2.0: CL 3039633 - update fw common interface files
HTT stats for airtime and Thermal Wmi Defs changes
Change-Id: I2505b04e2fd7b405375befcebcef2d24d42ff19f
CRs-fixed: 865207
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_tlv_defs.h | 17 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 70 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMI/wmi_unified.c | 1 |
4 files changed, 89 insertions, 1 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index 3dfe4c584932..fa516fad51be 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -816,6 +816,10 @@ typedef enum { WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param, WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv, WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param, + WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param, + WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info, + WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param, + WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info, } WMITLV_TAG_ID; /* @@ -1147,6 +1151,7 @@ typedef enum { OP(WMI_SET_INIT_COUNTRY_CMDID) \ OP(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID) \ OP(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID) \ + OP(WMI_THERM_THROT_SET_CONF_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1326,6 +1331,7 @@ typedef enum { OP(WMI_WLAN_COEX_BT_ACTIVITY_EVENTID) \ OP(WMI_VDEV_GET_TX_POWER_EVENTID) \ OP(WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID) \ + OP(WMI_THERM_THROT_STATS_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -3303,6 +3309,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_ARP_STAT_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param, wmi_vdev_get_arp_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_ARP_STAT_CMDID); +/* Thermal Throttling SET CONFIG commands. */ +#define WMITLV_TABLE_WMI_THERM_THROT_SET_CONF_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param, wmi_therm_throt_config_request_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_therm_throt_level_config_info, therm_throt_level_config_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_THERM_THROT_SET_CONF_CMDID); /************************** TLV definitions of WMI events *******************************/ @@ -4396,6 +4407,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_ARP_STAT_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_coex_bt_activity_event_fixed_param, wmi_coex_bt_activity_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_WLAN_COEX_BT_ACTIVITY_EVENTID); +/* Thermal Throttling stats event */ +#define WMITLV_TABLE_WMI_THERM_THROT_STATS_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param, wmi_therm_throt_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_therm_throt_level_stats_info, therm_throt_level_stats_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_THERM_THROT_STATS_EVENTID); + #ifdef __cplusplus } #endif diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 982da5c2912d..4e51477b445a 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -849,6 +849,8 @@ typedef enum { WMI_SET_MULTIPLE_MCAST_FILTER_CMDID, /** upload a requested section of data from firmware flash to host */ WMI_READ_DATA_FROM_FLASH_CMDID, + /* Thermal Throttling SET CONF commands */ + WMI_THERM_THROT_SET_CONF_CMDID, /* GPIO Configuration */ WMI_GPIO_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GPIO), @@ -1427,6 +1429,9 @@ typedef enum { /** event to upload a PKGID to host to identify chip for various products */ WMI_PKGID_EVENTID, + /* Thermal Throttling stats event id for every pdev and zones, etc */ + WMI_THERM_THROT_STATS_EVENTID, + /* GPIO Event */ WMI_GPIO_INPUT_EVENTID=WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), /** upload H_CV info WMI event @@ -18507,6 +18512,70 @@ typedef struct { */ } wmi_scan_dbs_duty_cycle_fixed_param; +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */ + A_UINT32 tlv_header; + /** + * temperature sensor value in celsius when to exit to lower zone, + * this value can be lower than HWM of lower zone as zone overlapping + * is permitted by design to provide hysteresis + */ + A_UINT32 temp_lwm; + /** + * temperature sensor value in celsius when to exit to higher zone, + * this value can be higher than LWM of higher zone as zone overlapping + * is permitted by design to provide hysteresis + */ + A_UINT32 temp_hwm; + A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */ + /** Disable only the transmit queues in firmware that have lower priority than value defined by prio + * Prioritization: + * 0 = disable all data tx queues, No Prioritization defined + * 1 = disable BK tx queue + * 2 = disable BK+BE tx queues + * 3 = disable BK+BE+VI tx queues + */ + A_UINT32 prio; +} wmi_therm_throt_level_config_info; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */ + A_UINT32 pdev_id; /* config for each pdev */ + A_UINT32 enable; /* 0:disable, 1:enable */ + A_UINT32 dc; /* duty cycle in ms */ + A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */ + A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */ + /* + * Following this structure is the TLV: + * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels]; + */ +} wmi_therm_throt_config_request_fixed_param; + +/** FW response with the stats event id for every pdev and zones */ +typedef struct { + /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */ + A_UINT32 tlv_header; + A_UINT32 pdev_id; /* stats for corresponding pdev*/ + A_UINT32 temp; /* Temperature reading in celsius */ + A_UINT32 level; /* current thermal throttling level */ + A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */ + /* This TLV is followed by another TLV of array of structs + * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels]; + */ +} wmi_therm_throt_stats_event_fixed_param; + + + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */ + A_UINT32 tlv_header; + A_UINT32 level_count; /* count of each time thermal throttling entered this state */ + A_UINT32 dc_count; /* total number of duty cycles spent in this state. */ + /* this number increments by one each time we are in this state and we finish one full duty cycle. */ +} wmi_therm_throt_level_stats_info; + typedef enum { WMI_REG_EXT_FCC_MIDBAND = 0, WMI_REG_EXT_JAPAN_MIDBAND = 1, @@ -19117,6 +19186,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID); WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID); WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID); + WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID); } return "Invalid WMI cmd"; diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index d97b8ca71a5a..02919d6b6098 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/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_ 380 +#define __WMI_REVISION_ 381 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index 9ae9f7282248..3bad3b1a04b3 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -748,6 +748,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID); CASE_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID); CASE_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID); + CASE_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID); } return "Invalid WMI cmd"; } |
