Home | History | Annotate | Download | only in usb

Lines Matching defs:htc

1035 	struct ar_htc_frame_hdr *htc;
1043 htc = (struct ar_htc_frame_hdr *)data->buf;
1044 memset(htc, 0, sizeof(*htc));
1045 htc->endpoint_id = 0;
1046 htc->payload_len = htobe16(sizeof(*msg) + len);
1048 msg = (struct ar_htc_msg_hdr *)&htc[1];
1054 sizeof(*htc) + sizeof(*msg) + len,
1244 struct ar_htc_frame_hdr *htc;
1253 htc = (struct ar_htc_frame_hdr *)data->buf;
1254 memset(htc, 0, sizeof(*htc));
1255 htc->endpoint_id = usc->usc_ep_ctrl;
1256 htc->payload_len = htobe16(sizeof(*wmi) + ilen);
1258 wmi = (struct ar_wmi_cmd_hdr *)&htc[1];
1266 sizeof(*htc) + sizeof(*wmi) + ilen,
1958 struct ar_htc_frame_hdr *htc;
1994 hdr->len = htole16(sizeof(*htc) + sizeof(*bcn) + m->m_pkthdr.len);
1996 htc = (struct ar_htc_frame_hdr *)&hdr[1];
1997 memset(htc, 0, sizeof(*htc));
1998 htc->endpoint_id = usc->usc_ep_bcn;
1999 htc->payload_len = htobe16(sizeof(*bcn) + m->m_pkthdr.len);
2001 bcn = (struct ar_tx_bcn *)&htc[1];
2008 sizeof(*hdr) + sizeof(*htc) + sizeof(*bcn) + m->m_pkthdr.len,
2084 struct ar_htc_frame_hdr *htc;
2108 if (__predict_false(len < (int)sizeof(*htc)))
2110 htc = (struct ar_htc_frame_hdr *)buf;
2111 /* Skip HTC header. */
2112 buf += sizeof(*htc);
2113 len -= sizeof(*htc);
2115 if (htc->endpoint_id != 0) {
2116 if (__predict_false(htc->endpoint_id != usc->usc_ep_ctrl)) {
2118 htc->endpoint_id, usc->usc_ep_ctrl);
2122 if (htc->flags & AR_HTC_FLAG_TRAILER) {
2123 if (__predict_false(len < htc->control[0])) {
2125 len, htc->control[0]);
2128 len -= htc->control[0];
2135 * Endpoint 0 carries HTC messages.
2141 DPRINTFN(DBG_RX, usc, "Rx HTC message %d\n", msg_id);
2169 DPRINTFN(DBG_RX, usc, "HTC message %d ignored\n", msg_id);
2231 struct ar_htc_frame_hdr *htc;
2238 if (__predict_false(m->m_len < (int)sizeof(*htc)))
2240 htc = mtod(m, struct ar_htc_frame_hdr *);
2241 if (__predict_false(htc->endpoint_id == 0)) {
2242 DPRINTFN(DBG_RX, sc, "bad endpoint %d\n", htc->endpoint_id);
2245 if (htc->flags & AR_HTC_FLAG_TRAILER) {
2246 if (m->m_len < htc->control[0])
2248 m_adj(m, -(int)htc->control[0]);
2250 m_adj(m, sizeof(*htc)); /* Strip HTC header. */
2463 struct ar_htc_frame_hdr *htc;
2513 htc = (struct ar_htc_frame_hdr *)&hdr[1];
2514 memset(htc, 0, sizeof(*htc));
2517 htc->endpoint_id = usc->usc_ep_data[qid];
2519 txf = (struct ar_tx_frame *)&htc[1];
2536 htc->endpoint_id = usc->usc_ep_mgmt;
2538 txm = (struct ar_tx_mgmt *)&htc[1];
2550 htc->payload_len = htobe16(frm - (uint8_t *)&htc[1]);