net: bt: Print data length for both recv and send

Change-Id: Ibe5c0a17addaa0f7a839691f8eac6128fe95335f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2016-11-18 16:50:37 +02:00 committed by Jukka Rissanen
parent fa43abc100
commit d1588dccee

View File

@ -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