diff mbox series

[BlueZ,11/22] btio: Add mode to for Enhanced Credit Mode

Message ID 20200108003342.15458-12-luiz.dentz@gmail.com
State New
Headers show
Series None | expand

Commit Message

Luiz Augusto von Dentz Jan. 8, 2020, 12:33 a.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds BT_IO_MODE_ECRED which directly maps to L2CAP_MODE_ECRED.
---
 btio/btio.c | 2 +-
 btio/btio.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/btio/btio.c b/btio/btio.c
index af2276db9..bd076b4c8 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -638,7 +638,7 @@  static gboolean l2cap_set(int sock, uint8_t src_type, int sec_level,
 	if (imtu || omtu || mode) {
 		gboolean ret;
 
-		if (src_type == BDADDR_BREDR)
+		if (src_type == BDADDR_BREDR || mode)
 			ret = set_l2opts(sock, imtu, omtu, mode, err);
 		else
 			ret = set_le_imtu(sock, imtu, err);
diff --git a/btio/btio.h b/btio/btio.h
index 2dce9f0c1..91398f72d 100644
--- a/btio/btio.h
+++ b/btio/btio.h
@@ -70,7 +70,8 @@  typedef enum {
 	BT_IO_MODE_RETRANS,
 	BT_IO_MODE_FLOWCTL,
 	BT_IO_MODE_ERTM,
-	BT_IO_MODE_STREAMING
+	BT_IO_MODE_STREAMING,
+	BT_IO_MODE_ECRED = 0x81
 } BtIOMode;
 
 typedef void (*BtIOConfirm)(GIOChannel *io, gpointer user_data);