Skip to contentSkip to conversation

emulator: Fix version of 6.2 and 7.0 controllers

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Nov 16 – Nov 18 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v2 1/1 emulator: Fix version of 6.2 and 7.0 controllers

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

BTDEV_TYPE_BREDRLE62 reported 0x0e (6.0) since it never set a version of its own and BTDEV_TYPE_BREDRLE70 reported 0x10, which is 6.2, so set them to 0x10 and 0x12 respectively as decoded by btmon.

The version set for BTDEV_TYPE_BREDRLE70 in btdev_create was always overwritten by set_bredrle_features, so fold it into the other BREDRLE types. Update the versions expected by mgmt-tester to match.

Fixes a938cf48d083 ("emulator/btdev: Add emulation support for HIDS

1.1 SCI commands")

Fixes a7f03764fa5f ("emulator: Add HDT support to btdev")
Assisted-by OpenCode:claude-fable-5.2
---
 emulator/btdev.c    | 10 +++-------
 tools/mgmt-tester.c |  4 ++--
 2 files changed, 5 insertions(+), 9 deletions(-)
emulator/btdev.c +3 -7
index b3d13e39741a..1140acd90e7d 100644
@@ -9151,6 +9151,7 @@ static void set_bredrle_features(struct btdev *btdev)
 	}
 
 	if (btdev->type >= BTDEV_TYPE_BREDRLE62) {
+		btdev->version = 0x10;
 		/* Shorter Connection Intervals */
 		btdev->le_features[9] |= BIT(0);
 		/* Shorter Connection Intervals (Host Support) */
@@ -9160,7 +9161,7 @@ static void set_bredrle_features(struct btdev *btdev)
 	if (btdev->type >= BTDEV_TYPE_BREDRLE70) {
 		uint8_t *page_1 = &btdev->le_features[8];
 
-		btdev->version = 0x10;
+		btdev->version = 0x12;
 
 		/* The data length commands of 7.0 are the ones emulated */
 		btdev->le_features[0] |= BIT(5); /* LE Data Length Extension */
@@ -9302,17 +9303,12 @@ struct btdev *btdev_create(enum btdev_type type, uint16_t id)
 	btdev->revision = 0x0000;
 
 	switch (btdev->type) {
-	case BTDEV_TYPE_BREDRLE70:
-		btdev->version = 0x0e;
-		set_bredrle_features(btdev);
-		set_bredrle_commands(btdev);
-		set_le_states(btdev);
-		break;
 	case BTDEV_TYPE_BREDRLE:
 	case BTDEV_TYPE_BREDRLE50:
 	case BTDEV_TYPE_BREDRLE52:
 	case BTDEV_TYPE_BREDRLE60:
 	case BTDEV_TYPE_BREDRLE62:
+	case BTDEV_TYPE_BREDRLE70:
 		btdev->version = 0x09;
 		set_bredrle_features(btdev);
 		set_bredrle_commands(btdev);
tools/mgmt-tester.c +2 -2
index 100e3cd6082c..18dbd3f89096 100644
@@ -706,14 +706,14 @@ static void test_condition_complete(struct test_data *data)
 
 #define test_bredrle62_full(name, data, setup, func, timeout) \
 	test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE62, \
-					0x0e, 0x0201beff, 0x00000080)
+					0x10, 0x0201beff, 0x00000080)
 
 #define test_bredrle62(name, data, setup, func) \
 	test_bredrle62_full(name, data, setup, func, 2)
 
 #define test_bredrle70_full(name, data, setup, func, timeout) \
 	test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE70, \
-					0x10, 0x0601beff, 0x00000080)
+					0x12, 0x0601beff, 0x00000080)
 
 #define test_bredrle70(name, data, setup, func) \
 	test_bredrle70_full(name, data, setup, func, 2)
Signature · 1 line
2.56.0
#1 lore raw

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/series/1213178/

---Test result---

Test Summary:

CheckPatch                    FAIL      0.36 seconds
GitLint                       PASS      0.25 seconds
BuildEll                      PASS      16.24 seconds
BluezMake                     PASS      244.61 seconds
CheckSmatch                   PASS      222.12 seconds
bluezmakeextell               PASS      79.76 seconds
TestFunctional                FAIL      1061.02 seconds
IncrementalBuild              PASS      243.19 seconds
ScanBuild                     PASS      849.63 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,1/1] emulator: Fix version of 6.2 and 7.0 controllers
WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12+ chars of sha1> ("<title line>")' - ie: 'Fixes: a938cf48d083 ("emulator/btdev: Add emulation support for HIDS 1.1 SCI commands")' #125:

Fixes a938cf48d083 ("emulator/btdev: Add emulation support for HIDS

/home/runner/work/bluez/bluez/src/patch/14990576.patch total: 0 errors, 1 warnings, 49 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/home/runner/work/bluez/bluez/src/patch/14990576.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

##############################
Test: TestFunctional - FAIL
Desc: Run test-functional
Output:
FAIL functional.test_bap::test_bass_past_earbuds_transport_acquire[hosts11-vm3]: AssertionError: Failed to acquire: org.bluez.Error.Failed

https://github.com/bluez/bluez/pull/2838

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 11 lines · On Mon, 16 Nov 2026 16:28:05 -0500 you wrote:

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

BTDEV_TYPE_BREDRLE62 reported 0x0e (6.0) since it never set a version of its own and BTDEV_TYPE_BREDRLE70 reported 0x10, which is 6.2, so set them to 0x10 and 0x12 respectively as decoded by btmon.

The version set for BTDEV_TYPE_BREDRLE70 in btdev_create was always overwritten by set_bredrle_features, so fold it into the other BREDRLE types. Update the versions expected by mgmt-tester to match.

[...]

Here is the summary with links:
- [BlueZ,v2,1/1] emulator: Fix version of 6.2 and 7.0 controllers

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=35a9286435f9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html