Lines Matching refs:hcon
118 static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) in sco_conn_add() argument
120 struct hci_dev *hdev = hcon->hdev; in sco_conn_add()
123 if ((conn = hcon->sco_data)) in sco_conn_add()
135 hcon->sco_data = conn; in sco_conn_add()
136 conn->hcon = hcon; in sco_conn_add()
139 conn->dst = &hcon->dst; in sco_conn_add()
146 BT_DBG("hcon %p conn %p", hcon, conn); in sco_conn_add()
161 static int sco_conn_del(struct hci_conn *hcon, int err) in sco_conn_del() argument
166 if (!(conn = hcon->sco_data)) in sco_conn_del()
169 BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); in sco_conn_del()
180 hcon->sco_data = NULL; in sco_conn_del()
206 struct hci_conn *hcon; in sco_connect() local
219 hcon = hci_connect(hdev, SCO_LINK, dst); in sco_connect()
220 if (!hcon) in sco_connect()
223 conn = sco_conn_add(hcon, 0); in sco_connect()
225 hci_conn_put(hcon); in sco_connect()
236 if (hcon->state == BT_CONNECTED) { in sco_connect()
270 if ((err = hci_send_sco(conn->hcon, skb)) < 0) in sco_send_frame()
718 cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle; in sco_sock_getsockopt()
783 hci_conn_put(conn->hcon); in sco_chan_del()
825 hci_conn_hold(conn->hcon); in sco_conn_ready()
849 int sco_connect_cfm(struct hci_conn *hcon, __u8 status) in sco_connect_cfm() argument
851 BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); in sco_connect_cfm()
853 if (hcon->type != SCO_LINK) in sco_connect_cfm()
859 conn = sco_conn_add(hcon, status); in sco_connect_cfm()
863 sco_conn_del(hcon, bterr(status)); in sco_connect_cfm()
868 int sco_disconn_ind(struct hci_conn *hcon, __u8 reason) in sco_disconn_ind() argument
870 BT_DBG("hcon %p reason %d", hcon, reason); in sco_disconn_ind()
872 if (hcon->type != SCO_LINK) in sco_disconn_ind()
875 sco_conn_del(hcon, bterr(reason)); in sco_disconn_ind()
879 int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) in sco_recv_scodata() argument
881 struct sco_conn *conn = hcon->sco_data; in sco_recv_scodata()