Lines Matching defs:instance
1267 void mgmt_advertising_added(struct sock *sk, struct hci_dev *hdev, u8 instance)
1271 ev.instance = instance;
1277 u8 instance)
1281 ev.instance = instance;
2222 u8 instance = hdev->le_num_of_adv_sets + 1;
2231 adv = hci_add_adv_instance(hdev, instance, 0,
2241 mesh_tx->instance = instance;
2245 if (hdev->cur_adv_instance == instance) {
2246 /* If the currently advertised instance is being changed then
2248 * instance. If there is only one instance then the overridden
2253 next_instance = hci_get_next_instance(hdev, instance);
2255 instance = next_instance->instance;
2257 instance = 0;
2259 /* Immediately advertise the new instance if no other, or
2262 instance = 0;
2265 if (instance)
2266 return hci_schedule_adv_instance_sync(hdev, instance, true);
3723 /* stop if current instance doesn't need to be changed */
3729 adv_instance = hci_get_next_instance(hdev, adv_instance->instance);
3733 hci_schedule_adv_instance_sync(hdev, adv_instance->instance, true);
6281 u8 instance;
6304 /* If "Set Advertising" was just disabled and instance advertising was
6305 * set up earlier, then re-enable multi-instance advertising.
6311 instance = hdev->cur_adv_instance;
6312 if (!instance) {
6318 instance = adv_instance->instance;
6321 err = hci_schedule_adv_instance_sync(hdev, instance, true);
6340 /* Switch to instance "0" for the Set Advertising setting.
8354 u8 *instance;
8379 instance = rp->instance;
8382 if (adv_instance->instance <= hdev->adv_instance_cnt) {
8383 *instance = adv_instance->instance;
8384 instance++;
8520 static void add_adv_complete(struct hci_dev *hdev, struct sock *sk, u8 instance,
8530 u8 instance;
8540 instance = adv->instance;
8542 if (hdev->cur_adv_instance == instance)
8545 hci_remove_adv_instance(hdev, instance);
8546 mgmt_advertising_removed(sk, hdev, instance);
8560 rp.instance = cp->instance;
8569 add_adv_complete(hdev, cmd->sk, cp->instance, err);
8579 return hci_schedule_adv_instance_sync(hdev, cp->instance, true);
8603 if (cp->instance < 1 || cp->instance > hdev->le_num_of_adv_sets)
8643 adv = hci_add_adv_instance(hdev, cp->instance, flags,
8657 /* Only trigger an advertising added event if a new instance was
8661 mgmt_advertising_added(sk, hdev, cp->instance);
8663 if (hdev->cur_adv_instance == cp->instance) {
8664 /* If the currently advertised instance is being changed then
8666 * instance. If there is only one instance then the overridden
8671 next_instance = hci_get_next_instance(hdev, cp->instance);
8673 schedule_instance = next_instance->instance;
8675 /* Immediately advertise the new instance if no other
8676 * instance is currently being advertised.
8678 schedule_instance = cp->instance;
8682 * there is no instance to be advertised then we have no HCI
8688 rp.instance = cp->instance;
8704 cp->instance = schedule_instance;
8730 adv = hci_find_adv_instance(hdev, cp->instance);
8734 rp.instance = cp->instance;
8750 mgmt_advertising_removed(cmd->sk, hdev, cp->instance);
8752 hci_remove_adv_instance(hdev, cp->instance);
8773 return hci_setup_ext_adv_instance_sync(hdev, cp->instance);
8796 if (cp->instance < 1 || cp->instance > hdev->le_num_of_adv_sets)
8851 /* Create advertising instance with no advertising or response data */
8852 adv = hci_add_adv_instance(hdev, cp->instance, flags, 0, NULL, 0, NULL,
8868 hci_remove_adv_instance(hdev, cp->instance);
8877 rp.instance = cp->instance;
8898 add_adv_complete(hdev, cmd->sk, cp->instance, err);
8902 rp.instance = cp->instance;
8921 err = hci_update_adv_data_sync(hdev, cp->instance);
8925 err = hci_update_scan_rsp_data_sync(hdev, cp->instance);
8929 return hci_enable_ext_advertising_sync(hdev, cp->instance);
8932 return hci_schedule_adv_instance_sync(hdev, cp->instance, true);
8950 adv_instance = hci_find_adv_instance(hdev, cp->instance);
8981 /* Set the data in the advertising instance */
8982 hci_set_adv_instance_data(hdev, cp->instance, cp->adv_data_len,
8986 /* If using software rotation, determine next instance to use */
8987 if (hdev->cur_adv_instance == cp->instance) {
8988 /* If the currently advertised instance is being changed
8990 * next instance. If there is only one instance then the
8996 next_instance = hci_get_next_instance(hdev, cp->instance);
8998 schedule_instance = next_instance->instance;
9000 /* Immediately advertise the new instance if no other
9001 * instance is currently being advertised.
9003 schedule_instance = cp->instance;
9006 /* If the HCI_ADVERTISING flag is set or there is no instance to
9012 mgmt_advertising_added(sk, hdev, cp->instance);
9015 rp.instance = cp->instance;
9036 * event if this is an instance that wasn't previously advertising. If
9038 * instance again in add_advertising_complete
9041 mgmt_advertising_added(sk, hdev, cp->instance);
9046 hci_remove_adv_instance(hdev, cp->instance);
9064 rp.instance = cp->instance;
9082 err = hci_remove_advertising_sync(hdev, cmd->sk, cp->instance, true);
9103 if (cp->instance && !hci_find_adv_instance(hdev, cp->instance)) {
9153 if (cp->instance < 1 || cp->instance > hdev->le_num_of_adv_sets)
9167 rp.instance = cp->instance;