Lines Matching refs:vbt
29 static int virtbt_add_inbuf(struct virtio_bluetooth *vbt) in virtbt_add_inbuf() argument
31 struct virtqueue *vq = vbt->vqs[VIRTBT_VQ_RX]; in virtbt_add_inbuf()
53 struct virtio_bluetooth *vbt = hci_get_drvdata(hdev); in virtbt_open() local
55 if (virtbt_add_inbuf(vbt) < 0) in virtbt_open()
58 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_open()
64 struct virtio_bluetooth *vbt = hci_get_drvdata(hdev); in virtbt_close() local
67 cancel_work_sync(&vbt->rx); in virtbt_close()
69 for (i = 0; i < ARRAY_SIZE(vbt->vqs); i++) { in virtbt_close()
70 struct virtqueue *vq = vbt->vqs[i]; in virtbt_close()
87 struct virtio_bluetooth *vbt = hci_get_drvdata(hdev); in virtbt_send_frame() local
94 err = virtqueue_add_outbuf(vbt->vqs[VIRTBT_VQ_TX], sg, 1, skb, in virtbt_send_frame()
101 virtqueue_kick(vbt->vqs[VIRTBT_VQ_TX]); in virtbt_send_frame()
190 static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb) in virtbt_rx_handle() argument
203 hci_recv_frame(vbt->hdev, skb); in virtbt_rx_handle()
210 struct virtio_bluetooth *vbt = container_of(work, in virtbt_rx_work() local
215 skb = virtqueue_get_buf(vbt->vqs[VIRTBT_VQ_RX], &len); in virtbt_rx_work()
220 virtbt_rx_handle(vbt, skb); in virtbt_rx_work()
222 if (virtbt_add_inbuf(vbt) < 0) in virtbt_rx_work()
225 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_rx_work()
239 struct virtio_bluetooth *vbt = vq->vdev->priv; in virtbt_rx_done() local
241 schedule_work(&vbt->rx); in virtbt_rx_done()
254 struct virtio_bluetooth *vbt; in virtbt_probe() local
272 vbt = kzalloc(sizeof(*vbt), GFP_KERNEL); in virtbt_probe()
273 if (!vbt) in virtbt_probe()
276 vdev->priv = vbt; in virtbt_probe()
277 vbt->vdev = vdev; in virtbt_probe()
279 INIT_WORK(&vbt->rx, virtbt_rx_work); in virtbt_probe()
281 err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, callbacks, in virtbt_probe()
292 vbt->hdev = hdev; in virtbt_probe()
296 hci_set_drvdata(hdev, vbt); in virtbt_probe()
363 struct virtio_bluetooth *vbt = vdev->priv; in virtbt_remove() local
364 struct hci_dev *hdev = vbt->hdev; in virtbt_remove()
370 vbt->hdev = NULL; in virtbt_remove()
373 kfree(vbt); in virtbt_remove()