Lines Matching refs:monitor
215 struct adv_monitor *monitor, in msft_le_monitor_advertisement_cb() argument
241 handle_data->mgmt_handle = monitor->handle; in msft_le_monitor_advertisement_cb()
246 monitor->state = ADV_MONITOR_STATE_OFFLOADED; in msft_le_monitor_advertisement_cb()
250 hci_free_adv_monitor(hdev, monitor); in msft_le_monitor_advertisement_cb()
259 struct adv_monitor *monitor, in msft_le_cancel_monitor_advertisement_cb() argument
279 handle_data = msft_find_handle_data(hdev, monitor->handle, true); in msft_le_cancel_monitor_advertisement_cb()
282 if (monitor->state == ADV_MONITOR_STATE_OFFLOADED) in msft_le_cancel_monitor_advertisement_cb()
283 monitor->state = ADV_MONITOR_STATE_REGISTERED; in msft_le_cancel_monitor_advertisement_cb()
289 hci_free_adv_monitor(hdev, monitor); in msft_le_cancel_monitor_advertisement_cb()
308 struct adv_monitor *monitor) in msft_remove_monitor_sync() argument
314 handle_data = msft_find_handle_data(hdev, monitor->handle, true); in msft_remove_monitor_sync()
332 monitor, skb); in msft_remove_monitor_sync()
339 struct adv_monitor *monitor; in msft_suspend_sync() local
348 monitor = idr_get_next(&hdev->adv_monitors_idr, &handle); in msft_suspend_sync()
349 if (!monitor) in msft_suspend_sync()
352 msft_remove_monitor_sync(hdev, monitor); in msft_suspend_sync()
363 static bool msft_monitor_rssi_valid(struct adv_monitor *monitor) in msft_monitor_rssi_valid() argument
365 struct adv_rssi_thresholds *r = &monitor->rssi; in msft_monitor_rssi_valid()
386 static bool msft_monitor_pattern_valid(struct adv_monitor *monitor) in msft_monitor_pattern_valid() argument
388 return msft_monitor_rssi_valid(monitor); in msft_monitor_pattern_valid()
393 struct adv_monitor *monitor) in msft_add_monitor_sync() argument
404 if (!msft_monitor_pattern_valid(monitor)) in msft_add_monitor_sync()
407 list_for_each_entry(entry, &monitor->patterns, list) { in msft_add_monitor_sync()
417 cp->rssi_high = monitor->rssi.high_threshold; in msft_add_monitor_sync()
418 cp->rssi_low = monitor->rssi.low_threshold; in msft_add_monitor_sync()
419 cp->rssi_low_interval = (u8)monitor->rssi.low_threshold_timeout; in msft_add_monitor_sync()
420 cp->rssi_sampling_period = monitor->rssi.sampling_period; in msft_add_monitor_sync()
427 list_for_each_entry(entry, &monitor->patterns, list) { in msft_add_monitor_sync()
448 monitor, skb); in msft_add_monitor_sync()
454 struct adv_monitor *monitor; in reregister_monitor() local
464 monitor = idr_get_next(&hdev->adv_monitors_idr, &handle); in reregister_monitor()
465 if (!monitor) in reregister_monitor()
468 msft_add_monitor_sync(hdev, monitor); in reregister_monitor()
541 struct adv_monitor *monitor; in msft_do_close() local
552 monitor = idr_find(&hdev->adv_monitors_idr, in msft_do_close()
555 if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED) in msft_do_close()
556 monitor->state = ADV_MONITOR_STATE_REGISTERED; in msft_do_close()
780 int msft_add_monitor_pattern(struct hci_dev *hdev, struct adv_monitor *monitor) in msft_add_monitor_pattern() argument
790 return msft_add_monitor_sync(hdev, monitor); in msft_add_monitor_pattern()
794 int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor) in msft_remove_monitor() argument
804 return msft_remove_monitor_sync(hdev, monitor); in msft_remove_monitor()