Lines Matching full:monitor
132 /* To synchronize add/remove address filter and monitor device event.*/
259 struct adv_monitor *monitor, in msft_le_monitor_advertisement_cb() argument
285 handle_data->mgmt_handle = monitor->handle; in msft_le_monitor_advertisement_cb()
291 monitor->state = ADV_MONITOR_STATE_OFFLOADED; in msft_le_monitor_advertisement_cb()
295 hci_free_adv_monitor(hdev, monitor); in msft_le_monitor_advertisement_cb()
368 struct adv_monitor *monitor, in msft_le_cancel_monitor_advertisement_cb() argument
389 handle_data = msft_find_handle_data(hdev, monitor->handle, true); in msft_le_cancel_monitor_advertisement_cb()
392 if (monitor->state == ADV_MONITOR_STATE_OFFLOADED) in msft_le_cancel_monitor_advertisement_cb()
393 monitor->state = ADV_MONITOR_STATE_REGISTERED; in msft_le_cancel_monitor_advertisement_cb()
395 /* Do not free the monitor if it is being removed due to in msft_le_cancel_monitor_advertisement_cb()
399 hci_free_adv_monitor(hdev, monitor); in msft_le_cancel_monitor_advertisement_cb()
401 /* Clear any monitored devices by this Adv Monitor */ in msft_le_cancel_monitor_advertisement_cb()
424 struct adv_monitor *monitor) in msft_remove_monitor_sync() argument
430 handle_data = msft_find_handle_data(hdev, monitor->handle, true); in msft_remove_monitor_sync()
445 monitor, skb); in msft_remove_monitor_sync()
452 struct adv_monitor *monitor; in msft_suspend_sync() local
461 monitor = idr_get_next(&hdev->adv_monitors_idr, &handle); in msft_suspend_sync()
462 if (!monitor) in msft_suspend_sync()
465 msft_remove_monitor_sync(hdev, monitor); in msft_suspend_sync()
476 static bool msft_monitor_rssi_valid(struct adv_monitor *monitor) in msft_monitor_rssi_valid() argument
478 struct adv_rssi_thresholds *r = &monitor->rssi; in msft_monitor_rssi_valid()
499 static bool msft_monitor_pattern_valid(struct adv_monitor *monitor) in msft_monitor_pattern_valid() argument
501 return msft_monitor_rssi_valid(monitor); in msft_monitor_pattern_valid()
502 /* No additional check needed for pattern-based monitor */ in msft_monitor_pattern_valid()
506 struct adv_monitor *monitor) in msft_add_monitor_sync() argument
519 if (!msft_monitor_pattern_valid(monitor)) in msft_add_monitor_sync()
522 list_for_each_entry(entry, &monitor->patterns, list) { in msft_add_monitor_sync()
532 cp->rssi_high = monitor->rssi.high_threshold; in msft_add_monitor_sync()
533 cp->rssi_low = monitor->rssi.low_threshold; in msft_add_monitor_sync()
534 cp->rssi_low_interval = (u8)monitor->rssi.low_threshold_timeout; in msft_add_monitor_sync()
535 cp->rssi_sampling_period = monitor->rssi.sampling_period; in msft_add_monitor_sync()
542 list_for_each_entry(entry, &monitor->patterns, list) { in msft_add_monitor_sync()
561 monitor, skb); in msft_add_monitor_sync()
565 handle_data = msft_find_handle_data(hdev, monitor->handle, true); in msft_add_monitor_sync()
584 struct adv_monitor *monitor; in reregister_monitor() local
594 monitor = idr_get_next(&hdev->adv_monitors_idr, &handle); in reregister_monitor()
595 if (!monitor) in reregister_monitor()
598 msft_add_monitor_sync(hdev, monitor); in reregister_monitor()
661 * tell the controller to re-monitor. in msft_do_open()
672 struct adv_monitor *monitor; in msft_do_close() local
680 * Therefore, remove handle_data mapping and reset monitor state. in msft_do_close()
683 monitor = idr_find(&hdev->adv_monitors_idr, in msft_do_close()
686 if (monitor && monitor->state == ADV_MONITOR_STATE_OFFLOADED) in msft_do_close()
687 monitor->state = ADV_MONITOR_STATE_REGISTERED; in msft_do_close()
951 * avoided when receiving monitor device event (found/lost) frequently in msft_add_address_filter()
1001 * monitors. Pattern monitor always has its address filters for in msft_monitor_device_evt()
1019 /* This device event is not from pattern monitor. in msft_monitor_device_evt()
1152 int msft_add_monitor_pattern(struct hci_dev *hdev, struct adv_monitor *monitor) in msft_add_monitor_pattern() argument
1162 return msft_add_monitor_sync(hdev, monitor); in msft_add_monitor_pattern()
1166 int msft_remove_monitor(struct hci_dev *hdev, struct adv_monitor *monitor) in msft_remove_monitor() argument
1176 return msft_remove_monitor_sync(hdev, monitor); in msft_remove_monitor()