Lines Matching defs:hdev
26 struct hci_dev *hdev = hu->hdev;
31 hdev->stat.cmd_tx++;
35 hdev->stat.acl_tx++;
39 hdev->stat.sco_tx++;
61 struct hci_dev *hdev = hu->hdev;
75 hdev->stat.byte_tx += len;
94 static int hci_uart_flush(struct hci_dev *hdev)
96 struct hci_uart *hu = hci_get_drvdata(hdev);
98 BT_DBG("hdev %p serdev %p", hdev, hu->serdev);
114 static int hci_uart_open(struct hci_dev *hdev)
116 struct hci_uart *hu = hci_get_drvdata(hdev);
119 BT_DBG("%s %p", hdev->name, hdev);
133 hdev->flush = hci_uart_flush;
139 static int hci_uart_close(struct hci_dev *hdev)
141 struct hci_uart *hu = hci_get_drvdata(hdev);
143 BT_DBG("hdev %p", hdev);
148 hci_uart_flush(hdev);
149 hdev->flush = NULL;
155 if (test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks)) {
164 static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
166 struct hci_uart *hu = hci_get_drvdata(hdev);
168 BT_DBG("%s: type %d len %d", hdev->name, hci_skb_pkt_type(skb),
178 static int hci_uart_setup(struct hci_dev *hdev)
180 struct hci_uart *hu = hci_get_drvdata(hdev);
208 bt_dev_err(hdev, "Failed to set baudrate");
219 skb = __hci_cmd_sync(hdev, HCI_OP_READ_LOCAL_VERSION, 0, NULL,
222 bt_dev_err(hdev, "Reading local version info failed (%ld)",
228 bt_dev_err(hdev, "Event length mismatch for version info");
283 if (hu->hdev)
284 hu->hdev->stat.byte_rx += count;
298 struct hci_dev *hdev;
319 hdev = hci_alloc_dev();
320 if (!hdev) {
326 hu->hdev = hdev;
328 hdev->bus = HCI_UART;
329 hci_set_drvdata(hdev, hu);
339 hdev->manufacturer = hu->proto->manufacturer;
341 hdev->open = hci_uart_open;
342 hdev->close = hci_uart_close;
343 hdev->flush = hci_uart_flush;
344 hdev->send = hci_uart_send_frame;
345 hdev->setup = hci_uart_setup;
346 SET_HCIDEV_DEV(hdev, &hu->serdev->dev);
349 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
352 set_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks);
355 hdev->dev_type = HCI_AMP;
357 hdev->dev_type = HCI_PRIMARY;
362 if (hci_register_dev(hdev) < 0) {
373 hci_free_dev(hdev);
387 struct hci_dev *hdev = hu->hdev;
391 hci_unregister_dev(hdev);
392 hci_free_dev(hdev);