Lines Matching defs:monitor

1882 	struct adv_monitor *monitor;
1885 idr_for_each_entry(&hdev->adv_monitors_idr, monitor, handle)
1886 hci_free_adv_monitor(hdev, monitor);
1891 /* Frees the monitor structure and do some bookkeepings.
1894 void hci_free_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
1899 if (!monitor)
1902 list_for_each_entry_safe(pattern, tmp, &monitor->patterns, list) {
1907 if (monitor->handle)
1908 idr_remove(&hdev->adv_monitors_idr, monitor->handle);
1910 if (monitor->state != ADV_MONITOR_STATE_NOT_REGISTERED)
1913 kfree(monitor);
1916 /* Assigns handle to a monitor, and if offloading is supported and power is on,
1920 int hci_add_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor)
1925 if (!monitor)
1932 handle = idr_alloc(&hdev->adv_monitors_idr, monitor, min, max,
1940 monitor->handle = handle;
1947 bt_dev_dbg(hdev, "add monitor %d status %d",
1948 monitor->handle, status);
1953 status = msft_add_monitor_pattern(hdev, monitor);
1954 bt_dev_dbg(hdev, "add monitor %d msft status %d",
1962 /* Attempts to tell the controller and free the monitor. If somehow the
1967 struct adv_monitor *monitor)
1974 bt_dev_dbg(hdev, "remove monitor %d status %d",
1975 monitor->handle, status);
1979 handle = monitor->handle;
1980 status = msft_remove_monitor(hdev, monitor);
1981 bt_dev_dbg(hdev, "remove monitor %d msft status %d",
1986 /* In case no matching handle registered, just free the monitor */
1994 bt_dev_warn(hdev, "Removing monitor with no matching handle %d",
1995 monitor->handle);
1996 hci_free_adv_monitor(hdev, monitor);
2004 struct adv_monitor *monitor = idr_find(&hdev->adv_monitors_idr, handle);
2006 if (!monitor)
2009 return hci_remove_adv_monitor(hdev, monitor);
2015 struct adv_monitor *monitor;
2020 monitor = idr_get_next(&hdev->adv_monitors_idr, &idr_next_id);
2021 if (!monitor)
2024 status = hci_remove_adv_monitor(hdev, monitor);
3048 /* Send copy to monitor */
4064 /* Send copy to monitor */