@@ -1015,6 +1015,27 @@ void hci_req_update_resolving_list_local_irk(struct hci_dev *hdev)
hci_req_run(&req, NULL);
}
+void hci_req_check_and_update_resolving_list(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr)
+{
+ struct smp_irk *irk;
+
+ BT_DBG("");
+
+ /* Nothing to be done if LL privacy is not supported */
+ if ( !(hdev->le_features[0] & HCI_LE_LL_PRIVACY) )
+ return;
+
+ if ( !hci_dev_test_flag(hdev, HCI_LL_RPA_RESOLUTION) &&
+ ( hci_dev_test_flag(hdev, HCI_LE_ADV) ||
+ hci_dev_test_flag(hdev, HCI_LE_SCAN) ||
+ hci_lookup_le_connect(hdev) ) )
+ return;
+
+ irk = hci_find_irk_by_addr(hdev, bdaddr, type);
+ if (irk)
+ hci_req_update_resolving_list(hdev, irk->addr_type, &irk->bdaddr, irk->val);
+}
+
void hci_load_resolving_list (struct hci_dev *hdev)
{
struct smp_irk *irk;
@@ -90,6 +90,8 @@ void __hci_req_clear_ext_adv_sets(struct hci_request *req);
int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
bool use_rpa, struct adv_info *adv_instance,
u8 *own_addr_type, bdaddr_t *rand_addr);
+void hci_req_check_and_update_resolving_list(struct hci_dev *hdev, u8 addr_type,
+ bdaddr_t *bdaddr);
void __hci_req_update_class(struct hci_request *req);