• Home
  • Raw
  • Download

Lines Matching refs:hdev

65 	struct hci_dev		*hdev;  member
149 data->hdev->name, urb, err); in bfusb_send_bulk()
194 if (!test_bit(HCI_RUNNING, &data->hdev->flags)) in bfusb_tx_complete()
198 data->hdev->stat.byte_tx += skb->len; in bfusb_tx_complete()
200 data->hdev->stat.err_tx++; in bfusb_tx_complete()
245 data->hdev->name, urb, err); in bfusb_rx_submit()
259 BT_ERR("%s error in block", data->hdev->name); in bfusb_recv_block()
271 BT_ERR("%s unexpected start block", data->hdev->name); in bfusb_recv_block()
277 BT_ERR("%s no packet type found", data->hdev->name); in bfusb_recv_block()
289 BT_ERR("%s event block is too short", data->hdev->name); in bfusb_recv_block()
299 BT_ERR("%s data block is too short", data->hdev->name); in bfusb_recv_block()
309 BT_ERR("%s audio block is too short", data->hdev->name); in bfusb_recv_block()
317 BT_ERR("%s no memory for the packet", data->hdev->name); in bfusb_recv_block()
321 skb->dev = (void *) data->hdev; in bfusb_recv_block()
327 BT_ERR("%s unexpected continuation block", data->hdev->name); in bfusb_recv_block()
355 if (!test_bit(HCI_RUNNING, &data->hdev->flags)) in bfusb_rx_complete()
361 data->hdev->stat.byte_rx += count; in bfusb_rx_complete()
380 data->hdev->name); in bfusb_rx_complete()
405 data->hdev->name, urb, err); in bfusb_rx_complete()
412 static int bfusb_open(struct hci_dev *hdev) in bfusb_open() argument
414 struct bfusb_data *data = hdev->driver_data; in bfusb_open()
418 BT_DBG("hdev %p bfusb %p", hdev, data); in bfusb_open()
420 if (test_and_set_bit(HCI_RUNNING, &hdev->flags)) in bfusb_open()
430 clear_bit(HCI_RUNNING, &hdev->flags); in bfusb_open()
438 static int bfusb_flush(struct hci_dev *hdev) in bfusb_flush() argument
440 struct bfusb_data *data = hdev->driver_data; in bfusb_flush()
442 BT_DBG("hdev %p bfusb %p", hdev, data); in bfusb_flush()
449 static int bfusb_close(struct hci_dev *hdev) in bfusb_close() argument
451 struct bfusb_data *data = hdev->driver_data; in bfusb_close()
454 BT_DBG("hdev %p bfusb %p", hdev, data); in bfusb_close()
456 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) in bfusb_close()
463 bfusb_flush(hdev); in bfusb_close()
470 struct hci_dev *hdev = (struct hci_dev *) skb->dev; in bfusb_send_frame() local
476 BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len); in bfusb_send_frame()
478 if (!hdev) { in bfusb_send_frame()
483 if (!test_bit(HCI_RUNNING, &hdev->flags)) in bfusb_send_frame()
486 data = hdev->driver_data; in bfusb_send_frame()
490 hdev->stat.cmd_tx++; in bfusb_send_frame()
493 hdev->stat.acl_tx++; in bfusb_send_frame()
496 hdev->stat.sco_tx++; in bfusb_send_frame()
547 static void bfusb_destruct(struct hci_dev *hdev) in bfusb_destruct() argument
549 struct bfusb_data *data = hdev->driver_data; in bfusb_destruct()
551 BT_DBG("hdev %p bfusb %p", hdev, data); in bfusb_destruct()
556 static int bfusb_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg) in bfusb_ioctl() argument
646 struct hci_dev *hdev; in bfusb_probe() local
698 hdev = hci_alloc_dev(); in bfusb_probe()
699 if (!hdev) { in bfusb_probe()
704 data->hdev = hdev; in bfusb_probe()
706 hdev->type = HCI_USB; in bfusb_probe()
707 hdev->driver_data = data; in bfusb_probe()
708 SET_HCIDEV_DEV(hdev, &intf->dev); in bfusb_probe()
710 hdev->open = bfusb_open; in bfusb_probe()
711 hdev->close = bfusb_close; in bfusb_probe()
712 hdev->flush = bfusb_flush; in bfusb_probe()
713 hdev->send = bfusb_send_frame; in bfusb_probe()
714 hdev->destruct = bfusb_destruct; in bfusb_probe()
715 hdev->ioctl = bfusb_ioctl; in bfusb_probe()
717 hdev->owner = THIS_MODULE; in bfusb_probe()
719 if (hci_register_dev(hdev) < 0) { in bfusb_probe()
721 hci_free_dev(hdev); in bfusb_probe()
742 struct hci_dev *hdev = data->hdev; in bfusb_disconnect() local
746 if (!hdev) in bfusb_disconnect()
751 bfusb_close(hdev); in bfusb_disconnect()
753 if (hci_unregister_dev(hdev) < 0) in bfusb_disconnect()
754 BT_ERR("Can't unregister HCI device %s", hdev->name); in bfusb_disconnect()
756 hci_free_dev(hdev); in bfusb_disconnect()