/net/bluetooth/ |
D | smp.h | 90 __u8 irk[16]; member 191 bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16], 193 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa);
|
D | hci_core.c | 2508 struct smp_irk *irk; in hci_find_irk_by_rpa() local 2511 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa() 2512 if (!bacmp(&irk->rpa, rpa)) { in hci_find_irk_by_rpa() 2513 irk_to_return = irk; in hci_find_irk_by_rpa() 2518 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa() 2519 if (smp_irk_matches(hdev, irk->val, rpa)) { in hci_find_irk_by_rpa() 2520 bacpy(&irk->rpa, rpa); in hci_find_irk_by_rpa() 2521 irk_to_return = irk; in hci_find_irk_by_rpa() 2543 struct smp_irk *irk; in hci_find_irk_by_addr() local 2550 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_addr() [all …]
|
D | hci_debugfs.c | 622 16, hdev->irk, &hdev->rpa); in identity_show() 764 struct smp_irk *irk; in identity_resolving_keys_show() local 767 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in identity_resolving_keys_show() 769 &irk->bdaddr, irk->addr_type, in identity_resolving_keys_show() 770 16, irk->val, &irk->rpa); in identity_resolving_keys_show()
|
D | hci_conn.c | 67 struct smp_irk *irk; in hci_connect_le_scan_cleanup() local 75 irk = hci_get_irk(hdev, bdaddr, bdaddr_type); in hci_connect_le_scan_cleanup() 76 if (irk) { in hci_connect_le_scan_cleanup() 77 bdaddr = &irk->bdaddr; in hci_connect_le_scan_cleanup() 78 bdaddr_type = irk->addr_type; in hci_connect_le_scan_cleanup() 1002 struct smp_irk *irk; in hci_connect_le() local 1044 irk = hci_find_irk_by_addr(hdev, dst, dst_type); in hci_connect_le() 1045 if (irk && bacmp(&irk->rpa, BDADDR_ANY)) { in hci_connect_le() 1046 dst = &irk->rpa; in hci_connect_le()
|
D | smp.c | 113 u8 irk[16]; member 471 static int smp_ah(const u8 irk[16], const u8 r[3], u8 res[3]) in smp_ah() 480 err = smp_e(irk, _res); in smp_ah() 497 bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16], in smp_irk_matches() 507 bt_dev_dbg(hdev, "RPA %pMR IRK %*phN", bdaddr, 16, irk); in smp_irk_matches() 509 err = smp_ah(irk, &bdaddr->b[3], hash); in smp_irk_matches() 516 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa) in smp_generate_rpa() 529 err = smp_ah(irk, &rpa->b[3], rpa->b); in smp_generate_rpa() 1321 memcpy(idinfo.irk, hdev->irk, sizeof(idinfo.irk)); in smp_distribute_keys() 2574 info->irk)) { in smp_cmd_ident_info() [all …]
|
D | hci_request.c | 707 struct smp_irk *irk; in del_from_white_list() local 709 irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type); in del_from_white_list() 710 if (irk) { in del_from_white_list() 761 struct smp_irk *irk; in add_to_white_list() local 763 irk = hci_find_irk_by_addr(hdev, ¶ms->addr, in add_to_white_list() 765 if (irk) { in add_to_white_list() 770 memcpy(cp.peer_irk, irk->val, 16); in add_to_white_list() 773 memcpy(cp.local_irk, hdev->irk, 16); in add_to_white_list() 1918 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_get_random_address() 2378 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_update_random_address()
|
D | mgmt.c | 5827 memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); in set_privacy() 5836 memset(hdev->irk, 0, sizeof(hdev->irk)); in set_privacy() 5854 static bool irk_is_valid(struct mgmt_irk_info *irk) in irk_is_valid() argument 5856 switch (irk->addr.type) { in irk_is_valid() 5862 if ((irk->addr.bdaddr.b[5] & 0xc0) != 0xc0) in irk_is_valid() 5917 struct mgmt_irk_info *irk = &cp->irks[i]; in load_irks() local 5918 u8 addr_type = le_addr_type(irk->addr.type); in load_irks() 5922 irk->val)) { in load_irks() 5924 &irk->addr.bdaddr); in load_irks() 5929 if (irk->addr.type == BDADDR_BREDR) in load_irks() [all …]
|
D | hci_event.c | 5166 struct smp_irk *irk; in le_conn_complete_evt() local 5221 irk = hci_get_irk(hdev, &conn->dst, conn->dst_type); in le_conn_complete_evt() 5222 if (irk) { in le_conn_complete_evt() 5223 bacpy(&conn->dst, &irk->bdaddr); in le_conn_complete_evt() 5224 conn->dst_type = irk->addr_type; in le_conn_complete_evt() 5489 struct smp_irk *irk; in process_adv_report() local 5551 if (!smp_irk_matches(hdev, hdev->irk, direct_addr)) in process_adv_report() 5556 irk = hci_get_irk(hdev, bdaddr, bdaddr_type); in process_adv_report() 5557 if (irk) { in process_adv_report() 5558 bdaddr = &irk->bdaddr; in process_adv_report() [all …]
|