Lines Matching refs:adv

1049 		struct adv_info *adv;
1051 adv = hci_find_adv_instance(hdev, instance);
1052 if (!adv)
1056 if (!adv->enabled)
1111 struct adv_info *adv;
1115 adv = hci_find_adv_instance(hdev, instance);
1116 if (!adv)
1119 adv = NULL;
1126 if (adv && !adv->pending) {
1148 adv_use_rpa(hdev, flags), adv,
1155 if (adv) {
1156 hci_cpu_to_le24(adv->min_interval, cp.min_interval);
1157 hci_cpu_to_le24(adv->max_interval, cp.max_interval);
1158 cp.tx_power = adv->tx_power;
1221 if (adv) {
1222 if (!bacmp(&random_addr, &adv->random_addr))
1243 struct adv_info *adv = NULL;
1249 adv = hci_find_adv_instance(hdev, instance);
1250 if (!adv || !adv->scan_rsp_changed)
1267 if (adv) {
1268 adv->scan_rsp_changed = false;
1315 struct adv_info *adv;
1318 adv = hci_find_adv_instance(hdev, instance);
1319 if (!adv)
1322 if (adv->enabled)
1325 adv = NULL;
1343 if (adv && adv->timeout) {
1344 u16 duration = adv->timeout * MSEC_PER_SEC;
1374 struct adv_info *adv = NULL;
1377 adv = hci_find_adv_instance(hdev, instance);
1378 if (!adv || !adv->periodic || !adv->enabled)
1423 struct adv_info *adv = hci_find_adv_instance(hdev, instance);
1425 if (!adv || !adv->periodic)
1443 struct adv_info *adv = NULL;
1446 adv = hci_find_adv_instance(hdev, instance);
1447 if (adv && adv->periodic && adv->enabled)
1462 static int hci_adv_bcast_annoucement(struct hci_dev *hdev, struct adv_info *adv)
1467 /* Skip if NULL adv as instance 0x00 is used for general purpose
1471 if (!adv)
1477 if (!eir_get_service_data(adv->per_adv_data, adv->per_adv_data_len,
1485 if (eir_get_service_data(adv->adv_data, adv->adv_data_len, 0x1852,
1492 hci_set_adv_instance_data(hdev, adv->instance, sizeof(ad), ad, 0, NULL);
1494 return hci_update_adv_data_sync(hdev, adv->instance);
1501 struct adv_info *adv = NULL;
1508 adv = hci_find_adv_instance(hdev, instance);
1510 if (!adv) {
1511 adv = hci_add_per_instance(hdev, instance, flags,
1515 if (IS_ERR(adv))
1516 return PTR_ERR(adv);
1517 adv->pending = false;
1527 err = hci_adv_bcast_annoucement(hdev, adv);
1694 struct adv_info *adv = data;
1697 if (adv)
1698 instance = adv->instance;
1705 struct adv_info *adv = NULL;
1708 adv = hci_find_adv_instance(hdev, instance);
1709 if (!adv)
1713 return hci_cmd_sync_queue(hdev, remove_ext_adv_sync, adv, NULL);
1735 struct adv_info *adv = NULL;
1741 adv = hci_find_adv_instance(hdev, instance);
1742 if (!adv || !adv->adv_data_changed)
1760 if (adv) {
1761 adv->adv_data_changed = false;
1807 struct adv_info *adv = NULL;
1816 adv = hci_find_adv_instance(hdev, instance);
1817 if (!adv)
1828 if (adv->timeout == 0 || adv->duration <= adv->remaining_time)
1829 timeout = adv->duration;
1831 timeout = adv->remaining_time;
1836 if (adv->timeout)
1837 adv->remaining_time = adv->remaining_time - timeout;
1878 struct adv_info *adv, *n;
1893 list_for_each_entry_safe(adv, n, &hdev->adv_instances, list) {
1894 u8 instance = adv->instance;
1897 if (!(force || adv->timeout))
1968 struct adv_info *adv = hci_find_adv_instance(hdev, instance);
1970 if (force || (adv && adv->timeout && !adv->remaining_time)) {
2436 struct adv_info *adv, *tmp;
2454 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list) {
2456 adv->instance);
2461 hci_remove_ext_adv_instance_sync(hdev, adv->instance,
3159 struct adv_info *adv, *tmp;
3196 list_for_each_entry_safe(adv, tmp, &hdev->adv_instances, list)
3197 hci_schedule_adv_instance_sync(hdev, adv->instance, true);
3335 * Update adv data)
4275 * also included. So do not call it if extended adv
6226 cp.handle = 0x00; /* Use instance 0 for directed adv */
6236 * So it is required to remove adv set for handle 0x00. since we use
6237 * instance 0 for directed adv.