fw-api: CL 6106208 - update fw common interface files

Change-Id: I66eb37075bf69bf1b53ad504eba75557825854b4
HTT: add T2H PEER_STATS_IND message def
CRs-Fixed: 2262693
This commit is contained in:
spuligil 2019-01-02 11:57:58 -08:00
commit 9f75499ade
5 changed files with 140 additions and 5 deletions

View file

@ -174,9 +174,10 @@
* 3.57 Add support for in-band data within HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND
* 3.58 Add optional MSDU ack RSSI array to end of HTT_T2H TX_COMPL_IND msg
* 3.59 Add HTT_RXDMA_HOST_BUF_RING2 def
* 3.60 Add HTT_T2H_MSG_TYPE_PEER_STATS_IND def
*/
#define HTT_CURRENT_VERSION_MAJOR 3
#define HTT_CURRENT_VERSION_MINOR 59
#define HTT_CURRENT_VERSION_MINOR 60
#define HTT_NUM_TX_FRAG_DESC 1024
@ -5603,6 +5604,7 @@ enum htt_t2h_msg_type {
HTT_T2H_MSG_TYPE_MONITOR_MAC_HEADER_IND = 0x20,
HTT_T2H_MSG_TYPE_FLOW_POOL_RESIZE = 0x21,
HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND = 0x22,
HTT_T2H_MSG_TYPE_PEER_STATS_IND = 0x23,
HTT_T2H_MSG_TYPE_TEST,
/* keep this last */
@ -11144,4 +11146,98 @@ PREPACK struct htt_cfr_dump_compl_ind {
(((word) & HTT_T2H_CFR_DUMP_TYPE1_VDEV_ID_M) >> \
HTT_T2H_CFR_DUMP_TYPE1_VDEV_ID_S)
/**
* @brief target -> host peer (PPDU) stats message
* HTT_T2H_MSG_TYPE_PEER_STATS_IND
* @details
* This message is generated by FW when FW is sending stats to host
* about one or more PPDUs that the FW has transmitted to one or more peers.
* This message is sent autonomously by the target rather than upon request
* by the host.
* The following field definitions describe the format of the HTT target
* to host peer stats indication message.
*
* The HTT_T2H PPDU_STATS_IND message has a header followed by one
* or more PPDU stats records.
* Each PPDU stats record uses a htt_tx_ppdu_stats_info TLV.
* If the details of N PPDUS are sent in one PEER_STATS_IND message,
* then the message would start with the
* header, followed by N htt_tx_ppdu_stats_info structures, as depicted
* below.
*
* |31 16|15|14|13 11|10 9|8|7 0|
* |-------------------------------------------------------------|
* | reserved |MSG_TYPE |
* |-------------------------------------------------------------|
* rec 0 | TLV header |
* rec 0 |-------------------------------------------------------------|
* rec 0 | ppdu successful bytes |
* rec 0 |-------------------------------------------------------------|
* rec 0 | ppdu retry bytes |
* rec 0 |-------------------------------------------------------------|
* rec 0 | ppdu failed bytes |
* rec 0 |-------------------------------------------------------------|
* rec 0 | peer id | S|SG| BW | BA |A|rate code|
* rec 0 |-------------------------------------------------------------|
* rec 0 | retried MSDUs | successful MSDUs |
* rec 0 |-------------------------------------------------------------|
* rec 0 | TX duration | failed MSDUs |
* rec 0 |-------------------------------------------------------------|
* ...
* |-------------------------------------------------------------|
* rec N | TLV header |
* rec N |-------------------------------------------------------------|
* rec N | ppdu successful bytes |
* rec N |-------------------------------------------------------------|
* rec N | ppdu retry bytes |
* rec N |-------------------------------------------------------------|
* rec N | ppdu failed bytes |
* rec N |-------------------------------------------------------------|
* rec N | peer id | S|SG| BW | BA |A|rate code|
* rec N |-------------------------------------------------------------|
* rec N | retried MSDUs | successful MSDUs |
* rec N |-------------------------------------------------------------|
* rec N | TX duration | failed MSDUs |
* rec N |-------------------------------------------------------------|
*
* where:
* A = is A-MPDU flag
* BA = block-ack failure flags
* BW = bandwidth spec
* SG = SGI enabled spec
* S = skipped rate ctrl
* One htt_tx_ppdu_stats_info instance will have stats for one PPDU
*
* Header
* ------
* dword0 - b'0:7 - msg_type : HTT_T2H_MSG_TYPE_PEER_STATS_IND
* dword0 - b'8:31 - reserved : Reserved for future use
*
* payload include below peer_stats information
* --------------------------------------------
* @TLV : HTT_PPDU_STATS_INFO_TLV
* @tx_success_bytes : total successful bytes in the PPDU.
* @tx_retry_bytes : total retried bytes in the PPDU.
* @tx_failed_bytes : total failed bytes in the PPDU.
* @tx_ratecode : rate code used for the PPDU.
* @is_ampdu : Indicates PPDU is AMPDU or not.
* @ba_ack_failed : BA/ACK failed for this PPDU
* b00 -> BA received
* b01 -> BA failed once
* b10 -> BA failed twice, when HW retry is enabled.
* @bw : BW
* b00 -> 20 MHz
* b01 -> 40 MHz
* b10 -> 80 MHz
* b11 -> 160 MHz (or 80+80)
* @sg : SGI enabled
* @s : skipped ratectrl
* @peer_id : peer id
* @tx_success_msdus : successful MSDUs
* @tx_retry_msdus : retried MSDUs
* @tx_failed_msdus : MSDUs dropped in FW after max retry
* @tx_duration : Tx duration for the PPDU (microsecond units)
*/
#endif

View file

@ -114,6 +114,19 @@ typedef enum htt_ppdu_stats_tlv_tag htt_ppdu_stats_tlv_tag_t;
((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_S)); \
} while (0)
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M 0x00008000
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S 15
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_GET(_var) \
(((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M) >> \
HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S)
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_SET(_var, _val) \
do { \
HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR, _val); \
((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S)); \
} while (0)
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_M 0xffff0000
#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_S 16
@ -193,13 +206,23 @@ PREPACK struct htt_tx_ppdu_stats_info {
3: 160 MHz or 80+80 MHz */
bw: 3,
sgi: 1,
reserved0: 1,
skipped_rate_ctrl: 1,
peer_id: 16;
A_UINT32 tx_success_msdus: 16,
tx_retry_msdus: 16;
A_UINT32 tx_failed_msdus: 16,
/* united in us */
tx_duration: 16;
/*
* 1 in bit 0 of valid_bitmap represents that bitmap itself is valid.
* If the bitmap is valid (i.e. bit 0 is set), then check the other bits
* of bitmap to know which fields within htt_tx_ppdu_stats_info are valid.
* If bit 1 is set, tx_success_bytes is valid
* If bit 2 is set, tx_retry_bytes is valid
* ...
* If bit 14 is set, tx_duration is valid
*/
A_UINT32 valid_bitmap;
} POSTPACK;
typedef struct {

View file

@ -367,6 +367,7 @@ typedef enum {
WMI_SERVICE_PEER_UNMAP_RESPONSE_SUPPORT = 182, /* support peer ids unmap response from host */
WMI_SERVICE_TX_PER_PEER_AMPDU_SIZE = 183, /* indicate FW support per peer TX AMPDU size */
WMI_SERVICE_BSS_COLOR_SWITCH_COUNT = 184, /* Firmware supports bss-color switch count handling */
WMI_SERVICE_HTT_PEER_STATS_SUPPORT = 185, /* Supports the feature where FW sends peer stats autonomously to Host via the HTT_T2H PEER_STATS_IND message */
/******* ADD NEW SERVICES HERE *******/

View file

@ -2895,6 +2895,14 @@ typedef struct {
#define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
#define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
/*
* If this HTT_PEER_STATS is set, then the target should use the
* the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
* else the target should avoid sending the PEER_STATS_IND message.
*/
#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
A_UINT32 flag1;
/** @brief smart_ant_cap - Smart Antenna capabilities information
@ -3138,6 +3146,11 @@ typedef struct {
#define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
@ -7473,7 +7486,7 @@ typedef struct {
typedef struct {
/** peer MAC address */
wmi_mac_addr peer_macaddr;
/* rx duration in microseconds*/
/* lower 32 bits of rx duration in microseconds */
A_UINT32 rx_duration;
/** Total TX bytes (including dot11 header) sent to peer */
A_UINT32 peer_tx_bytes;
@ -7486,7 +7499,9 @@ typedef struct {
/* Total number of received multicast & broadcast data frames corresponding to this peer */
A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
A_UINT32 reserved[3]; /** for future use - add new peer stats here */
/* upper 32 bits of rx duration in microseconds */
A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
A_UINT32 reserved[2]; /** for future use - add new peer stats here */
} wmi_peer_extd_stats;
typedef struct {

View file

@ -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_ 608
#define __WMI_REVISION_ 609
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work