Lines Matching refs:btq

48 	struct btqcomsmd *btq = priv;  in btqcomsmd_acl_callback()  local
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()
57 struct btqcomsmd *btq = priv; in btqcomsmd_cmd_callback() local
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()
65 struct btqcomsmd *btq = hci_get_drvdata(hdev); in btqcomsmd_send() local
70 ret = rpmsg_send(btq->acl_channel, skb->data, skb->len); in btqcomsmd_send()
79 ret = rpmsg_send(btq->cmd_channel, skb->data, skb->len); in btqcomsmd_send()
142 struct btqcomsmd *btq; in btqcomsmd_probe() local
147 btq = devm_kzalloc(&pdev->dev, sizeof(*btq), GFP_KERNEL); in btqcomsmd_probe()
148 if (!btq) in btqcomsmd_probe()
153 btq->acl_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_ACL", in btqcomsmd_probe()
154 btqcomsmd_acl_callback, btq); in btqcomsmd_probe()
155 if (IS_ERR(btq->acl_channel)) in btqcomsmd_probe()
156 return PTR_ERR(btq->acl_channel); in btqcomsmd_probe()
158 btq->cmd_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_CMD", in btqcomsmd_probe()
159 btqcomsmd_cmd_callback, btq); in btqcomsmd_probe()
160 if (IS_ERR(btq->cmd_channel)) { in btqcomsmd_probe()
161 ret = PTR_ERR(btq->cmd_channel); in btqcomsmd_probe()
171 hci_set_drvdata(hdev, btq); in btqcomsmd_probe()
172 btq->hdev = hdev; in btqcomsmd_probe()
186 platform_set_drvdata(pdev, btq); in btqcomsmd_probe()
193 rpmsg_destroy_ept(btq->cmd_channel); in btqcomsmd_probe()
195 rpmsg_destroy_ept(btq->acl_channel); in btqcomsmd_probe()
202 struct btqcomsmd *btq = platform_get_drvdata(pdev); in btqcomsmd_remove() local
204 hci_unregister_dev(btq->hdev); in btqcomsmd_remove()
205 hci_free_dev(btq->hdev); in btqcomsmd_remove()
207 rpmsg_destroy_ept(btq->cmd_channel); in btqcomsmd_remove()
208 rpmsg_destroy_ept(btq->acl_channel); in btqcomsmd_remove()