diff mbox series

[BlueZ,v1,1/2] device: Fix storing conn parameters without first attempting to use them

Message ID 20240612191145.1379415-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1,1/2] device: Fix storing conn parameters without first attempting to use them | expand

Commit Message

Luiz Augusto von Dentz June 12, 2024, 7:11 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Some controller seems to have problems to use connections parameters
that comes from PPCP as seem bellow, so instead of storing the
parameters immediately this wait the MGMT_EV_NEW_CONN_PARAM to confirm
the connection parameters are save to be stored:

< HCI Command: LE Extended Create Connection (0x08|0x0043) plen 42
        Filter policy: Accept list is not used (0x00)
        Own address type: Public (0x00)
        Peer address type: Random (0x01)
        Peer address: FE:D5:D9:EC:AB:99 (Static)
        Initiating PHYs: 0x03
        Entry 0: LE 1M
          Scan interval: 60.000 msec (0x0060)
          Scan window: 60.000 msec (0x0060)
          Min connection interval: 7.50 msec (0x0006)
          Max connection interval: 4000.00 msec (0x0c80)
          Connection latency: 0 (0x0000)
          Supervision timeout: 5000 msec (0x01f4)
          Min connection length: 0.000 msec (0x0000)
          Max connection length: 0.000 msec (0x0000)
        Entry 1: LE 2M
          Scan interval: 60.000 msec (0x0060)
          Scan window: 60.000 msec (0x0060)
          Min connection interval: 7.50 msec (0x0006)
          Max connection interval: 4000.00 msec (0x0c80)
          Connection latency: 0 (0x0000)
          Supervision timeout: 5000 msec (0x01f4)
          Min connection length: 0.000 msec (0x0000)
          Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4
      LE Extended Create Connection (0x08|0x0043) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)
---
 src/device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

bluez.test.bot@gmail.com June 12, 2024, 9:31 p.m. UTC | #1
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=861326

---Test result---

Test Summary:
CheckPatch                    PASS      0.95 seconds
GitLint                       FAIL      0.89 seconds
BuildEll                      PASS      26.16 seconds
BluezMake                     PASS      1733.63 seconds
MakeCheck                     PASS      13.45 seconds
MakeDistcheck                 PASS      179.58 seconds
CheckValgrind                 PASS      254.32 seconds
CheckSmatch                   PASS      358.12 seconds
bluezmakeextell               PASS      120.42 seconds
IncrementalBuild              PASS      3141.96 seconds
ScanBuild                     PASS      1014.64 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/2] device: Fix storing conn parameters without first attempting to use them

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 (87>80): "[BlueZ,v1,1/2] device: Fix storing conn parameters without first attempting to use them"


---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org June 13, 2024, 9:20 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 12 Jun 2024 15:11:44 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Some controller seems to have problems to use connections parameters
> that comes from PPCP as seem bellow, so instead of storing the
> parameters immediately this wait the MGMT_EV_NEW_CONN_PARAM to confirm
> the connection parameters are save to be stored:
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1,1/2] device: Fix storing conn parameters without first attempting to use them
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=98676d410bde
  - [BlueZ,v1,2/2] gas: Fix default PPCP connection intervals
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0b02371e2b15

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index ce794f315995..85857577ae11 100644
--- a/src/device.c
+++ b/src/device.c
@@ -7435,10 +7435,10 @@  void btd_device_set_conn_param(struct btd_device *device, uint16_t min_interval,
 					uint16_t max_interval, uint16_t latency,
 					uint16_t timeout)
 {
-	btd_adapter_store_conn_param(device->adapter, &device->bdaddr,
-					device->bdaddr_type, min_interval,
-					max_interval, latency,
-					timeout);
+	/* Attempt to load the new connection parameters, in case it is
+	 * successful the MGMT_EV_NEW_CONN_PARAM will be generated which will
+	 * then trigger btd_adapter_store_conn_param.
+	 */
 	btd_adapter_load_conn_param(device->adapter, &device->bdaddr,
 					device->bdaddr_type, min_interval,
 					max_interval, latency,