Home | History | Annotate | Download | only in hw

Lines Matching refs:pkt

181 static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
186 switch (*pkt ++) {
188 opc = le16_to_cpu(((struct hci_command_hdr *) pkt)->opcode);
191 pkt + sizeof(struct hci_command_hdr),
202 s->hci->cmd_send(s->hci, pkt, s->in_len - 1);
209 s->hci->acl_send(s->hci, pkt, s->in_len - 1);
213 s->hci->sco_send(s->hci, pkt, s->in_len - 1);
218 memcmp(pkt - 1, csrhci_neg_packet, s->in_hdr)) {
222 pkt += 2;
227 memcpy(rpkt, pkt, 7); rpkt += 7;
233 if (s->in_hdr != 4 || pkt[1] != 0x55 || pkt[2] != 0x00) {
254 static int csrhci_header_len(const uint8_t *pkt)
256 switch (pkt[0]) {
266 return pkt[1] + 1;
274 static int csrhci_data_len(const uint8_t *pkt)
276 switch (*pkt ++) {
280 if (le16_to_cpu(((struct hci_command_hdr *) pkt)->opcode) == 0xfc00)
281 return (((struct hci_command_hdr *) pkt)->plen + 1) & ~1;
283 return ((struct hci_command_hdr *) pkt)->plen;
285 return ((struct hci_event_hdr *) pkt)->plen;
287 return le16_to_cpu(((struct hci_acl_hdr *) pkt)->dlen);
289 return ((struct hci_sco_hdr *) pkt)->dlen;
336 uint8_t *pkt = csrhci_out_packet(s, (len + 2) & ~1); /* Align */
338 *pkt ++ = H4_EVT_PKT;
339 memcpy(pkt, data, len);
348 uint8_t *pkt = csrhci_out_packet(s, (len + 2) & ~1); /* Align */
350 *pkt ++ = H4_ACL_PKT;
351 pkt[len & ~1] = 0;
352 memcpy(pkt, data, len);