|
@@ -253,9 +253,11 @@
|
|
|
* 3.125 Expand fisa_aggr_limit bits in fisa_control_bits_v2.
|
|
|
* 3.126 Add HTT_RXDATA_ERR_INVALID_PEER def.
|
|
|
* 3.127 Add transmit_count fields in htt_tx_wbm_completion_vX structs.
|
|
|
+ * 3.128 Add H2T TX_LATENCY_STATS_CFG + T2H TX_LATENCY_STATS_PERIODIC_IND
|
|
|
+ * msg defs
|
|
|
*/
|
|
|
#define HTT_CURRENT_VERSION_MAJOR 3
|
|
|
-#define HTT_CURRENT_VERSION_MINOR 127
|
|
|
+#define HTT_CURRENT_VERSION_MINOR 128
|
|
|
|
|
|
#define HTT_NUM_TX_FRAG_DESC 1024
|
|
|
|
|
@@ -882,6 +884,7 @@ enum htt_h2t_msg_type {
|
|
|
HTT_H2T_MSG_TYPE_UMAC_HANG_RECOVERY_SOC_START_PRE_RESET = 0x22,
|
|
|
HTT_H2T_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP = 0x23,
|
|
|
HTT_H2T_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_RESP = 0x24,
|
|
|
+ HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG = 0x25,
|
|
|
|
|
|
/* keep this last */
|
|
|
HTT_H2T_NUM_MSGS
|
|
@@ -10773,6 +10776,88 @@ typedef struct {
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * @brief host -> tgt msg to configure params for PPDU tx latency stats report
|
|
|
+ *
|
|
|
+ * MSG_TYPE => HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG
|
|
|
+ *
|
|
|
+ * @details
|
|
|
+ * HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG message is sent by the host to
|
|
|
+ * configure the parameters needed for FW to report PPDU tx latency stats
|
|
|
+ * for latency prediction in user space.
|
|
|
+ *
|
|
|
+ * The message would appear as follows:
|
|
|
+ * |31 28|27 12|11|10 8|7 0|
|
|
|
+ * |-----------+-------------------+--+-------+--------------|
|
|
|
+ * |granularity| periodic interval | E|vdev ID| msg type |
|
|
|
+ * |-----------+-------------------+--+-------+--------------|
|
|
|
+ * Where: E = enable
|
|
|
+ *
|
|
|
+ * The message is interpreted as follows:
|
|
|
+ * dword0 - b'0:7 - msg_type: This will be set to 0x25
|
|
|
+ * (HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG)
|
|
|
+ * b'8:10 - vdev_id: Indicate which vdev is configuration is for
|
|
|
+ * b'11 - enable: Indicate this message is to enable/disable
|
|
|
+ * PPDU latency report from FW
|
|
|
+ * b'12:27 - periodic_interval: Indicate the report interval in MS
|
|
|
+ * b'28:31 - granularity: Indicate the granularity of the latency
|
|
|
+ * stats report, in ms
|
|
|
+ */
|
|
|
+
|
|
|
+/* HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG */
|
|
|
+PREPACK struct htt_h2t_tx_latency_stats_cfg {
|
|
|
+ A_UINT32 msg_type :8,
|
|
|
+ vdev_id :3,
|
|
|
+ enable :1,
|
|
|
+ periodic_interval :16,
|
|
|
+ granularity :4;
|
|
|
+} POSTPACK;
|
|
|
+
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_M 0x00000700
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_S 8
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_GET(_var) \
|
|
|
+ (((_var) & HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_M) >> \
|
|
|
+ HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_S)
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_H2T_TX_LATENCY_STATS_CFG_VDEV_ID_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_M 0x00000800
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_S 11
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_GET(_var) \
|
|
|
+ (((_var) & HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_M) >> \
|
|
|
+ HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_S)
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_H2T_TX_LATENCY_STATS_CFG_ENABLE_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_M 0x0FFFF000
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_S 12
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_GET(_var) \
|
|
|
+ (((_var) & HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_M) >> \
|
|
|
+ HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_S)
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_H2T_TX_LATENCY_STATS_CFG_PERIODIC_INTERVAL_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_M 0xF0000000
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_S 28
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_GET(_var) \
|
|
|
+ (((_var) & HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_M) >> \
|
|
|
+ HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_S)
|
|
|
+#define HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_H2T_TX_LATENCY_STATS_CFG_GRANULARITY_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/*=== target -> host messages ===============================================*/
|
|
|
|
|
@@ -10843,6 +10928,7 @@ enum htt_t2h_msg_type {
|
|
|
HTT_T2H_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_IND = 0x37,
|
|
|
HTT_T2H_MSG_TYPE_PEER_AST_OVERRIDE_INDEX_IND = 0x38,
|
|
|
HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT = 0x39,
|
|
|
+ HTT_T2H_MSG_TYPE_TX_LATENCY_STATS_PERIODIC_IND = 0x3a,
|
|
|
|
|
|
|
|
|
HTT_T2H_MSG_TYPE_TEST,
|
|
@@ -21990,5 +22076,141 @@ typedef struct {
|
|
|
#define HTT_PEER_AST_OVERRIDE_INDEX_IND_BYTES 16
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * @brief target -> periodic report of tx latency to host
|
|
|
+ *
|
|
|
+ * MSG_TYPE => HTT_T2H_MSG_TYPE_TX_LATENCY_STATS_PERIODIC_IND
|
|
|
+ *
|
|
|
+ * @details
|
|
|
+ * The message starts with a message header followed by one or more
|
|
|
+ * htt_t2h_peer_tx_latency_stats structs, one for each peer within the vdev.
|
|
|
+ * After each upload, these tx latency stats will be reset.
|
|
|
+ *
|
|
|
+ * |31 24|23 16|15 14|13 10|9 8|7 0|
|
|
|
+ * +-------------------------+-----+-----+---+----------|
|
|
|
+ * hdr | |pyld elem sz| | GR | P | msg type |
|
|
|
+ *- -|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
|
|
|
+ * pyld | peer ID |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[0] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * 1st | peer_tx_latency[1] |
|
|
|
+ * peer |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[2] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[3] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | avg latency |
|
|
|
+ * |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
|
|
|
+ * | peer ID |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[0] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * 2nd | peer_tx_latency[1] |
|
|
|
+ * peer |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[2] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | peer_tx_latency[3] |
|
|
|
+ * |----------------------------------------------------|
|
|
|
+ * | avg latency |
|
|
|
+ * |=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
|
|
|
+ * Where:
|
|
|
+ * P = pdev ID
|
|
|
+ * GR = granularity
|
|
|
+ *
|
|
|
+ * @details
|
|
|
+ * htt_t2h_tx_latency_stats_periodic_hdr_t:
|
|
|
+ * - msg_type
|
|
|
+ * Bits 7:0
|
|
|
+ * Purpose: identifies this as a tx latency report message
|
|
|
+ * Value: 0x3a (HTT_T2H_MSG_TYPE_TX_LATENCY_STATS_PERIODIC_IND)
|
|
|
+ * - pdev_id
|
|
|
+ * Bits 9:8
|
|
|
+ * Purpose: Indicates which pdev this message is associated with.
|
|
|
+ * - granularity
|
|
|
+ * Bits 13:10
|
|
|
+ * Purpose: specifies the granulairty of each tx latency bucket in MS.
|
|
|
+ * There are 4 buckets in total. E.g. if granularity is set to 5 ms,
|
|
|
+ * then the ranges for the 4 latency histogram buckets will be
|
|
|
+ * 0-5ms, 5ms-10ms, 10ms-15ms, 15ms-max, respectively.
|
|
|
+ * - payload_elem_size
|
|
|
+ * Bits 23:16
|
|
|
+ * Purpose: specifies the size of each element within the msg's payload
|
|
|
+ * In other words, this field specified the value of
|
|
|
+ * sizeof(htt_t2h_peer_tx_latency_stats) based on the target's
|
|
|
+ * revision of the htt_t2h_peer_tx_latency_stats definition.
|
|
|
+ * If the payload_elem_size reported in the message exceeds the
|
|
|
+ * sizeof(htt_t2h_peer_tx_latency_stats) based on the host's
|
|
|
+ * revision of the htt_t2h_peer_tx_latency_stats definition,
|
|
|
+ * the host shall ignore the excess data.
|
|
|
+ * Conversely, if the payload_elem_size reported in the message is
|
|
|
+ * less than sizeof(htt_t2h_peer_tx_latency_stats) based on the host's
|
|
|
+ * revision of the htt_t2h_peer_tx_latency_stats definition,
|
|
|
+ * the host shall use 0x0 values for the portion of the data not
|
|
|
+ * provided by the target.
|
|
|
+ * The host can compare the payload_elem_size to the total size of
|
|
|
+ * the message minus the size of the message header to determine
|
|
|
+ * how many peer payload elements are present in the message.
|
|
|
+ * - sw_peer_id
|
|
|
+ * Purpose: The peer to which the following stats belong
|
|
|
+ * - peer_tx_latency
|
|
|
+ * Purpose: tx latency histogram for this peer, with 4 buckets whose
|
|
|
+ * size (in milliseconds) is specified by the granularity field
|
|
|
+ * - avg_latency
|
|
|
+ * Purpose: average tx latency (in ms) for this peer in this report interval
|
|
|
+*/
|
|
|
+typedef struct {
|
|
|
+ A_UINT32 msg_type: 8,
|
|
|
+ pdev_id: 2,
|
|
|
+ granularity: 4,
|
|
|
+ reserved1: 2,
|
|
|
+ payload_elem_size: 8,
|
|
|
+ reserved2: 8;
|
|
|
+} htt_t2h_tx_latency_stats_periodic_hdr_t;
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_HDR_SIZE \
|
|
|
+ (sizeof(htt_t2h_tx_latency_stats_periodic_hdr_t))
|
|
|
+#define HTT_PEER_TX_LATENCY_REPORT_BINS 4
|
|
|
+
|
|
|
+typedef struct _htt_tx_latency_stats {
|
|
|
+ A_UINT32 peer_id;
|
|
|
+ A_UINT32 peer_tx_latency[HTT_PEER_TX_LATENCY_REPORT_BINS];
|
|
|
+ A_UINT32 avg_latency;
|
|
|
+} htt_t2h_peer_tx_latency_stats;
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_M 0x00000300
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_S 8
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_GET(_var) \
|
|
|
+ (((_var) & HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_M) >> HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_S)
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PDEV_ID_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_M 0x00003C00
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_S 10
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_GET(_var) \
|
|
|
+ (((_var) & HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_M) >> HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_S)
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_GRANULARITY_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_M 0xFFFFC000
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_S 14
|
|
|
+
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_GET(_var) \
|
|
|
+ (((_var) & HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_M) >> HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_S)
|
|
|
+#define HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_SET(_var, _val) \
|
|
|
+ do { \
|
|
|
+ HTT_CHECK_SET_VAL(HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE, _val); \
|
|
|
+ ((_var) |= ((_val) << HTT_T2H_TX_LATENCY_STATS_PERIODIC_IND_PAYLOAD_ELEM_SIZE_S)); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#endif
|