Home
last modified time | relevance | path

Searched refs:irk (Results 1 – 8 of 8) sorted by relevance

/net/bluetooth/
Dsmp.h90 __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);
Dhci_core.c2519 struct smp_irk *irk; in hci_find_irk_by_rpa() local
2522 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa()
2523 if (!bacmp(&irk->rpa, rpa)) { in hci_find_irk_by_rpa()
2524 irk_to_return = irk; in hci_find_irk_by_rpa()
2529 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa()
2530 if (smp_irk_matches(hdev, irk->val, rpa)) { in hci_find_irk_by_rpa()
2531 bacpy(&irk->rpa, rpa); in hci_find_irk_by_rpa()
2532 irk_to_return = irk; in hci_find_irk_by_rpa()
2554 struct smp_irk *irk; in hci_find_irk_by_addr() local
2561 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_addr()
[all …]
Dhci_conn.c67 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()
1048 struct smp_irk *irk; in hci_connect_le() local
1090 irk = hci_find_irk_by_addr(hdev, dst, dst_type); in hci_connect_le()
1091 if (irk && bacmp(&irk->rpa, BDADDR_ANY)) { in hci_connect_le()
1092 dst = &irk->rpa; in hci_connect_le()
Dhci_debugfs.c672 16, hdev->irk, &hdev->rpa); in identity_show()
814 struct smp_irk *irk; in identity_resolving_keys_show() local
817 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in identity_resolving_keys_show()
819 &irk->bdaddr, irk->addr_type, in identity_resolving_keys_show()
820 16, irk->val, &irk->rpa); in identity_resolving_keys_show()
Dsmp.c112 u8 irk[16]; member
470 static int smp_ah(const u8 irk[16], const u8 r[3], u8 res[3]) in smp_ah()
479 err = smp_e(irk, _res); in smp_ah()
496 bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16], in smp_irk_matches()
506 bt_dev_dbg(hdev, "RPA %pMR IRK %*phN", bdaddr, 16, irk); in smp_irk_matches()
508 err = smp_ah(irk, &bdaddr->b[3], hash); in smp_irk_matches()
515 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa) in smp_generate_rpa()
528 err = smp_ah(irk, &rpa->b[3], rpa->b); in smp_generate_rpa()
1320 memcpy(idinfo.irk, hdev->irk, sizeof(idinfo.irk)); in smp_distribute_keys()
2573 info->irk)) { in smp_cmd_ident_info()
[all …]
Dhci_request.c762 struct smp_irk *irk; in del_from_accept_list() local
764 irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type); in del_from_accept_list()
765 if (irk) { in del_from_accept_list()
816 struct smp_irk *irk; in add_to_accept_list() local
818 irk = hci_find_irk_by_addr(hdev, &params->addr, in add_to_accept_list()
820 if (irk) { in add_to_accept_list()
825 memcpy(cp.peer_irk, irk->val, 16); in add_to_accept_list()
828 memcpy(cp.local_irk, hdev->irk, 16); in add_to_accept_list()
2092 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_get_random_address()
2555 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_update_random_address()
Dmgmt.c6093 memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); in set_privacy()
6102 memset(hdev->irk, 0, sizeof(hdev->irk)); in set_privacy()
6120 static bool irk_is_valid(struct mgmt_irk_info *irk) in irk_is_valid() argument
6122 switch (irk->addr.type) { in irk_is_valid()
6128 if ((irk->addr.bdaddr.b[5] & 0xc0) != 0xc0) in irk_is_valid()
6183 struct mgmt_irk_info *irk = &cp->irks[i]; in load_irks() local
6184 u8 addr_type = le_addr_type(irk->addr.type); in load_irks()
6188 irk->val)) { in load_irks()
6190 &irk->addr.bdaddr); in load_irks()
6195 if (irk->addr.type == BDADDR_BREDR) in load_irks()
[all …]
Dhci_event.c5270 struct smp_irk *irk; in le_conn_complete_evt() local
5325 irk = hci_get_irk(hdev, &conn->dst, conn->dst_type); in le_conn_complete_evt()
5326 if (irk) { in le_conn_complete_evt()
5327 bacpy(&conn->dst, &irk->bdaddr); in le_conn_complete_evt()
5328 conn->dst_type = irk->addr_type; in le_conn_complete_evt()
5622 struct smp_irk *irk; in process_adv_report() local
5684 if (!smp_irk_matches(hdev, hdev->irk, direct_addr)) in process_adv_report()
5689 irk = hci_get_irk(hdev, bdaddr, bdaddr_type); in process_adv_report()
5690 if (irk) { in process_adv_report()
5691 bdaddr = &irk->bdaddr; in process_adv_report()
[all …]