Lines Matching refs:rx_pkt
234 ppp->rx_pkt = net_pkt_rx_alloc_with_buffer(ppp->iface, in modem_ppp_process_received_byte()
237 if (ppp->rx_pkt == NULL) { in modem_ppp_process_received_byte()
245 net_pkt_cursor_init(ppp->rx_pkt); in modem_ppp_process_received_byte()
254 LOG_DBG("Received PPP frame (len %zu)", net_pkt_get_len(ppp->rx_pkt)); in modem_ppp_process_received_byte()
257 net_pkt_remove_tail(ppp->rx_pkt, MODEM_PPP_FRAME_TAIL_SIZE); in modem_ppp_process_received_byte()
258 net_pkt_set_ppp(ppp->rx_pkt, true); in modem_ppp_process_received_byte()
260 if (net_recv_data(ppp->iface, ppp->rx_pkt) < 0) { in modem_ppp_process_received_byte()
262 net_pkt_unref(ppp->rx_pkt); in modem_ppp_process_received_byte()
265 ppp->rx_pkt = NULL; in modem_ppp_process_received_byte()
271 if (net_pkt_available_buffer(ppp->rx_pkt) == 1) { in modem_ppp_process_received_byte()
272 if (net_pkt_alloc_buffer(ppp->rx_pkt, CONFIG_MODEM_PPP_NET_BUF_FRAG_SIZE, in modem_ppp_process_received_byte()
275 net_pkt_unref(ppp->rx_pkt); in modem_ppp_process_received_byte()
276 ppp->rx_pkt = NULL; in modem_ppp_process_received_byte()
287 if (net_pkt_write_u8(ppp->rx_pkt, byte) < 0) { in modem_ppp_process_received_byte()
289 net_pkt_unref(ppp->rx_pkt); in modem_ppp_process_received_byte()
290 ppp->rx_pkt = NULL; in modem_ppp_process_received_byte()
300 if (net_pkt_write_u8(ppp->rx_pkt, (byte ^ MODEM_PPP_VALUE_ESCAPE)) < 0) { in modem_ppp_process_received_byte()
302 net_pkt_unref(ppp->rx_pkt); in modem_ppp_process_received_byte()
303 ppp->rx_pkt = NULL; in modem_ppp_process_received_byte()
560 if (ppp->rx_pkt != NULL) { in modem_ppp_release()
561 net_pkt_unref(ppp->rx_pkt); in modem_ppp_release()
562 ppp->rx_pkt = NULL; in modem_ppp_release()