Lines Matching refs:hdev
21 struct hci_dev *hdev; member
27 static int btqcomsmd_recv(struct hci_dev *hdev, unsigned int type, in btqcomsmd_recv() argument
35 hdev->stat.err_rx++; in btqcomsmd_recv()
42 return hci_recv_frame(hdev, skb); in btqcomsmd_recv()
50 btq->hdev->stat.byte_rx += count; in btqcomsmd_acl_callback()
51 return btqcomsmd_recv(btq->hdev, HCI_ACLDATA_PKT, data, count); in btqcomsmd_acl_callback()
59 btq->hdev->stat.byte_rx += count; in btqcomsmd_cmd_callback()
60 return btqcomsmd_recv(btq->hdev, HCI_EVENT_PKT, data, count); in btqcomsmd_cmd_callback()
63 static int btqcomsmd_send(struct hci_dev *hdev, struct sk_buff *skb) in btqcomsmd_send() argument
65 struct btqcomsmd *btq = hci_get_drvdata(hdev); in btqcomsmd_send()
72 hdev->stat.err_tx++; in btqcomsmd_send()
75 hdev->stat.acl_tx++; in btqcomsmd_send()
76 hdev->stat.byte_tx += skb->len; in btqcomsmd_send()
81 hdev->stat.err_tx++; in btqcomsmd_send()
84 hdev->stat.cmd_tx++; in btqcomsmd_send()
85 hdev->stat.byte_tx += skb->len; in btqcomsmd_send()
98 static int btqcomsmd_open(struct hci_dev *hdev) in btqcomsmd_open() argument
103 static int btqcomsmd_close(struct hci_dev *hdev) in btqcomsmd_close() argument
108 static int btqcomsmd_setup(struct hci_dev *hdev) in btqcomsmd_setup() argument
112 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); in btqcomsmd_setup()
120 hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_PROPERTY); in btqcomsmd_setup()
125 static int btqcomsmd_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) in btqcomsmd_set_bdaddr() argument
129 ret = qca_set_bdaddr_rome(hdev, bdaddr); in btqcomsmd_set_bdaddr()
143 struct hci_dev *hdev; in btqcomsmd_probe() local
165 hdev = hci_alloc_dev(); in btqcomsmd_probe()
166 if (!hdev) { in btqcomsmd_probe()
171 hci_set_drvdata(hdev, btq); in btqcomsmd_probe()
172 btq->hdev = hdev; in btqcomsmd_probe()
173 SET_HCIDEV_DEV(hdev, &pdev->dev); in btqcomsmd_probe()
175 hdev->bus = HCI_SMD; in btqcomsmd_probe()
176 hdev->open = btqcomsmd_open; in btqcomsmd_probe()
177 hdev->close = btqcomsmd_close; in btqcomsmd_probe()
178 hdev->send = btqcomsmd_send; in btqcomsmd_probe()
179 hdev->setup = btqcomsmd_setup; in btqcomsmd_probe()
180 hdev->set_bdaddr = btqcomsmd_set_bdaddr; in btqcomsmd_probe()
182 ret = hci_register_dev(hdev); in btqcomsmd_probe()
191 hci_free_dev(hdev); in btqcomsmd_probe()
204 hci_unregister_dev(btq->hdev); in btqcomsmd_remove()
205 hci_free_dev(btq->hdev); in btqcomsmd_remove()