Lines Matching full:adv

506 		bt_dev_err(hdev, "failed to reenable ADV: %d", status);  in reenable_adv()
965 struct adv_info *adv; in hci_disable_ext_adv_instance_sync() local
967 adv = hci_find_adv_instance(hdev, instance); in hci_disable_ext_adv_instance_sync()
968 if (!adv) in hci_disable_ext_adv_instance_sync()
972 if (!adv->enabled) in hci_disable_ext_adv_instance_sync()
1027 struct adv_info *adv; in hci_setup_ext_adv_instance_sync() local
1031 adv = hci_find_adv_instance(hdev, instance); in hci_setup_ext_adv_instance_sync()
1032 if (!adv) in hci_setup_ext_adv_instance_sync()
1035 adv = NULL; in hci_setup_ext_adv_instance_sync()
1042 if (adv && !adv->pending) { in hci_setup_ext_adv_instance_sync()
1064 adv_use_rpa(hdev, flags), adv, in hci_setup_ext_adv_instance_sync()
1071 if (adv) { in hci_setup_ext_adv_instance_sync()
1072 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1073 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1074 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1137 if (adv) { in hci_setup_ext_adv_instance_sync()
1138 if (!bacmp(&random_addr, &adv->random_addr)) in hci_setup_ext_adv_instance_sync()
1159 struct adv_info *adv = NULL; in hci_set_ext_scan_rsp_data_sync() local
1165 adv = hci_find_adv_instance(hdev, instance); in hci_set_ext_scan_rsp_data_sync()
1166 if (!adv || !adv->scan_rsp_changed) in hci_set_ext_scan_rsp_data_sync()
1183 if (adv) { in hci_set_ext_scan_rsp_data_sync()
1184 adv->scan_rsp_changed = false; in hci_set_ext_scan_rsp_data_sync()
1231 struct adv_info *adv; in hci_enable_ext_advertising_sync() local
1234 adv = hci_find_adv_instance(hdev, instance); in hci_enable_ext_advertising_sync()
1235 if (!adv) in hci_enable_ext_advertising_sync()
1238 if (adv->enabled) in hci_enable_ext_advertising_sync()
1241 adv = NULL; in hci_enable_ext_advertising_sync()
1259 if (adv && adv->timeout) { in hci_enable_ext_advertising_sync()
1260 u16 duration = adv->timeout * MSEC_PER_SEC; in hci_enable_ext_advertising_sync()
1337 struct adv_info *adv = hci_find_adv_instance(hdev, instance); in hci_set_per_adv_data_sync() local
1339 if (!adv || !adv->periodic) in hci_set_per_adv_data_sync()
1374 static int hci_adv_bcast_annoucement(struct hci_dev *hdev, struct adv_info *adv) in hci_adv_bcast_annoucement() argument
1379 /* Skip if NULL adv as instance 0x00 is used for general purpose in hci_adv_bcast_annoucement()
1383 if (!adv) in hci_adv_bcast_annoucement()
1389 if (!eir_get_service_data(adv->per_adv_data, adv->per_adv_data_len, in hci_adv_bcast_annoucement()
1397 if (eir_get_service_data(adv->adv_data, adv->adv_data_len, 0x1852, in hci_adv_bcast_annoucement()
1404 hci_set_adv_instance_data(hdev, adv->instance, sizeof(ad), ad, 0, NULL); in hci_adv_bcast_annoucement()
1406 return hci_update_adv_data_sync(hdev, adv->instance); in hci_adv_bcast_annoucement()
1413 struct adv_info *adv = NULL; in hci_start_per_adv_sync() local
1420 adv = hci_find_adv_instance(hdev, instance); in hci_start_per_adv_sync()
1422 if (!adv) { in hci_start_per_adv_sync()
1423 adv = hci_add_per_instance(hdev, instance, flags, in hci_start_per_adv_sync()
1427 if (IS_ERR(adv)) in hci_start_per_adv_sync()
1428 return PTR_ERR(adv); in hci_start_per_adv_sync()
1436 if (!adv || added) { in hci_start_per_adv_sync()
1441 err = hci_adv_bcast_annoucement(hdev, adv); in hci_start_per_adv_sync()
1609 struct adv_info *adv = data; in remove_ext_adv_sync() local
1612 if (adv) in remove_ext_adv_sync()
1613 instance = adv->instance; in remove_ext_adv_sync()
1620 struct adv_info *adv = NULL; in hci_remove_ext_adv_instance() local
1623 adv = hci_find_adv_instance(hdev, instance); in hci_remove_ext_adv_instance()
1624 if (!adv) in hci_remove_ext_adv_instance()
1628 return hci_cmd_sync_queue(hdev, remove_ext_adv_sync, adv, NULL); in hci_remove_ext_adv_instance()
1650 struct adv_info *adv = NULL; in hci_set_ext_adv_data_sync() local
1656 adv = hci_find_adv_instance(hdev, instance); in hci_set_ext_adv_data_sync()
1657 if (!adv || !adv->adv_data_changed) in hci_set_ext_adv_data_sync()
1675 if (adv) { in hci_set_ext_adv_data_sync()
1676 adv->adv_data_changed = false; in hci_set_ext_adv_data_sync()
1722 struct adv_info *adv = NULL; in hci_schedule_adv_instance_sync() local
1731 adv = hci_find_adv_instance(hdev, instance); in hci_schedule_adv_instance_sync()
1732 if (!adv) in hci_schedule_adv_instance_sync()
1743 if (adv->timeout == 0 || adv->duration <= adv->remaining_time) in hci_schedule_adv_instance_sync()
1744 timeout = adv->duration; in hci_schedule_adv_instance_sync()
1746 timeout = adv->remaining_time; in hci_schedule_adv_instance_sync()
1751 if (adv->timeout) in hci_schedule_adv_instance_sync()
1752 adv->remaining_time = adv->remaining_time - timeout; in hci_schedule_adv_instance_sync()
1793 struct adv_info *adv, *n; in hci_clear_adv_sync() local
1808 list_for_each_entry_safe(adv, n, &hdev->adv_instances, list) { in hci_clear_adv_sync()
1809 u8 instance = adv->instance; in hci_clear_adv_sync()
1812 if (!(force || adv->timeout)) in hci_clear_adv_sync()
1883 struct adv_info *adv = hci_find_adv_instance(hdev, instance); in hci_remove_advertising_sync() local
1885 if (force || (adv && adv->timeout && !adv->remaining_time)) { in hci_remove_advertising_sync()
2052 * - There is at least one ADV monitor in hci_update_interleaved_scan_sync()
2328 struct adv_info *adv, *tmp; in hci_resume_advertising_sync() local
2346 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) { in hci_resume_advertising_sync()
2348 adv->instance); in hci_resume_advertising_sync()
2353 hci_remove_ext_adv_instance_sync(hdev, adv->instance, in hci_resume_advertising_sync()
2483 * - There are 1 or more ADV monitors registered and it's not offloaded in hci_update_accept_list_sync()
2737 bt_dev_dbg(hdev, "ADV monitoring is %s", in hci_update_passive_scan_sync()
2746 * to be scanned for or no ADV monitors, we should stop the in hci_update_passive_scan_sync()
2878 struct adv_info *adv, *tmp; in hci_powered_update_adv_sync() local
2915 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) in hci_powered_update_adv_sync()
2916 hci_schedule_adv_instance_sync(hdev, adv->instance, true); in hci_powered_update_adv_sync()
3054 * Update adv data)
3868 /* If the controller supports LL Privacy feature or LE Extended Adv, in hci_le_set_event_mask_sync()
3966 * also included. So do not call it if extended adv in hci_le_read_adv_tx_power_sync()
5810 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
5820 * So it is required to remove adv set for handle 0x00. since we use in hci_le_ext_directed_advertising_sync()
5821 * instance 0 for directed adv. in hci_le_ext_directed_advertising_sync()