Home | History | Annotate | Download | only in hw

Lines Matching refs:pkt

182 static void csrhci_in_packet(struct csrhci_s *s, uint8_t *pkt)
187 switch (*pkt ++) {
189 opc = le16_to_cpu(((struct hci_command_hdr *) pkt)->opcode);
192 pkt + sizeof(struct hci_command_hdr),
203 s->hci->cmd_send(s->hci, pkt, s->in_len - 1);
210 s->hci->acl_send(s->hci, pkt, s->in_len - 1);
214 s->hci->sco_send(s->hci, pkt, s->in_len - 1);
219 memcmp(pkt - 1, csrhci_neg_packet, s->in_hdr)) {
223 pkt += 2;
228 memcpy(rpkt, pkt, 7); rpkt += 7;
234 if (s->in_hdr != 4 || pkt[1] != 0x55 || pkt[2] != 0x00) {
255 static int csrhci_header_len(const uint8_t *pkt)
257 switch (pkt[0]) {
267 return pkt[1] + 1;
275 static int csrhci_data_len(const uint8_t *pkt)
277 switch (*pkt ++) {
281 if (le16_to_cpu(((struct hci_command_hdr *) pkt)->opcode) == 0xfc00)
282 return (((struct hci_command_hdr *) pkt)->plen + 1) & ~1;
284 return ((struct hci_command_hdr *) pkt)->plen;
286 return ((struct hci_event_hdr *) pkt)->plen;
288 return le16_to_cpu(((struct hci_acl_hdr *) pkt)->dlen);
290 return ((struct hci_sco_hdr *) pkt)->dlen;
337 uint8_t *pkt = csrhci_out_packet(s, (len + 2) & ~1); /* Align */
339 *pkt ++ = H4_EVT_PKT;
340 memcpy(pkt, data, len);
349 uint8_t *pkt = csrhci_out_packet(s, (len + 2) & ~1); /* Align */
351 *pkt ++ = H4_ACL_PKT;
352 pkt[len & ~1] = 0;
353 memcpy(pkt, data, len);