Lines Matching defs:buf
245 static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned char *buf, int len)
247 BT_DBG("bfusb %p hdr 0x%02x data %p len %d", data, hdr, buf, len);
272 pkt_type = *buf++; len--;
277 struct hci_event_hdr *hdr = (struct hci_event_hdr *) buf;
287 struct hci_acl_hdr *hdr = (struct hci_acl_hdr *) buf;
297 struct hci_sco_hdr *hdr = (struct hci_sco_hdr *) buf;
323 skb_put_data(data->reassembly, buf, len);
337 unsigned char *buf = urb->transfer_buffer;
356 hdr = buf[0] | (buf[1] << 8);
361 buf += 2;
363 len = (buf[2] == 0) ? 256 : buf[2];
365 buf += 3;
373 bfusb_recv_block(data, hdr, buf, len);
376 buf += len;
453 unsigned char buf[3];
488 buf[0] = 0xc1 | ((sent == 0) ? 0x04 : 0) | ((count == size) ? 0x08 : 0);
489 buf[1] = 0x00;
490 buf[2] = (size == BFUSB_MAX_BLOCK_SIZE) ? 0 : size;
492 skb_put_data(nskb, buf, 3);
501 buf[0] = 0xdd;
502 buf[1] = 0x00;
503 skb_put_data(nskb, buf, 2);
521 unsigned char *buf;
528 buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_KERNEL);
529 if (!buf) {
539 kfree(buf);
550 memcpy(buf, firmware + sent, size);
552 err = usb_bulk_msg(data->udev, pipe, buf, size,
584 kfree(buf);
588 kfree(buf);