* [PATCH BlueZ v2 1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1.
@ 2023-09-29 13:05 Vibhav Pant
2023-09-29 14:27 ` [BlueZ,v2,1/2] " bluez.test.bot
0 siblings, 1 reply; 3+ messages in thread
From: Vibhav Pant @ 2023-09-29 13:05 UTC (permalink / raw)
To: linux-bluetooth
This allows DBus clients to find an adapter's version and
manufacturer company code without querying the management API.
---
src/adapter.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/adapter.c b/src/adapter.c
index 8a7c53a9e..8c267d418 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -260,6 +260,7 @@ struct btd_adapter {
bdaddr_t bdaddr; /* controller Bluetooth address */
uint8_t bdaddr_type; /* address type */
+ uint8_t version; /* controller core spec version */
uint32_t dev_class; /* controller class of device */
char *name; /* controller device name */
char *short_name; /* controller short name */
@@ -3540,6 +3541,29 @@ static gboolean property_experimental_exists(const GDBusPropertyTable *property,
return !queue_isempty(adapter->exps);
}
+static gboolean property_get_manufacturer(const GDBusPropertyTable *property,
+ DBusMessageIter *iter,
+ void *user_data)
+{
+ struct btd_adapter *adapter = user_data;
+ dbus_uint16_t val = adapter->manufacturer;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, &val);
+
+ return TRUE;
+}
+
+static gboolean property_get_version(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *user_data)
+{
+ struct btd_adapter *adapter = user_data;
+ uint8_t val = adapter->version;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_BYTE, &val);
+
+ return TRUE;
+}
+
static DBusMessage *remove_device(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
@@ -3898,6 +3922,8 @@ static const GDBusPropertyTable adapter_properties[] = {
{ "Roles", "as", property_get_roles },
{ "ExperimentalFeatures", "as", property_get_experimental, NULL,
property_experimental_exists },
+ { "Manufacturer", "q", property_get_manufacturer },
+ { "Version", "y", property_get_version },
{ }
};
@@ -10164,6 +10190,8 @@ static void read_info_complete(uint8_t status, uint16_t length,
adapter->supported_settings = btohl(rp->supported_settings);
adapter->current_settings = btohl(rp->current_settings);
+ adapter->version = rp->version;
+
clear_uuids(adapter);
clear_devices(adapter);
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1.
2023-09-29 13:05 [PATCH BlueZ v2 1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1 Vibhav Pant
@ 2023-09-29 14:27 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-09-29 14:27 UTC (permalink / raw)
To: linux-bluetooth, vibhavp
[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]
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=788804
---Test result---
Test Summary:
CheckPatch PASS 0.43 seconds
GitLint FAIL 0.56 seconds
BuildEll PASS 30.70 seconds
BluezMake PASS 1046.22 seconds
MakeCheck PASS 13.88 seconds
MakeDistcheck PASS 179.72 seconds
CheckValgrind PASS 277.48 seconds
CheckSmatch PASS 421.49 seconds
bluezmakeextell PASS 119.57 seconds
IncrementalBuild PASS 911.93 seconds
ScanBuild PASS 1207.68 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1.
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (81>80): "[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1."
1: T3 Title has trailing punctuation (.): "[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1."
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1.
2023-09-29 13:07 [PATCH BlueZ v2 1/2] " vibhavp
@ 2023-09-29 14:37 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-09-29 14:37 UTC (permalink / raw)
To: linux-bluetooth, vibhavp
[-- Attachment #1: Type: text/plain, Size: 2289 bytes --]
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=788805
---Test result---
Test Summary:
CheckPatch PASS 1.09 seconds
GitLint FAIL 1.72 seconds
BuildEll PASS 28.83 seconds
BluezMake PASS 1024.19 seconds
MakeCheck PASS 13.04 seconds
MakeDistcheck PASS 165.71 seconds
CheckValgrind PASS 265.79 seconds
CheckSmatch PASS 356.05 seconds
bluezmakeextell PASS 109.50 seconds
IncrementalBuild PASS 1741.06 seconds
ScanBuild PASS 1098.65 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1.
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (81>80): "[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1."
1: T3 Title has trailing punctuation (.): "[BlueZ,v2,1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1."
[BlueZ,v2,2/2] adapter-api: Add docs for properties Manufacturer and Version.
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T3 Title has trailing punctuation (.): "[BlueZ,v2,2/2] adapter-api: Add docs for properties Manufacturer and Version."
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-29 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29 13:05 [PATCH BlueZ v2 1/2] adapter: Add Version and Manufacturer props to org.bluez.Adapter1 Vibhav Pant
2023-09-29 14:27 ` [BlueZ,v2,1/2] " bluez.test.bot
2023-09-29 13:07 [PATCH BlueZ v2 1/2] " vibhavp
2023-09-29 14:37 ` [BlueZ,v2,1/2] " bluez.test.bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.