From d1588dcceeebdef7f6bbd2e4a705edeb312e1bd2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 18 Nov 2016 16:50:37 +0200 Subject: [PATCH] net: bt: Print data length for both recv and send Change-Id: Ibe5c0a17addaa0f7a839691f8eac6128fe95335f Signed-off-by: Luiz Augusto von Dentz --- net/yaip/l2/bluetooth.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/yaip/l2/bluetooth.c b/net/yaip/l2/bluetooth.c index e4f06de24b3..35edb611641 100644 --- a/net/yaip/l2/bluetooth.c +++ b/net/yaip/l2/bluetooth.c @@ -60,7 +60,7 @@ static enum net_verdict net_bt_recv(struct net_if *iface, struct net_buf *buf) uint32_t src; uint32_t dst; - NET_DBG("iface %p buf %p", iface, buf); + NET_DBG("iface %p buf %p len %u", iface, buf, net_buf_frags_len(buf)); /* Uncompress will drop the current fragment. Buf ll src/dst address * will then be wrong and must be updated according to the new fragment. @@ -85,7 +85,7 @@ static enum net_verdict net_bt_send(struct net_if *iface, struct net_buf *buf) { struct bt_context *ctxt = net_if_get_device(iface)->driver_data; - NET_DBG("iface %p buf %p", iface, buf); + NET_DBG("iface %p buf %p len %u", iface, buf, net_buf_frags_len(buf)); /* Only accept IPv6 packets */ if (net_nbuf_family(buf) != AF_INET6) { @@ -148,7 +148,8 @@ static void ipsp_recv(struct bt_l2cap_chan *chan, struct net_buf *buf) struct bt_context *ctxt = CHAN_CTXT(chan); struct net_buf *nbuf; - NET_DBG("Incoming data channel %p len %u", chan, buf->len); + NET_DBG("Incoming data channel %p len %u", chan, + net_buf_frags_len(buf)); /* Get buffer for bearer / protocol related data */ nbuf = net_nbuf_get_reserve_rx(0); @@ -197,7 +198,7 @@ static int bt_iface_send(struct net_if *iface, struct net_buf *buf) struct bt_context *ctxt = net_if_get_device(iface)->driver_data; int ret; - NET_DBG("iface %p buf %p", iface, buf); + NET_DBG("iface %p buf %p len %u", iface, buf, net_buf_frags_len(buf)); /* bt_l2cap_chan_send will attempt to unref but net_nbuf_unref does * some extra book keeping so add a reference to prevent it to be