Lines Matching refs:conn

1545 		if (p->conn) {  in hci_pend_le_actions_clear()
1546 hci_conn_drop(p->conn); in hci_pend_le_actions_clear()
1547 hci_conn_put(p->conn); in hci_pend_le_actions_clear()
1548 p->conn = NULL; in hci_pend_le_actions_clear()
2210 static bool hci_persistent_key(struct hci_dev *hdev, struct hci_conn *conn, in hci_persistent_key() argument
2226 if (!conn) in hci_persistent_key()
2230 if (conn->type == LE_LINK) in hci_persistent_key()
2234 if (conn->auth_type > 0x01 && conn->remote_auth > 0x01) in hci_persistent_key()
2238 if (conn->auth_type == 0x02 || conn->auth_type == 0x03) in hci_persistent_key()
2242 if (conn->remote_auth == 0x02 || conn->remote_auth == 0x03) in hci_persistent_key()
2324 struct link_key *hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, in hci_add_link_key() argument
2336 old_key_type = conn ? conn->key_type : 0xff; in hci_add_link_key()
2349 (!conn || conn->remote_auth == 0xff) && old_key_type == 0xff) { in hci_add_link_key()
2351 if (conn) in hci_add_link_key()
2352 conn->key_type = type; in hci_add_link_key()
2365 *persistent = hci_persistent_key(hdev, conn, type, in hci_add_link_key()
2760 if (params->conn) { in hci_conn_params_free()
2761 hci_conn_drop(params->conn); in hci_conn_params_free()
2762 hci_conn_put(params->conn); in hci_conn_params_free()
3435 struct hci_conn *conn = chan->conn; in hci_queue_acl() local
3436 struct hci_dev *hdev = conn->hdev; in hci_queue_acl()
3446 hci_add_acl_hdr(skb, conn->handle, flags); in hci_queue_acl()
3483 hci_add_acl_hdr(skb, conn->handle, flags); in hci_queue_acl()
3496 struct hci_dev *hdev = chan->conn->hdev; in hci_send_acl()
3506 void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) in hci_send_sco() argument
3508 struct hci_dev *hdev = conn->hdev; in hci_send_sco()
3513 hdr.handle = cpu_to_le16(conn->handle); in hci_send_sco()
3522 skb_queue_tail(&conn->data_q, skb); in hci_send_sco()
3533 struct hci_conn *conn = NULL, *c; in hci_low_sent() local
3552 conn = c; in hci_low_sent()
3561 if (conn) { in hci_low_sent()
3564 switch (conn->type) { in hci_low_sent()
3585 BT_DBG("conn %p quote %d", conn, *quote); in hci_low_sent()
3586 return conn; in hci_low_sent()
3616 struct hci_conn *conn; in hci_chan_sent() local
3623 list_for_each_entry_rcu(conn, &h->list, list) { in hci_chan_sent()
3626 if (conn->type != type) in hci_chan_sent()
3629 if (conn->state != BT_CONNECTED && conn->state != BT_CONFIG) in hci_chan_sent()
3634 list_for_each_entry_rcu(tmp, &conn->chan_list, list) { in hci_chan_sent()
3652 if (conn->sent < min) { in hci_chan_sent()
3653 min = conn->sent; in hci_chan_sent()
3667 switch (chan->conn->type) { in hci_chan_sent()
3695 struct hci_conn *conn; in hci_prio_recalculate() local
3702 list_for_each_entry_rcu(conn, &h->list, list) { in hci_prio_recalculate()
3705 if (conn->type != type) in hci_prio_recalculate()
3708 if (conn->state != BT_CONNECTED && conn->state != BT_CONFIG) in hci_prio_recalculate()
3713 list_for_each_entry_rcu(chan, &conn->chan_list, list) { in hci_prio_recalculate()
3781 hci_conn_enter_active_mode(chan->conn, in hci_sched_acl_pkt()
3789 chan->conn->sent++; in hci_sched_acl_pkt()
3833 hci_conn_enter_active_mode(chan->conn, in hci_sched_acl_blk()
3843 chan->conn->sent += blocks; in hci_sched_acl_blk()
3877 struct hci_conn *conn; in hci_sched_sco() local
3886 while (hdev->sco_cnt && (conn = hci_low_sent(hdev, SCO_LINK, &quote))) { in hci_sched_sco()
3887 while (quote-- && (skb = skb_dequeue(&conn->data_q))) { in hci_sched_sco()
3891 conn->sent++; in hci_sched_sco()
3892 if (conn->sent == ~0) in hci_sched_sco()
3893 conn->sent = 0; in hci_sched_sco()
3900 struct hci_conn *conn; in hci_sched_esco() local
3909 while (hdev->sco_cnt && (conn = hci_low_sent(hdev, ESCO_LINK, in hci_sched_esco()
3911 while (quote-- && (skb = skb_dequeue(&conn->data_q))) { in hci_sched_esco()
3915 conn->sent++; in hci_sched_esco()
3916 if (conn->sent == ~0) in hci_sched_esco()
3917 conn->sent = 0; in hci_sched_esco()
3960 chan->conn->sent++; in hci_sched_le()
4000 struct hci_conn *conn; in hci_acldata_packet() local
4015 conn = hci_conn_hash_lookup_handle(hdev, handle); in hci_acldata_packet()
4018 if (conn) { in hci_acldata_packet()
4019 hci_conn_enter_active_mode(conn, BT_POWER_FORCE_ACTIVE_OFF); in hci_acldata_packet()
4022 l2cap_recv_acldata(conn, skb, flags); in hci_acldata_packet()
4036 struct hci_conn *conn; in hci_scodata_packet() local
4048 conn = hci_conn_hash_lookup_handle(hdev, handle); in hci_scodata_packet()
4051 if (conn) { in hci_scodata_packet()
4053 sco_recv_scodata(conn, skb); in hci_scodata_packet()