Lines Matching refs:nb
315 struct net_buf *nb; in smp_bt_chr_write() local
322 nb = smp_packet_alloc(); in smp_bt_chr_write()
323 if (!nb) { in smp_bt_chr_write()
328 if (net_buf_tailroom(nb) < len) { in smp_bt_chr_write()
330 len, net_buf_tailroom(nb)); in smp_bt_chr_write()
331 smp_packet_free(nb); in smp_bt_chr_write()
335 net_buf_add_mem(nb, buf, len); in smp_bt_chr_write()
337 ud = net_buf_user_data(nb); in smp_bt_chr_write()
345 smp_rx_req(&smp_bt_transport, nb); in smp_bt_chr_write()
391 static struct bt_conn *smp_bt_conn_from_pkt(const struct net_buf *nb) in smp_bt_conn_from_pkt() argument
393 struct smp_bt_user_data *ud = net_buf_user_data(nb); in smp_bt_conn_from_pkt()
406 static uint16_t smp_bt_get_mtu(const struct net_buf *nb) in smp_bt_get_mtu() argument
411 conn = smp_bt_conn_from_pkt(nb); in smp_bt_get_mtu()
448 static int smp_bt_tx_pkt(struct net_buf *nb) in smp_bt_tx_pkt() argument
457 .data = nb->data, in smp_bt_tx_pkt()
464 conn = smp_bt_conn_from_pkt(nb); in smp_bt_tx_pkt()
486 mtu_size = smp_bt_get_mtu(nb); in smp_bt_tx_pkt()
495 ud = net_buf_user_data(nb); in smp_bt_tx_pkt()
507 while (off < nb->len) { in smp_bt_tx_pkt()
516 if ((off + mtu_size) > nb->len) { in smp_bt_tx_pkt()
518 mtu_size = nb->len - off; in smp_bt_tx_pkt()
549 notify_param.data = &nb->data[off]; in smp_bt_tx_pkt()
564 smp_bt_ud_free(net_buf_user_data(nb)); in smp_bt_tx_pkt()
565 smp_packet_free(nb); in smp_bt_tx_pkt()
632 static bool smp_bt_query_valid_check(struct net_buf *nb, void *arg) in smp_bt_query_valid_check() argument
635 struct smp_bt_user_data *ud = net_buf_user_data(nb); in smp_bt_query_valid_check()