Lines Matching refs:p_msg
69 NFC_HDR* p_msg);
70 static void llcp_link_proc_agf_pdu(NFC_HDR* p_msg);
72 NFC_HDR* p_msg);
73 static void llcp_link_proc_rx_data(NFC_HDR* p_msg);
78 static void llcp_link_send_to_lower(NFC_HDR* p_msg);
201 NFC_HDR* p_msg = (NFC_HDR*)GKI_getpoolbuf(LLCP_POOL_ID); in llcp_link_activate() local
203 if (p_msg) { in llcp_link_activate()
206 p_msg->len = 1; in llcp_link_activate()
207 p_msg->offset = NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE; in llcp_link_activate()
209 NFC_SendData(NFC_RF_CONN_ID, p_msg); in llcp_link_activate()
811 NFC_HDR* p_msg; in llcp_link_send_SYMM() local
814 p_msg = (NFC_HDR*)GKI_getpoolbuf(LLCP_POOL_ID); in llcp_link_send_SYMM()
816 if (p_msg) { in llcp_link_send_SYMM()
817 p_msg->len = LLCP_PDU_SYMM_SIZE; in llcp_link_send_SYMM()
818 p_msg->offset = NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE; in llcp_link_send_SYMM()
820 p = (uint8_t*)(p_msg + 1) + p_msg->offset; in llcp_link_send_SYMM()
824 llcp_link_send_to_lower(p_msg); in llcp_link_send_SYMM()
838 NFC_HDR* p_msg; in llcp_link_send_invalid_pdu() local
841 p_msg = (NFC_HDR*)GKI_getpoolbuf(LLCP_POOL_ID); in llcp_link_send_invalid_pdu()
843 if (p_msg) { in llcp_link_send_invalid_pdu()
845 p_msg->len = 1; in llcp_link_send_invalid_pdu()
846 p_msg->offset = NCI_MSG_OFFSET_SIZE + NCI_DATA_HDR_SIZE; in llcp_link_send_invalid_pdu()
848 p = (uint8_t*)(p_msg + 1) + p_msg->offset; in llcp_link_send_invalid_pdu()
851 NFC_SendData(NFC_RF_CONN_ID, p_msg); in llcp_link_send_invalid_pdu()
956 NFC_HDR* p_msg) { in llcp_link_proc_ui_pdu() argument
971 if (p_msg) { in llcp_link_proc_ui_pdu()
972 GKI_freebuf(p_msg); in llcp_link_proc_ui_pdu()
984 if (p_msg) { in llcp_link_proc_ui_pdu()
985 ui_pdu_length = p_msg->len; /* including LLCP header */ in llcp_link_proc_ui_pdu()
986 p_ui_pdu = (uint8_t*)(p_msg + 1) + p_msg->offset; in llcp_link_proc_ui_pdu()
1012 if (p_msg) GKI_freebuf(p_msg); in llcp_link_proc_ui_pdu()
1021 if (p_msg) { in llcp_link_proc_ui_pdu()
1026 p_msg->offset -= LLCP_PDU_AGF_LEN_SIZE; in llcp_link_proc_ui_pdu()
1027 p_msg->len += LLCP_PDU_AGF_LEN_SIZE; in llcp_link_proc_ui_pdu()
1028 p_msg->layer_specific = 0; in llcp_link_proc_ui_pdu()
1030 p_msg = (NFC_HDR*)GKI_getpoolbuf(LLCP_POOL_ID); in llcp_link_proc_ui_pdu()
1032 if (p_msg) { in llcp_link_proc_ui_pdu()
1033 p_dst = (uint8_t*)(p_msg + 1); in llcp_link_proc_ui_pdu()
1040 p_msg->offset = 0; in llcp_link_proc_ui_pdu()
1041 p_msg->len = LLCP_PDU_AGF_LEN_SIZE + ui_pdu_length; in llcp_link_proc_ui_pdu()
1042 p_msg->layer_specific = 0; in llcp_link_proc_ui_pdu()
1049 if (p_msg) { in llcp_link_proc_ui_pdu()
1050 GKI_enqueue(&p_app_cb->ui_rx_q, p_msg); in llcp_link_proc_ui_pdu()
1075 if (p_msg) { in llcp_link_proc_ui_pdu()
1076 GKI_freebuf(p_msg); in llcp_link_proc_ui_pdu()
1201 NFC_HDR* p_msg) { in llcp_link_proc_rx_pdu() argument
1214 p_data = (uint8_t*)(p_msg + 1) + p_msg->offset + LLCP_PDU_HEADER_SIZE; in llcp_link_proc_rx_pdu()
1216 (uint16_t)(p_msg->len - LLCP_PDU_HEADER_SIZE), in llcp_link_proc_rx_pdu()
1222 p_data = (uint8_t*)(p_msg + 1) + p_msg->offset + LLCP_PDU_HEADER_SIZE; in llcp_link_proc_rx_pdu()
1223 llcp_sdp_proc_snl((uint16_t)(p_msg->len - LLCP_PDU_HEADER_SIZE), p_data); in llcp_link_proc_rx_pdu()
1227 llcp_link_proc_agf_pdu(p_msg); in llcp_link_proc_rx_pdu()
1232 llcp_link_proc_ui_pdu(dsap, ssap, 0, nullptr, p_msg); in llcp_link_proc_rx_pdu()
1237 llcp_dlc_proc_i_pdu(dsap, ssap, 0, nullptr, p_msg); in llcp_link_proc_rx_pdu()
1242 p_data = (uint8_t*)(p_msg + 1) + p_msg->offset + LLCP_PDU_HEADER_SIZE; in llcp_link_proc_rx_pdu()
1244 (uint16_t)(p_msg->len - LLCP_PDU_HEADER_SIZE), in llcp_link_proc_rx_pdu()
1249 if (free_buffer) GKI_freebuf(p_msg); in llcp_link_proc_rx_pdu()
1261 static void llcp_link_proc_rx_data(NFC_HDR* p_msg) { in llcp_link_proc_rx_data() argument
1285 if (p_msg->len < LLCP_PDU_HEADER_SIZE) { in llcp_link_proc_rx_data()
1287 p_msg->len); in llcp_link_proc_rx_data()
1290 p = (uint8_t*)(p_msg + 1) + p_msg->offset; in llcp_link_proc_rx_data()
1300 if (p_msg->len >= LLCP_PDU_HEADER_SIZE + LLCP_SEQUENCE_SIZE) { in llcp_link_proc_rx_data()
1302 p_msg->len - LLCP_PDU_HEADER_SIZE - LLCP_SEQUENCE_SIZE; in llcp_link_proc_rx_data()
1309 info_length = p_msg->len - LLCP_PDU_HEADER_SIZE; in llcp_link_proc_rx_data()
1335 llcp_link_proc_rx_pdu(dsap, ptype, ssap, p_msg); in llcp_link_proc_rx_data()
1350 if (free_buffer) GKI_freebuf(p_msg); in llcp_link_proc_rx_data()
1365 NFC_HDR* p_msg; in llcp_link_get_next_pdu() local
1372 p_msg = (NFC_HDR*)llcp_cb.lcb.sig_xmit_q.p_first; in llcp_link_get_next_pdu()
1373 *p_next_pdu_length = p_msg->len; in llcp_link_get_next_pdu()
1376 p_msg = (NFC_HDR*)GKI_dequeue(&llcp_cb.lcb.sig_xmit_q); in llcp_link_get_next_pdu()
1378 return p_msg; in llcp_link_get_next_pdu()
1393 p_msg = (NFC_HDR*)p_app_cb->ui_xmit_q.p_first; in llcp_link_get_next_pdu()
1394 *p_next_pdu_length = p_msg->len; in llcp_link_get_next_pdu()
1400 p_msg = (NFC_HDR*)GKI_dequeue(&p_app_cb->ui_xmit_q); in llcp_link_get_next_pdu()
1407 return p_msg; in llcp_link_get_next_pdu()
1436 p_msg = llcp_dlc_get_next_pdu(&llcp_cb.dlcb[llcp_cb.lcb.dl_idx]); in llcp_link_get_next_pdu()
1443 if (p_msg) { in llcp_link_get_next_pdu()
1446 return p_msg; in llcp_link_get_next_pdu()
1479 NFC_HDR *p_agf = nullptr, *p_msg = nullptr, *p_next_pdu; in llcp_link_build_next_pdu() local
1499 p_msg = p_pdu; in llcp_link_build_next_pdu()
1503 p_msg = llcp_link_get_next_pdu(false, &next_pdu_length); in llcp_link_build_next_pdu()
1505 if (!p_msg) { in llcp_link_build_next_pdu()
1516 if (2 + p_msg->len + 2 + next_pdu_length <= llcp_cb.lcb.effective_miu) { in llcp_link_build_next_pdu()
1526 UINT16_TO_BE_STREAM(p, p_msg->len); in llcp_link_build_next_pdu()
1527 memcpy(p, (uint8_t*)(p_msg + 1) + p_msg->offset, p_msg->len); in llcp_link_build_next_pdu()
1529 p_agf->len = LLCP_PDU_HEADER_SIZE + 2 + p_msg->len; in llcp_link_build_next_pdu()
1531 GKI_freebuf(p_msg); in llcp_link_build_next_pdu()
1532 p_msg = p_agf; in llcp_link_build_next_pdu()
1535 return p_msg; in llcp_link_build_next_pdu()
1568 return p_msg; in llcp_link_build_next_pdu()