Lines Matching refs:p_buf

194       BT_HDR* p_buf = static_cast<BT_HDR*>(list_front(p_lcb->link_xmit_data_q));  in l2cu_release_lcb()  local
195 list_remove(p_lcb->link_xmit_data_q, p_buf); in l2cu_release_lcb()
196 osi_free(p_buf); in l2cu_release_lcb()
216 tL2CAP_SEC_DATA* p_buf = in l2cu_release_lcb() local
218 if (p_buf->p_callback) in l2cu_release_lcb()
219 p_buf->p_callback(p_lcb->remote_bd_addr, p_lcb->transport, in l2cu_release_lcb()
220 p_buf->p_ref_data, BTM_DEV_RESET); in l2cu_release_lcb()
221 osi_free(p_buf); in l2cu_release_lcb()
298 BT_HDR* p_buf = (BT_HDR*)osi_malloc(L2CAP_CMD_BUF_SIZE); in l2cu_build_header() local
301 p_buf->offset = L2CAP_SEND_CMD_OFFSET; in l2cu_build_header()
302 p_buf->len = in l2cu_build_header()
304 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET; in l2cu_build_header()
328 return (p_buf); in l2cu_build_header()
360 BT_HDR* p_buf; in l2cu_send_peer_cmd_reject() local
371 p_buf = l2cu_build_header(p_lcb, (uint16_t)(L2CAP_CMD_REJECT_LEN + param_len), in l2cu_send_peer_cmd_reject()
373 if (p_buf == NULL) { in l2cu_send_peer_cmd_reject()
378 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_cmd_reject()
387 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_cmd_reject()
401 BT_HDR* p_buf; in l2cu_send_peer_connect_req() local
410 p_buf = l2cu_build_header(p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, in l2cu_send_peer_connect_req()
412 if (p_buf == NULL) { in l2cu_send_peer_connect_req()
417 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_connect_req()
423 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_connect_req()
448 BT_HDR* p_buf = l2cu_build_header(p_ccb->p_lcb, L2CAP_CONN_RSP_LEN, in l2cu_send_peer_connect_rsp() local
450 if (p_buf == nullptr) { in l2cu_send_peer_connect_rsp()
455 uint8_t* p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + in l2cu_send_peer_connect_rsp()
463 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_connect_rsp()
479 BT_HDR* p_buf; in l2cu_reject_connection() local
482 p_buf = in l2cu_reject_connection()
484 if (p_buf == NULL) { in l2cu_reject_connection()
489 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_reject_connection()
497 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_reject_connection()
512 BT_HDR* p_buf; in l2cu_send_credit_based_reconfig_req() local
527 p_buf = l2cu_build_header(p_lcb, cmd_len, L2CAP_CMD_CREDIT_BASED_RECONFIG_REQ, in l2cu_send_credit_based_reconfig_req()
529 if (p_buf == NULL) { in l2cu_send_credit_based_reconfig_req()
534 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_credit_based_reconfig_req()
550 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_credit_based_reconfig_req()
564 BT_HDR* p_buf; in l2cu_send_peer_config_req() local
587 p_buf = l2cu_build_header(p_ccb->p_lcb, in l2cu_send_peer_config_req()
590 if (p_buf == NULL) { in l2cu_send_peer_config_req()
595 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_config_req()
651 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_config_req()
665 BT_HDR* p_buf; in l2cu_send_peer_config_rsp() local
681 p_buf = l2cu_build_header(p_ccb->p_lcb, in l2cu_send_peer_config_rsp()
684 if (p_buf == NULL) { in l2cu_send_peer_config_rsp()
689 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_config_rsp()
741 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_config_rsp()
772 BT_HDR* p_buf = (BT_HDR*)osi_malloc(len + rej_len); in l2cu_send_peer_config_rej() local
773 p_buf->offset = L2CAP_SEND_CMD_OFFSET; in l2cu_send_peer_config_rej()
774 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET; in l2cu_send_peer_config_rej()
853 p_buf->len = len + 4; in l2cu_send_peer_config_rej()
858 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_config_rej()
872 BT_HDR *p_buf, *p_buf2; in l2cu_send_peer_disc_req() local
886 p_buf = l2cu_build_header(p_ccb->p_lcb, L2CAP_DISC_REQ_LEN, in l2cu_send_peer_disc_req()
888 if (p_buf == NULL) { in l2cu_send_peer_disc_req()
893 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_disc_req()
910 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_disc_req()
929 BT_HDR* p_buf; in l2cu_send_peer_disc_rsp() local
932 p_buf = l2cu_build_header(p_lcb, L2CAP_DISC_RSP_LEN, L2CAP_CMD_DISC_RSP, in l2cu_send_peer_disc_rsp()
934 if (p_buf == NULL) { in l2cu_send_peer_disc_rsp()
939 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_disc_rsp()
945 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_disc_rsp()
960 BT_HDR* p_buf; in l2cu_send_peer_echo_rsp() local
987 p_buf = l2cu_build_header(p_lcb, (uint16_t)(L2CAP_ECHO_RSP_LEN + data_len), in l2cu_send_peer_echo_rsp()
989 if (p_buf == NULL) { in l2cu_send_peer_echo_rsp()
994 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_echo_rsp()
1001 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_echo_rsp()
1014 BT_HDR* p_buf; in l2cu_send_peer_info_req() local
1021 p_buf = l2cu_build_header(p_lcb, 2, L2CAP_CMD_INFO_REQ, p_lcb->signal_id); in l2cu_send_peer_info_req()
1022 if (p_buf == NULL) { in l2cu_send_peer_info_req()
1029 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_info_req()
1038 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_info_req()
1053 BT_HDR* p_buf; in l2cu_send_peer_info_rsp() local
1079 p_buf = l2cu_build_header(p_lcb, len, L2CAP_CMD_INFO_RSP, remote_id); in l2cu_send_peer_info_rsp()
1080 if (p_buf == NULL) { in l2cu_send_peer_info_rsp()
1085 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_info_rsp()
1145 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_info_rsp()
2615 BT_HDR* p_buf; in l2cu_send_peer_ble_par_req() local
2622 p_buf = l2cu_build_header(p_lcb, L2CAP_CMD_BLE_UPD_REQ_LEN, in l2cu_send_peer_ble_par_req()
2624 if (p_buf == NULL) { in l2cu_send_peer_ble_par_req()
2629 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_par_req()
2637 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_ble_par_req()
2652 BT_HDR* p_buf; in l2cu_send_peer_ble_par_rsp() local
2655 p_buf = l2cu_build_header(p_lcb, L2CAP_CMD_BLE_UPD_RSP_LEN, in l2cu_send_peer_ble_par_rsp()
2657 if (p_buf == NULL) { in l2cu_send_peer_ble_par_rsp()
2662 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_par_rsp()
2667 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_ble_par_rsp()
2681 BT_HDR* p_buf; in l2cu_send_peer_ble_credit_based_conn_req() local
2697 p_buf = in l2cu_send_peer_ble_credit_based_conn_req()
2700 if (p_buf == NULL) { in l2cu_send_peer_ble_credit_based_conn_req()
2705 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_credit_based_conn_req()
2723 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_ble_credit_based_conn_req()
2737 BT_HDR* p_buf; in l2cu_send_peer_credit_based_conn_req() local
2754 p_buf = l2cu_build_header(p_lcb, in l2cu_send_peer_credit_based_conn_req()
2758 if (p_buf == NULL) { in l2cu_send_peer_credit_based_conn_req()
2763 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_credit_based_conn_req()
2786 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_credit_based_conn_req()
2802 BT_HDR* p_buf; in l2cu_reject_ble_coc_connection() local
2805 p_buf = l2cu_build_header(p_lcb, L2CAP_CMD_BLE_CREDIT_BASED_CONN_RES_LEN, in l2cu_reject_ble_coc_connection()
2807 if (p_buf == NULL) { in l2cu_reject_ble_coc_connection()
2812 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_reject_ble_coc_connection()
2821 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_reject_ble_coc_connection()
2837 BT_HDR* p_buf; in l2cu_reject_credit_based_conn_req() local
2842 p_buf = l2cu_build_header(p_lcb, rsp_len, L2CAP_CMD_CREDIT_BASED_CONN_RES, in l2cu_reject_credit_based_conn_req()
2844 if (p_buf == NULL) { in l2cu_reject_credit_based_conn_req()
2849 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_reject_credit_based_conn_req()
2858 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_reject_credit_based_conn_req()
2875 BT_HDR* p_buf; in l2cu_send_peer_credit_based_conn_res() local
2882 p_buf = l2cu_build_header(p_ccb->p_lcb, rsp_len, in l2cu_send_peer_credit_based_conn_res()
2884 if (p_buf == NULL) { in l2cu_send_peer_credit_based_conn_res()
2889 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_credit_based_conn_res()
2927 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_credit_based_conn_res()
2964 BT_HDR* p_buf; in l2cu_send_ble_reconfig_rsp() local
2969 p_buf = l2cu_build_header(p_lcb, L2CAP_CMD_CREDIT_BASED_RECONFIG_RES_LEN, in l2cu_send_ble_reconfig_rsp()
2971 if (p_buf == NULL) { in l2cu_send_ble_reconfig_rsp()
2976 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_ble_reconfig_rsp()
2982 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_ble_reconfig_rsp()
2998 BT_HDR* p_buf; in l2cu_send_peer_ble_credit_based_conn_res() local
3002 p_buf = in l2cu_send_peer_ble_credit_based_conn_res()
3005 if (p_buf == NULL) { in l2cu_send_peer_ble_credit_based_conn_res()
3010 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_credit_based_conn_res()
3019 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2cu_send_peer_ble_credit_based_conn_res()
3034 BT_HDR* p_buf; in l2cu_send_peer_ble_flow_control_credit() local
3047 p_buf = l2cu_build_header(p_lcb, L2CAP_CMD_BLE_FLOW_CTRL_CREDIT_LEN, in l2cu_send_peer_ble_flow_control_credit()
3049 if (p_buf == NULL) { in l2cu_send_peer_ble_flow_control_credit()
3054 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_flow_control_credit()
3060 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_ble_flow_control_credit()
3074 BT_HDR* p_buf; in l2cu_send_peer_ble_credit_based_disconn_req() local
3087 p_buf = l2cu_build_header(p_lcb, L2CAP_DISC_REQ_LEN, L2CAP_CMD_DISC_REQ, in l2cu_send_peer_ble_credit_based_disconn_req()
3089 if (p_buf == NULL) { in l2cu_send_peer_ble_credit_based_disconn_req()
3095 p = (uint8_t*)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET + HCI_DATA_PREAMBLE_SIZE + in l2cu_send_peer_ble_credit_based_disconn_req()
3101 l2c_link_check_send_pkts(p_lcb, 0, p_buf); in l2cu_send_peer_ble_credit_based_disconn_req()
3174 void l2cu_set_acl_hci_header(BT_HDR* p_buf, tL2C_CCB* p_ccb) { in l2cu_set_acl_hci_header() argument
3179 p = (uint8_t*)(p_buf + 1) + p_buf->offset - HCI_DATA_PREAMBLE_SIZE; in l2cu_set_acl_hci_header()
3188 if (p_buf->len > acl_data_size) { in l2cu_set_acl_hci_header()
3191 UINT16_TO_STREAM(p, p_buf->len); in l2cu_set_acl_hci_header()
3194 if (((p_buf->layer_specific & L2CAP_FLUSHABLE_MASK) == in l2cu_set_acl_hci_header()
3206 if (p_buf->len > acl_data_size) { in l2cu_set_acl_hci_header()
3209 UINT16_TO_STREAM(p, p_buf->len); in l2cu_set_acl_hci_header()
3212 p_buf->offset -= HCI_DATA_PREAMBLE_SIZE; in l2cu_set_acl_hci_header()
3213 p_buf->len += HCI_DATA_PREAMBLE_SIZE; in l2cu_set_acl_hci_header()