client/btpclient: Move BTP definitions per service
Subsystems (2)
PATCH v2 1/1 client/btpclient: Move BTP definitions per service
Over the years, BTP interface has grown way over what has been initially anticipated in terms of number of services and commands.
To simplify addition and maintenance of new services this commit split the commands in btp.h per services and move them under client/btpclient/btp folder.
--- Makefile.tools | 2 + client/btpclient/btp/core.h | 24 ++++ client/btpclient/btp/gap.h | 236 ++++++++++++++++++++++++++++++ client/btpclient/btpclient.c | 1 + client/btpclient/btpclientctl.c | 1 + client/btpclient/core.c | 1 + client/btpclient/gap.c | 2 +- client/btpclient/services.h | 11 ++ src/shared/btp.h | 244 -------------------------------- 9 files changed, 277 insertions(+), 245 deletions(-) create mode 100644 client/btpclient/btp/core.h create mode 100644 client/btpclient/btp/gap.h create mode 100644 client/btpclient/services.h
Makefile.tools +2 -0
@@ -588,6 +588,8 @@ noinst_PROGRAMS += client/btpclient/btpclient client/btpclient/btpclientctl client_btpclient_btpclient_SOURCES = client/btpclient/btpclient.c \ client/btpclient/btpclient.h \ src/shared/btp.c src/shared/btp.h \ + client/btpclient/btp/core.h client/btpclient/btp/gap.h\ + client/btpclient/services.h \ client/btpclient/core.c client/btpclient/core.h \ client/btpclient/gap.c client/btpclient/gap.h client_btpclient_btpclient_LDADD = lib/libbluetooth-internal.la \
client/btpclient/btp/core.h new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2011-2017 Intel Corporation. All rights reserved. +* +*/ + +#define BTP_OP_CORE_READ_SUPPORTED_COMMANDS 0x01 + +#define BTP_OP_CORE_READ_SUPPORTED_SERVICES 0x02 + +#define BTP_OP_CORE_REGISTER 0x03 +struct btp_core_register_cp { +uint8_t service_id; +} __packed; + +#define BTP_OP_CORE_UNREGISTER 0x04 +struct btp_core_unregister_cp { +uint8_t service_id; +} __packed; + +#define BTP_EV_CORE_READY 0x80
client/btpclient/btp/gap.h new file +236 -0
236 lines not on this page · raw message
client/btpclient/btpclient.c +1 -0
@@ -26,6 +26,7 @@#include "btpclient.h" #include "core.h" #include "gap.h" +#include "services.h" static struct l_dbus *dbus;
client/btpclient/btpclientctl.c +1 -0
@@ -31,6 +31,7 @@#include "src/shared/queue.h" #include "src/shared/shell.h" #include "src/shared/util.h" +#include "services.h" #define DEFAULT_SOCKET_PATH "/tmp/bt-stack-tester"
client/btpclient/core.c +1 -0
@@ -14,6 +14,7 @@#include "btpclient.h" #include "core.h" #include "gap.h" +#include "services.h" static struct btp *btp;static struct l_dbus *dbus;
client/btpclient/gap.c +1 -1
@@ -18,8 +18,8 @@#include "bluetooth/bluetooth.h" #include "src/shared/btp.h" #include "btpclient.h" -#include "core.h" #include "gap.h" +#include "services.h" #define AD_PATH "/org/bluez/advertising"#define AG_PATH "/org/bluez/agent"
client/btpclient/services.h new file +11 -0
@@ -0,0 +1,11 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/* +* +* BlueZ - Bluetooth protocol stack for Linux +* +* Copyright (C) 2026 Collabora Ltd. +* +*/ + +#include "btp/core.h" +#include "btp/gap.h"
src/shared/btp.h +0 -244
250 lines not on this page · raw message
Signature · 1 line
2.43.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1056772
---Test result---
Test Summary:
CheckPatch PENDING 0.30 seconds GitLint PENDING 0.35 seconds BuildEll PASS 19.96 seconds BluezMake PASS 643.22 seconds MakeCheck PASS 18.91 seconds MakeDistcheck PASS 240.44 seconds CheckValgrind PASS 296.24 seconds CheckSmatch PASS 349.56 seconds bluezmakeextell PASS 182.94 seconds IncrementalBuild PENDING 0.33 seconds ScanBuild PASS 1035.06 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth