Bluetooth: l2cap: add debug print for EATT

Add debug print when a buffer intended for ECRED is segmented
unnecessarily.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit is contained in:
Jonathan Rico 2023-07-24 13:04:03 +02:00 committed by Carles Cufí
commit 4433ff7154

View file

@ -1840,6 +1840,11 @@ static struct net_buf *l2cap_chan_create_seg(struct bt_l2cap_le_chan *ch,
net_buf_push_le16(buf, net_buf_frags_len(buf)); net_buf_push_le16(buf, net_buf_frags_len(buf));
} }
return net_buf_ref(buf); return net_buf_ref(buf);
} else {
/* Unnecessary fragmentation. Ensure the source buffer has
* BT_L2CAP_SDU_BUF_SIZE(0) headroom.
*/
LOG_DBG("not enough headroom on %p", buf);
} }
segment: segment: