Lines Matching full:adv

459 		bt_dev_err(hdev, "failed to reenable ADV: %d", status);  in reenable_adv()
1151 struct adv_info *adv = NULL; in hci_disable_ext_adv_instance_sync() local
1155 adv = hci_find_adv_instance(hdev, instance); in hci_disable_ext_adv_instance_sync()
1156 if (!adv) in hci_disable_ext_adv_instance_sync()
1160 if (!adv->enabled) in hci_disable_ext_adv_instance_sync()
1173 set->handle = adv ? adv->handle : instance; in hci_disable_ext_adv_instance_sync()
1215 struct adv_info *adv; in hci_setup_ext_adv_instance_sync() local
1219 adv = hci_find_adv_instance(hdev, instance); in hci_setup_ext_adv_instance_sync()
1220 if (!adv) in hci_setup_ext_adv_instance_sync()
1223 adv = NULL; in hci_setup_ext_adv_instance_sync()
1230 if (adv && !adv->pending) { in hci_setup_ext_adv_instance_sync()
1252 adv_use_rpa(hdev, flags), adv, in hci_setup_ext_adv_instance_sync()
1259 if (adv) { in hci_setup_ext_adv_instance_sync()
1260 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1261 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1262 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1302 cp.handle = adv ? adv->handle : instance; in hci_setup_ext_adv_instance_sync()
1325 if (adv) { in hci_setup_ext_adv_instance_sync()
1326 if (!bacmp(&random_addr, &adv->random_addr)) in hci_setup_ext_adv_instance_sync()
1345 struct adv_info *adv = NULL; in hci_set_ext_scan_rsp_data_sync() local
1349 adv = hci_find_adv_instance(hdev, instance); in hci_set_ext_scan_rsp_data_sync()
1350 if (!adv || !adv->scan_rsp_changed) in hci_set_ext_scan_rsp_data_sync()
1356 pdu->handle = adv ? adv->handle : instance; in hci_set_ext_scan_rsp_data_sync()
1367 if (adv) { in hci_set_ext_scan_rsp_data_sync()
1368 adv->scan_rsp_changed = false; in hci_set_ext_scan_rsp_data_sync()
1415 struct adv_info *adv; in hci_enable_ext_advertising_sync() local
1418 adv = hci_find_adv_instance(hdev, instance); in hci_enable_ext_advertising_sync()
1419 if (!adv) in hci_enable_ext_advertising_sync()
1422 if (adv->enabled) in hci_enable_ext_advertising_sync()
1425 adv = NULL; in hci_enable_ext_advertising_sync()
1438 set->handle = adv ? adv->handle : instance; in hci_enable_ext_advertising_sync()
1443 if (adv && adv->timeout) { in hci_enable_ext_advertising_sync()
1444 u16 duration = adv->timeout * MSEC_PER_SEC; in hci_enable_ext_advertising_sync()
1474 struct adv_info *adv = NULL; in hci_disable_per_advertising_sync() local
1477 adv = hci_find_adv_instance(hdev, instance); in hci_disable_per_advertising_sync()
1478 if (!adv || !adv->periodic || !adv->enabled) in hci_disable_per_advertising_sync()
1517 struct adv_info *adv = NULL; in hci_set_per_adv_data_sync() local
1520 adv = hci_find_adv_instance(hdev, instance); in hci_set_per_adv_data_sync()
1521 if (!adv || !adv->periodic) in hci_set_per_adv_data_sync()
1528 pdu->handle = adv ? adv->handle : instance; in hci_set_per_adv_data_sync()
1539 struct adv_info *adv = NULL; in hci_enable_per_advertising_sync() local
1542 adv = hci_find_adv_instance(hdev, instance); in hci_enable_per_advertising_sync()
1543 if (adv && adv->periodic && adv->enabled) in hci_enable_per_advertising_sync()
1558 static int hci_adv_bcast_annoucement(struct hci_dev *hdev, struct adv_info *adv) in hci_adv_bcast_annoucement() argument
1563 /* Skip if NULL adv as instance 0x00 is used for general purpose in hci_adv_bcast_annoucement()
1567 if (!adv) in hci_adv_bcast_annoucement()
1573 if (!eir_get_service_data(adv->per_adv_data, adv->per_adv_data_len, in hci_adv_bcast_annoucement()
1581 if (eir_get_service_data(adv->adv_data, adv->adv_data_len, 0x1852, in hci_adv_bcast_annoucement()
1588 hci_set_adv_instance_data(hdev, adv->instance, sizeof(ad), ad, 0, NULL); in hci_adv_bcast_annoucement()
1590 return hci_update_adv_data_sync(hdev, adv->instance); in hci_adv_bcast_annoucement()
1597 struct adv_info *adv = NULL; in hci_start_per_adv_sync() local
1604 adv = hci_find_adv_instance(hdev, instance); in hci_start_per_adv_sync()
1606 if (!adv) { in hci_start_per_adv_sync()
1607 adv = hci_add_per_instance(hdev, instance, flags, in hci_start_per_adv_sync()
1611 if (IS_ERR(adv)) in hci_start_per_adv_sync()
1612 return PTR_ERR(adv); in hci_start_per_adv_sync()
1613 adv->pending = false; in hci_start_per_adv_sync()
1623 err = hci_adv_bcast_annoucement(hdev, adv); in hci_start_per_adv_sync()
1790 struct adv_info *adv = data; in remove_ext_adv_sync() local
1793 if (adv) in remove_ext_adv_sync()
1794 instance = adv->instance; in remove_ext_adv_sync()
1801 struct adv_info *adv = NULL; in hci_remove_ext_adv_instance() local
1804 adv = hci_find_adv_instance(hdev, instance); in hci_remove_ext_adv_instance()
1805 if (!adv) in hci_remove_ext_adv_instance()
1809 return hci_cmd_sync_queue(hdev, remove_ext_adv_sync, adv, NULL); in hci_remove_ext_adv_instance()
1829 struct adv_info *adv = NULL; in hci_set_ext_adv_data_sync() local
1833 adv = hci_find_adv_instance(hdev, instance); in hci_set_ext_adv_data_sync()
1834 if (!adv || !adv->adv_data_changed) in hci_set_ext_adv_data_sync()
1841 pdu->handle = adv ? adv->handle : instance; in hci_set_ext_adv_data_sync()
1852 if (adv) { in hci_set_ext_adv_data_sync()
1853 adv->adv_data_changed = false; in hci_set_ext_adv_data_sync()
1899 struct adv_info *adv = NULL; in hci_schedule_adv_instance_sync() local
1908 adv = hci_find_adv_instance(hdev, instance); in hci_schedule_adv_instance_sync()
1909 if (!adv) in hci_schedule_adv_instance_sync()
1920 if (adv->timeout == 0 || adv->duration <= adv->remaining_time) in hci_schedule_adv_instance_sync()
1921 timeout = adv->duration; in hci_schedule_adv_instance_sync()
1923 timeout = adv->remaining_time; in hci_schedule_adv_instance_sync()
1928 if (adv->timeout) in hci_schedule_adv_instance_sync()
1929 adv->remaining_time = adv->remaining_time - timeout; in hci_schedule_adv_instance_sync()
1970 struct adv_info *adv, *n; in hci_clear_adv_sync() local
1985 list_for_each_entry_safe(adv, n, &hdev->adv_instances, list) { in hci_clear_adv_sync()
1986 u8 instance = adv->instance; in hci_clear_adv_sync()
1989 if (!(force || adv->timeout)) in hci_clear_adv_sync()
2060 struct adv_info *adv = hci_find_adv_instance(hdev, instance); in hci_remove_advertising_sync() local
2062 if (force || (adv && adv->timeout && !adv->remaining_time)) { in hci_remove_advertising_sync()
2224 * - There is at least one ADV monitor in hci_update_interleaved_scan_sync()
2523 struct adv_info *adv, *tmp; in hci_resume_advertising_sync() local
2541 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) { in hci_resume_advertising_sync()
2543 adv->instance); in hci_resume_advertising_sync()
2548 hci_remove_ext_adv_instance_sync(hdev, adv->instance, in hci_resume_advertising_sync()
2827 * - There are 1 or more ADV monitors registered and it's not offloaded in hci_update_accept_list_sync()
3139 bt_dev_dbg(hdev, "ADV monitoring is %s", in hci_update_passive_scan_sync()
3148 * to be scanned for or no ADV monitors, we should stop the in hci_update_passive_scan_sync()
3281 struct adv_info *adv, *tmp; in hci_powered_update_adv_sync() local
3318 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) in hci_powered_update_adv_sync()
3319 hci_schedule_adv_instance_sync(hdev, adv->instance, true); in hci_powered_update_adv_sync()
3457 * Update adv data)
4225 /* If the controller supports LL Privacy feature or LE Extended Adv, in hci_le_set_event_mask_sync()
4326 * also included. So do not call it if extended adv in hci_le_read_adv_tx_power_sync()
6255 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6265 * So it is required to remove adv set for handle 0x00. since we use in hci_le_ext_directed_advertising_sync()
6266 * instance 0 for directed adv. in hci_le_ext_directed_advertising_sync()