Lines Matching defs:hdev
50 struct hci_dev *hdev;
136 bt_dev_err(data->hdev, "bulk tx submit failed urb %p err %d",
182 if (!test_bit(HCI_RUNNING, &data->hdev->flags))
186 data->hdev->stat.byte_tx += skb->len;
188 data->hdev->stat.err_tx++;
235 bt_dev_err(data->hdev, "bulk rx submit failed urb %p err %d",
250 bt_dev_err(data->hdev, "error in block");
262 bt_dev_err(data->hdev, "unexpected start block");
268 bt_dev_err(data->hdev, "no packet type found");
280 bt_dev_err(data->hdev, "event block is too short");
290 bt_dev_err(data->hdev, "data block is too short");
300 bt_dev_err(data->hdev, "audio block is too short");
308 bt_dev_err(data->hdev, "no memory for the packet");
317 bt_dev_err(data->hdev, "unexpected continuation block");
326 hci_recv_frame(data->hdev, data->reassembly);
345 if (!test_bit(HCI_RUNNING, &data->hdev->flags))
351 data->hdev->stat.byte_rx += count;
369 bt_dev_err(data->hdev, "block extends over URB buffer ranges");
393 bt_dev_err(data->hdev, "bulk resubmit failed urb %p err %d",
401 static int bfusb_open(struct hci_dev *hdev)
403 struct bfusb_data *data = hci_get_drvdata(hdev);
407 BT_DBG("hdev %p bfusb %p", hdev, data);
422 static int bfusb_flush(struct hci_dev *hdev)
424 struct bfusb_data *data = hci_get_drvdata(hdev);
426 BT_DBG("hdev %p bfusb %p", hdev, data);
433 static int bfusb_close(struct hci_dev *hdev)
435 struct bfusb_data *data = hci_get_drvdata(hdev);
438 BT_DBG("hdev %p bfusb %p", hdev, data);
444 bfusb_flush(hdev);
449 static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
451 struct bfusb_data *data = hci_get_drvdata(hdev);
456 BT_DBG("hdev %p skb %p type %d len %d", hdev, skb,
461 hdev->stat.cmd_tx++;
464 hdev->stat.acl_tx++;
467 hdev->stat.sco_tx++;
479 bt_dev_err(hdev, "Can't allocate memory for new packet");
604 struct hci_dev *hdev;
657 hdev = hci_alloc_dev();
658 if (!hdev) {
663 data->hdev = hdev;
665 hdev->bus = HCI_USB;
666 hci_set_drvdata(hdev, data);
667 SET_HCIDEV_DEV(hdev, &intf->dev);
669 hdev->open = bfusb_open;
670 hdev->close = bfusb_close;
671 hdev->flush = bfusb_flush;
672 hdev->send = bfusb_send_frame;
674 set_bit(HCI_QUIRK_BROKEN_LOCAL_COMMANDS, &hdev->quirks);
676 if (hci_register_dev(hdev) < 0) {
678 hci_free_dev(hdev);
696 struct hci_dev *hdev = data->hdev;
700 if (!hdev)
705 bfusb_close(hdev);
707 hci_unregister_dev(hdev);
708 hci_free_dev(hdev);