Lines Matching refs:hdev
45 * @hdev: hci device pointer which binds to bt driver
53 struct hci_dev *hdev;
62 struct hci_dev *hdev = hst->hdev;
67 hdev->stat.cmd_tx++;
71 hdev->stat.acl_tx++;
75 hdev->stat.sco_tx++;
111 skb->dev = (void *) lhst->hdev;
120 lhst->hdev->stat.byte_rx += skb->len;
152 static int ti_st_open(struct hci_dev *hdev)
158 BT_DBG("%s %p", hdev->name, hdev);
160 if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
164 hst = hci_get_drvdata(hdev);
186 clear_bit(HCI_RUNNING, &hdev->flags);
200 clear_bit(HCI_RUNNING, &hdev->flags);
210 clear_bit(HCI_RUNNING, &hdev->flags);
220 clear_bit(HCI_RUNNING, &hdev->flags);
236 static int ti_st_close(struct hci_dev *hdev)
239 struct ti_st *hst = hci_get_drvdata(hdev);
241 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
258 struct hci_dev *hdev;
262 hdev = (struct hci_dev *)skb->dev;
264 if (!test_bit(HCI_RUNNING, &hdev->flags))
267 hst = hci_get_drvdata(hdev);
272 BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type,
288 hdev->stat.byte_tx += len;
297 struct hci_dev *hdev;
305 hdev = hci_alloc_dev();
306 if (!hdev) {
311 BT_DBG("hdev %p", hdev);
313 hst->hdev = hdev;
314 hdev->bus = HCI_UART;
315 hci_set_drvdata(hdev, hst);
316 hdev->open = ti_st_open;
317 hdev->close = ti_st_close;
318 hdev->flush = NULL;
319 hdev->send = ti_st_send_frame;
321 err = hci_register_dev(hdev);
325 hci_free_dev(hdev);
329 BT_DBG("HCI device registered (hdev %p)", hdev);
337 struct hci_dev *hdev;
343 BT_DBG("%s", hst->hdev->name);
345 hdev = hst->hdev;
346 ti_st_close(hdev);
347 hci_unregister_dev(hdev);
349 hci_free_dev(hdev);