Lines Matching refs:nb
22 if (rx_ctxt->nb != NULL) { in mcumgr_serial_free_rx_ctxt()
23 smp_packet_free(rx_ctxt->nb); in mcumgr_serial_free_rx_ctxt()
24 rx_ctxt->nb = NULL; in mcumgr_serial_free_rx_ctxt()
35 if (rx_ctxt->nb->len < 2) { in mcumgr_serial_extract_len()
39 rx_ctxt->pkt_len = net_buf_pull_be16(rx_ctxt->nb); in mcumgr_serial_extract_len()
49 rc = base64_decode(rx_ctxt->nb->data + rx_ctxt->nb->len, in mcumgr_serial_decode_frag()
50 net_buf_tailroom(rx_ctxt->nb), &dec_len, in mcumgr_serial_decode_frag()
56 rx_ctxt->nb->len += dec_len; in mcumgr_serial_decode_frag()
72 struct net_buf *nb; in mcumgr_serial_process_frag() local
77 if (rx_ctxt->nb == NULL) { in mcumgr_serial_process_frag()
78 rx_ctxt->nb = smp_packet_alloc(); in mcumgr_serial_process_frag()
79 if (rx_ctxt->nb == NULL) { in mcumgr_serial_process_frag()
91 net_buf_reset(rx_ctxt->nb); in mcumgr_serial_process_frag()
95 if (rx_ctxt->nb->len == 0U) { in mcumgr_serial_process_frag()
121 if (rx_ctxt->nb->len < rx_ctxt->pkt_len) { in mcumgr_serial_process_frag()
126 if (rx_ctxt->nb->len > rx_ctxt->pkt_len) { in mcumgr_serial_process_frag()
132 crc = mcumgr_serial_calc_crc(rx_ctxt->nb->data, rx_ctxt->nb->len); in mcumgr_serial_process_frag()
139 rx_ctxt->nb->len -= 2U; in mcumgr_serial_process_frag()
141 nb = rx_ctxt->nb; in mcumgr_serial_process_frag()
142 rx_ctxt->nb = NULL; in mcumgr_serial_process_frag()
143 return nb; in mcumgr_serial_process_frag()