Lines Matching refs:btm_cb

44 extern tBTM_CB btm_cb;
62 return (btm_cb.btm_inq_vars.inqparms.max_resps && in max_responses_reached()
63 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp >= in max_responses_reached()
64 btm_cb.btm_inq_vars.inqparms.max_resps); in max_responses_reached()
68 return btm_cb.btm_inq_vars.inq_active & BTM_PERIODIC_INQUIRY_ACTIVE; in is_periodic_inquiry_active()
88 return btm_cb.btm_inq_vars.inqparms.mode & BTM_BLE_INQUIRY_MASK; in is_observing_or_active_scanning()
116 } else if (p_i->inq_count == btm_cb.btm_inq_vars.inq_counter && in btm_api_process_inquiry_result()
132 p_i->inq_count = btm_cb.btm_inq_vars.inq_counter; in btm_api_process_inquiry_result()
135 if (p_i->inq_count != btm_cb.btm_inq_vars.inq_counter) { in btm_api_process_inquiry_result()
137 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp++; in btm_api_process_inquiry_result()
144 if (btm_cb.btm_inq_vars.p_inq_results_cb == nullptr) { in btm_api_process_inquiry_result()
148 (btm_cb.btm_inq_vars.p_inq_results_cb)(&p_i->inq_info.results, nullptr, 0); in btm_api_process_inquiry_result()
165 if (btm_cb.btm_inq_vars.inqparms.report_dup && p_i != nullptr && in btm_api_process_inquiry_result_with_rssi()
176 } else if (p_i->inq_count == btm_cb.btm_inq_vars.inq_counter && in btm_api_process_inquiry_result_with_rssi()
194 p_i->inq_count = btm_cb.btm_inq_vars.inq_counter; in btm_api_process_inquiry_result_with_rssi()
197 if (p_i->inq_count != btm_cb.btm_inq_vars.inq_counter) { in btm_api_process_inquiry_result_with_rssi()
199 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp++; in btm_api_process_inquiry_result_with_rssi()
207 if (btm_cb.btm_inq_vars.p_inq_results_cb == nullptr) { in btm_api_process_inquiry_result_with_rssi()
212 (btm_cb.btm_inq_vars.p_inq_results_cb)(&p_i->inq_info.results, nullptr, 0); in btm_api_process_inquiry_result_with_rssi()
236 } else if (p_i->inq_count == btm_cb.btm_inq_vars.inq_counter && in btm_api_process_extended_inquiry_result()
254 p_i->inq_count = btm_cb.btm_inq_vars.inq_counter; in btm_api_process_extended_inquiry_result()
257 if (p_i->inq_count != btm_cb.btm_inq_vars.inq_counter) { in btm_api_process_extended_inquiry_result()
259 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp++; in btm_api_process_extended_inquiry_result()
267 if (btm_cb.btm_inq_vars.p_inq_results_cb == nullptr) { in btm_api_process_extended_inquiry_result()
276 (btm_cb.btm_inq_vars.p_inq_results_cb)(&p_i->inq_info.results, p_eir_data, in btm_api_process_extended_inquiry_result()
290 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp = 0; in BTM_StartInquiry()
291 btm_cb.btm_inq_vars.scan_type = INQ_GENERAL; in BTM_StartInquiry()
318 btm_cb.btm_inq_vars.inqparms.mode &= ~(inquiry_mode); in BTM_StartInquiry()
321 if (btm_cb.btm_inq_vars.inq_active) { in BTM_StartInquiry()
322 btm_cb.btm_inq_vars.inq_cmpl_info.status = status; in BTM_StartInquiry()
324 btm_cb.btm_inq_vars.state = BTM_INQ_INACTIVE_STATE; in BTM_StartInquiry()
327 btm_cb.btm_inq_vars.inq_counter++; in BTM_StartInquiry()
337 btm_cb.btm_inq_vars.inq_active = BTM_INQUIRY_INACTIVE; in BTM_StartInquiry()
338 btm_cb.btm_inq_vars.p_inq_results_cb = nullptr; in BTM_StartInquiry()
339 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr; in BTM_StartInquiry()
341 if (btm_cb.btm_inq_vars.p_inq_cmpl_cb != nullptr) { in BTM_StartInquiry()
344 (btm_cb.btm_inq_vars.p_inq_cmpl_cb)( in BTM_StartInquiry()
345 (tBTM_INQUIRY_CMPL*)&btm_cb.btm_inq_vars.inq_cmpl_info); in BTM_StartInquiry()
346 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr; in BTM_StartInquiry()
349 if (btm_cb.btm_inq_vars.inqparms.mode == BTM_INQUIRY_NONE && in BTM_StartInquiry()
350 btm_cb.btm_inq_vars.scan_type == INQ_GENERAL) { in BTM_StartInquiry()
351 btm_cb.btm_inq_vars.scan_type = INQ_NONE; in BTM_StartInquiry()
358 btm_cb.btm_inq_vars.state = BTM_INQ_ACTIVE_STATE; in BTM_StartInquiry()
359 btm_cb.btm_inq_vars.p_inq_cmpl_cb = p_cmpl_cb; in BTM_StartInquiry()
360 btm_cb.btm_inq_vars.p_inq_results_cb = p_results_cb; in BTM_StartInquiry()
361 btm_cb.btm_inq_vars.inq_active = p_inqparms->mode; in BTM_StartInquiry()
434 if (btm_cb.ble_ctr_cb.scan_activity & BTM_LE_OBSERVE_ACTIVE) { in BTM_BleObserve()
439 btm_cb.ble_ctr_cb.p_obs_results_cb = p_results_cb; in BTM_BleObserve()
440 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = p_cmpl_cb; in BTM_BleObserve()
442 btm_cb.ble_ctr_cb.scan_activity |= BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve()
453 btm_cb.ble_ctr_cb.scan_activity &= ~BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve()
455 if (btm_cb.ble_ctr_cb.p_obs_cmpl_cb) { in BTM_BleObserve()
456 (btm_cb.ble_ctr_cb.p_obs_cmpl_cb)( in BTM_BleObserve()
457 &btm_cb.btm_inq_vars.inq_cmpl_info); in BTM_BleObserve()
459 btm_cb.ble_ctr_cb.p_obs_results_cb = nullptr; in BTM_BleObserve()
460 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = nullptr; in BTM_BleObserve()
462 btm_cb.btm_inq_vars.inqparms.mode &= ~(BTM_BLE_INQUIRY_MASK); in BTM_BleObserve()
463 btm_cb.btm_inq_vars.scan_type = INQ_NONE; in BTM_BleObserve()
468 btm_cb.btm_inq_vars.state = BTM_INQ_INACTIVE_STATE; in BTM_BleObserve()
470 btm_cb.btm_inq_vars.inq_counter++; in BTM_BleObserve()
474 btm_cb.btm_inq_vars.inq_active = BTM_INQUIRY_INACTIVE; in BTM_BleObserve()
475 btm_cb.btm_inq_vars.p_inq_results_cb = NULL; in BTM_BleObserve()
476 btm_cb.btm_inq_vars.p_inq_cmpl_cb = NULL; in BTM_BleObserve()
478 if (btm_cb.btm_inq_vars.p_inq_cmpl_cb) { in BTM_BleObserve()
479 (btm_cb.btm_inq_vars.p_inq_cmpl_cb)( in BTM_BleObserve()
480 (tBTM_INQUIRY_CMPL*)&btm_cb.btm_inq_vars.inq_cmpl_info); in BTM_BleObserve()
481 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr; in BTM_BleObserve()
488 if (!(btm_cb.ble_ctr_cb.scan_activity & BTM_LE_OBSERVE_ACTIVE)) { in BTM_BleObserve()
493 btm_cb.ble_ctr_cb.scan_activity &= ~BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve()
495 if (btm_cb.ble_ctr_cb.p_obs_cmpl_cb) { in BTM_BleObserve()
496 (btm_cb.ble_ctr_cb.p_obs_cmpl_cb)(&btm_cb.btm_inq_vars.inq_cmpl_info); in BTM_BleObserve()
498 btm_cb.ble_ctr_cb.p_obs_results_cb = nullptr; in BTM_BleObserve()
499 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = nullptr; in BTM_BleObserve()
618 btm_cb.btm_inq_vars.state = BTM_INQ_INACTIVE_STATE; in BTM_CancelInquiry()
624 btm_cb.ble_ctr_cb.scan_activity &= ~BTM_BLE_INQUIRY_MASK; in BTM_CancelInquiry()
626 btm_cb.btm_inq_vars.inqparms.mode &= in BTM_CancelInquiry()
627 ~(btm_cb.btm_inq_vars.inqparms.mode & BTM_BLE_INQUIRY_MASK); in BTM_CancelInquiry()
631 if (btm_cb.btm_inq_vars.inq_active) { in BTM_CancelInquiry()
632 btm_cb.btm_inq_vars.inq_cmpl_info.status = BTM_SUCCESS; in BTM_CancelInquiry()
639 btm_cb.btm_inq_vars.inq_active = BTM_INQUIRY_INACTIVE; in BTM_CancelInquiry()
640 btm_cb.btm_inq_vars.p_inq_results_cb = nullptr; in BTM_CancelInquiry()
641 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr; in BTM_CancelInquiry()
642 btm_cb.btm_inq_vars.inq_counter++; in BTM_CancelInquiry()
644 if (btm_cb.btm_inq_vars.p_inq_cmpl_cb != nullptr) { in BTM_CancelInquiry()
647 (btm_cb.btm_inq_vars.p_inq_cmpl_cb)( in BTM_CancelInquiry()
648 (tBTM_INQUIRY_CMPL*)&btm_cb.btm_inq_vars.inq_cmpl_info); in BTM_CancelInquiry()
649 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr; in BTM_CancelInquiry()
652 if (btm_cb.btm_inq_vars.inqparms.mode == BTM_INQUIRY_NONE && in BTM_CancelInquiry()
653 btm_cb.btm_inq_vars.scan_type == INQ_GENERAL) { in BTM_CancelInquiry()
654 btm_cb.btm_inq_vars.scan_type = INQ_NONE; in BTM_CancelInquiry()