Lines Matching refs:hcon

46 	struct hci_conn	*hcon;  member
123 static struct sco_conn *sco_conn_add(struct hci_conn *hcon) in sco_conn_add() argument
125 struct hci_dev *hdev = hcon->hdev; in sco_conn_add()
126 struct sco_conn *conn = hcon->sco_data; in sco_conn_add()
129 if (!conn->hcon) in sco_conn_add()
130 conn->hcon = hcon; in sco_conn_add()
141 hcon->sco_data = conn; in sco_conn_add()
142 conn->hcon = hcon; in sco_conn_add()
149 BT_DBG("hcon %p conn %p", hcon, conn); in sco_conn_add()
170 if (conn->hcon) in sco_chan_del()
171 hci_conn_drop(conn->hcon); in sco_chan_del()
181 static void sco_conn_del(struct hci_conn *hcon, int err) in sco_conn_del() argument
183 struct sco_conn *conn = hcon->sco_data; in sco_conn_del()
189 BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); in sco_conn_del()
209 hcon->sco_data = NULL; in sco_conn_del()
243 struct hci_conn *hcon; in sco_connect() local
266 hcon = hci_connect_sco(hdev, type, &sco_pi(sk)->dst, in sco_connect()
268 if (IS_ERR(hcon)) { in sco_connect()
269 err = PTR_ERR(hcon); in sco_connect()
273 conn = sco_conn_add(hcon); in sco_connect()
275 hci_conn_drop(hcon); in sco_connect()
289 bacpy(&sco_pi(sk)->src, &hcon->src); in sco_connect()
291 if (hcon->state == BT_CONNECTED) { in sco_connect()
318 hci_send_sco(conn->hcon, skb); in sco_send_frame()
440 if (sco_pi(sk)->conn->hcon) { in __sco_sock_close()
444 hci_conn_drop(sco_pi(sk)->conn->hcon); in __sco_sock_close()
445 sco_pi(sk)->conn->hcon = NULL; in __sco_sock_close()
810 sco_conn_defer_accept(pi->conn->hcon, pi->setting); in sco_sock_recvmsg()
1006 cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle; in sco_sock_getsockopt_old()
1007 memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3); in sco_sock_getsockopt_old()
1077 phys = hci_conn_get_phy(sco_pi(sk)->conn->hcon); in sco_sock_getsockopt()
1276 if (!conn->hcon) { in sco_conn_ready()
1281 parent = sco_get_sock_listen(&conn->hcon->src); in sco_conn_ready()
1299 bacpy(&sco_pi(sk)->src, &conn->hcon->src); in sco_conn_ready()
1300 bacpy(&sco_pi(sk)->dst, &conn->hcon->dst); in sco_conn_ready()
1302 hci_conn_hold(conn->hcon); in sco_conn_ready()
1347 static void sco_connect_cfm(struct hci_conn *hcon, __u8 status) in sco_connect_cfm() argument
1349 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) in sco_connect_cfm()
1352 BT_DBG("hcon %p bdaddr %pMR status %u", hcon, &hcon->dst, status); in sco_connect_cfm()
1357 conn = sco_conn_add(hcon); in sco_connect_cfm()
1361 sco_conn_del(hcon, bt_to_errno(status)); in sco_connect_cfm()
1364 static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) in sco_disconn_cfm() argument
1366 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) in sco_disconn_cfm()
1369 BT_DBG("hcon %p reason %d", hcon, reason); in sco_disconn_cfm()
1371 sco_conn_del(hcon, bt_to_errno(reason)); in sco_disconn_cfm()
1374 void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) in sco_recv_scodata() argument
1376 struct sco_conn *conn = hcon->sco_data; in sco_recv_scodata()