Go to the documentation of this file.
26 #define HTC_FLAGS_NEED_CREDIT_UPDATE (1 << 0)
27 #define HTC_FLAGS_SEND_BUNDLE (1 << 1)
28 #define HTC_FLAGS_TX_FIXUP_NETBUF (1 << 2)
31 #define HTC_FLG_RX_UNUSED (1 << 0)
32 #define HTC_FLG_RX_TRAILER (1 << 1)
34 #define HTC_FLG_RX_BNDL_CNT (0xF0)
35 #define HTC_FLG_RX_BNDL_CNT_S 4
37 #define HTC_HDR_LENGTH (sizeof(struct htc_frame_hdr))
38 #define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(struct htc_frame_hdr))
42 #define HTC_MSG_READY_ID 1
43 #define HTC_MSG_CONN_SVC_ID 2
44 #define HTC_MSG_CONN_SVC_RESP_ID 3
45 #define HTC_MSG_SETUP_COMPLETE_ID 4
46 #define HTC_MSG_SETUP_COMPLETE_EX_ID 5
48 #define HTC_MAX_CTRL_MSG_LEN 256
50 #define HTC_VERSION_2P0 0x00
51 #define HTC_VERSION_2P1 0x01
53 #define HTC_SERVICE_META_DATA_MAX_LENGTH 128
55 #define HTC_CONN_FLGS_THRESH_LVL_QUAT 0x0
56 #define HTC_CONN_FLGS_THRESH_LVL_HALF 0x1
57 #define HTC_CONN_FLGS_THRESH_LVL_THREE_QUAT 0x2
58 #define HTC_CONN_FLGS_REDUCE_CRED_DRIB 0x4
59 #define HTC_CONN_FLGS_THRESH_MASK 0x3
61 #define HTC_CONN_FLGS_DISABLE_CRED_FLOW_CTRL (1 << 3)
62 #define HTC_CONN_FLGS_SET_RECV_ALLOC_SHIFT 8
63 #define HTC_CONN_FLGS_SET_RECV_ALLOC_MASK 0xFF00
66 #define HTC_SERVICE_SUCCESS 0
67 #define HTC_SERVICE_NOT_FOUND 1
68 #define HTC_SERVICE_FAILED 2
71 #define HTC_SERVICE_NO_RESOURCES 3
74 #define HTC_SERVICE_NO_MORE_EP 4
77 #define HTC_RECORD_NULL 0
78 #define HTC_RECORD_CREDITS 1
79 #define HTC_RECORD_LOOKAHEAD 2
80 #define HTC_RECORD_LOOKAHEAD_BUNDLE 3
82 #define HTC_SETUP_COMP_FLG_RX_BNDL_EN (1 << 0)
83 #define HTC_SETUP_COMP_FLG_DISABLE_TX_CREDIT_FLOW (1 << 1)
85 #define MAKE_SERVICE_ID(group, index) \
86 (int)(((int)group << 8) | (int)(index))
89 #define HTC_CTRL_RSVD_SVC MAKE_SERVICE_ID(RSVD_SERVICE_GROUP, 1)
90 #define WMI_CONTROL_SVC MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 0)
91 #define WMI_DATA_BE_SVC MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 1)
92 #define WMI_DATA_BK_SVC MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 2)
93 #define WMI_DATA_VI_SVC MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 3)
94 #define WMI_DATA_VO_SVC MAKE_SERVICE_ID(WMI_SERVICE_GROUP, 4)
95 #define WMI_MAX_SERVICES 5
100 #define HTC_TX_PACKET_TAG_ALL 0
101 #define HTC_SERVICE_TX_PACKET_TAG 1
102 #define HTC_TX_PACKET_TAG_USER_DEFINED (HTC_SERVICE_TX_PACKET_TAG + 9)
105 #define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0)
110 #define HTC_MAILBOX_NUM_MAX 4
113 #define HTC_FLGS_TX_BNDL_PAD_EN (1 << 0)
114 #define HTC_EP_ACTIVE ((u32) (1u << 31))
117 #define HTC_TARGET_RESPONSE_TIMEOUT 2000
118 #define HTC_TARGET_RESPONSE_POLL_WAIT 10
119 #define HTC_TARGET_RESPONSE_POLL_COUNT 200
120 #define HTC_TARGET_DEBUG_INTR_MASK 0x01
121 #define HTC_TARGET_CREDIT_INTR_MASK 0xF0
123 #define HTC_HOST_MAX_MSG_PER_BUNDLE 8
124 #define HTC_MIN_HTC_MSGS_TO_BUNDLE 2
128 #define HTC_RX_PKT_IGNORE_LOOKAHEAD (1 << 0)
129 #define HTC_RX_PKT_REFRESH_HDR (1 << 1)
130 #define HTC_RX_PKT_PART_OF_BUNDLE (1 << 2)
131 #define HTC_RX_PKT_NO_RECYCLE (1 << 3)
133 #define NUM_CONTROL_BUFFERS 8
134 #define NUM_CONTROL_TX_BUFFERS 2
135 #define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS)
137 #define HTC_RECV_WAIT_BUFFERS (1 << 0)
138 #define HTC_OP_STATE_STOPPING (1 << 0)
139 #define HTC_OP_STATE_SETUP_COMPLETE (1 << 1)
633 u32 msg_look_ahead,
int *n_pkts);
636 u8 *
buf,
unsigned int len,
653 u8 *
buf,
unsigned long len,