hcon 592 include/net/bluetooth/hci_core.h int l2cap_disconn_ind(struct hci_conn *hcon); hcon 593 include/net/bluetooth/hci_core.h void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags); hcon 597 include/net/bluetooth/hci_core.h void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb); hcon 605 include/net/bluetooth/hci_core.h static inline void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) hcon 629 include/net/bluetooth/l2cap.h struct hci_conn *hcon; hcon 252 net/bluetooth/6lowpan.c if (conn->hcon->hdev == entry->hdev) { hcon 625 net/bluetooth/6lowpan.c static bool is_bt_6lowpan(struct hci_conn *hcon) hcon 627 net/bluetooth/6lowpan.c if (hcon->type != LE_LINK) hcon 698 net/bluetooth/6lowpan.c SET_NETDEV_DEV(netdev, &chan->conn->hcon->hdev->dev); hcon 703 net/bluetooth/6lowpan.c (*dev)->hdev = chan->conn->hcon->hdev; hcon 792 net/bluetooth/6lowpan.c if (chan->conn && chan->conn->hcon) { hcon 793 net/bluetooth/6lowpan.c if (!is_bt_6lowpan(chan->conn->hcon)) hcon 984 net/bluetooth/6lowpan.c struct hci_conn *hcon; hcon 1002 net/bluetooth/6lowpan.c hcon = hci_conn_hash_lookup_le(hdev, addr, *addr_type); hcon 1005 net/bluetooth/6lowpan.c if (!hcon) hcon 1008 net/bluetooth/6lowpan.c *conn = (struct l2cap_conn *)hcon->l2cap_data; hcon 1010 net/bluetooth/6lowpan.c BT_DBG("conn %p dst %pMR type %d", *conn, &hcon->dst, hcon->dst_type); hcon 1139 net/bluetooth/6lowpan.c if (!is_bt_6lowpan(conn->hcon)) hcon 1149 net/bluetooth/6lowpan.c &conn->hcon->dst, conn->hcon->dst_type, hcon 409 net/bluetooth/a2mp.c struct hci_conn *hcon; hcon 447 net/bluetooth/a2mp.c hcon = phylink_add(hdev, mgr, rsp->id, true); hcon 448 net/bluetooth/a2mp.c if (!hcon) hcon 451 net/bluetooth/a2mp.c BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); hcon 455 net/bluetooth/a2mp.c amp_create_phylink(hdev, mgr, hcon); hcon 470 net/bluetooth/a2mp.c struct hci_conn *hcon; hcon 516 net/bluetooth/a2mp.c hcon = phylink_add(hdev, mgr, req->local_id, false); hcon 517 net/bluetooth/a2mp.c if (hcon) { hcon 518 net/bluetooth/a2mp.c amp_accept_phylink(hdev, mgr, hcon); hcon 549 net/bluetooth/a2mp.c struct hci_conn *hcon; hcon 566 net/bluetooth/a2mp.c hcon = hci_conn_hash_lookup_ba(hdev, AMP_LINK, hcon 567 net/bluetooth/a2mp.c &mgr->l2cap_conn->hcon->dst); hcon 568 net/bluetooth/a2mp.c if (!hcon) { hcon 856 net/bluetooth/a2mp.c conn->hcon->amp_mgr = mgr; hcon 876 net/bluetooth/a2mp.c if (conn->hcon->type != ACL_LINK) hcon 1017 net/bluetooth/a2mp.c struct amp_mgr *mgr = conn->hcon->amp_mgr; hcon 108 net/bluetooth/amp.c bdaddr_t *dst = &mgr->l2cap_conn->hcon->dst; hcon 109 net/bluetooth/amp.c struct hci_conn *hcon; hcon 112 net/bluetooth/amp.c hcon = hci_conn_add(hdev, AMP_LINK, dst, role); hcon 113 net/bluetooth/amp.c if (!hcon) hcon 116 net/bluetooth/amp.c BT_DBG("hcon %p dst %pMR", hcon, dst); hcon 118 net/bluetooth/amp.c hcon->state = BT_CONNECT; hcon 119 net/bluetooth/amp.c hcon->attempt++; hcon 120 net/bluetooth/amp.c hcon->handle = __next_handle(mgr); hcon 121 net/bluetooth/amp.c hcon->remote_id = remote_id; hcon 122 net/bluetooth/amp.c hcon->amp_mgr = amp_mgr_get(mgr); hcon 124 net/bluetooth/amp.c return hcon; hcon 293 net/bluetooth/amp.c struct hci_conn *hcon) hcon 296 net/bluetooth/amp.c struct amp_mgr *mgr = hcon->amp_mgr; hcon 300 net/bluetooth/amp.c cp.phy_handle = hcon->handle; hcon 330 net/bluetooth/amp.c struct hci_conn *hcon) hcon 333 net/bluetooth/amp.c struct amp_mgr *mgr = hcon->amp_mgr; hcon 338 net/bluetooth/amp.c ctrl = amp_ctrl_lookup(mgr, hcon->remote_id); hcon 361 net/bluetooth/amp.c hcon, ctrl, frag_len, ctrl->assoc_len, ctrl->assoc_rem_len); hcon 363 net/bluetooth/amp.c cp->phy_handle = hcon->handle; hcon 384 net/bluetooth/amp.c struct hci_conn *hcon; hcon 388 net/bluetooth/amp.c hcon = hci_conn_hash_lookup_handle(hdev, handle); hcon 389 net/bluetooth/amp.c if (!hcon) hcon 393 net/bluetooth/amp.c if (amp_write_rem_assoc_frag(hdev, hcon)) hcon 399 net/bluetooth/amp.c struct hci_conn *hcon; hcon 403 net/bluetooth/amp.c hcon = hci_conn_hash_lookup_handle(hdev, handle); hcon 404 net/bluetooth/amp.c if (!hcon) hcon 407 net/bluetooth/amp.c BT_DBG("%s phy handle 0x%2.2x hcon %p", hdev->name, handle, hcon); hcon 409 net/bluetooth/amp.c amp_write_rem_assoc_frag(hdev, hcon); hcon 426 net/bluetooth/amp.c struct hci_conn *hcon; hcon 428 net/bluetooth/amp.c hcon = hci_conn_hash_lookup_handle(hdev, cp->phy_handle); hcon 429 net/bluetooth/amp.c if (hcon) hcon 430 net/bluetooth/amp.c hci_conn_del(hcon); hcon 439 net/bluetooth/amp.c struct hci_conn *hcon) hcon 444 net/bluetooth/amp.c cp.phy_handle = hcon->handle; hcon 446 net/bluetooth/amp.c BT_DBG("%s hcon %p phy handle 0x%2.2x", hdev->name, hcon, hcon 447 net/bluetooth/amp.c hcon->handle); hcon 449 net/bluetooth/amp.c if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, hcon 478 net/bluetooth/amp.c struct hci_conn *hcon) hcon 483 net/bluetooth/amp.c cp.phy_handle = hcon->handle; hcon 485 net/bluetooth/amp.c BT_DBG("%s hcon %p phy handle 0x%2.2x", hdev->name, hcon, hcon 486 net/bluetooth/amp.c hcon->handle); hcon 488 net/bluetooth/amp.c if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, hcon 534 net/bluetooth/amp.c &chan->conn->hcon->dst); hcon 571 net/bluetooth/amp.c struct hci_conn *hcon = hchan->conn; hcon 574 net/bluetooth/amp.c if (hcon->state != BT_CONNECTED) { hcon 580 net/bluetooth/amp.c hci_send_cmd(hcon->hdev, HCI_OP_DISCONN_LOGICAL_LINK, sizeof(cp), &cp); hcon 29 net/bluetooth/amp.h int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type); hcon 35 net/bluetooth/amp.h struct hci_conn *hcon); hcon 37 net/bluetooth/amp.h struct hci_conn *hcon); hcon 39 net/bluetooth/amp.h struct hci_conn *hcon); hcon 546 net/bluetooth/bnep/core.c if (!conn || !conn->hcon) hcon 549 net/bluetooth/bnep/core.c return &conn->hcon->dev; hcon 1697 net/bluetooth/hci_conn.c static struct hci_chan *__hci_chan_lookup_handle(struct hci_conn *hcon, hcon 1702 net/bluetooth/hci_conn.c list_for_each_entry(hchan, &hcon->chan_list, list) { hcon 1713 net/bluetooth/hci_conn.c struct hci_conn *hcon; hcon 1718 net/bluetooth/hci_conn.c list_for_each_entry_rcu(hcon, &h->list, list) { hcon 1719 net/bluetooth/hci_conn.c hchan = __hci_chan_lookup_handle(hcon, handle); hcon 4764 net/bluetooth/hci_event.c struct hci_conn *hcon; hcon 4770 net/bluetooth/hci_event.c hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); hcon 4771 net/bluetooth/hci_event.c if (!hcon) hcon 4774 net/bluetooth/hci_event.c amp_read_loc_assoc_final_data(hdev, hcon); hcon 4781 net/bluetooth/hci_event.c struct hci_conn *hcon, *bredr_hcon; hcon 4788 net/bluetooth/hci_event.c hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); hcon 4789 net/bluetooth/hci_event.c if (!hcon) { hcon 4795 net/bluetooth/hci_event.c hci_conn_del(hcon); hcon 4800 net/bluetooth/hci_event.c bredr_hcon = hcon->amp_mgr->l2cap_conn->hcon; hcon 4802 net/bluetooth/hci_event.c hcon->state = BT_CONNECTED; hcon 4803 net/bluetooth/hci_event.c bacpy(&hcon->dst, &bredr_hcon->dst); hcon 4805 net/bluetooth/hci_event.c hci_conn_hold(hcon); hcon 4806 net/bluetooth/hci_event.c hcon->disc_timeout = HCI_DISCONN_TIMEOUT; hcon 4807 net/bluetooth/hci_event.c hci_conn_drop(hcon); hcon 4809 net/bluetooth/hci_event.c hci_debugfs_create_conn(hcon); hcon 4810 net/bluetooth/hci_event.c hci_conn_add_sysfs(hcon); hcon 4812 net/bluetooth/hci_event.c amp_physical_cfm(bredr_hcon, hcon); hcon 4820 net/bluetooth/hci_event.c struct hci_conn *hcon; hcon 4828 net/bluetooth/hci_event.c hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); hcon 4829 net/bluetooth/hci_event.c if (!hcon) hcon 4833 net/bluetooth/hci_event.c hchan = hci_chan_create(hcon); hcon 4839 net/bluetooth/hci_event.c BT_DBG("hcon %p mgr %p hchan %p", hcon, hcon->amp_mgr, hchan); hcon 4841 net/bluetooth/hci_event.c mgr = hcon->amp_mgr; hcon 4849 net/bluetooth/hci_event.c hci_conn_hold(hcon); hcon 4883 net/bluetooth/hci_event.c struct hci_conn *hcon; hcon 4892 net/bluetooth/hci_event.c hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); hcon 4893 net/bluetooth/hci_event.c if (hcon) { hcon 4894 net/bluetooth/hci_event.c hcon->state = BT_CLOSED; hcon 4895 net/bluetooth/hci_event.c hci_conn_del(hcon); hcon 5649 net/bluetooth/hci_event.c struct hci_conn *hcon; hcon 5658 net/bluetooth/hci_event.c hcon = hci_conn_hash_lookup_handle(hdev, handle); hcon 5659 net/bluetooth/hci_event.c if (!hcon || hcon->state != BT_CONNECTED) hcon 5667 net/bluetooth/hci_event.c if (hcon->role == HCI_ROLE_MASTER) { hcon 5673 net/bluetooth/hci_event.c params = hci_conn_params_lookup(hdev, &hcon->dst, hcon 5674 net/bluetooth/hci_event.c hcon->dst_type); hcon 5687 net/bluetooth/hci_event.c mgmt_new_conn_param(hdev, &hcon->dst, hcon->dst_type, hcon 703 net/bluetooth/hidp/core.c input->dev.parent = &session->conn->hcon->dev; hcon 794 net/bluetooth/hidp/core.c hid->dev.parent = &session->conn->hcon->dev; hcon 76 net/bluetooth/l2cap_core.c static inline u8 bdaddr_src_type(struct hci_conn *hcon) hcon 78 net/bluetooth/l2cap_core.c return bdaddr_type(hcon->type, hcon->src_type); hcon 81 net/bluetooth/l2cap_core.c static inline u8 bdaddr_dst_type(struct hci_conn *hcon) hcon 83 net/bluetooth/l2cap_core.c return bdaddr_type(hcon->type, hcon->dst_type); hcon 253 net/bluetooth/l2cap_core.c if (conn->hcon->type == LE_LINK) hcon 548 net/bluetooth/l2cap_core.c if (conn->hcon->type == ACL_LINK) hcon 582 net/bluetooth/l2cap_core.c hci_conn_hold(conn->hcon); hcon 606 net/bluetooth/l2cap_core.c struct amp_mgr *mgr = conn->hcon->amp_mgr; hcon 620 net/bluetooth/l2cap_core.c hci_conn_drop(conn->hcon); hcon 669 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 676 net/bluetooth/l2cap_core.c bacpy(&chan->dst, &hcon->dst); hcon 677 net/bluetooth/l2cap_core.c chan->dst_type = bdaddr_dst_type(hcon); hcon 750 net/bluetooth/l2cap_core.c if (conn->hcon->type == ACL_LINK) hcon 752 net/bluetooth/l2cap_core.c else if (conn->hcon->type == LE_LINK) hcon 828 net/bluetooth/l2cap_core.c if (conn->hcon->type == LE_LINK) hcon 829 net/bluetooth/l2cap_core.c return smp_conn_security(conn->hcon, chan->sec_level); hcon 833 net/bluetooth/l2cap_core.c return hci_conn_security(conn->hcon, chan->sec_level, auth_type, hcon 872 net/bluetooth/l2cap_core.c if (lmp_no_flush_capable(conn->hcon->hdev) || hcon 873 net/bluetooth/l2cap_core.c conn->hcon->type == LE_LINK) hcon 892 net/bluetooth/l2cap_core.c struct hci_conn *hcon = chan->conn->hcon; hcon 911 net/bluetooth/l2cap_core.c if (hcon->type == LE_LINK || hcon 913 net/bluetooth/l2cap_core.c lmp_no_flush_capable(hcon->hdev))) hcon 1310 net/bluetooth/l2cap_core.c if (!smp_conn_security(conn->hcon, chan->sec_level)) hcon 1327 net/bluetooth/l2cap_core.c } else if (chan->conn->hcon->type == LE_LINK) { hcon 1352 net/bluetooth/l2cap_core.c static bool l2cap_check_enc_key_size(struct hci_conn *hcon) hcon 1363 net/bluetooth/l2cap_core.c return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon 1364 net/bluetooth/l2cap_core.c hcon->enc_key_size >= hcon->hdev->min_enc_key_size); hcon 1371 net/bluetooth/l2cap_core.c if (conn->hcon->type == LE_LINK) { hcon 1388 net/bluetooth/l2cap_core.c if (l2cap_check_enc_key_size(conn->hcon)) hcon 1470 net/bluetooth/l2cap_core.c if (l2cap_check_enc_key_size(conn->hcon)) hcon 1520 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 1521 net/bluetooth/l2cap_core.c struct hci_dev *hdev = hcon->hdev; hcon 1528 net/bluetooth/l2cap_core.c if (hcon->out) hcon 1529 net/bluetooth/l2cap_core.c smp_conn_security(hcon, hcon->pending_sec_level); hcon 1536 net/bluetooth/l2cap_core.c if (hcon->role == HCI_ROLE_SLAVE && hcon 1537 net/bluetooth/l2cap_core.c (hcon->le_conn_interval < hcon->le_conn_min_interval || hcon 1538 net/bluetooth/l2cap_core.c hcon->le_conn_interval > hcon->le_conn_max_interval)) { hcon 1541 net/bluetooth/l2cap_core.c req.min = cpu_to_le16(hcon->le_conn_min_interval); hcon 1542 net/bluetooth/l2cap_core.c req.max = cpu_to_le16(hcon->le_conn_max_interval); hcon 1543 net/bluetooth/l2cap_core.c req.latency = cpu_to_le16(hcon->le_conn_latency); hcon 1544 net/bluetooth/l2cap_core.c req.to_multiplier = cpu_to_le16(hcon->le_supv_timeout); hcon 1554 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 1558 net/bluetooth/l2cap_core.c if (hcon->type == ACL_LINK) hcon 1572 net/bluetooth/l2cap_core.c if (hcon->type == LE_LINK) { hcon 1586 net/bluetooth/l2cap_core.c if (hcon->type == LE_LINK) hcon 1589 net/bluetooth/l2cap_core.c queue_work(hcon->hdev->workqueue, &conn->pending_rx_work); hcon 1635 net/bluetooth/l2cap_core.c struct hci_dev *hdev = conn->hcon->hdev; hcon 1673 net/bluetooth/l2cap_core.c struct hci_dev *hdev = conn->hcon->hdev; hcon 1699 net/bluetooth/l2cap_core.c static void l2cap_conn_del(struct hci_conn *hcon, int err) hcon 1701 net/bluetooth/l2cap_core.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 1707 net/bluetooth/l2cap_core.c BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); hcon 1726 net/bluetooth/l2cap_core.c hcon->disc_timeout = 0; hcon 1750 net/bluetooth/l2cap_core.c hcon->l2cap_data = NULL; hcon 1759 net/bluetooth/l2cap_core.c hci_conn_put(conn->hcon); hcon 2946 net/bluetooth/l2cap_core.c if (conn->hcon->type == LE_LINK) hcon 3851 net/bluetooth/l2cap_core.c pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, hcon 3852 net/bluetooth/l2cap_core.c &conn->hcon->dst, ACL_LINK); hcon 3863 net/bluetooth/l2cap_core.c !hci_conn_check_link_mode(conn->hcon)) { hcon 3892 net/bluetooth/l2cap_core.c conn->hcon->disc_timeout = HCI_DISCONN_TIMEOUT; hcon 3894 net/bluetooth/l2cap_core.c bacpy(&chan->src, &conn->hcon->src); hcon 3895 net/bluetooth/l2cap_core.c bacpy(&chan->dst, &conn->hcon->dst); hcon 3896 net/bluetooth/l2cap_core.c chan->src_type = bdaddr_src_type(conn->hcon); hcon 3897 net/bluetooth/l2cap_core.c chan->dst_type = bdaddr_dst_type(conn->hcon); hcon 3982 net/bluetooth/l2cap_core.c struct hci_dev *hdev = conn->hcon->hdev; hcon 3983 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 3990 net/bluetooth/l2cap_core.c !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &hcon->flags)) hcon 3991 net/bluetooth/l2cap_core.c mgmt_device_connected(hdev, hcon, 0, NULL, 0); hcon 4579 net/bluetooth/l2cap_core.c struct amp_mgr *mgr = conn->hcon->amp_mgr; hcon 4583 net/bluetooth/l2cap_core.c &conn->hcon->dst); hcon 5026 net/bluetooth/l2cap_core.c bacmp(&conn->hcon->src, &conn->hcon->dst) > 0) { hcon 5283 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 5289 net/bluetooth/l2cap_core.c if (hcon->role != HCI_ROLE_MASTER) hcon 5318 net/bluetooth/l2cap_core.c store_hint = hci_le_conn_update(hcon, min, max, latency, hcon 5320 net/bluetooth/l2cap_core.c mgmt_new_conn_param(hcon->hdev, &hcon->dst, hcon->dst_type, hcon 5334 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 5388 net/bluetooth/l2cap_core.c if (hcon->sec_level > BT_SECURITY_MEDIUM) { hcon 5393 net/bluetooth/l2cap_core.c sec_level = hcon->sec_level + 1; hcon 5400 net/bluetooth/l2cap_core.c smp_conn_security(hcon, chan->sec_level); hcon 5524 net/bluetooth/l2cap_core.c pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, hcon 5525 net/bluetooth/l2cap_core.c &conn->hcon->dst, LE_LINK); hcon 5535 net/bluetooth/l2cap_core.c if (!smp_sufficient_security(conn->hcon, pchan->sec_level, hcon 5562 net/bluetooth/l2cap_core.c bacpy(&chan->src, &conn->hcon->src); hcon 5563 net/bluetooth/l2cap_core.c bacpy(&chan->dst, &conn->hcon->dst); hcon 5564 net/bluetooth/l2cap_core.c chan->src_type = bdaddr_src_type(conn->hcon); hcon 5565 net/bluetooth/l2cap_core.c chan->dst_type = bdaddr_dst_type(conn->hcon); hcon 5743 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 5748 net/bluetooth/l2cap_core.c if (hcon->type != LE_LINK) hcon 5784 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 5792 net/bluetooth/l2cap_core.c if (hcon->type != ACL_LINK) hcon 6507 net/bluetooth/l2cap_core.c chan->conn->mtu = chan->conn->hcon->hdev->acl_mtu; hcon 6578 net/bluetooth/l2cap_core.c chan->conn->mtu = chan->conn->hcon->hdev->acl_mtu; hcon 6981 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 6984 net/bluetooth/l2cap_core.c if (hcon->type != ACL_LINK) hcon 6987 net/bluetooth/l2cap_core.c chan = l2cap_global_chan_by_psm(0, psm, &hcon->src, &hcon->dst, hcon 7001 net/bluetooth/l2cap_core.c bacpy(&bt_cb(skb)->l2cap.bdaddr, &hcon->dst); hcon 7018 net/bluetooth/l2cap_core.c struct hci_conn *hcon = conn->hcon; hcon 7022 net/bluetooth/l2cap_core.c if (hcon->state != BT_CONNECTED) { hcon 7040 net/bluetooth/l2cap_core.c if (hcon->type == LE_LINK && hcon 7041 net/bluetooth/l2cap_core.c hci_bdaddr_list_lookup(&hcon->hdev->blacklist, &hcon->dst, hcon 7042 net/bluetooth/l2cap_core.c bdaddr_dst_type(hcon))) { hcon 7082 net/bluetooth/l2cap_core.c static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon) hcon 7084 net/bluetooth/l2cap_core.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 7090 net/bluetooth/l2cap_core.c hchan = hci_chan_create(hcon); hcon 7101 net/bluetooth/l2cap_core.c hcon->l2cap_data = conn; hcon 7102 net/bluetooth/l2cap_core.c conn->hcon = hci_conn_get(hcon); hcon 7105 net/bluetooth/l2cap_core.c BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan); hcon 7107 net/bluetooth/l2cap_core.c switch (hcon->type) { hcon 7109 net/bluetooth/l2cap_core.c if (hcon->hdev->le_mtu) { hcon 7110 net/bluetooth/l2cap_core.c conn->mtu = hcon->hdev->le_mtu; hcon 7115 net/bluetooth/l2cap_core.c conn->mtu = hcon->hdev->acl_mtu; hcon 7123 net/bluetooth/l2cap_core.c if (hcon->type == ACL_LINK && hcon 7124 net/bluetooth/l2cap_core.c hci_dev_test_flag(hcon->hdev, HCI_HS_ENABLED)) hcon 7127 net/bluetooth/l2cap_core.c if (hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED) && hcon 7128 net/bluetooth/l2cap_core.c (bredr_sc_enabled(hcon->hdev) || hcon 7129 net/bluetooth/l2cap_core.c hci_dev_test_flag(hcon->hdev, HCI_FORCE_BREDR_SMP))) hcon 7164 net/bluetooth/l2cap_core.c struct hci_conn *hcon; hcon 7247 net/bluetooth/l2cap_core.c hcon = hci_connect_le(hdev, dst, dst_type, hcon 7252 net/bluetooth/l2cap_core.c hcon = hci_connect_le_scan(hdev, dst, dst_type, hcon 7258 net/bluetooth/l2cap_core.c hcon = hci_connect_acl(hdev, dst, chan->sec_level, auth_type); hcon 7261 net/bluetooth/l2cap_core.c if (IS_ERR(hcon)) { hcon 7262 net/bluetooth/l2cap_core.c err = PTR_ERR(hcon); hcon 7266 net/bluetooth/l2cap_core.c conn = l2cap_conn_add(hcon); hcon 7268 net/bluetooth/l2cap_core.c hci_conn_drop(hcon); hcon 7277 net/bluetooth/l2cap_core.c hci_conn_drop(hcon); hcon 7283 net/bluetooth/l2cap_core.c bacpy(&chan->src, &hcon->src); hcon 7284 net/bluetooth/l2cap_core.c chan->src_type = bdaddr_src_type(hcon); hcon 7289 net/bluetooth/l2cap_core.c hci_conn_drop(hcon); hcon 7301 net/bluetooth/l2cap_core.c if (hcon->state == BT_CONNECTED) { hcon 7358 net/bluetooth/l2cap_core.c struct hci_conn *hcon) hcon 7360 net/bluetooth/l2cap_core.c u8 src_type = bdaddr_src_type(hcon); hcon 7374 net/bluetooth/l2cap_core.c if (bacmp(&c->src, &hcon->src) && bacmp(&c->src, BDADDR_ANY)) hcon 7389 net/bluetooth/l2cap_core.c static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status) hcon 7391 net/bluetooth/l2cap_core.c struct hci_dev *hdev = hcon->hdev; hcon 7396 net/bluetooth/l2cap_core.c if (hcon->type != ACL_LINK && hcon->type != LE_LINK) hcon 7399 net/bluetooth/l2cap_core.c BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status); hcon 7402 net/bluetooth/l2cap_core.c l2cap_conn_del(hcon, bt_to_errno(status)); hcon 7406 net/bluetooth/l2cap_core.c conn = l2cap_conn_add(hcon); hcon 7410 net/bluetooth/l2cap_core.c dst_type = bdaddr_dst_type(hcon); hcon 7413 net/bluetooth/l2cap_core.c if (hci_bdaddr_list_lookup(&hdev->blacklist, &hcon->dst, dst_type)) hcon 7421 net/bluetooth/l2cap_core.c pchan = l2cap_global_fixed_chan(NULL, hcon); hcon 7432 net/bluetooth/l2cap_core.c bacpy(&chan->src, &hcon->src); hcon 7433 net/bluetooth/l2cap_core.c bacpy(&chan->dst, &hcon->dst); hcon 7434 net/bluetooth/l2cap_core.c chan->src_type = bdaddr_src_type(hcon); hcon 7442 net/bluetooth/l2cap_core.c next = l2cap_global_fixed_chan(pchan, hcon); hcon 7450 net/bluetooth/l2cap_core.c int l2cap_disconn_ind(struct hci_conn *hcon) hcon 7452 net/bluetooth/l2cap_core.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 7454 net/bluetooth/l2cap_core.c BT_DBG("hcon %p", hcon); hcon 7461 net/bluetooth/l2cap_core.c static void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason) hcon 7463 net/bluetooth/l2cap_core.c if (hcon->type != ACL_LINK && hcon->type != LE_LINK) hcon 7466 net/bluetooth/l2cap_core.c BT_DBG("hcon %p reason %d", hcon, reason); hcon 7468 net/bluetooth/l2cap_core.c l2cap_conn_del(hcon, bt_to_errno(reason)); hcon 7488 net/bluetooth/l2cap_core.c static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) hcon 7490 net/bluetooth/l2cap_core.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 7512 net/bluetooth/l2cap_core.c chan->sec_level = hcon->sec_level; hcon 7528 net/bluetooth/l2cap_core.c if (!status && l2cap_check_enc_key_size(hcon)) hcon 7537 net/bluetooth/l2cap_core.c if (!status && l2cap_check_enc_key_size(hcon)) { hcon 7579 net/bluetooth/l2cap_core.c void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags) hcon 7581 net/bluetooth/l2cap_core.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 7586 net/bluetooth/l2cap_core.c if (!conn && hcon->hdev->dev_type != HCI_PRIMARY) hcon 7590 net/bluetooth/l2cap_core.c conn = l2cap_conn_add(hcon); hcon 477 net/bluetooth/l2cap_sock.c cinfo.hci_handle = chan->conn->hcon->handle; hcon 478 net/bluetooth/l2cap_sock.c memcpy(cinfo.dev_class, chan->conn->hcon->dev_class, 3); hcon 528 net/bluetooth/l2cap_sock.c sec.level = chan->conn->hcon->sec_level; hcon 531 net/bluetooth/l2cap_sock.c sec.key_size = chan->conn->hcon->enc_key_size; hcon 796 net/bluetooth/l2cap_sock.c if (smp_conn_security(conn->hcon, sec.level)) { hcon 853 net/bluetooth/l2cap_sock.c if (!conn || !lmp_no_flush_capable(conn->hcon->hdev)) { hcon 232 net/bluetooth/rfcomm/core.c return hci_conn_security(conn->hcon, d->sec_level, auth_type, hcon 1300 net/bluetooth/rfcomm/core.c hci_conn_switch_role(conn->hcon, 0x00); hcon 816 net/bluetooth/rfcomm/sock.c cinfo.hci_handle = conn->hcon->handle; hcon 817 net/bluetooth/rfcomm/sock.c memcpy(cinfo.dev_class, conn->hcon->dev_class, 3); hcon 46 net/bluetooth/sco.c struct hci_conn *hcon; hcon 104 net/bluetooth/sco.c static struct sco_conn *sco_conn_add(struct hci_conn *hcon) hcon 106 net/bluetooth/sco.c struct hci_dev *hdev = hcon->hdev; hcon 107 net/bluetooth/sco.c struct sco_conn *conn = hcon->sco_data; hcon 118 net/bluetooth/sco.c hcon->sco_data = conn; hcon 119 net/bluetooth/sco.c conn->hcon = hcon; hcon 126 net/bluetooth/sco.c BT_DBG("hcon %p conn %p", hcon, conn); hcon 147 net/bluetooth/sco.c if (conn->hcon) hcon 148 net/bluetooth/sco.c hci_conn_drop(conn->hcon); hcon 158 net/bluetooth/sco.c static void sco_conn_del(struct hci_conn *hcon, int err) hcon 160 net/bluetooth/sco.c struct sco_conn *conn = hcon->sco_data; hcon 166 net/bluetooth/sco.c BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); hcon 183 net/bluetooth/sco.c hcon->sco_data = NULL; hcon 217 net/bluetooth/sco.c struct hci_conn *hcon; hcon 240 net/bluetooth/sco.c hcon = hci_connect_sco(hdev, type, &sco_pi(sk)->dst, hcon 242 net/bluetooth/sco.c if (IS_ERR(hcon)) { hcon 243 net/bluetooth/sco.c err = PTR_ERR(hcon); hcon 247 net/bluetooth/sco.c conn = sco_conn_add(hcon); hcon 249 net/bluetooth/sco.c hci_conn_drop(hcon); hcon 255 net/bluetooth/sco.c bacpy(&sco_pi(sk)->src, &hcon->src); hcon 261 net/bluetooth/sco.c if (hcon->state == BT_CONNECTED) { hcon 296 net/bluetooth/sco.c hci_send_sco(conn->hcon, skb); hcon 419 net/bluetooth/sco.c if (sco_pi(sk)->conn->hcon) { hcon 423 net/bluetooth/sco.c hci_conn_drop(sco_pi(sk)->conn->hcon); hcon 424 net/bluetooth/sco.c sco_pi(sk)->conn->hcon = NULL; hcon 781 net/bluetooth/sco.c sco_conn_defer_accept(pi->conn->hcon, pi->setting); hcon 901 net/bluetooth/sco.c cinfo.hci_handle = sco_pi(sk)->conn->hcon->handle; hcon 902 net/bluetooth/sco.c memcpy(cinfo.dev_class, sco_pi(sk)->conn->hcon->dev_class, 3); hcon 1038 net/bluetooth/sco.c if (!conn->hcon) { hcon 1043 net/bluetooth/sco.c parent = sco_get_sock_listen(&conn->hcon->src); hcon 1061 net/bluetooth/sco.c bacpy(&sco_pi(sk)->src, &conn->hcon->src); hcon 1062 net/bluetooth/sco.c bacpy(&sco_pi(sk)->dst, &conn->hcon->dst); hcon 1064 net/bluetooth/sco.c hci_conn_hold(conn->hcon); hcon 1109 net/bluetooth/sco.c static void sco_connect_cfm(struct hci_conn *hcon, __u8 status) hcon 1111 net/bluetooth/sco.c if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) hcon 1114 net/bluetooth/sco.c BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status); hcon 1119 net/bluetooth/sco.c conn = sco_conn_add(hcon); hcon 1123 net/bluetooth/sco.c sco_conn_del(hcon, bt_to_errno(status)); hcon 1126 net/bluetooth/sco.c static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason) hcon 1128 net/bluetooth/sco.c if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK) hcon 1131 net/bluetooth/sco.c BT_DBG("hcon %p reason %d", hcon, reason); hcon 1133 net/bluetooth/sco.c sco_conn_del(hcon, bt_to_errno(reason)); hcon 1136 net/bluetooth/sco.c void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb) hcon 1138 net/bluetooth/sco.c struct sco_conn *conn = hcon->sco_data; hcon 663 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 664 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 691 net/bluetooth/smp.c if (hcon->dst_type == ADDR_LE_DEV_PUBLIC) hcon 696 net/bluetooth/smp.c oob_data = hci_find_remote_oob_data(hdev, &hcon->dst, hcon 712 net/bluetooth/smp.c req->io_capability = conn->hcon->io_capability; hcon 723 net/bluetooth/smp.c rsp->io_capability = conn->hcon->io_capability; hcon 736 net/bluetooth/smp.c struct hci_dev *hdev = conn->hcon->hdev; hcon 752 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 760 net/bluetooth/smp.c mgmt_smp_complete(hcon, complete); hcon 773 net/bluetooth/smp.c !hci_dev_test_flag(hcon->hdev, HCI_KEEP_DEBUG_KEYS)) { hcon 799 net/bluetooth/smp.c hci_conn_drop(hcon); hcon 804 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 811 net/bluetooth/smp.c mgmt_auth_failed(hcon, HCI_ERROR_AUTH_FAILURE); hcon 859 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 889 net/bluetooth/smp.c hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) hcon 907 net/bluetooth/smp.c if (hcon->pending_sec_level < BT_SECURITY_HIGH) hcon 908 net/bluetooth/smp.c hcon->pending_sec_level = BT_SECURITY_HIGH; hcon 915 net/bluetooth/smp.c if (hcon->role == HCI_ROLE_MASTER) hcon 932 net/bluetooth/smp.c ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, hcon 933 net/bluetooth/smp.c hcon->type, hcon->dst_type); hcon 935 net/bluetooth/smp.c ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon 936 net/bluetooth/smp.c hcon->type, hcon->dst_type, hcon 939 net/bluetooth/smp.c ret = mgmt_user_passkey_notify(hcon->hdev, &hcon->dst, hcon 940 net/bluetooth/smp.c hcon->type, hcon->dst_type, hcon 955 net/bluetooth/smp.c conn->hcon->init_addr_type, &conn->hcon->init_addr, hcon 956 net/bluetooth/smp.c conn->hcon->resp_addr_type, &conn->hcon->resp_addr, hcon 965 net/bluetooth/smp.c if (conn->hcon->out) hcon 976 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 980 net/bluetooth/smp.c BT_DBG("conn %p %s", conn, conn->hcon->out ? "master" : "slave"); hcon 983 net/bluetooth/smp.c hcon->init_addr_type, &hcon->init_addr, hcon 984 net/bluetooth/smp.c hcon->resp_addr_type, &hcon->resp_addr, confirm); hcon 989 net/bluetooth/smp.c bt_dev_err(hcon->hdev, "pairing failed " hcon 994 net/bluetooth/smp.c if (hcon->out) { hcon 1001 net/bluetooth/smp.c if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) hcon 1004 net/bluetooth/smp.c hci_le_start_enc(hcon, ediv, rand, stk, smp->enc_key_size); hcon 1005 net/bluetooth/smp.c hcon->enc_key_size = smp->enc_key_size; hcon 1006 net/bluetooth/smp.c set_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags); hcon 1017 net/bluetooth/smp.c if (hcon->pending_sec_level == BT_SECURITY_HIGH) hcon 1026 net/bluetooth/smp.c hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon 1037 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 1038 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 1043 net/bluetooth/smp.c if (hcon->type == ACL_LINK) { hcon 1044 net/bluetooth/smp.c if (hcon->key_type == HCI_LK_DEBUG_COMBINATION) hcon 1048 net/bluetooth/smp.c &hcon->flags); hcon 1065 net/bluetooth/smp.c if (hcon->type == LE_LINK) { hcon 1066 net/bluetooth/smp.c bacpy(&hcon->dst, &smp->remote_irk->bdaddr); hcon 1067 net/bluetooth/smp.c hcon->dst_type = smp->remote_irk->addr_type; hcon 1073 net/bluetooth/smp.c smp->csrk->bdaddr_type = hcon->dst_type; hcon 1074 net/bluetooth/smp.c bacpy(&smp->csrk->bdaddr, &hcon->dst); hcon 1079 net/bluetooth/smp.c smp->slave_csrk->bdaddr_type = hcon->dst_type; hcon 1080 net/bluetooth/smp.c bacpy(&smp->slave_csrk->bdaddr, &hcon->dst); hcon 1085 net/bluetooth/smp.c smp->ltk->bdaddr_type = hcon->dst_type; hcon 1086 net/bluetooth/smp.c bacpy(&smp->ltk->bdaddr, &hcon->dst); hcon 1091 net/bluetooth/smp.c smp->slave_ltk->bdaddr_type = hcon->dst_type; hcon 1092 net/bluetooth/smp.c bacpy(&smp->slave_ltk->bdaddr, &hcon->dst); hcon 1102 net/bluetooth/smp.c else if (hcon->sec_level == BT_SECURITY_FIPS) hcon 1107 net/bluetooth/smp.c key = hci_add_link_key(hdev, smp->conn->hcon, &hcon->dst, hcon 1126 net/bluetooth/smp.c struct hci_conn *hcon = smp->conn->hcon; hcon 1134 net/bluetooth/smp.c if (hcon->pending_sec_level == BT_SECURITY_FIPS) hcon 1139 net/bluetooth/smp.c smp->ltk = hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon 1198 net/bluetooth/smp.c struct hci_conn *hcon = smp->conn->hcon; hcon 1199 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 1202 net/bluetooth/smp.c key = hci_find_link_key(hdev, &hcon->dst); hcon 1235 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 1236 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 1244 net/bluetooth/smp.c if (hcon->out && (smp->remote_key_dist & KEY_DIST_MASK)) { hcon 1251 net/bluetooth/smp.c if (hcon->out) { hcon 1260 net/bluetooth/smp.c if (hcon->type == LE_LINK && (*keydist & SMP_DIST_LINK_KEY)) hcon 1262 net/bluetooth/smp.c if (hcon->type == ACL_LINK && (*keydist & SMP_DIST_ENC_KEY)) hcon 1292 net/bluetooth/smp.c authenticated = hcon->sec_level == BT_SECURITY_HIGH; hcon 1293 net/bluetooth/smp.c ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, hcon 1320 net/bluetooth/smp.c bacpy(&addrinfo.bdaddr, &hcon->src); hcon 1321 net/bluetooth/smp.c addrinfo.addr_type = hcon->src_type; hcon 1338 net/bluetooth/smp.c if (hcon->sec_level > BT_SECURITY_MEDIUM) hcon 1371 net/bluetooth/smp.c hci_disconnect(conn->hcon, HCI_ERROR_REMOTE_USER_TERM); hcon 1402 net/bluetooth/smp.c hci_conn_hold(conn->hcon); hcon 1415 net/bluetooth/smp.c struct hci_conn *hcon = smp->conn->hcon; hcon 1418 net/bluetooth/smp.c if (hcon->out) { hcon 1426 net/bluetooth/smp.c memcpy(a, &hcon->init_addr, 6); hcon 1427 net/bluetooth/smp.c memcpy(b, &hcon->resp_addr, 6); hcon 1428 net/bluetooth/smp.c a[6] = hcon->init_addr_type; hcon 1429 net/bluetooth/smp.c b[6] = hcon->resp_addr_type; hcon 1436 net/bluetooth/smp.c struct hci_conn *hcon = smp->conn->hcon; hcon 1441 net/bluetooth/smp.c memcpy(a, &hcon->init_addr, 6); hcon 1442 net/bluetooth/smp.c memcpy(b, &hcon->resp_addr, 6); hcon 1443 net/bluetooth/smp.c a[6] = hcon->init_addr_type; hcon 1444 net/bluetooth/smp.c b[6] = hcon->resp_addr_type; hcon 1446 net/bluetooth/smp.c if (hcon->out) { hcon 1459 net/bluetooth/smp.c put_unaligned_le32(hcon->passkey_notify, r); hcon 1473 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 1477 net/bluetooth/smp.c r = ((hcon->passkey_notify >> smp->passkey_round) & 0x01); hcon 1494 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 1495 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 1504 net/bluetooth/smp.c r = ((hcon->passkey_notify >> smp->passkey_round) & 0x01); hcon 1525 net/bluetooth/smp.c if (!hcon->out) { hcon 1553 net/bluetooth/smp.c if (hcon->out) { hcon 1564 net/bluetooth/smp.c if (!hcon->out) hcon 1581 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 1594 net/bluetooth/smp.c hcon->passkey_notify = le32_to_cpu(passkey); hcon 1609 net/bluetooth/smp.c if (hcon->out) { hcon 1620 net/bluetooth/smp.c int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey) hcon 1622 net/bluetooth/smp.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 1690 net/bluetooth/smp.c struct hci_dev *hdev = conn->hcon->hdev; hcon 1710 net/bluetooth/smp.c req->max_key_size = conn->hcon->enc_key_size; hcon 1720 net/bluetooth/smp.c rsp->max_key_size = conn->hcon->enc_key_size; hcon 1731 net/bluetooth/smp.c struct hci_dev *hdev = conn->hcon->hdev; hcon 1741 net/bluetooth/smp.c if (conn->hcon->role != HCI_ROLE_SLAVE) hcon 1774 net/bluetooth/smp.c if (conn->hcon->type == ACL_LINK) { hcon 1776 net/bluetooth/smp.c if (!test_bit(HCI_CONN_AES_CCM, &conn->hcon->flags) && hcon 1811 net/bluetooth/smp.c if (conn->hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) hcon 1816 net/bluetooth/smp.c if (sec_level > conn->hcon->pending_sec_level) hcon 1817 net/bluetooth/smp.c conn->hcon->pending_sec_level = sec_level; hcon 1820 net/bluetooth/smp.c if (conn->hcon->pending_sec_level >= BT_SECURITY_HIGH) { hcon 1823 net/bluetooth/smp.c method = get_auth_method(smp, conn->hcon->io_capability, hcon 1867 net/bluetooth/smp.c struct hci_dev *hdev = smp->conn->hcon->hdev; hcon 1923 net/bluetooth/smp.c struct hci_dev *hdev = conn->hcon->hdev; hcon 1932 net/bluetooth/smp.c if (conn->hcon->role != HCI_ROLE_MASTER) hcon 1967 net/bluetooth/smp.c if (conn->hcon->type == ACL_LINK) { hcon 1976 net/bluetooth/smp.c else if (conn->hcon->pending_sec_level > BT_SECURITY_HIGH) hcon 1977 net/bluetooth/smp.c conn->hcon->pending_sec_level = BT_SECURITY_HIGH; hcon 1980 net/bluetooth/smp.c if (conn->hcon->pending_sec_level >= BT_SECURITY_HIGH) { hcon 2027 net/bluetooth/smp.c if (conn->hcon->out) { hcon 2043 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2044 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 2049 net/bluetooth/smp.c if (hcon->out) hcon 2082 net/bluetooth/smp.c BT_DBG("conn %p %s", conn, conn->hcon->out ? "master" : "slave"); hcon 2104 net/bluetooth/smp.c if (conn->hcon->out) { hcon 2123 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2139 net/bluetooth/smp.c if (hcon->out) { hcon 2152 net/bluetooth/smp.c if (!hcon->out) hcon 2163 net/bluetooth/smp.c if (hcon->out) { hcon 2186 net/bluetooth/smp.c if (hcon->out) { hcon 2197 net/bluetooth/smp.c err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type, hcon 2198 net/bluetooth/smp.c hcon->dst_type, passkey, 0); hcon 2210 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2212 net/bluetooth/smp.c key = hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon->role); hcon 2219 net/bluetooth/smp.c if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) hcon 2222 net/bluetooth/smp.c hci_le_start_enc(hcon, key->ediv, key->rand, key->val, key->enc_size); hcon 2223 net/bluetooth/smp.c hcon->enc_key_size = key->enc_size; hcon 2226 net/bluetooth/smp.c clear_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags); hcon 2231 net/bluetooth/smp.c bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, hcon 2244 net/bluetooth/smp.c test_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags) && hcon 2245 net/bluetooth/smp.c hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon->role)) hcon 2248 net/bluetooth/smp.c if (hcon->sec_level >= sec_level) hcon 2258 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2259 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 2268 net/bluetooth/smp.c if (hcon->role != HCI_ROLE_MASTER) hcon 2276 net/bluetooth/smp.c if (hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) hcon 2281 net/bluetooth/smp.c if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) { hcon 2286 net/bluetooth/smp.c smp_ltk_encrypt(conn, hcon->sec_level); hcon 2290 net/bluetooth/smp.c if (sec_level > hcon->pending_sec_level) hcon 2291 net/bluetooth/smp.c hcon->pending_sec_level = sec_level; hcon 2293 net/bluetooth/smp.c if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) hcon 2318 net/bluetooth/smp.c int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) hcon 2320 net/bluetooth/smp.c struct l2cap_conn *conn = hcon->l2cap_data; hcon 2326 net/bluetooth/smp.c BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); hcon 2332 net/bluetooth/smp.c if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) hcon 2335 net/bluetooth/smp.c if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) hcon 2338 net/bluetooth/smp.c if (sec_level > hcon->pending_sec_level) hcon 2339 net/bluetooth/smp.c hcon->pending_sec_level = sec_level; hcon 2341 net/bluetooth/smp.c if (hcon->role == HCI_ROLE_MASTER) hcon 2342 net/bluetooth/smp.c if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) hcon 2347 net/bluetooth/smp.c bt_dev_err(hcon->hdev, "security requested but not available"); hcon 2367 net/bluetooth/smp.c if (hci_dev_test_flag(hcon->hdev, HCI_SC_ENABLED)) { hcon 2369 net/bluetooth/smp.c if (hci_dev_test_flag(hcon->hdev, HCI_SSP_ENABLED)) hcon 2376 net/bluetooth/smp.c if (hcon->io_capability != HCI_IO_NO_INPUT_OUTPUT || hcon 2377 net/bluetooth/smp.c hcon->pending_sec_level > BT_SECURITY_MEDIUM) hcon 2380 net/bluetooth/smp.c if (hcon->role == HCI_ROLE_MASTER) { hcon 2407 net/bluetooth/smp.c struct hci_conn *hcon; hcon 2416 net/bluetooth/smp.c hcon = hci_conn_hash_lookup_le(hdev, bdaddr, addr_type); hcon 2417 net/bluetooth/smp.c if (!hcon) hcon 2420 net/bluetooth/smp.c conn = hcon->l2cap_data; hcon 2476 net/bluetooth/smp.c struct hci_dev *hdev = conn->hcon->hdev; hcon 2477 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2496 net/bluetooth/smp.c authenticated = (hcon->sec_level == BT_SECURITY_HIGH); hcon 2497 net/bluetooth/smp.c ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, SMP_LTK, hcon 2533 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2561 net/bluetooth/smp.c bt_dev_err(hcon->hdev, "ignoring IRK with no identity address"); hcon 2570 net/bluetooth/smp.c if (hci_is_identity_address(&hcon->dst, hcon->dst_type) && hcon 2571 net/bluetooth/smp.c (bacmp(&info->bdaddr, &hcon->dst) || hcon 2572 net/bluetooth/smp.c info->addr_type != hcon->dst_type)) { hcon 2573 net/bluetooth/smp.c bt_dev_err(hcon->hdev, hcon 2581 net/bluetooth/smp.c if (hci_bdaddr_is_rpa(&hcon->dst, hcon->dst_type)) hcon 2582 net/bluetooth/smp.c bacpy(&rpa, &hcon->dst); hcon 2586 net/bluetooth/smp.c smp->remote_irk = hci_add_irk(conn->hcon->hdev, &smp->id_addr, hcon 2615 net/bluetooth/smp.c if (conn->hcon->sec_level > BT_SECURITY_MEDIUM) hcon 2630 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2643 net/bluetooth/smp.c if (hcon->out) { hcon 2675 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2678 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 2703 net/bluetooth/smp.c if (!hcon->out) { hcon 2742 net/bluetooth/smp.c hcon->pending_sec_level = BT_SECURITY_MEDIUM; hcon 2744 net/bluetooth/smp.c hcon->pending_sec_level = BT_SECURITY_FIPS; hcon 2750 net/bluetooth/smp.c get_random_bytes(&hcon->passkey_notify, hcon 2751 net/bluetooth/smp.c sizeof(hcon->passkey_notify)); hcon 2752 net/bluetooth/smp.c hcon->passkey_notify %= 1000000; hcon 2753 net/bluetooth/smp.c hcon->passkey_entered = 0; hcon 2755 net/bluetooth/smp.c if (mgmt_user_passkey_notify(hdev, &hcon->dst, hcon->type, hcon 2756 net/bluetooth/smp.c hcon->dst_type, hcon 2757 net/bluetooth/smp.c hcon->passkey_notify, hcon 2758 net/bluetooth/smp.c hcon->passkey_entered)) hcon 2765 net/bluetooth/smp.c if (hcon->out) hcon 2774 net/bluetooth/smp.c if (hcon->out) hcon 2778 net/bluetooth/smp.c if (mgmt_user_passkey_request(hdev, &hcon->dst, hcon->type, hcon 2779 net/bluetooth/smp.c hcon->dst_type)) hcon 2789 net/bluetooth/smp.c if (conn->hcon->out) hcon 2807 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2818 net/bluetooth/smp.c memcpy(a, &hcon->init_addr, 6); hcon 2819 net/bluetooth/smp.c memcpy(b, &hcon->resp_addr, 6); hcon 2820 net/bluetooth/smp.c a[6] = hcon->init_addr_type; hcon 2821 net/bluetooth/smp.c b[6] = hcon->resp_addr_type; hcon 2823 net/bluetooth/smp.c if (hcon->out) { hcon 2836 net/bluetooth/smp.c put_unaligned_le32(hcon->passkey_notify, r); hcon 2848 net/bluetooth/smp.c if (!hcon->out) { hcon 2860 net/bluetooth/smp.c if (hcon->out) { hcon 2861 net/bluetooth/smp.c hci_le_start_enc(hcon, 0, 0, smp->tk, smp->enc_key_size); hcon 2862 net/bluetooth/smp.c hcon->enc_key_size = smp->enc_key_size; hcon 2881 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 2889 net/bluetooth/smp.c if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) { hcon 2985 net/bluetooth/smp.c bt_dev_err(hcon->hdev, "unexpected SMP command 0x%02x from %pMR", hcon 2986 net/bluetooth/smp.c code, &hcon->dst); hcon 3007 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 3008 net/bluetooth/smp.c struct hci_dev *hdev = hcon->hdev; hcon 3015 net/bluetooth/smp.c if (!test_bit(HCI_CONN_NEW_LINK_KEY, &hcon->flags)) hcon 3019 net/bluetooth/smp.c if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) hcon 3023 net/bluetooth/smp.c if (hcon->role != HCI_ROLE_MASTER) hcon 3031 net/bluetooth/smp.c if (!test_bit(HCI_CONN_AES_CCM, &hcon->flags) && hcon 3040 net/bluetooth/smp.c if (!lmp_host_le_capable(hcon)) hcon 3075 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 3079 net/bluetooth/smp.c if (hcon->type == ACL_LINK) { hcon 3087 net/bluetooth/smp.c if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) hcon 3098 net/bluetooth/smp.c struct hci_conn *hcon = conn->hcon; hcon 3110 net/bluetooth/smp.c if (hcon->type == ACL_LINK && test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) hcon 3127 net/bluetooth/smp.c hci_disconnect(chan->conn->hcon, HCI_ERROR_AUTH_FAILURE); hcon 186 net/bluetooth/smp.h bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, hcon 188 net/bluetooth/smp.h int smp_conn_security(struct hci_conn *hcon, __u8 sec_level);