Lines Matching refs:monitor
3089 struct adv_monitor *monitor; in hci_adv_monitors_clear() local
3092 idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle) in hci_adv_monitors_clear()
3093 hci_free_adv_monitor(hdev, monitor); in hci_adv_monitors_clear()
3101 void hci_free_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor) in hci_free_adv_monitor() argument
3106 if (!monitor) in hci_free_adv_monitor()
3109 list_for_each_entry_safe(pattern, tmp, &monitor->patterns, list) { in hci_free_adv_monitor()
3114 if (monitor->handle) in hci_free_adv_monitor()
3115 idr_remove(&hdev->adv_monitors_idr, monitor->handle); in hci_free_adv_monitor()
3117 if (monitor->state != ADV_MONITOR_STATE_NOT_REGISTERED) { in hci_free_adv_monitor()
3119 mgmt_adv_monitor_removed(hdev, monitor->handle); in hci_free_adv_monitor()
3122 kfree(monitor); in hci_free_adv_monitor()
3140 bool hci_add_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor, in hci_add_adv_monitor() argument
3147 if (!monitor) { in hci_add_adv_monitor()
3154 handle = idr_alloc(&hdev->adv_monitors_idr, monitor, min, max, in hci_add_adv_monitor()
3161 monitor->handle = handle; in hci_add_adv_monitor()
3173 *err = msft_add_monitor_pattern(hdev, monitor); in hci_add_adv_monitor()
3188 struct adv_monitor *monitor, in hci_remove_adv_monitor() argument
3197 *err = msft_remove_monitor(hdev, monitor, handle); in hci_remove_adv_monitor()
3210 monitor->handle); in hci_remove_adv_monitor()
3211 hci_free_adv_monitor(hdev, monitor); in hci_remove_adv_monitor()
3222 struct adv_monitor *monitor = idr_find(&hdev->adv_monitors_idr, handle); in hci_remove_single_adv_monitor() local
3225 if (!monitor) { in hci_remove_single_adv_monitor()
3230 pending = hci_remove_adv_monitor(hdev, monitor, handle, err); in hci_remove_single_adv_monitor()
3245 struct adv_monitor *monitor; in hci_remove_all_adv_monitor() local
3253 monitor = idr_get_next(&hdev->adv_monitors_idr, &idr_next_id); in hci_remove_all_adv_monitor()
3254 if (!monitor) in hci_remove_all_adv_monitor()
3257 pending = hci_remove_adv_monitor(hdev, monitor, 0, err); in hci_remove_all_adv_monitor()