Lines Matching refs:hdev
53 struct hci_dev *hdev; member
62 struct hci_dev *hdev = hst->hdev; in ti_st_tx_complete() local
67 hdev->stat.cmd_tx++; in ti_st_tx_complete()
71 hdev->stat.acl_tx++; in ti_st_tx_complete()
75 hdev->stat.sco_tx++; in ti_st_tx_complete()
112 err = hci_recv_frame(lhst->hdev, skb); in st_receive()
118 lhst->hdev->stat.byte_rx += skb->len; in st_receive()
150 static int ti_st_open(struct hci_dev *hdev) in ti_st_open() argument
156 BT_DBG("%s %p", hdev->name, hdev); in ti_st_open()
158 if (test_and_set_bit(HCI_RUNNING, &hdev->flags)) in ti_st_open()
162 hst = hci_get_drvdata(hdev); in ti_st_open()
184 clear_bit(HCI_RUNNING, &hdev->flags); in ti_st_open()
198 clear_bit(HCI_RUNNING, &hdev->flags); in ti_st_open()
208 clear_bit(HCI_RUNNING, &hdev->flags); in ti_st_open()
218 clear_bit(HCI_RUNNING, &hdev->flags); in ti_st_open()
234 static int ti_st_close(struct hci_dev *hdev) in ti_st_close() argument
237 struct ti_st *hst = hci_get_drvdata(hdev); in ti_st_close()
239 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) in ti_st_close()
254 static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb) in ti_st_send_frame() argument
259 if (!test_bit(HCI_RUNNING, &hdev->flags)) in ti_st_send_frame()
262 hst = hci_get_drvdata(hdev); in ti_st_send_frame()
267 BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, in ti_st_send_frame()
283 hdev->stat.byte_tx += len; in ti_st_send_frame()
292 struct hci_dev *hdev; in bt_ti_probe() local
300 hdev = hci_alloc_dev(); in bt_ti_probe()
301 if (!hdev) in bt_ti_probe()
304 BT_DBG("hdev %p", hdev); in bt_ti_probe()
306 hst->hdev = hdev; in bt_ti_probe()
307 hdev->bus = HCI_UART; in bt_ti_probe()
308 hci_set_drvdata(hdev, hst); in bt_ti_probe()
309 hdev->open = ti_st_open; in bt_ti_probe()
310 hdev->close = ti_st_close; in bt_ti_probe()
311 hdev->flush = NULL; in bt_ti_probe()
312 hdev->send = ti_st_send_frame; in bt_ti_probe()
314 err = hci_register_dev(hdev); in bt_ti_probe()
317 hci_free_dev(hdev); in bt_ti_probe()
321 BT_DBG("HCI device registered (hdev %p)", hdev); in bt_ti_probe()
329 struct hci_dev *hdev; in bt_ti_remove() local
335 BT_DBG("%s", hst->hdev->name); in bt_ti_remove()
337 hdev = hst->hdev; in bt_ti_remove()
338 ti_st_close(hdev); in bt_ti_remove()
339 hci_unregister_dev(hdev); in bt_ti_remove()
341 hci_free_dev(hdev); in bt_ti_remove()