Lines Matching refs:app_idx
69 extern void btif_hl_release_mcl_sockets(UINT8 app_idx, UINT8 mcl_idx);
70 extern BOOLEAN btif_hl_create_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx);
71 extern void btif_hl_release_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx);
296 void btif_hl_stop_cch_timer(UINT8 app_idx, UINT8 mcl_idx) in btif_hl_stop_cch_timer() argument
298 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_stop_cch_timer()
300 BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d", __func__, app_idx, mcl_idx); in btif_hl_stop_cch_timer()
312 void btif_hl_start_cch_timer(UINT8 app_idx, UINT8 mcl_idx) in btif_hl_start_cch_timer() argument
314 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_start_cch_timer()
315 BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d", __func__, app_idx, mcl_idx); in btif_hl_start_cch_timer()
333 static BOOLEAN btif_hl_find_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, UINT16 mdl_id, in btif_hl_find_mdl_idx() argument
336 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_find_mdl_idx()
369 BOOLEAN btif_hl_is_the_first_reliable_existed(UINT8 app_idx, UINT8 mcl_idx ) in btif_hl_is_the_first_reliable_existed() argument
371 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_is_the_first_reliable_existed()
443 static void btif_hl_clean_mcl_cb(UINT8 app_idx, UINT8 mcl_idx) in btif_hl_clean_mcl_cb() argument
446 BTIF_TRACE_DEBUG("%s app_idx=%d, mcl_idx=%d", __FUNCTION__,app_idx, mcl_idx); in btif_hl_clean_mcl_cb()
447 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_clean_mcl_cb()
461 static void btif_hl_reset_mdep_filter(UINT8 app_idx) in btif_hl_reset_mdep_filter() argument
463 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_reset_mdep_filter()
476 static BOOLEAN btif_hl_find_sdp_idx_using_mdep_filter(UINT8 app_idx, UINT8 mcl_idx, UINT8 *p_sdp_id… in btif_hl_find_sdp_idx_using_mdep_filter() argument
478 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_find_sdp_idx_using_mdep_filter()
479 btif_hl_mcl_cb_t *p_mcb =BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_find_sdp_idx_using_mdep_filter()
542 btif_hl_reset_mdep_filter(app_idx); in btif_hl_find_sdp_idx_using_mdep_filter()
555 BOOLEAN btif_hl_is_reconnect_possible(UINT8 app_idx, UINT8 mcl_idx, int mdep_cfg_idx, in btif_hl_is_reconnect_possible() argument
558 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_is_reconnect_possible()
559 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_is_reconnect_possible()
573 __FUNCTION__, app_idx, mcl_idx, mdep_cfg_idx ); in btif_hl_is_reconnect_possible()
577 if (!btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx)) in btif_hl_is_reconnect_possible()
609 !btif_hl_find_mdl_idx(app_idx, mcl_idx,p_mdl->base.mdl_id, &mdl_idx)) in btif_hl_is_reconnect_possible()
681 UINT8 app_idx, mcl_idx; in btif_hl_dch_open() local
691 if (btif_hl_find_app_idx(app_id, &app_idx)) in btif_hl_dch_open()
693 if (btif_hl_find_mcl_idx(app_idx, bd_addr , &mcl_idx)) in btif_hl_dch_open()
695 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_dch_open()
697 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_dch_open()
717 … if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, mdep_cfg_idx, p_dch_open_api, &mdl_id )) in btif_hl_dch_open()
735 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_dch_open()
787 void btif_hl_dch_abort(UINT8 app_idx, UINT8 mcl_idx){ in btif_hl_dch_abort() argument
790 BTIF_TRACE_DEBUG("%s app_idx=%d mcl_idx=%d",__FUNCTION__, app_idx, mcl_idx ); in btif_hl_dch_abort()
791 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_dch_abort()
818 UINT8 app_idx, mcl_idx; in btif_hl_cch_open() local
826 if (btif_hl_find_app_idx(app_id, &app_idx)) in btif_hl_cch_open()
828 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_cch_open()
830 if (!btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx)) in btif_hl_cch_open()
832 if (btif_hl_find_avail_mcl_idx(app_idx, &mcl_idx)) in btif_hl_cch_open()
834 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_cch_open()
850 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_cch_open()
998 BOOLEAN btif_hl_find_channel_id_using_mdl_id(UINT8 app_idx, tBTA_HL_MDL_ID mdl_id, in btif_hl_find_channel_id_using_mdl_id() argument
1005 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_find_channel_id_using_mdl_id()
1010 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx,j); in btif_hl_find_channel_id_using_mdl_id()
1011 mdl_cfg_channel_id = *(BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx,j)); in btif_hl_find_channel_id_using_mdl_id()
1021 __FUNCTION__,found,*p_channel_id,mdl_id, app_idx,j ); in btif_hl_find_channel_id_using_mdl_id()
1087 UINT8 app_idx, mcl_idx; in btif_hl_find_peer_mdep_id() local
1110 if (btif_hl_find_app_idx(app_id, &app_idx) ) in btif_hl_find_peer_mdep_id()
1112 if (btif_hl_find_mcl_idx(app_idx, bd_addr, &mcl_idx)) in btif_hl_find_peer_mdep_id()
1114 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_find_peer_mdep_id()
1116 BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d",app_idx, mcl_idx); in btif_hl_find_peer_mdep_id()
1154 static BOOLEAN btif_hl_find_mdep_cfg_idx(UINT8 app_idx, tBTA_HL_MDEP_ID local_mdep_id, in btif_hl_find_mdep_cfg_idx() argument
1156 btif_hl_app_cb_t *p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_find_mdep_cfg_idx()
1164 p_sup_feature->mdep[i].mdep_id,app_idx); in btif_hl_find_mdep_cfg_idx()
1174 __FUNCTION__, found,i, local_mdep_id,app_idx); in btif_hl_find_mdep_cfg_idx()
1187 BOOLEAN btif_hl_find_mcl_idx(UINT8 app_idx, BD_ADDR p_bd_addr, UINT8 *p_mcl_idx){ in btif_hl_find_mcl_idx() argument
1195 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, i); in btif_hl_find_mcl_idx()
1277 static void btif_hl_free_app_idx(UINT8 app_idx){ in btif_hl_free_app_idx() argument
1279 if ((app_idx < BTA_HL_NUM_APPS) && btif_hl_cb.acb[app_idx].in_use ) in btif_hl_free_app_idx()
1281 btif_hl_cb.acb[app_idx].in_use = FALSE; in btif_hl_free_app_idx()
1283 alarm_free(btif_hl_cb.acb[app_idx].mcb[i].cch_timer); in btif_hl_free_app_idx()
1284 memset(&btif_hl_cb.acb[app_idx], 0, sizeof(btif_hl_app_cb_t)); in btif_hl_free_app_idx()
1814 void btif_hl_clean_mdls_using_app_idx( UINT8 app_idx){ in btif_hl_clean_mdls_using_app_idx() argument
1821 p_acb =BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_clean_mdls_using_app_idx()
1832 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, j,x); in btif_hl_clean_mdls_using_app_idx()
1833 btif_hl_release_socket(app_idx,j,x); in btif_hl_clean_mdls_using_app_idx()
1920 BOOLEAN btif_hl_find_avail_mdl_idx(UINT8 app_idx, UINT8 mcl_idx, in btif_hl_find_avail_mdl_idx() argument
1922 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_find_avail_mdl_idx()
1950 BOOLEAN btif_hl_find_avail_mcl_idx(UINT8 app_idx, UINT8 *p_mcl_idx){ in btif_hl_find_avail_mcl_idx() argument
1956 if (!btif_hl_cb.acb[app_idx].mcb[i].in_use) in btif_hl_find_avail_mcl_idx()
2007 UINT8 app_idx; in btif_hl_proc_dereg_cfm() local
2014 if (btif_hl_find_app_idx_using_app_id(p_data->dereg_cfm.app_id, &app_idx)) in btif_hl_proc_dereg_cfm()
2016 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_proc_dereg_cfm()
2020 btif_hl_clean_mdls_using_app_idx(app_idx); in btif_hl_proc_dereg_cfm()
2049 UINT8 app_idx; in btif_hl_proc_reg_cfm() local
2054 if (btif_hl_find_app_idx(p_data->reg_cfm.app_id, &app_idx)) in btif_hl_proc_reg_cfm()
2056 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_proc_reg_cfm()
2063 btif_hl_free_app_idx(app_idx); in btif_hl_proc_reg_cfm()
2082 void btif_hl_set_chan_cb_state(UINT8 app_idx, UINT8 mcl_idx, btif_hl_chan_cb_state_t state){ in btif_hl_set_chan_cb_state() argument
2083 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_set_chan_cb_state()
2125 void btif_hl_send_disconnecting_cb(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){ in btif_hl_send_disconnecting_cb() argument
2126 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR( app_idx, mcl_idx, mdl_idx); in btif_hl_send_disconnecting_cb()
2150 void btif_hl_send_setup_connecting_cb(UINT8 app_idx, UINT8 mcl_idx){ in btif_hl_send_setup_connecting_cb() argument
2151 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_send_setup_connecting_cb()
2167 btif_hl_set_chan_cb_state(app_idx, mcl_idx, BTIF_HL_CHAN_CB_STATE_CONNECTED_PENDING); in btif_hl_send_setup_connecting_cb()
2179 void btif_hl_send_setup_disconnected_cb(UINT8 app_idx, UINT8 mcl_idx){ in btif_hl_send_setup_disconnected_cb() argument
2180 btif_hl_pending_chan_cb_t *p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_send_setup_disconnected_cb()
2232 UINT8 app_idx, mcl_idx, sdp_idx = 0; in btif_hl_proc_sdp_query_cfm() local
2261 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx)) in btif_hl_proc_sdp_query_cfm()
2263 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_proc_sdp_query_cfm()
2265 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx)) in btif_hl_proc_sdp_query_cfm()
2267 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_proc_sdp_query_cfm()
2277 status = btif_hl_find_sdp_idx_using_mdep_filter(app_idx, in btif_hl_proc_sdp_query_cfm()
2293 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_proc_sdp_query_cfm()
2301 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx); in btif_hl_proc_sdp_query_cfm()
2321 status = btif_hl_proc_pending_op(app_idx,mcl_idx); in btif_hl_proc_sdp_query_cfm()
2391 BOOLEAN btif_hl_proc_pending_op(UINT8 app_idx, UINT8 mcl_idx) in btif_hl_proc_pending_op() argument
2395 btif_hl_app_cb_t *p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_proc_pending_op()
2396 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_proc_pending_op()
2403 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_proc_pending_op()
2420 && !btif_hl_is_the_first_reliable_existed(app_idx, mcl_idx)) in btif_hl_proc_pending_op()
2426 btif_hl_send_setup_connecting_cb(app_idx,mcl_idx); in btif_hl_proc_pending_op()
2428 … if (!btif_hl_is_reconnect_possible(app_idx, mcl_idx, p_pcb->mdep_cfg_idx, &dch_open, &mdl_id )) in btif_hl_proc_pending_op()
2445 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_proc_pending_op()
2474 UINT8 app_idx, mcl_idx; in btif_hl_proc_cch_open_cfm() local
2479 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx)) in btif_hl_proc_cch_open_cfm()
2481 BTIF_TRACE_DEBUG("app_idx=%d", app_idx); in btif_hl_proc_cch_open_cfm()
2482 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx)) in btif_hl_proc_cch_open_cfm()
2484 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_proc_cch_open_cfm()
2488 status = btif_hl_proc_pending_op(app_idx, mcl_idx); in btif_hl_proc_cch_open_cfm()
2490 btif_hl_start_cch_timer(app_idx, mcl_idx); in btif_hl_proc_cch_open_cfm()
2733 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx; in btif_hl_proc_dch_open_cfm() local
2740 btif_hl_find_app_idx_using_mdepId(p_data->dch_open_cfm.local_mdep_id,&app_idx); in btif_hl_proc_dch_open_cfm()
2742 if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_open_cfm.mcl_handle, app_idx, &mcl_idx )) in btif_hl_proc_dch_open_cfm()
2744 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_proc_dch_open_cfm()
2746 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx)) in btif_hl_proc_dch_open_cfm()
2748 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_open_cfm()
2750 … if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_open_cfm.local_mdep_id, &mdep_cfg_idx)) in btif_hl_proc_dch_open_cfm()
2762 BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx ); in btif_hl_proc_dch_open_cfm()
2763 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx); in btif_hl_proc_dch_open_cfm()
2764 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx)) in btif_hl_proc_dch_open_cfm()
2768 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id); in btif_hl_proc_dch_open_cfm()
2806 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx; in btif_hl_proc_dch_reconnect_cfm() local
2812 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_cfm.local_mdep_id,&app_idx); in btif_hl_proc_dch_reconnect_cfm()
2814 … if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_cfm.mcl_handle, app_idx, &mcl_idx )) in btif_hl_proc_dch_reconnect_cfm()
2816 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in btif_hl_proc_dch_reconnect_cfm()
2818 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx)) in btif_hl_proc_dch_reconnect_cfm()
2820 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_reconnect_cfm()
2822 … if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_cfm.local_mdep_id, &mdep_cfg_idx)) in btif_hl_proc_dch_reconnect_cfm()
2834 BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx ); in btif_hl_proc_dch_reconnect_cfm()
2835 btif_hl_send_setup_connecting_cb(app_idx, mcl_idx); in btif_hl_proc_dch_reconnect_cfm()
2836 if (btif_hl_create_socket(app_idx, mcl_idx, mdl_idx)) in btif_hl_proc_dch_reconnect_cfm()
2840 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id); in btif_hl_proc_dch_reconnect_cfm()
2880 UINT8 app_idx, mcl_idx, mdl_idx, mdep_cfg_idx; in btif_hl_proc_dch_reconnect_ind() local
2886 btif_hl_find_app_idx_using_mdepId(p_data->dch_reconnect_ind.local_mdep_id,&app_idx); in btif_hl_proc_dch_reconnect_ind()
2888 … if (btif_hl_find_mcl_idx_using_app_idx(p_data->dch_reconnect_ind.mcl_handle, app_idx, &mcl_idx )) in btif_hl_proc_dch_reconnect_ind()
2890 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_proc_dch_reconnect_ind()
2892 app_idx, mcl_idx); in btif_hl_proc_dch_reconnect_ind()
2894 if (btif_hl_find_avail_mdl_idx(app_idx, mcl_idx, &mdl_idx)) in btif_hl_proc_dch_reconnect_ind()
2896 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_reconnect_ind()
2898 … if (btif_hl_find_mdep_cfg_idx(app_idx, p_data->dch_reconnect_ind.local_mdep_id, &mdep_cfg_idx)) in btif_hl_proc_dch_reconnect_ind()
2912 app_idx, mcl_idx, mdl_idx, p_dcb->channel_id ); in btif_hl_proc_dch_reconnect_ind()
2913 if (!btif_hl_create_socket(app_idx, mcl_idx, mdl_idx)) in btif_hl_proc_dch_reconnect_ind()
2953 UINT8 app_idx, mcl_idx, mdl_idx; in btif_hl_proc_dch_close_ind() local
2957 &app_idx, &mcl_idx, &mdl_idx )) in btif_hl_proc_dch_close_ind()
2959 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_close_ind()
2960 btif_hl_release_socket(app_idx,mcl_idx, mdl_idx); in btif_hl_proc_dch_close_ind()
2961 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_proc_dch_close_ind()
2962 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx); in btif_hl_proc_dch_close_ind()
2965 btif_hl_start_cch_timer(app_idx, mcl_idx); in btif_hl_proc_dch_close_ind()
2984 UINT8 app_idx, mcl_idx, mdl_idx; in btif_hl_proc_dch_close_cfm() local
2988 &app_idx, &mcl_idx, &mdl_idx )) in btif_hl_proc_dch_close_cfm()
2990 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_close_cfm()
2991 btif_hl_release_socket(app_idx,mcl_idx,mdl_idx); in btif_hl_proc_dch_close_cfm()
2993 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx,mcl_idx); in btif_hl_proc_dch_close_cfm()
2995 btif_hl_start_cch_timer(app_idx, mcl_idx); in btif_hl_proc_dch_close_cfm()
3077 UINT8 app_idx,mcl_idx, mdl_idx; in btif_hl_proc_send_data_cfm() local
3083 &app_idx, &mcl_idx, &mdl_idx )) in btif_hl_proc_send_data_cfm()
3085 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_send_data_cfm()
3106 UINT8 app_idx, mcl_idx, mdl_idx; in btif_hl_proc_dch_cong_ind() local
3110 …if (btif_hl_find_mdl_idx_using_handle(p_data->dch_cong_ind.mdl_handle, &app_idx, &mcl_idx, &mdl_id… in btif_hl_proc_dch_cong_ind()
3112 p_dcb =BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_proc_dch_cong_ind()
3126 static void btif_hl_proc_reg_request(UINT8 app_idx, UINT8 app_id, in btif_hl_proc_reg_request() argument
3131 BTIF_TRACE_DEBUG("%s app_idx=%d app_id=%d", __FUNCTION__, app_idx, app_id); in btif_hl_proc_reg_request()
3189 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->reg.app_idx); in btif_hl_proc_cb_evt()
3190 …BTIF_TRACE_DEBUG("Rcv BTIF_HL_REG_APP app_idx=%d reg_pending=%d", p_data->reg.app_idx, p_acb->reg_… in btif_hl_proc_cb_evt()
3200 … btif_hl_proc_reg_request (p_data->reg.app_idx, p_acb->app_id, ®_param, btif_hl_cback); in btif_hl_proc_cb_evt()
3210 BTIF_TRACE_DEBUG("Rcv BTIF_HL_UNREG_APP app_idx=%d", p_data->unreg.app_idx ); in btif_hl_proc_cb_evt()
3211 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->unreg.app_idx); in btif_hl_proc_cb_evt()
3221 BTIF_TRACE_DEBUG("Rcv BTIF_HL_UPDATE_MDL app_idx=%d", p_data->update_mdl.app_idx ); in btif_hl_proc_cb_evt()
3222 p_acb = BTIF_HL_GET_APP_CB_PTR(p_data->update_mdl.app_idx); in btif_hl_proc_cb_evt()
3242 UINT8 app_idx, mcl_idx; in btif_hl_upstreams_evt() local
3300 if (btif_hl_find_app_idx_using_app_id(p_data->sdp_query_cfm.app_id, &app_idx)) in btif_hl_upstreams_evt()
3302 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_upstreams_evt()
3303 if (btif_hl_find_mcl_idx(app_idx, p_data->sdp_query_cfm.bd_addr, &mcl_idx)) in btif_hl_upstreams_evt()
3305 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3313 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3321 btif_hl_clean_mcl_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3353 if (btif_hl_find_app_idx_using_app_id(p_data->cch_open_cfm.app_id, &app_idx)) in btif_hl_upstreams_evt()
3355 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_upstreams_evt()
3356 if (btif_hl_find_mcl_idx(app_idx, p_data->cch_open_cfm.bd_addr, &mcl_idx)) in btif_hl_upstreams_evt()
3358 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3363 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3370 btif_hl_clean_mcl_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3399 … if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx)) in btif_hl_upstreams_evt()
3401 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3406 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3471 &app_idx)) in btif_hl_upstreams_evt()
3473 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_upstreams_evt()
3502 … if (btif_hl_find_mcl_idx_using_handle(p_data->dch_open_cfm.mcl_handle,&app_idx, &mcl_idx)) in btif_hl_upstreams_evt()
3504 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3509 btif_hl_send_setup_disconnected_cb(app_idx, mcl_idx); in btif_hl_upstreams_evt()
3835 UINT8 app_idx, mcl_idx; in connect_channel() local
3852 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx)) in connect_channel()
3854 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in connect_channel()
3855 if (btif_hl_find_mcl_idx(app_idx, bda , &mcl_idx)) in connect_channel()
3857 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in connect_channel()
3862 …TIF_TRACE_DEBUG("connect_channel: app_idx =%d, mdep_cfg_indx =%d, mdep_id =%d app_id= %d", app_idx, in connect_channel()
3870 && !btif_hl_is_the_first_reliable_existed(app_idx,mcl_idx)) in connect_channel()
3887 p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx); in connect_channel()
3936 UINT8 app_idx, mcl_idx, mdl_cfg_idx, mdep_cfg_idx = 0; in destroy_channel() local
3946 if (btif_hl_if_channel_setup_pending(channel_id, &app_idx, &mcl_idx)) in destroy_channel()
3948 btif_hl_dch_abort(app_idx, mcl_idx); in destroy_channel()
3952 if (btif_hl_find_mdl_cfg_idx_using_channel_id(channel_id, &app_idx, &mdl_cfg_idx)) in destroy_channel()
3955 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in destroy_channel()
3958 p_mdl =BTIF_HL_GET_MDL_CFG_PTR(app_idx, mdl_cfg_idx); in destroy_channel()
3965 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr, &mcl_idx)) in destroy_channel()
3967 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in destroy_channel()
4025 UINT8 app_idx; in unregister_application() local
4034 if (btif_hl_find_app_idx(((UINT8)app_id), &app_idx)) in unregister_application()
4036 evt_param.unreg.app_idx = app_idx; in unregister_application()
4065 UINT8 app_idx=0, i=0; in register_application() local
4082 if (!btif_hl_find_avail_app_idx(&app_idx)) in register_application()
4088 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in register_application()
4160 evt_param.reg.app_idx = app_idx; in register_application()
4172 btif_hl_free_app_idx(app_idx); in register_application()
4194 UINT8 app_idx, mcl_idx, len; in btif_hl_save_mdl_cfg() local
4203 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx)) in btif_hl_save_mdl_cfg()
4205 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_save_mdl_cfg()
4206 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx); in btif_hl_save_mdl_cfg()
4207 p_channel_id = BTIF_HL_GET_MDL_CFG_CHANNEL_ID_PTR(app_idx, item_idx); in btif_hl_save_mdl_cfg()
4211 if (btif_hl_find_mcl_idx(app_idx, p_mdl->base.peer_bd_addr , &mcl_idx)) in btif_hl_save_mdl_cfg()
4213 p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_save_mdl_cfg()
4229 __FUNCTION__, app_idx, item_idx, p_mdl->base.mdl_id); in btif_hl_save_mdl_cfg()
4230 evt_param.update_mdl.app_idx = app_idx; in btif_hl_save_mdl_cfg()
4232 BTIF_TRACE_DEBUG("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx); in btif_hl_save_mdl_cfg()
4259 UINT8 app_idx, len; in btif_hl_delete_mdl_cfg() local
4263 if(btif_hl_find_app_idx_using_mdepId(mdep_id,&app_idx)) in btif_hl_delete_mdl_cfg()
4265 p_mdl = BTIF_HL_GET_MDL_CFG_PTR(app_idx, item_idx); in btif_hl_delete_mdl_cfg()
4269 evt_param.update_mdl.app_idx = app_idx; in btif_hl_delete_mdl_cfg()
4271 BTIF_TRACE_DEBUG("send BTIF_HL_UPDATE_MDL event app_idx=%d ",app_idx); in btif_hl_delete_mdl_cfg()
4412 void btif_hl_release_mcl_sockets(UINT8 app_idx, UINT8 mcl_idx){ in btif_hl_release_mcl_sockets() argument
4419 p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, i); in btif_hl_release_mcl_sockets()
4422 … BTIF_TRACE_DEBUG("found socket for app_idx=%d mcl_id=%d, mdl_idx=%d", app_idx, mcl_idx, i); in btif_hl_release_mcl_sockets()
4440 void btif_hl_release_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){ in btif_hl_release_socket() argument
4442 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_release_socket()
4445 BTIF_TRACE_DEBUG("app_idx=%d mcl_idx=%d mdl_idx=%d", app_idx, mcl_idx, mdl_idx ); in btif_hl_release_socket()
4464 BOOLEAN btif_hl_create_socket(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx){ in btif_hl_create_socket() argument
4465 btif_hl_mcl_cb_t *p_mcb = BTIF_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in btif_hl_create_socket()
4466 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(app_idx, mcl_idx, mdl_idx); in btif_hl_create_socket()
4477 p_scb->app_idx = app_idx; in btif_hl_create_socket()
4525 p_mcb = BTIF_HL_GET_MCL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx); in btif_hl_add_socket_to_set()
4526 p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx); in btif_hl_add_socket_to_set()
4527 p_acb = BTIF_HL_GET_APP_CB_PTR(p_scb->app_idx); in btif_hl_add_socket_to_set()
4562 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx); in btif_hl_close_socket()
4593 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, in btif_hl_close_socket()
4596 p_scb->app_idx, p_scb->mcl_idx, p_scb->mdl_idx, p_dcb->in_use); in btif_hl_close_socket()
4649 btif_hl_mdl_cb_t *p_dcb = BTIF_HL_GET_MDL_CB_PTR(p_scb->app_idx, in btif_hl_select_monitor_callback()
4946 UINT8 app_idx; in btif_hl_load_mdl_config() local
4953 if (btif_hl_find_app_idx(app_id, &app_idx)) in btif_hl_load_mdl_config()
4955 p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx); in btif_hl_load_mdl_config()