Lines Matching defs:hdev

80 	struct hci_dev *hdev = hu->hdev;
85 hdev->stat.cmd_tx++;
89 hdev->stat.acl_tx++;
93 hdev->stat.sco_tx++;
149 struct hci_dev *hdev = hu->hdev;
164 hdev->stat.byte_tx += len;
187 struct hci_dev *hdev;
192 err = hci_register_dev(hu->hdev);
197 hdev = hu->hdev;
198 hu->hdev = NULL;
199 hci_free_dev(hdev);
225 static int hci_uart_flush(struct hci_dev *hdev)
227 struct hci_uart *hu = hci_get_drvdata(hdev);
230 BT_DBG("hdev %p tty %p", hdev, tty);
251 static int hci_uart_open(struct hci_dev *hdev)
253 BT_DBG("%s %p", hdev->name, hdev);
256 hdev->flush = hci_uart_flush;
262 static int hci_uart_close(struct hci_dev *hdev)
264 BT_DBG("hdev %p", hdev);
266 hci_uart_flush(hdev);
267 hdev->flush = NULL;
272 static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
274 struct hci_uart *hu = hci_get_drvdata(hdev);
276 BT_DBG("%s: type %d len %d", hdev->name, hci_skb_pkt_type(skb),
385 BT_DBG("%s: New tty speeds: %d/%d", hu->hdev->name,
389 static int hci_uart_setup(struct hci_dev *hdev)
391 struct hci_uart *hu = hci_get_drvdata(hdev);
428 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL,
432 hdev->name, PTR_ERR(skb));
438 hdev->name);
447 hdev->set_bdaddr = btintel_set_bdaddr;
448 btintel_check_bdaddr(hdev);
453 hdev->set_bdaddr = btbcm_set_bdaddr;
454 btbcm_check_bdaddr(hdev);
524 struct hci_dev *hdev;
534 hdev = hu->hdev;
535 if (hdev)
536 hci_uart_close(hdev);
546 if (hdev) {
548 hci_unregister_dev(hdev);
549 hci_free_dev(hdev);
619 if (hu->hdev)
620 hu->hdev->stat.byte_rx += count;
627 struct hci_dev *hdev;
633 hdev = hci_alloc_dev();
634 if (!hdev) {
639 hu->hdev = hdev;
641 hdev->bus = HCI_UART;
642 hci_set_drvdata(hdev, hu);
649 hdev->manufacturer = hu->proto->manufacturer;
651 hdev->open = hci_uart_open;
652 hdev->close = hci_uart_close;
653 hdev->flush = hci_uart_flush;
654 hdev->send = hci_uart_send_frame;
655 hdev->setup = hci_uart_setup;
656 SET_HCIDEV_DEV(hdev, hu->tty->dev);
659 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
662 set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks);
665 set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
668 hdev->dev_type = HCI_AMP;
670 hdev->dev_type = HCI_PRIMARY;
672 /* Only call open() for the protocol after hdev is fully initialized as
677 hu->hdev = NULL;
678 hci_free_dev(hdev);
685 if (hci_register_dev(hdev) < 0) {
688 hu->hdev = NULL;
689 hci_free_dev(hdev);
780 err = hu->hdev->id;