Lines Matching refs:p_data

89 …edef void (*tBTA_HL_DCH_ACTION)(UINT8 app_idx, UINT8 mcl_idx, UINT8 mdl_idx, tBTA_HL_DATA *p_data);
307 typedef void (*tBTA_HL_CCH_ACTION)(UINT8 app_idx, UINT8 mcl_idx, tBTA_HL_DATA *p_data);
418 UINT16 event, tBTA_HL_DATA *p_data) in bta_hl_cch_sm_execute() argument
445 (*bta_hl_cch_action[action])(app_idx, mcl_idx, p_data); in bta_hl_cch_sm_execute()
450 bta_hl_discard_data(p_data->hdr.event, p_data); in bta_hl_cch_sm_execute()
476 UINT16 event, tBTA_HL_DATA *p_data) in bta_hl_dch_sm_execute() argument
502 (*bta_hl_dch_action[action])(app_idx, mcl_idx, mdl_idx, p_data); in bta_hl_dch_sm_execute()
507 bta_hl_discard_data(p_data->hdr.event, p_data); in bta_hl_dch_sm_execute()
532 static void bta_hl_api_enable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_enable() argument
541 if (p_data->api_enable.p_cback) in bta_hl_api_enable()
542 p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data); in bta_hl_api_enable()
550 p_cb->p_ctrl_cback = p_data->api_enable.p_cback; in bta_hl_api_enable()
552 if (p_data->api_enable.p_cback) in bta_hl_api_enable()
553 p_data->api_enable.p_cback(BTA_HL_CTRL_ENABLE_CFM_EVT, (tBTA_HL_CTRL *) &evt_data); in bta_hl_api_enable()
565 static void bta_hl_api_disable(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_disable() argument
573 bta_hl_check_disable(p_data); in bta_hl_api_disable()
601 static void bta_hl_api_update(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_update() argument
612 status = bta_hl_app_update(p_data->api_update.app_id, p_data->api_update.is_register); in bta_hl_api_update()
613 if (!p_data->api_update.is_register) in bta_hl_api_update()
618 evt_data.dereg_cfm.app_id = p_data->api_update.app_id; in bta_hl_api_update()
648 evt_data.reg_cfm.app_id = p_data->api_update.app_id; in bta_hl_api_update()
651 if (p_data->api_reg.p_cback) in bta_hl_api_update()
653 p_data->api_reg.p_cback(BTA_HL_REGISTER_CFM_EVT, (tBTA_HL *) &evt_data); in bta_hl_api_update()
664 if (p_data->api_reg.p_cback) in bta_hl_api_update()
666 p_data->api_reg.p_cback(BTA_HL_SDP_INFO_IND_EVT, (tBTA_HL *) &evt_data); in bta_hl_api_update()
680 static void bta_hl_api_register(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_register() argument
690 if (!bta_hl_is_a_duplicate_id(p_data->api_reg.app_id)) in bta_hl_api_register()
696 p_acb->app_id = p_data->api_reg.app_id; in bta_hl_api_register()
697 p_acb->p_cback = p_data->api_reg.p_cback; in bta_hl_api_register()
698 p_acb->sec_mask = p_data->api_reg.sec_mask; in bta_hl_api_register()
699 p_acb->dev_type = p_data->api_reg.dev_type; in bta_hl_api_register()
700 strlcpy(p_acb->srv_name, p_data->api_reg.srv_name, BTA_SERVICE_NAME_LEN); in bta_hl_api_register()
701 strlcpy(p_acb->srv_desp, p_data->api_reg.srv_desp, BTA_SERVICE_DESP_LEN); in bta_hl_api_register()
702 strlcpy(p_acb->provider_name, p_data->api_reg.provider_name, BTA_PROVIDER_NAME_LEN); in bta_hl_api_register()
738 evt_data.reg_cfm.app_id = p_data->api_reg.app_id; in bta_hl_api_register()
741 if (p_data->api_reg.p_cback) in bta_hl_api_register()
743 p_data->api_reg.p_cback(BTA_HL_REGISTER_CFM_EVT, (tBTA_HL *) &evt_data); in bta_hl_api_register()
754 if (p_data->api_reg.p_cback) in bta_hl_api_register()
756 p_data->api_reg.p_cback(BTA_HL_SDP_INFO_IND_EVT, (tBTA_HL *) &evt_data); in bta_hl_api_register()
770 static void bta_hl_api_deregister(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_deregister() argument
776 if (bta_hl_find_app_idx_using_handle(p_data->api_dereg.app_handle, &app_idx)) in bta_hl_api_deregister()
780 bta_hl_check_deregistration(app_idx,p_data); in bta_hl_api_deregister()
784 APPL_TRACE_ERROR("Invalid app_handle=%d", p_data->api_dereg.app_handle); in bta_hl_api_deregister()
797 static void bta_hl_api_cch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_cch_open() argument
806 if (bta_hl_find_app_idx_using_handle(p_data->api_cch_open.app_handle, &app_idx)) in bta_hl_api_cch_open()
809 if (!bta_hl_find_mcl_idx(app_idx, p_data->api_cch_open.bd_addr, &mcl_idx)) in bta_hl_api_cch_open()
815 p_mcb->req_ctrl_psm = p_data->api_cch_open.ctrl_psm; in bta_hl_api_cch_open()
816 p_mcb->sec_mask = p_data->api_cch_open.sec_mask; in bta_hl_api_cch_open()
817 bdcpy(p_mcb->bd_addr, p_data->api_cch_open.bd_addr); in bta_hl_api_cch_open()
834 bta_hl_build_cch_open_cfm(&evt_data, p_data->api_cch_open.app_id, in bta_hl_api_cch_open()
835 p_data->api_cch_open.app_handle, in bta_hl_api_cch_open()
837 p_data->api_cch_open.bd_addr, in bta_hl_api_cch_open()
861 bta_hl_cch_sm_execute(app_idx, mcl_idx, BTA_HL_CCH_OPEN_EVT, p_data); in bta_hl_api_cch_open()
869 bta_hl_build_cch_open_cfm(&evt_data, p_data->api_cch_open.app_id, in bta_hl_api_cch_open()
870 p_data->api_cch_open.app_handle, in bta_hl_api_cch_open()
872 p_data->api_cch_open.bd_addr, in bta_hl_api_cch_open()
896 static void bta_hl_api_cch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_cch_close() argument
905 if (bta_hl_find_mcl_idx_using_handle(p_data->api_cch_close.mcl_handle, &app_idx, &mcl_idx)) in bta_hl_api_cch_close()
923 bta_hl_check_cch_close(app_idx, mcl_idx, p_data, TRUE); in bta_hl_api_cch_close()
932 p_data->api_cch_close.mcl_handle, in bta_hl_api_cch_close()
957 static void bta_hl_api_dch_open(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_dch_open() argument
969 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_open.mcl_handle, &app_idx, &mcl_idx)) in bta_hl_api_dch_open()
974 …cl_idx=%d, cch_state=%d, mcl_handle=%d",app_idx,mcl_idx,p_mcb->cch_state,p_data->api_dch_open.mcl_… in bta_hl_api_dch_open()
981 … if (bta_hl_find_mdep_cfg_idx(app_idx, p_data->api_dch_open.local_mdep_id, &mdep_cfg_idx)) in bta_hl_api_dch_open()
986 p_data->api_dch_open.local_cfg = BTA_HL_DCH_CFG_NO_PREF; in bta_hl_api_dch_open()
989 … if ((status = bta_hl_chk_local_cfg(app_idx,mcl_idx,mdep_cfg_idx,p_data->api_dch_open.local_cfg)) in bta_hl_api_dch_open()
993 if (p_data->api_dch_open.local_mdep_id != BTA_HL_ECHO_TEST_MDEP_ID) in bta_hl_api_dch_open()
995 … if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm)) in bta_hl_api_dch_open()
1000 p_dcb->sec_mask = p_data->api_dch_open.sec_mask; in bta_hl_api_dch_open()
1001 … p_dcb->local_mdep_id = p_data->api_dch_open.local_mdep_id; in bta_hl_api_dch_open()
1002 p_dcb->peer_mdep_id = p_data->api_dch_open.peer_mdep_id; in bta_hl_api_dch_open()
1014 p_dcb->local_cfg = p_data->api_dch_open.local_cfg; in bta_hl_api_dch_open()
1065 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_OPEN_EVT, p_data); in bta_hl_api_dch_open()
1069 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data); in bta_hl_api_dch_open()
1084 p_data->api_dch_open.mcl_handle, in bta_hl_api_dch_open()
1111 static void bta_hl_api_dch_close(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_dch_close() argument
1121 …if (bta_hl_find_mdl_idx_using_handle(p_data->api_dch_close.mdl_handle, &app_idx, &mcl_idx, &mdl_id… in bta_hl_api_dch_close()
1144 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_CLOSE_EVT, p_data); in bta_hl_api_dch_close()
1154 p_data->api_dch_close.mdl_handle, in bta_hl_api_dch_close()
1180 static void bta_hl_api_dch_reconnect(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_dch_reconnect() argument
1193 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_reconnect.mcl_handle, &app_idx, &mcl_idx)) in bta_hl_api_dch_reconnect()
1202 … if (bta_hl_validate_reconnect_params(app_idx, mcl_idx, &(p_data->api_dch_reconnect), in bta_hl_api_dch_reconnect()
1212 … if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm)) in bta_hl_api_dch_reconnect()
1220 p_dcb->mdl_id = p_data->api_dch_reconnect.mdl_id; in bta_hl_api_dch_reconnect()
1280 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_RECONNECT_EVT, p_data); in bta_hl_api_dch_reconnect()
1284 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data); in bta_hl_api_dch_reconnect()
1296 p_data->api_dch_reconnect.mcl_handle, in bta_hl_api_dch_reconnect()
1298 0,p_data->api_dch_reconnect.mdl_id,0,0,0, status); in bta_hl_api_dch_reconnect()
1321 static void bta_hl_api_dch_echo_test(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_dch_echo_test() argument
1332 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_echo_test.mcl_handle, &app_idx, &mcl_idx)) in bta_hl_api_dch_echo_test()
1344 if ((p_data->api_dch_echo_test.local_cfg == BTA_HL_DCH_CFG_RELIABLE) || in bta_hl_api_dch_echo_test()
1345 (p_data->api_dch_echo_test.local_cfg == BTA_HL_DCH_CFG_STREAMING)) in bta_hl_api_dch_echo_test()
1348 … if ((p_dcb->p_echo_tx_pkt = bta_hl_get_buf(p_data->api_dch_echo_test.pkt_size, fcs_use)) != NULL ) in bta_hl_api_dch_echo_test()
1350 … if (bta_hl_set_ctrl_psm_for_dch(app_idx, mcl_idx, mdl_idx, p_data->api_dch_open.ctrl_psm)) in bta_hl_api_dch_echo_test()
1356 … p_dcb->local_cfg = p_data->api_dch_echo_test.local_cfg; in bta_hl_api_dch_echo_test()
1414 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_ECHO_TEST_EVT, p_data); in bta_hl_api_dch_echo_test()
1418 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_SDP_INIT_EVT, p_data); in bta_hl_api_dch_echo_test()
1455 static void bta_hl_api_sdp_query(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_sdp_query() argument
1464 if (bta_hl_find_app_idx_using_handle(p_data->api_sdp_query.app_handle, &app_idx)) in bta_hl_api_sdp_query()
1466 if (!bta_hl_find_mcl_idx(app_idx, p_data->api_sdp_query.bd_addr, &mcl_idx)) in bta_hl_api_sdp_query()
1472 bdcpy(p_mcb->bd_addr, p_data->api_sdp_query.bd_addr); in bta_hl_api_sdp_query()
1474 p_mcb->app_id = p_data->api_sdp_query.app_id; in bta_hl_api_sdp_query()
1485 p_mcb->app_id = p_data->api_sdp_query.app_id; in bta_hl_api_sdp_query()
1525 p_data->api_sdp_query.app_id, in bta_hl_api_sdp_query()
1526 p_data->api_sdp_query.app_handle, in bta_hl_api_sdp_query()
1527 p_data->api_sdp_query.bd_addr, in bta_hl_api_sdp_query()
1557 static void bta_hl_sdp_query_results(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_sdp_query_results() argument
1561 UINT8 app_idx = p_data->cch_sdp.app_idx; in bta_hl_sdp_query_results()
1562 UINT8 mcl_idx = p_data->cch_sdp.mcl_idx; in bta_hl_sdp_query_results()
1570 event = p_data->hdr.event; in bta_hl_sdp_query_results()
1595 if (p_data->cch_sdp.release_mcl_cb) { in bta_hl_sdp_query_results()
1599 bta_hl_check_cch_close(app_idx, mcl_idx, p_data, TRUE); in bta_hl_sdp_query_results()
1618 static void bta_hl_api_delete_mdl(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_delete_mdl() argument
1627 if (bta_hl_find_mcl_idx_using_handle(p_data->api_delete_mdl.mcl_handle, &app_idx, &mcl_idx )) in bta_hl_api_delete_mdl()
1629 if (bta_hl_is_mdl_value_valid(p_data->api_delete_mdl.mdl_id)) in bta_hl_api_delete_mdl()
1634 p_data->api_delete_mdl.mdl_id)) in bta_hl_api_delete_mdl()
1638 p_mcb->delete_mdl.mcl_handle = p_data->api_delete_mdl.mcl_handle; in bta_hl_api_delete_mdl()
1639 p_mcb->delete_mdl.mdl_id = p_data->api_delete_mdl.mdl_id; in bta_hl_api_delete_mdl()
1643 p_data->api_delete_mdl.mdl_id)!= MCA_SUCCESS) in bta_hl_api_delete_mdl()
1682 p_data->api_delete_mdl.mcl_handle, in bta_hl_api_delete_mdl()
1683 p_data->api_delete_mdl.mdl_id, in bta_hl_api_delete_mdl()
1707 static void bta_hl_mca_delete_mdl_cfm(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_mca_delete_mdl_cfm() argument
1712 tMCA_RSP_EVT *p_delete_cfm = &p_data->mca_evt.mca_data.delete_cfm; in bta_hl_mca_delete_mdl_cfm()
1718 if (bta_hl_find_mcl_idx_using_handle(p_data->mca_evt.mcl_handle, &app_idx, &mcl_idx)) in bta_hl_mca_delete_mdl_cfm()
1787 static void bta_hl_mca_delete_mdl_ind(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_mca_delete_mdl_ind() argument
1791 tMCA_EVT_HDR *p_delete_ind = &p_data->mca_evt.mca_data.delete_ind; in bta_hl_mca_delete_mdl_ind()
1798 if (bta_hl_find_mcl_idx_using_handle(p_data->mca_evt.mcl_handle, &app_idx, &mcl_idx) ) in bta_hl_mca_delete_mdl_ind()
1850 static void bta_hl_api_dch_abort(tBTA_HL_CB *p_cb, tBTA_HL_DATA *p_data) in bta_hl_api_dch_abort() argument
1860 if (bta_hl_find_mcl_idx_using_handle(p_data->api_dch_abort.mcl_handle, &app_idx, &mcl_idx )) in bta_hl_api_dch_abort()
1897 bta_hl_dch_sm_execute(app_idx, mcl_idx, mdl_idx, BTA_HL_DCH_ABORT_EVT, p_data); in bta_hl_api_dch_abort()