• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/bluetooth/

Lines Matching refs:hdev

50 	struct hci_dev    *hdev;
67 static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
69 struct bpa10x_data *data = hdev->driver_data;
71 BT_DBG("%s queue %d buffer %p count %d", hdev->name,
77 hdev->stat.byte_rx += count;
128 BT_ERR("%s no memory for packet", hdev->name);
132 skb->dev = (void *) hdev;
170 struct hci_dev *hdev = (struct hci_dev *) skb->dev;
172 BT_DBG("%s urb %p status %d count %d", hdev->name,
175 if (!test_bit(HCI_RUNNING, &hdev->flags))
179 hdev->stat.byte_tx += urb->transfer_buffer_length;
181 hdev->stat.err_tx++;
191 struct hci_dev *hdev = urb->context;
192 struct bpa10x_data *data = hdev->driver_data;
195 BT_DBG("%s urb %p status %d count %d", hdev->name,
198 if (!test_bit(HCI_RUNNING, &hdev->flags))
202 if (bpa10x_recv(hdev, usb_pipebulk(urb->pipe),
205 BT_ERR("%s corrupted event packet", hdev->name);
206 hdev->stat.err_rx++;
215 hdev->name, urb, -err);
220 static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)
222 struct bpa10x_data *data = hdev->driver_data;
228 BT_DBG("%s", hdev->name);
243 bpa10x_rx_complete, hdev, 1);
252 hdev->name, urb, -err);
261 static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)
263 struct bpa10x_data *data = hdev->driver_data;
269 BT_DBG("%s", hdev->name);
284 buf, size, bpa10x_rx_complete, hdev);
293 hdev->name, urb, -err);
302 static int bpa10x_open(struct hci_dev *hdev)
304 struct bpa10x_data *data = hdev->driver_data;
307 BT_DBG("%s", hdev->name);
309 if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
312 err = bpa10x_submit_intr_urb(hdev);
316 err = bpa10x_submit_bulk_urb(hdev);
325 clear_bit(HCI_RUNNING, &hdev->flags);
330 static int bpa10x_close(struct hci_dev *hdev)
332 struct bpa10x_data *data = hdev->driver_data;
334 BT_DBG("%s", hdev->name);
336 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
344 static int bpa10x_flush(struct hci_dev *hdev)
346 struct bpa10x_data *data = hdev->driver_data;
348 BT_DBG("%s", hdev->name);
357 struct hci_dev *hdev = (struct hci_dev *) skb->dev;
358 struct bpa10x_data *data = hdev->driver_data;
364 BT_DBG("%s", hdev->name);
366 if (!test_bit(HCI_RUNNING, &hdev->flags))
395 hdev->stat.cmd_tx++;
404 hdev->stat.acl_tx++;
413 hdev->stat.sco_tx++;
425 BT_ERR("%s urb %p submission failed", hdev->name, urb);
435 static void bpa10x_destruct(struct hci_dev *hdev)
437 struct bpa10x_data *data = hdev->driver_data;
439 BT_DBG("%s", hdev->name);
449 struct hci_dev *hdev;
466 hdev = hci_alloc_dev();
467 if (!hdev) {
472 hdev->bus = HCI_USB;
473 hdev->driver_data = data;
475 data->hdev = hdev;
477 SET_HCIDEV_DEV(hdev, &intf->dev);
479 hdev->open = bpa10x_open;
480 hdev->close = bpa10x_close;
481 hdev->flush = bpa10x_flush;
482 hdev->send = bpa10x_send_frame;
483 hdev->destruct = bpa10x_destruct;
485 hdev->owner = THIS_MODULE;
487 set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);
489 err = hci_register_dev(hdev);
491 hci_free_dev(hdev);
512 hci_unregister_dev(data->hdev);
514 hci_free_dev(data->hdev);