Skip to content

Commit 1a7f85c

Browse files
Vudentzjhedberg
authored andcommitted
Bluetooth: L2CAP: Document cases where -EAGAIN is returned
This documents the special cases where -EAGAIN is returned which leads the buffer to be queued. Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent b8911a8 commit 1a7f85c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

subsys/bluetooth/host/l2cap.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,16 @@ static void l2cap_chan_seg_sent(struct bt_conn *conn, void *user_data)
12551255
l2cap_chan_tx_resume(BT_L2CAP_LE_CHAN(chan));
12561256
}
12571257

1258+
/* This returns -EAGAIN whenever a segment cannot be send immediately which can
1259+
* happen under the following circuntances:
1260+
*
1261+
* 1. There are no credits
1262+
* 2. There are no buffers
1263+
* 3. There are no TX contexts
1264+
*
1265+
* In all cases the original buffer is unaffected so it can be pushed back to
1266+
* be sent later.
1267+
*/
12581268
static int l2cap_chan_le_send(struct bt_l2cap_le_chan *ch,
12591269
struct net_buf *buf, u16_t sdu_hdr_len)
12601270
{

0 commit comments

Comments
 (0)