Lines Matching refs:hdev

29 	struct hci_dev *hdev;  member
36 static int btqcomsmd_recv(struct hci_dev *hdev, unsigned int type, in btqcomsmd_recv() argument
44 hdev->stat.err_rx++; in btqcomsmd_recv()
51 return hci_recv_frame(hdev, skb); in btqcomsmd_recv()
59 btq->hdev->stat.byte_rx += count; in btqcomsmd_acl_callback()
60 return btqcomsmd_recv(btq->hdev, HCI_ACLDATA_PKT, data, count); in btqcomsmd_acl_callback()
68 btq->hdev->stat.byte_rx += count; in btqcomsmd_cmd_callback()
69 return btqcomsmd_recv(btq->hdev, HCI_EVENT_PKT, data, count); in btqcomsmd_cmd_callback()
72 static int btqcomsmd_send(struct hci_dev *hdev, struct sk_buff *skb) in btqcomsmd_send() argument
74 struct btqcomsmd *btq = hci_get_drvdata(hdev); in btqcomsmd_send()
81 hdev->stat.err_tx++; in btqcomsmd_send()
84 hdev->stat.acl_tx++; in btqcomsmd_send()
85 hdev->stat.byte_tx += skb->len; in btqcomsmd_send()
90 hdev->stat.err_tx++; in btqcomsmd_send()
93 hdev->stat.cmd_tx++; in btqcomsmd_send()
94 hdev->stat.byte_tx += skb->len; in btqcomsmd_send()
107 static int btqcomsmd_open(struct hci_dev *hdev) in btqcomsmd_open() argument
112 static int btqcomsmd_close(struct hci_dev *hdev) in btqcomsmd_close() argument
117 static int btqcomsmd_setup(struct hci_dev *hdev) in btqcomsmd_setup() argument
119 struct btqcomsmd *btq = hci_get_drvdata(hdev); in btqcomsmd_setup()
123 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); in btqcomsmd_setup()
133 set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); in btqcomsmd_setup()
140 err = qca_set_bdaddr_rome(hdev, &btq->bdaddr); in btqcomsmd_setup()
142 set_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks); in btqcomsmd_setup()
152 struct hci_dev *hdev; in btqcomsmd_probe() local
181 hdev = hci_alloc_dev(); in btqcomsmd_probe()
182 if (!hdev) in btqcomsmd_probe()
185 hci_set_drvdata(hdev, btq); in btqcomsmd_probe()
186 btq->hdev = hdev; in btqcomsmd_probe()
187 SET_HCIDEV_DEV(hdev, &pdev->dev); in btqcomsmd_probe()
189 hdev->bus = HCI_SMD; in btqcomsmd_probe()
190 hdev->open = btqcomsmd_open; in btqcomsmd_probe()
191 hdev->close = btqcomsmd_close; in btqcomsmd_probe()
192 hdev->send = btqcomsmd_send; in btqcomsmd_probe()
193 hdev->setup = btqcomsmd_setup; in btqcomsmd_probe()
194 hdev->set_bdaddr = qca_set_bdaddr_rome; in btqcomsmd_probe()
196 ret = hci_register_dev(hdev); in btqcomsmd_probe()
198 hci_free_dev(hdev); in btqcomsmd_probe()
211 hci_unregister_dev(btq->hdev); in btqcomsmd_remove()
212 hci_free_dev(btq->hdev); in btqcomsmd_remove()