Lines Matching refs:hcon
45 struct hci_conn *hcon; member
103 static struct sco_conn *sco_conn_add(struct hci_conn *hcon) in sco_conn_add() argument
105 struct hci_dev *hdev = hcon->hdev; in sco_conn_add()
106 struct sco_conn *conn = hcon->sco_data; in sco_conn_add()
117 hcon->sco_data = conn; in sco_conn_add()
118 conn->hcon = hcon; in sco_conn_add()
125 BT_DBG("hcon %p conn %p", hcon, conn); in sco_conn_add()
146 if (conn->hcon) in sco_chan_del()
147 hci_conn_drop(conn->hcon); in sco_chan_del()
157 static void sco_conn_del(struct hci_conn *hcon, int err) in sco_conn_del() argument
159 struct sco_conn *conn = hcon->sco_data; in sco_conn_del()
165 BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); in sco_conn_del()
182 hcon->sco_data = NULL; in sco_conn_del()
216 struct hci_conn *hcon; in sco_connect() local
239 hcon = hci_connect_sco(hdev, type, &sco_pi(sk)->dst, in sco_connect()
241 if (IS_ERR(hcon)) { in sco_connect()
242 err = PTR_ERR(hcon); in sco_connect()
246 conn = sco_conn_add(hcon); in sco_connect()
248 hci_conn_drop(hcon); in sco_connect()
254 bacpy(&sco_pi(sk)->src, &hcon->src); in sco_connect()
260 if (hcon->state == BT_CONNECTED) { in sco_connect()
295 hci_send_sco(conn->hcon, skb); in sco_send_frame()
417 if (sco_pi(sk)->conn->hcon) { in __sco_sock_close()
421 hci_conn_drop(sco_pi(sk)->conn->hcon); in __sco_sock_close()
422 sco_pi(sk)->conn->hcon = NULL; in __sco_sock_close()
782 sco_conn_defer_accept(pi->conn->hcon, pi->setting); in sco_sock_recvmsg()
902 cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle; in sco_sock_getsockopt_old()
903 memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3); in sco_sock_getsockopt_old()
1039 if (!conn->hcon) { in sco_conn_ready()
1044 parent = sco_get_sock_listen(&conn->hcon->src); in sco_conn_ready()
1062 bacpy(&sco_pi(sk)->src, &conn->hcon->src); in sco_conn_ready()
1063 bacpy(&sco_pi(sk)->dst, &conn->hcon->dst); in sco_conn_ready()
1065 hci_conn_hold(conn->hcon); in sco_conn_ready()
1110 static void sco_connect_cfm(struct hci_conn *hcon, __u8 status) in sco_connect_cfm() argument
1112 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) in sco_connect_cfm()
1115 BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status); in sco_connect_cfm()
1120 conn = sco_conn_add(hcon); in sco_connect_cfm()
1124 sco_conn_del(hcon, bt_to_errno(status)); in sco_connect_cfm()
1127 static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) in sco_disconn_cfm() argument
1129 if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) in sco_disconn_cfm()
1132 BT_DBG("hcon %p reason %d", hcon, reason); in sco_disconn_cfm()
1134 sco_conn_del(hcon, bt_to_errno(reason)); in sco_disconn_cfm()
1137 void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) in sco_recv_scodata() argument
1139 struct sco_conn *conn = hcon->sco_data; in sco_recv_scodata()