Bluetooth: L2CAP: Extend available return codes from accept cb

This adds support for returning various return codes from
the channel accept callback.
This is needed for implementation of incoming connection
authorization for certification purposes.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2018-10-23 11:26:30 +02:00 committed by Johan Hedberg
commit e82ebb2c84
2 changed files with 22 additions and 4 deletions

View file

@ -246,6 +246,10 @@ struct bt_l2cap_server {
* @param chan Pointer to received the allocated channel
*
* @return 0 in case of success or negative value in case of error.
* Possible return values:
* -ENOMEM if no available space for new channel.
* -EACCES if application did not authorize the connection.
* -EKEYREJECTED if encryption key size is too short.
*/
int (*accept)(struct bt_conn *conn, struct bt_l2cap_chan **chan);