[PATCH BlueZ 05/12] attrib: replace ATT_CID with 'shared' BT_ATT_CID
From: Christian Eggers <ceggers@arri.de>
Date: 2026-02-25 16:18:31
Subsystem:
the rest · Maintainer:
Linus Torvalds
Avoid multiple definitions of the same value. --- attrib/att.h | 1 - attrib/gatttool.c | 3 ++- attrib/interactive.c | 3 ++- attrib/utils.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/attrib/att.h b/attrib/att.h
index 13a0c3a31f1f..613a018ba2c6 100644
--- a/attrib/att.h
+++ b/attrib/att.h@@ -71,7 +71,6 @@ #define ATT_DEFAULT_L2CAP_MTU 48 #define ATT_DEFAULT_LE_MTU 23 -#define ATT_CID 4 #define ATT_PSM 31 /* Flags for Execute Write Request Operation */
diff --git a/attrib/gatttool.c b/attrib/gatttool.c
index 4fae9d41f44f..c984bef9dd39 100644
--- a/attrib/gatttool.c
+++ b/attrib/gatttool.c@@ -25,6 +25,7 @@ #include "bluetooth/sdp.h" #include "bluetooth/uuid.h" +#include "src/shared/att-types.h" #include "src/shared/util.h" #include "att.h" #include "btio/btio.h"
@@ -132,7 +133,7 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data) mtu = ATT_DEFAULT_LE_MTU; } - if (cid == ATT_CID) + if (cid == BT_ATT_CID) mtu = ATT_DEFAULT_LE_MTU; attrib = g_attrib_new(io, mtu, false);
diff --git a/attrib/interactive.c b/attrib/interactive.c
index 4329685c4f7a..07d6cafc57ba 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c@@ -30,6 +30,7 @@ #include "bluetooth/sdp.h" #include "bluetooth/uuid.h" +#include "src/shared/att-types.h" #include "src/shared/util.h" #include "btio/btio.h" #include "att.h"
@@ -159,7 +160,7 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data) mtu = ATT_DEFAULT_LE_MTU; } - if (cid == ATT_CID) + if (cid == BT_ATT_CID) mtu = ATT_DEFAULT_LE_MTU; attrib = g_attrib_new(iochannel, mtu, false);
diff --git a/attrib/utils.c b/attrib/utils.c
index e48bf4ea5cd3..ca05baaa1e8a 100644
--- a/attrib/utils.c
+++ b/attrib/utils.c@@ -22,6 +22,7 @@ #include "bluetooth/sdp.h" #include "bluetooth/uuid.h" +#include "src/shared/att-types.h" #include "btio/btio.h" #include "att.h" #include "gattrib.h"
@@ -69,7 +70,7 @@ GIOChannel *gatt_connect(const char *src, const char *dst, BT_IO_OPT_SOURCE_TYPE, BDADDR_LE_PUBLIC, BT_IO_OPT_DEST_BDADDR, &dba, BT_IO_OPT_DEST_TYPE, dest_type, - BT_IO_OPT_CID, ATT_CID, + BT_IO_OPT_CID, BT_ATT_CID, BT_IO_OPT_SEC_LEVEL, sec, BT_IO_OPT_INVALID); else
--
2.51.0