Skip to contentSkip to conversation

Bluetooth: Add BT_MODE socket option

PATCH New Luiz Augusto von Dentz 1 participant 1 message Mar 27, 2020

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Add BT_MODE socket option

From: Luiz Augusto von Dentz <[email protected]>

This adds BT_MODE socket option which can be used to set L2CAP modes, including modes only supported over LE which were not supported using the L2CAP_OPTIONS.

---
 include/net/bluetooth/bluetooth.h |   8 ++
 net/bluetooth/l2cap_sock.c        | 120 +++++++++++++++++++++++++++++-
 2 files changed, 127 insertions(+), 1 deletion(-)
include/net/bluetooth/bluetooth.h +8 -0
index 1576353a2773..3fa7b1e3c5d9 100644
@@ -139,6 +139,14 @@ struct bt_voice {
 #define BT_PHY_LE_CODED_TX	0x00002000
 #define BT_PHY_LE_CODED_RX	0x00004000
 
+#define BT_MODE			15
+
+#define BT_MODE_BASIC		0x00
+#define BT_MODE_ERTM		0x01
+#define BT_MODE_STREAMING	0x02
+#define BT_MODE_LE_FLOWCTL	0x03
+#define BT_MODE_EXT_FLOWCTL	0x04
+
 __printf(1, 2)
 void bt_info(const char *fmt, ...);
 __printf(1, 2)
net/bluetooth/l2cap_sock.c +119 -1

156 lines not on this page · raw message

Signature · 1 line
2.21.1