Skip to content

Commit b3e67cf

Browse files
jori-nordiccarlescufi
authored andcommitted
Bluetooth: L2CAP: document error values of bt_l2cap_chan_send()
They're still subject to change. At least now the users have some idea of what's happening. Signed-off-by: Jonathan Rico <[email protected]>
1 parent 5248587 commit b3e67cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/zephyr/bluetooth/l2cap.h

+7
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,13 @@ int bt_l2cap_chan_disconnect(struct bt_l2cap_chan *chan);
594594
* case of an error the caller retains the ownership of the buffer.
595595
*
596596
* @return 0 in case of success or negative value in case of error.
597+
* @return -EINVAL if `buf` or `chan` is NULL.
598+
* @return -EINVAL if `chan` is not either BR/EDR or LE credit-based.
599+
* @return -EINVAL if buffer doesn't have enough bytes reserved to fit header.
600+
* @return -EMSGSIZE if `buf` is larger than `chan`'s MTU.
601+
* @return -ENOTCONN if underlying conn is disconnected.
602+
* @return -ESHUTDOWN if L2CAP channel is disconnected.
603+
* @return -other (from lower layers) if chan is BR/EDR.
597604
*/
598605
int bt_l2cap_chan_send(struct bt_l2cap_chan *chan, struct net_buf *buf);
599606

0 commit comments

Comments
 (0)