Lines Matching defs:hdev

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