Lines Matching refs:hdev
58 struct hci_dev *hdev; member
82 BT_DBG("%s", data->hdev->name); in btsdio_tx_packet()
98 data->hdev->stat.byte_tx += skb->len; in btsdio_tx_packet()
111 BT_DBG("%s", data->hdev->name); in btsdio_work()
118 data->hdev->stat.err_tx++; in btsdio_work()
133 BT_DBG("%s", data->hdev->name); in btsdio_rx_packet()
159 data->hdev->stat.byte_rx += len; in btsdio_rx_packet()
163 err = hci_recv_frame(data->hdev, skb); in btsdio_rx_packet()
177 BT_DBG("%s", data->hdev->name); in btsdio_interrupt()
184 data->hdev->stat.err_rx++; in btsdio_interrupt()
190 static int btsdio_open(struct hci_dev *hdev) in btsdio_open() argument
192 struct btsdio_data *data = hci_get_drvdata(hdev); in btsdio_open()
195 BT_DBG("%s", hdev->name); in btsdio_open()
197 if (test_and_set_bit(HCI_RUNNING, &hdev->flags)) in btsdio_open()
204 clear_bit(HCI_RUNNING, &hdev->flags); in btsdio_open()
211 clear_bit(HCI_RUNNING, &hdev->flags); in btsdio_open()
226 static int btsdio_close(struct hci_dev *hdev) in btsdio_close() argument
228 struct btsdio_data *data = hci_get_drvdata(hdev); in btsdio_close()
230 BT_DBG("%s", hdev->name); in btsdio_close()
232 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) in btsdio_close()
247 static int btsdio_flush(struct hci_dev *hdev) in btsdio_flush() argument
249 struct btsdio_data *data = hci_get_drvdata(hdev); in btsdio_flush()
251 BT_DBG("%s", hdev->name); in btsdio_flush()
258 static int btsdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb) in btsdio_send_frame() argument
260 struct btsdio_data *data = hci_get_drvdata(hdev); in btsdio_send_frame()
262 BT_DBG("%s", hdev->name); in btsdio_send_frame()
264 if (!test_bit(HCI_RUNNING, &hdev->flags)) in btsdio_send_frame()
269 hdev->stat.cmd_tx++; in btsdio_send_frame()
273 hdev->stat.acl_tx++; in btsdio_send_frame()
277 hdev->stat.sco_tx++; in btsdio_send_frame()
295 struct hci_dev *hdev; in btsdio_probe() local
316 hdev = hci_alloc_dev(); in btsdio_probe()
317 if (!hdev) in btsdio_probe()
320 hdev->bus = HCI_SDIO; in btsdio_probe()
321 hci_set_drvdata(hdev, data); in btsdio_probe()
324 hdev->dev_type = HCI_AMP; in btsdio_probe()
326 hdev->dev_type = HCI_BREDR; in btsdio_probe()
328 data->hdev = hdev; in btsdio_probe()
330 SET_HCIDEV_DEV(hdev, &func->dev); in btsdio_probe()
332 hdev->open = btsdio_open; in btsdio_probe()
333 hdev->close = btsdio_close; in btsdio_probe()
334 hdev->flush = btsdio_flush; in btsdio_probe()
335 hdev->send = btsdio_send_frame; in btsdio_probe()
338 set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks); in btsdio_probe()
340 err = hci_register_dev(hdev); in btsdio_probe()
342 hci_free_dev(hdev); in btsdio_probe()
354 struct hci_dev *hdev; in btsdio_remove() local
361 hdev = data->hdev; in btsdio_remove()
365 hci_unregister_dev(hdev); in btsdio_remove()
367 hci_free_dev(hdev); in btsdio_remove()