Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/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.c2506 struct smp_irk *irk; in hci_find_irk_by_rpa() local
2509 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa()
2510 if (!bacmp(&irk->rpa, rpa)) { in hci_find_irk_by_rpa()
2511 irk_to_return = irk; in hci_find_irk_by_rpa()
2516 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_rpa()
2517 if (smp_irk_matches(hdev, irk->val, rpa)) { in hci_find_irk_by_rpa()
2518 bacpy(&irk->rpa, rpa); in hci_find_irk_by_rpa()
2519 irk_to_return = irk; in hci_find_irk_by_rpa()
2541 struct smp_irk *irk; in hci_find_irk_by_addr() local
2548 list_for_each_entry_rcu(irk, &hdev->identity_resolving_keys, list) { in hci_find_irk_by_addr()
[all …]
Dhci_debugfs.c622 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()
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()
1004 struct smp_irk *irk; in hci_connect_le() local
1046 irk = hci_find_irk_by_addr(hdev, dst, dst_type); in hci_connect_le()
1047 if (irk && bacmp(&irk->rpa, BDADDR_ANY)) { in hci_connect_le()
1048 dst = &irk->rpa; in hci_connect_le()
Dsmp.c113 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()
1311 memcpy(idinfo.irk, hdev->irk, sizeof(idinfo.irk)); in smp_distribute_keys()
2559 info->irk)) { in smp_cmd_ident_info()
[all …]
Dhci_request.c753 struct smp_irk *irk; in del_from_accept_list() local
755 irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type); in del_from_accept_list()
756 if (irk) { in del_from_accept_list()
807 struct smp_irk *irk; in add_to_accept_list() local
809 irk = hci_find_irk_by_addr(hdev, &params->addr, in add_to_accept_list()
811 if (irk) { in add_to_accept_list()
816 memcpy(cp.peer_irk, irk->val, 16); in add_to_accept_list()
819 memcpy(cp.local_irk, hdev->irk, 16); in add_to_accept_list()
2037 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_get_random_address()
2497 err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa); in hci_update_random_address()
Dmgmt.c5826 memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); in set_privacy()
5835 memset(hdev->irk, 0, sizeof(hdev->irk)); in set_privacy()
5853 static bool irk_is_valid(struct mgmt_irk_info *irk) in irk_is_valid() argument
5855 switch (irk->addr.type) { in irk_is_valid()
5861 if ((irk->addr.bdaddr.b[5] & 0xc0) != 0xc0) in irk_is_valid()
5916 struct mgmt_irk_info *irk = &cp->irks[i]; in load_irks() local
5920 irk->val)) { in load_irks()
5922 &irk->addr.bdaddr); in load_irks()
5926 hci_add_irk(hdev, &irk->addr.bdaddr, in load_irks()
5927 le_addr_type(irk->addr.type), irk->val, in load_irks()
[all …]
Dhci_event.c5138 struct smp_irk *irk; in le_conn_complete_evt() local
5193 irk = hci_get_irk(hdev, &conn->dst, conn->dst_type); in le_conn_complete_evt()
5194 if (irk) { in le_conn_complete_evt()
5195 bacpy(&conn->dst, &irk->bdaddr); in le_conn_complete_evt()
5196 conn->dst_type = irk->addr_type; in le_conn_complete_evt()
5461 struct smp_irk *irk; in process_adv_report() local
5523 if (!smp_irk_matches(hdev, hdev->irk, direct_addr)) in process_adv_report()
5528 irk = hci_get_irk(hdev, bdaddr, bdaddr_type); in process_adv_report()
5529 if (irk) { in process_adv_report()
5530 bdaddr = &irk->bdaddr; in process_adv_report()
[all …]
/kernel/linux/linux-5.10/include/net/bluetooth/
Dmgmt.h410 __u8 irk[16]; member
928 struct mgmt_irk_info irk; member
Dhci_core.h545 __u8 irk[16]; member
1776 void mgmt_new_irk(struct hci_dev *hdev, struct smp_irk *irk, bool persistent);
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/
D0008_linux_net.patch112 @@ -193,6 +193,8 @@ bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16],
113 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa);