diff --git a/fw/htt.h b/fw/htt.h index 0b9f590299eb..44a0c434c886 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -258,9 +258,10 @@ * 3.129 Add HTT_TX_FW2WBM_REINJECT_REASON_SAWF_SVC_CLASS_ID_ABSENT def. * 3.130 Add H2T TX_LCE_SUPER_RULE_SETUP and T2H TX_LCE_SUPER_RULE_SETUP_DONE * msg defs. + * 3.131 Add H2T TYPE_MSDUQ_RECFG_REQ + T2H MSDUQ_CFG_IND msg defs. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 130 +#define HTT_CURRENT_VERSION_MINOR 131 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -897,6 +898,7 @@ enum htt_h2t_msg_type { HTT_H2T_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_RESP = 0x24, HTT_H2T_MSG_TYPE_TX_LATENCY_STATS_CFG = 0x25, HTT_H2T_MSG_TYPE_TX_LCE_SUPER_RULE_SETUP = 0x26, + HTT_H2T_MSG_TYPE_MSDUQ_RECFG_REQ = 0x27, /* keep this last */ HTT_H2T_NUM_MSGS @@ -11200,6 +11202,97 @@ PREPACK struct htt_h2t_tx_latency_stats_cfg { } while (0) +/** + * @brief host -> tgt msg to reconfigure params for a MSDU queue + * + * MSG_TYPE => HTT_H2T_MSG_TYPE_MSDUQ_RECFG_REQ + * + * @details + * HTT_H2T_MSG_TYPE_MSDUQ_RECFG_REQ message is sent by the host to + * update the configuration of the identified MSDU. + * This message supports the following MSDU queue reconfigurations: + * 1. Pausing or resuming the MSDU queue. + * 2. Moving the MSDU queue from its current service class to a + * different service class. + * The new service class needs to be within the same TID as the + * current service class. + * This msg overlaps with the HTT_H2T_SAWF_DEF_QUEUES_[MAP,UNMAP]_REQ + * messages, but those only apply to the default MSDU queues within + * a peer-TID, while this message applies only to a single MSDU queue, + * and that MSDU queue can be a user-defined queue or a default queue. + * Also, the concurrent combination of reconfigurations 1+2 is supported. + * + * The message format is as follows: + * |31 8|7 0| + * |--------------------------------------------------------------| + * | tgt_opaque_msduq_id | msg type | + * |--------------------------------------------------------------| + * | reserved |P| svc_class_id | + * |--------------------------------------------------------------| + * Where: P = pause_type + * + * The message is interpreted as follows: + * dword0 - b'0:7 - msg_type: This will be set to 0x27 + * (HTT_H2T_MSG_TYPE_MSDUQ_RECFG_REQ) + * b'8:31 - tgt_opaque_msduq_id: tx flow number that uniquely + * identifies the MSDU queue + * dword1 - b'0:7 - svc_class_id: ID of the SAWF service class to which + * the MSDU queue should be associated. + * On un-pause requests, svc_class_id may be set to the + * same service class ID as before the pause or it may + * be set to a different service class ID. + * b'8:8 - pause: Whether the MSDU queue should be paused or unpaused + * b'9:31 - reserved + */ + +/* HTT_H2T_MSG_TYPE_MSDUQ_RECFG_REQ */ +typedef enum { + HTT_MSDUQ_UNPAUSE = 0, + HTT_MSDUQ_PAUSE = 1, +} HTT_MSDUQ_PAUSE_E; + +PREPACK struct htt_h2t_msduq_acm_req { + A_UINT32 msg_type :8, /* bits 7:0 */ + tgt_opaque_msduq_id :24; /* bits 31:8 */ + A_UINT32 svc_class_id :8, /* bits 7:0 */ + pause :1, /* bits 8:8 */ + reserved :23; /* bits 31:9 */ +} POSTPACK; + +#define HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_M 0xFFFFFF00 +#define HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_S 8 +#define HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_GET(_var) \ + (((_var) & HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_M) >> \ + HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_S) +#define HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID, _val); \ + ((_var) |= ((_val) << HTT_H2T_MSDUQ_RECFG_REQ_TGT_OPAQUE_MSDUQ_ID_S)); \ + } while (0) + +#define HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_M 0x000000FF +#define HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_S 0 +#define HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_GET(_var) \ + (((_var) & HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_M) >> \ + HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_S) +#define HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID, _val); \ + ((_var) |= ((_val) << HTT_H2T_MSDUQ_RECFG_REQ_SVC_CLASS_ID_S)); \ + } while (0) + +#define HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_M 0x00000100 +#define HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_S 8 +#define HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_GET(_var) \ + (((_var) & HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_M) >> \ + HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_S) +#define HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_H2T_MSDUQ_RECFG_REQ_PAUSE, _val); \ + ((_var) |= ((_val) << HTT_H2T_MSDUQ_RECFG_REQ_PAUSE_S)); \ + } while (0) + + /*=== target -> host messages ===============================================*/ @@ -11272,6 +11365,7 @@ enum htt_t2h_msg_type { HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT = 0x39, HTT_T2H_MSG_TYPE_TX_LATENCY_STATS_PERIODIC_IND = 0x3a, HTT_T2H_MSG_TYPE_TX_LCE_SUPER_RULE_SETUP_DONE = 0x3b, + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND = 0x3c, HTT_T2H_MSG_TYPE_TEST, @@ -22717,5 +22811,204 @@ typedef struct _htt_tx_latency_stats { } while (0) +/** + * @brief target -> host report showing MSDU queue configuration + * + * MSG_TYPE => HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND + * + * @details + * + * |31 24|23 16|15|14 11|10|9 8|7 0| + * |----------------+----------------+--+-----+--+---+----------------------| + * | peer_id | htt_qtype | msg type | + * |----------------+----------------+--+-----+--+---+----------+-----------| + * | error_code | svc_class_id | R| AST | F|WHO| hlos_tid | remap_tid | + * |----------------+----------------+--+-----+--+---+----------+-----------| + * | reserved | tgt_opaque_msduq_id | + * |------------------------------------------------------------------------| + * Where WHO = who_classify_info_sel + * F = flow_override + * AST = ast_list_idx + * R = reserved + * + * @details + * htt_t2h_msg_type_msduq_acm_ind_t: + * + * The message is interpreted as follows: + * dword0 - b'7:0 - msg_type: Identifies this as a MSDU queue cfg indication + * This will be set to 0x3c (HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND) + * b'15:8 - HTT qtype (refer to HTT_MSDU_QTYPE) + * b'31:16 - peer ID + * + * dword1 - b'3:0 - remap TID, as assigned in firmware + * b'7:4 - HLOS TID, as sent by host in TCL Data Command + * hlos_tid : Common to Lithium and Beryllium + * b'9:8 - who_classify_info_sel (WWHO, as sent by host in + * TCL Data Command : Beryllium + * b'10:10 - flow_override (F), as sent by host in + * TCL Data Command: Beryllium + * b'14:11 - ast_list_idx (AST) + * Array index into the list of extension AST entries + * (not the actual AST 16-bit index). + * The ast_list_idx is one-based, with the following + * range of values: + * - legacy targets supporting 16 user-defined + * MSDU queues: 1-2 + * - legacy targets supporting 48 user-defined + * MSDU queues: 1-6 + * - new targets: 0 (peer_id is used instead) + * Note that since ast_list_idx is one-based, + * the host will need to subtract 1 to use it as an + * index into a list of extension AST entries. + * b'15:15 - reserved + * b'23:16 - svc_class_id + * b'31:24 - error_code + * + * dword2 - b'23:0 - tgt_opaque_msduq_id: tx flow number that uniquely + * identifies the MSDU queue + * b'24:31 - reserved1 + * + * The behavior of this indication is as follows: + * - svc_class_id is set to the service class that the specified MSDUQ is + * currently linked to. + * - error_code is set to a defined code if any errors arise. + * Otherwise a value of 0x00 (ERROR_NONE) indicates success. + */ + +/* HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND */ +typedef enum { + HTT_MSDUQ_CFG_IND_ERROR_NONE = 0x00, + HTT_MSDUQ_CFG_IND_ERROR_PEER_DELETE_IN_PROG = 0x01, + HTT_MSDUQ_CFG_IND_ERROR_SW_MSDUQ_NULL = 0x02, + HTT_MSDUQ_CFG_IND_ERROR_MSDUQ_LOCATE_ERROR = 0x03, +} HTT_MSDUQ_CFG_IND_ERROR_CODE_E; + +PREPACK struct htt_t2h_sawf_msduq_pause_event { + A_UINT32 msg_type: 8, /* bits 7:0 */ + htt_qtype: 8, /* bits 15:8 */ + peer_id: 16; /* bits 31:16 */ + A_UINT32 remap_tid: 4, /* bits 3:0 */ + hlos_tid: 4, /* bits 7:4 */ + who_classify_info_sel: 2, /* bits 9:8 */ + flow_override: 1, /* bits 10:10 */ + ast_list_idx: 4, /* bits 14:11 */ + reserved: 1, /* bits 15:15 */ + svc_class_id: 8, /* bits 23:16 */ + error_code: 8; /* bits 31:24 */ + A_UINT32 tgt_opaque_msduq_id: 24, /* bits 23:0 */ + reserved1: 8; /* bits 31:24 */ +} POSTPACK; + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_M 0x0000FF00 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_S 8 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HTT_QTYPE_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_M 0xFFFF0000 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_S 16 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_PEER_ID_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_M 0x0000000F +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_S 0 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_REMAP_TID_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_M 0x000000F0 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_S 4 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IN_DHLOS_TID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_HLOS_TID_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_M 0x00000300 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_S 8 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_WHO_CLASSIFY_INFO_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_M 0x00000400 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_S 10 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_FLOW_OVERRIDE_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_M 0x00007800 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_S 11 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_AST_LIST_IDX_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_M 0x00FF0000 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_S 16 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_SVC_CLASS_ID_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_M 0xFF000000 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_S 24 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_ERROR_CODE_S)); \ + } while (0) + +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_M 0x00FFFFFF +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_S 0 +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_GET(_var) \ + (((_var) & HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_M) >> \ + HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_S) +#define HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID, _val); \ + ((_var) |= ((_val) << HTT_T2H_MSG_TYPE_MSDUQ_CFG_IND_TGT_OPAQUE_MSDUQ_ID_S)); \ + } while (0) + + #endif diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 1499b7c7bfba..f8a9544a650b 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -658,6 +658,7 @@ typedef enum { WMI_SERVICE_SMEM_MAILBOX_SUPPORT = 404, /* FW code has smem_mailbox support enabled */ WMI_SERVICE_REG_CC_EXT2_EVENT_SUPPORT = 405, /* Indicate FW would send EXT2 REG_CC event having data which would be a continuation to EXT REG_CC event */ WMI_SERVICE_MLO_MODE2_RECOVERY_SUPPORTED = 406, /* Indicate FW support for MLO mode2 recovery */ + WMI_SERVICE_MSDUQ_RECFG = 407, /* FW support the HTT MSDUQ_RECFG_REQ + MSDUQ_CFG_IND messages */ WMI_MAX_EXT2_SERVICE