bt: fix bt_l2cap_chan_send_sdu to return total bytes sent

bt_l2cap_chan_send_sdu previously returned the number of bytes sent
in the last sent sdu buf fragment or 0 if the buf has only
one fragment. bt_l2cap_chan_send_sdu now returns the total data
bytes sent from the buf.

Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
This commit is contained in:
Tom Finet 2023-08-29 23:48:54 +01:00 committed by Carles Cufí
commit 2b8762a438

View file

@ -2088,7 +2088,7 @@ static int l2cap_chan_le_send_sdu(struct bt_l2cap_le_chan *ch,
net_buf_unref(frag); net_buf_unref(frag);
return ret; return sent;
} }
static void le_credits(struct bt_l2cap *l2cap, uint8_t ident, static void le_credits(struct bt_l2cap *l2cap, uint8_t ident,