/packages/modules/Bluetooth/system/bta/av/ |
D | bta_av_api.cc | 72 tBTA_AV_API_ENABLE* p_buf = (tBTA_AV_API_ENABLE*)osi_malloc(sizeof(tBTA_AV_API_ENABLE)); in BTA_AvEnable() local 77 p_buf->hdr.event = BTA_AV_API_ENABLE_EVT; in BTA_AvEnable() 78 p_buf->p_cback = p_cback; in BTA_AvEnable() 79 p_buf->features = features; in BTA_AvEnable() 81 bta_sys_sendmsg(p_buf); in BTA_AvEnable() 94 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_AvDisable() local 97 p_buf->event = BTA_AV_API_DISABLE_EVT; in BTA_AvDisable() 99 bta_sys_sendmsg(p_buf); in BTA_AvDisable() 117 tBTA_AV_API_REG* p_buf = (tBTA_AV_API_REG*)osi_malloc(sizeof(tBTA_AV_API_REG)); in BTA_AvRegister() local 119 p_buf->hdr.layer_specific = chnl; in BTA_AvRegister() [all …]
|
D | bta_av_ci.cc | 55 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in bta_av_ci_src_data_ready() local 57 p_buf->layer_specific = chnl; in bta_av_ci_src_data_ready() 58 p_buf->event = BTA_AV_CI_SRC_DATA_READY_EVT; in bta_av_ci_src_data_ready() 60 bta_sys_sendmsg(p_buf); in bta_av_ci_src_data_ready() 81 tBTA_AV_CI_SETCONFIG* p_buf = (tBTA_AV_CI_SETCONFIG*)osi_malloc(sizeof(tBTA_AV_CI_SETCONFIG)); in bta_av_ci_setconfig() local 83 p_buf->hdr.layer_specific = bta_av_handle; in bta_av_ci_setconfig() 84 p_buf->hdr.event = in bta_av_ci_setconfig() 86 p_buf->err_code = err_code; in bta_av_ci_setconfig() 87 p_buf->category = category; in bta_av_ci_setconfig() 88 p_buf->recfg_needed = recfg_needed; in bta_av_ci_setconfig() [all …]
|
/packages/modules/Bluetooth/system/bta/gatt/ |
D | bta_gattc_api.cc | 181 tBTA_GATTC_API_CANCEL_OPEN* p_buf = in BTA_GATTC_CancelOpen() local 184 p_buf->hdr.event = BTA_GATTC_API_CANCEL_OPEN_EVT; in BTA_GATTC_CancelOpen() 185 p_buf->client_if = client_if; in BTA_GATTC_CancelOpen() 186 p_buf->is_direct = is_direct; in BTA_GATTC_CancelOpen() 187 p_buf->remote_bda = remote_bda; in BTA_GATTC_CancelOpen() 189 bta_sys_sendmsg(p_buf); in BTA_GATTC_CancelOpen() 204 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_GATTC_Close() local 206 p_buf->event = BTA_GATTC_API_CLOSE_EVT; in BTA_GATTC_Close() 207 p_buf->layer_specific = static_cast<uint16_t>(conn_id); in BTA_GATTC_Close() 209 bta_sys_sendmsg(p_buf); in BTA_GATTC_Close() [all …]
|
D | bta_gatts_api.cc | 67 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_GATTS_Disable() local 68 p_buf->event = BTA_GATTS_API_DISABLE_EVT; in BTA_GATTS_Disable() 69 bta_sys_sendmsg(p_buf); in BTA_GATTS_Disable() 88 tBTA_GATTS_API_REG* p_buf = (tBTA_GATTS_API_REG*)osi_malloc(sizeof(tBTA_GATTS_API_REG)); in BTA_GATTS_AppRegister() local 95 p_buf->hdr.event = BTA_GATTS_API_REG_EVT; in BTA_GATTS_AppRegister() 96 p_buf->app_uuid = app_uuid; in BTA_GATTS_AppRegister() 97 p_buf->p_cback = p_cback; in BTA_GATTS_AppRegister() 98 p_buf->eatt_support = eatt_support; in BTA_GATTS_AppRegister() 100 bta_sys_sendmsg(p_buf); in BTA_GATTS_AppRegister() 115 tBTA_GATTS_API_DEREG* p_buf = (tBTA_GATTS_API_DEREG*)osi_malloc(sizeof(tBTA_GATTS_API_DEREG)); in BTA_GATTS_AppDeregister() local [all …]
|
/packages/modules/Bluetooth/system/bta/hd/ |
D | bta_hd_api.cc | 69 tBTA_HD_API_ENABLE* p_buf = (tBTA_HD_API_ENABLE*)osi_malloc((uint16_t)sizeof(tBTA_HD_API_ENABLE)); in BTA_HdEnable() local 71 memset(p_buf, 0, sizeof(tBTA_HD_API_ENABLE)); in BTA_HdEnable() 73 p_buf->hdr.event = BTA_HD_API_ENABLE_EVT; in BTA_HdEnable() 74 p_buf->p_cback = p_cback; in BTA_HdEnable() 76 bta_sys_sendmsg(p_buf); in BTA_HdEnable() 91 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_HdDisable() local 92 p_buf->event = BTA_HD_API_DISABLE_EVT; in BTA_HdDisable() 93 bta_sys_sendmsg(p_buf); in BTA_HdDisable() 110 tBTA_HD_REGISTER_APP* p_buf = (tBTA_HD_REGISTER_APP*)osi_malloc(sizeof(tBTA_HD_REGISTER_APP)); in BTA_HdRegisterApp() local 111 p_buf->hdr.event = BTA_HD_API_REGISTER_APP_EVT; in BTA_HdRegisterApp() [all …]
|
/packages/modules/Bluetooth/system/stack/rfcomm/ |
D | rfc_ts_frames.cc | 49 BT_HDR* p_buf = (BT_HDR*)osi_malloc(RFCOMM_CMD_BUF_SIZE); in rfc_send_sabme() local 51 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_sabme() 52 p_data = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in rfc_send_sabme() 59 *p_data = RFCOMM_SABME_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_sabme() 61 p_buf->len = 4; in rfc_send_sabme() 63 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_sabme() 76 BT_HDR* p_buf = (BT_HDR*)osi_malloc(RFCOMM_CMD_BUF_SIZE); in rfc_send_ua() local 78 p_buf->offset = L2CAP_MIN_OFFSET; in rfc_send_ua() 79 p_data = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in rfc_send_ua() 86 *p_data = RFCOMM_UA_FCS((uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET, cr, dlci); in rfc_send_ua() [all …]
|
D | port_api.cc | 739 BT_HDR* p_buf; in PORT_ReadData() local 773 p_buf = (BT_HDR*)fixed_queue_try_peek_first(p_port->rx.queue); in PORT_ReadData() 774 if (p_buf == NULL) { in PORT_ReadData() 778 if (p_buf->len > max_len) { in PORT_ReadData() 779 memcpy(p_data, (uint8_t*)(p_buf + 1) + p_buf->offset, max_len); in PORT_ReadData() 780 p_buf->offset += max_len; in PORT_ReadData() 781 p_buf->len -= max_len; in PORT_ReadData() 793 memcpy(p_data, (uint8_t*)(p_buf + 1) + p_buf->offset, p_buf->len); in PORT_ReadData() 795 *p_len += p_buf->len; in PORT_ReadData() 796 max_len -= p_buf->len; in PORT_ReadData() [all …]
|
/packages/modules/Bluetooth/system/bta/hh/ |
D | bta_hh_api.cc | 112 BT_HDR* p_buf = (BT_HDR*)osi_calloc(sizeof(BT_HDR)); in BTA_HhClose() local 114 p_buf->event = BTA_HH_API_CLOSE_EVT; in BTA_HhClose() 115 p_buf->layer_specific = (uint16_t)dev_handle; in BTA_HhClose() 117 bta_sys_sendmsg(p_buf); in BTA_HhClose() 131 tBTA_HH_API_CONN* p_buf = (tBTA_HH_API_CONN*)osi_calloc(sizeof(tBTA_HH_API_CONN)); in BTA_HhOpen() local 134 p_buf->hdr.event = BTA_HH_API_OPEN_EVT; in BTA_HhOpen() 135 p_buf->hdr.layer_specific = BTA_HH_INVALID_HANDLE; in BTA_HhOpen() 136 p_buf->mode = mode; in BTA_HhOpen() 137 p_buf->link_spec = link_spec; in BTA_HhOpen() 138 p_buf->direct = direct; in BTA_HhOpen() [all …]
|
/packages/modules/Bluetooth/system/stack/avct/ |
D | avct_lcb_act.cc | 64 static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) { in avct_lcb_msg_asmbl() argument 69 if (p_buf->len < 1) { in avct_lcb_msg_asmbl() 70 osi_free(p_buf); in avct_lcb_msg_asmbl() 76 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avct_lcb_msg_asmbl() 80 if (p_buf->len < avct_lcb_pkt_type_len[pkt_type] || in avct_lcb_msg_asmbl() 81 (sizeof(BT_HDR) + p_buf->offset + p_buf->len) > BT_DEFAULT_BUFFER_SIZE) { in avct_lcb_msg_asmbl() 82 osi_free(p_buf); in avct_lcb_msg_asmbl() 94 p_ret = p_buf; in avct_lcb_msg_asmbl() 109 if (sizeof(BT_HDR) + p_buf->offset + p_buf->len > BT_DEFAULT_BUFFER_SIZE) { in avct_lcb_msg_asmbl() 110 osi_free(p_buf); in avct_lcb_msg_asmbl() [all …]
|
D | avct_bcb_act.cc | 96 static BT_HDR* avct_bcb_msg_asmbl(tAVCT_BCB* /* p_bcb */, BT_HDR* p_buf) { in avct_bcb_msg_asmbl() argument 100 if (p_buf->len == 0) { in avct_bcb_msg_asmbl() 101 osi_free_and_reset((void**)&p_buf); in avct_bcb_msg_asmbl() 106 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avct_bcb_msg_asmbl() 111 osi_free_and_reset((void**)&p_buf); in avct_bcb_msg_asmbl() 114 return p_buf; in avct_bcb_msg_asmbl() 223 .p_buf = p_bcb->p_tx_msg, in avct_bcb_open_ind() 430 osi_free_and_reset((void**)&p_data->ul_msg.p_buf); in avct_bcb_discard_msg() 433 p_bcb->p_tx_msg = p_data->ul_msg.p_buf; in avct_bcb_discard_msg() 461 BT_HDR* p_buf; in avct_bcb_send_msg() local [all …]
|
/packages/modules/Bluetooth/system/bta/hf_client/ |
D | bta_hf_client_api.cc | 92 tBTA_HF_CLIENT_API_OPEN* p_buf = in BTA_HfClientOpen() local 100 p_buf->hdr.event = BTA_HF_CLIENT_API_OPEN_EVT; in BTA_HfClientOpen() 101 p_buf->hdr.layer_specific = *p_handle; in BTA_HfClientOpen() 102 p_buf->bd_addr = bd_addr; in BTA_HfClientOpen() 104 bta_sys_sendmsg(p_buf); in BTA_HfClientOpen() 120 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_HfClientClose() local 122 p_buf->event = BTA_HF_CLIENT_API_CLOSE_EVT; in BTA_HfClientClose() 123 p_buf->layer_specific = handle; in BTA_HfClientClose() 125 bta_sys_sendmsg(p_buf); in BTA_HfClientClose() 140 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_HfClientAudioOpen() local [all …]
|
D | bta_hf_client_rfc.cc | 64 tBTA_HF_CLIENT_RFC* p_buf = (tBTA_HF_CLIENT_RFC*)osi_malloc(sizeof(tBTA_HF_CLIENT_RFC)); in bta_hf_client_port_cback() local 65 p_buf->hdr.event = BTA_HF_CLIENT_RFC_DATA_EVT; in bta_hf_client_port_cback() 66 p_buf->hdr.layer_specific = client_cb->handle; in bta_hf_client_port_cback() 67 bta_sys_sendmsg(p_buf); in bta_hf_client_port_cback() 92 tBTA_HF_CLIENT_RFC* p_buf = (tBTA_HF_CLIENT_RFC*)osi_malloc(sizeof(tBTA_HF_CLIENT_RFC)); in bta_hf_client_mgmt_cback() local 96 p_buf->hdr.event = BTA_HF_CLIENT_RFC_OPEN_EVT; in bta_hf_client_mgmt_cback() 98 p_buf->hdr.event = BTA_HF_CLIENT_RFC_OPEN_EVT; in bta_hf_client_mgmt_cback() 117 p_buf->hdr.event = BTA_HF_CLIENT_RFC_CLOSE_EVT; in bta_hf_client_mgmt_cback() 134 osi_free(p_buf); in bta_hf_client_mgmt_cback() 143 p_buf->hdr.event = BTA_HF_CLIENT_RFC_CLOSE_EVT; in bta_hf_client_mgmt_cback() [all …]
|
/packages/modules/Bluetooth/system/stack/l2cap/ |
D | l2c_fcr.cc | 83 static void process_s_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word); 84 static void process_i_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word, bool delay_ack); 86 static void prepare_I_frame(tL2C_CCB* p_ccb, BT_HDR* p_buf, bool is_retransmission); 87 static bool do_sar_reassembly(tL2C_CCB* p_ccb, BT_HDR* p_buf, uint16_t ctrl_word); 119 static uint16_t l2c_fcr_tx_get_fcs(BT_HDR* p_buf) { in l2c_fcr_tx_get_fcs() argument 120 uint8_t* p = ((uint8_t*)(p_buf + 1)) + p_buf->offset; in l2c_fcr_tx_get_fcs() 122 return l2c_fcr_updcrc(L2CAP_FCR_INIT_CRC, p, p_buf->len); in l2c_fcr_tx_get_fcs() 134 static uint16_t l2c_fcr_rx_get_fcs(BT_HDR* p_buf) { in l2c_fcr_rx_get_fcs() argument 135 uint8_t* p = ((uint8_t*)(p_buf + 1)) + p_buf->offset; in l2c_fcr_rx_get_fcs() 140 return l2c_fcr_updcrc(L2CAP_FCR_INIT_CRC, p, p_buf->len + L2CAP_PKT_OVERHEAD); in l2c_fcr_rx_get_fcs() [all …]
|
D | l2c_utils.cc | 200 BT_HDR* p_buf = static_cast<BT_HDR*>(list_front(p_lcb->link_xmit_data_q)); in l2cu_release_lcb() local 201 list_remove(p_lcb->link_xmit_data_q, p_buf); in l2cu_release_lcb() 202 osi_free(p_buf); in l2cu_release_lcb() 228 tL2CAP_SEC_DATA* p_buf = (tL2CAP_SEC_DATA*)fixed_queue_try_dequeue(p_lcb->le_sec_pending_q); in l2cu_release_lcb() local 229 if (p_buf->p_callback) { in l2cu_release_lcb() 230 p_buf->p_callback(p_lcb->remote_bd_addr, p_lcb->transport, p_buf->p_ref_data, in l2cu_release_lcb() 233 osi_free(p_buf); in l2cu_release_lcb() 306 BT_HDR* p_buf = (BT_HDR*)osi_malloc(L2CAP_CMD_BUF_SIZE); in l2cu_build_header() local 309 p_buf->offset = L2CAP_SEND_CMD_OFFSET; in l2cu_build_header() 310 p_buf->len = len + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD; in l2cu_build_header() [all …]
|
/packages/modules/Bluetooth/system/stack/gatt/ |
D | att_protocol.cc | 57 BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR) + GATT_HDR_SIZE + L2CAP_MIN_OFFSET); in attp_build_mtu_cmd() local 59 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 63 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_mtu_cmd() 64 p_buf->len = GATT_HDR_SIZE; /* opcode + 2 bytes mtu */ in attp_build_mtu_cmd() 66 return p_buf; in attp_build_mtu_cmd() 78 BT_HDR* p_buf = (BT_HDR*)osi_malloc(GATT_DATA_BUF_SIZE); in attp_build_exec_write_cmd() local 81 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() 83 p_buf->offset = L2CAP_MIN_OFFSET; in attp_build_exec_write_cmd() 84 p_buf->len = GATT_OP_CODE_SIZE; in attp_build_exec_write_cmd() 91 p_buf->len += 1; in attp_build_exec_write_cmd() [all …]
|
/packages/modules/Bluetooth/system/btif/src/ |
D | btif_a2dp_sink.cc | 159 static void btif_a2dp_sink_decoder_update_event(tBTIF_MEDIA_SINK_DECODER_UPDATE* p_buf); 160 static void btif_a2dp_sink_decoder_update_event_old(tBTIF_MEDIA_SINK_DECODER_UPDATE* p_buf); 447 tBTIF_MEDIA_SINK_DECODER_UPDATE* p_buf = reinterpret_cast<tBTIF_MEDIA_SINK_DECODER_UPDATE*>( in btif_a2dp_sink_update_decoder() local 452 memcpy(p_buf->codec_info, p_codec_info, AVDT_CODEC_SIZE); in btif_a2dp_sink_update_decoder() 453 p_buf->peer_address = peer_address; in btif_a2dp_sink_update_decoder() 454 p_buf->hdr.event = BTIF_MEDIA_SINK_DECODER_UPDATE; in btif_a2dp_sink_update_decoder() 457 base::BindOnce(btif_a2dp_sink_command_ready, (BT_HDR_RIGID*)p_buf)); in btif_a2dp_sink_update_decoder() 462 BT_HDR_RIGID* p_buf = reinterpret_cast<BT_HDR_RIGID*>(osi_malloc(sizeof(BT_HDR_RIGID))); in btif_a2dp_sink_on_idle() local 463 p_buf->event = BTIF_MEDIA_SINK_SUSPEND; in btif_a2dp_sink_on_idle() 464 btif_a2dp_sink_cb.worker_thread.DoInThread(base::BindOnce(btif_a2dp_sink_command_ready, p_buf)); in btif_a2dp_sink_on_idle() [all …]
|
/packages/modules/Bluetooth/system/stack/avdt/ |
D | avdt_msg.cc | 1043 BT_HDR* p_buf; in avdt_msg_send() local 1072 p_buf = p_ccb->p_curr_msg; in avdt_msg_send() 1083 p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send() 1086 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send() 1087 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send() 1088 memcpy((uint8_t*)(p_buf + 1) + p_buf->offset, in avdt_msg_send() 1089 (uint8_t*)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send() 1097 p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send() 1100 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send() 1101 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send() [all …]
|
/packages/modules/Bluetooth/system/bta/pan/ |
D | bta_pan_api.cc | 65 tBTA_PAN_API_ENABLE* p_buf = (tBTA_PAN_API_ENABLE*)osi_malloc(sizeof(tBTA_PAN_API_ENABLE)); in BTA_PanEnable() local 70 p_buf->hdr.event = BTA_PAN_API_ENABLE_EVT; in BTA_PanEnable() 71 p_buf->p_cback = p_cback; in BTA_PanEnable() 73 bta_sys_sendmsg(p_buf); in BTA_PanEnable() 87 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in BTA_PanDisable() local 90 p_buf->event = BTA_PAN_API_DISABLE_EVT; in BTA_PanDisable() 92 bta_sys_sendmsg(p_buf); in BTA_PanDisable() 151 tBTA_PAN_API_OPEN* p_buf = (tBTA_PAN_API_OPEN*)osi_malloc(sizeof(tBTA_PAN_API_OPEN)); in BTA_PanOpen() local 153 p_buf->hdr.event = BTA_PAN_API_OPEN_EVT; in BTA_PanOpen() 154 p_buf->local_role = local_role; in BTA_PanOpen() [all …]
|
D | bta_pan_act.cc | 102 tBTA_PAN_CONN* p_buf = (tBTA_PAN_CONN*)osi_malloc(sizeof(tBTA_PAN_CONN)); in bta_pan_conn_state_cback() local 105 p_buf->hdr.event = BTA_PAN_CONN_OPEN_EVT; in bta_pan_conn_state_cback() 130 p_buf->hdr.event = BTA_PAN_CONN_CLOSE_EVT; in bta_pan_conn_state_cback() 135 p_buf->result = state; in bta_pan_conn_state_cback() 136 p_buf->hdr.layer_specific = handle; in bta_pan_conn_state_cback() 138 bta_sys_sendmsg(p_buf); in bta_pan_conn_state_cback() 160 BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID)); in bta_pan_data_flow_cb() local 161 p_buf->layer_specific = handle; in bta_pan_data_flow_cb() 162 p_buf->event = BTA_PAN_BNEP_FLOW_ENABLE_EVT; in bta_pan_data_flow_cb() 163 bta_sys_sendmsg(p_buf); in bta_pan_data_flow_cb() [all …]
|
D | bta_pan_ci.cc | 48 BT_HDR* p_buf; in bta_pan_ci_readbuf() local 54 p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_scb->data_queue); in bta_pan_ci_readbuf() 55 if (p_buf != NULL) { in bta_pan_ci_readbuf() 56 src = ((tBTA_PAN_DATA_PARAMS*)p_buf)->src; in bta_pan_ci_readbuf() 57 dst = ((tBTA_PAN_DATA_PARAMS*)p_buf)->dst; in bta_pan_ci_readbuf() 58 *p_protocol = ((tBTA_PAN_DATA_PARAMS*)p_buf)->protocol; in bta_pan_ci_readbuf() 59 *p_ext = ((tBTA_PAN_DATA_PARAMS*)p_buf)->ext; in bta_pan_ci_readbuf() 60 *p_forward = ((tBTA_PAN_DATA_PARAMS*)p_buf)->forward; in bta_pan_ci_readbuf() 63 return p_buf; in bta_pan_ci_readbuf()
|
/packages/modules/Bluetooth/system/stack/smp/ |
D | smp_utils.cc | 311 void smp_log_metrics(const RawAddress& bd_addr, bool is_outgoing, const uint8_t* p_buf, in smp_log_metrics() argument 318 STREAM_TO_UINT8(raw_cmd, p_buf); in smp_log_metrics() 322 STREAM_TO_UINT8(failure_reason, p_buf); in smp_log_metrics() 399 BT_HDR* p_buf; in smp_send_cmd() local 407 p_buf = (*smp_cmd_build_act[cmd_code])(cmd_code, p_cb); in smp_send_cmd() 409 if (p_buf != NULL && smp_send_msg_to_L2CAP(p_cb->pairing_bda, p_buf)) { in smp_send_cmd() 483 BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR) + SMP_PAIRING_REQ_SIZE + L2CAP_MIN_OFFSET); in smp_build_pairing_cmd() local 487 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in smp_build_pairing_cmd() 496 p_buf->offset = L2CAP_MIN_OFFSET; in smp_build_pairing_cmd() 498 p_buf->len = SMP_PAIRING_REQ_SIZE; in smp_build_pairing_cmd() [all …]
|
D | smp_l2c.cc | 46 static void smp_data_received(uint16_t channel, const RawAddress& bd_addr, BT_HDR* p_buf); 50 static void smp_br_data_received(uint16_t channel, const RawAddress& bd_addr, BT_HDR* p_buf); 144 static void smp_data_received(uint16_t channel, const RawAddress& bd_addr, BT_HDR* p_buf) { in smp_data_received() argument 146 uint8_t* p = (uint8_t*)(p_buf + 1) + p_buf->offset; in smp_data_received() 149 if (p_buf->len < 1) { in smp_data_received() 151 osi_free(p_buf); in smp_data_received() 162 osi_free(p_buf); in smp_data_received() 173 osi_free(p_buf); in smp_data_received() 184 smp_log_metrics(p_cb->pairing_bda, false /* incoming */, p_buf->data + p_buf->offset, in smp_data_received() 185 p_buf->len, false /* is_over_br */); in smp_data_received() [all …]
|
/packages/modules/Bluetooth/system/stack/bnep/ |
D | bnep_utils.cc | 54 static uint8_t* bnepu_init_hdr(BT_HDR* p_buf, uint16_t hdr_len, uint8_t pkt_type); 180 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_req() local 185 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_req() 186 p = p_start = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_req() 215 p_buf->len = (uint16_t)(p - p_start); in bnep_send_conn_req() 217 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_req() 230 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_response() local 235 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_response() 236 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_response() 246 p_buf->len = 4; in bnep_send_conn_response() [all …]
|
D | bnep_api.cc | 349 tBNEP_RESULT BNEP_WriteBuf(uint16_t handle, const RawAddress& dest_addr, BT_HDR* p_buf, in BNEP_WriteBuf() argument 355 osi_free(p_buf); in BNEP_WriteBuf() 361 if (p_buf->len > BNEP_MTU_SIZE) { in BNEP_WriteBuf() 362 log::error("length {} exceeded MTU {}", p_buf->len, BNEP_MTU_SIZE); in BNEP_WriteBuf() 363 osi_free(p_buf); in BNEP_WriteBuf() 368 p_data = (uint8_t*)(p_buf + 1) + p_buf->offset; in BNEP_WriteBuf() 369 if (bnep_is_packet_allowed(p_bcb, dest_addr, protocol, fw_ext_present, p_data, p_buf->len) != in BNEP_WriteBuf() 379 org_len = p_buf->len; in BNEP_WriteBuf() 383 osi_free(p_buf); in BNEP_WriteBuf() 394 osi_free(p_buf); in BNEP_WriteBuf() [all …]
|
/packages/modules/Bluetooth/system/stack/test/a2dp/ |
D | a2dp_sbc_unittest.cc | 147 auto enqueue_cb = +[](BT_HDR* p_buf, size_t /*frames_n*/, uint32_t /*len*/) -> bool { in TEST_F() argument 149 osi_free(p_buf); in TEST_F() 168 auto enqueue_cb = +[](BT_HDR* p_buf, size_t /*frames_n*/, uint32_t /*len*/) -> bool { in TEST_F() argument 174 osi_free(p_buf); in TEST_F() 200 auto read_cb = +[](uint8_t* p_buf, uint32_t len) -> uint32_t { in TEST_F() argument 202 memcpy(p_buf, wav_reader.GetSamples() + counter, len); in TEST_F() 206 auto enqueue_cb = +[](BT_HDR* p_buf, size_t frames_n, uint32_t /*len*/) -> bool { in TEST_F() argument 209 packet = reinterpret_cast<BT_HDR*>(osi_malloc(sizeof(*p_buf) + p_buf->len + 1)); in TEST_F() 210 memcpy(packet, p_buf, sizeof(*p_buf)); in TEST_F() 212 memcpy(packet->data + 1, p_buf->data + p_buf->offset, p_buf->len); in TEST_F() [all …]
|