* [PATCH v1] Bluetooth: Fix the LE Read Connection Interval response layout
@ 2026-10-13 14:22 Luiz Augusto von Dentz
2026-10-14 17:20 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-13 14:22 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The response to HCI_OP_LE_READ_CONN_INTERVAL carries a
Minimum_Supported_Connection_Interval octet between the status and
Num_Groups, which was missing from the structure. Without it the minimum
interval was read as the number of groups, and every group after it
from one octet off.
Take the minimum interval used to clamp the default rate parameters from
that field rather than the smallest group minimum, as the number of
groups can be zero, which left it unset.
Fixes: 2f8784cfe8a9 ("Bluetooth: Add support for Shorter Connection Interval (SCI) feature")
Assisted-by: OpenCode:claude-opus-5.5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
include/net/bluetooth/hci.h | 1 +
net/bluetooth/hci_event.c | 16 ++++------------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 1641d879dbda..9dc714d9145e 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2527,6 +2527,7 @@ struct hci_le_conn_interval_group {
struct hci_rp_le_read_conn_interval {
__u8 status;
+ __u8 min;
__u8 num_grps;
struct hci_le_conn_interval_group grps[];
} __packed;
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c055d16cfb8e..91a0157ff435 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1269,8 +1269,6 @@ static u8 hci_cc_le_read_conn_interval(struct hci_dev *hdev, void *data,
struct sk_buff *skb)
{
struct hci_rp_le_read_conn_interval *rp = data;
- u16 min_interval = 0;
- int i;
bt_dev_dbg(hdev, "status 0x%2.2x", rp->status);
@@ -1283,17 +1281,11 @@ static u8 hci_cc_le_read_conn_interval(struct hci_dev *hdev, void *data,
return HCI_ERROR_UNSPECIFIED;
}
- /* Store the smallest minimum supported connection interval reported by
- * the controller so the default rate parameters can be clamped to it.
+ /* Store the minimum supported connection interval so the default rate
+ * parameters can be clamped to it. It is reported on its own rather
+ * than derived from the groups, as there may be none.
*/
- for (i = 0; i < rp->num_grps; i++) {
- u16 min = le16_to_cpu(rp->grps[i].min);
-
- if (!min_interval || min < min_interval)
- min_interval = min;
- }
-
- hdev->le_min_rate_interval = min_interval;
+ hdev->le_min_rate_interval = rp->min;
return rp->status;
}
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] Bluetooth: Fix the LE Read Connection Interval response layout
2026-10-13 14:22 [PATCH v1] Bluetooth: Fix the LE Read Connection Interval response layout Luiz Augusto von Dentz
@ 2026-10-14 17:20 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2026-10-14 17:20 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 13 Oct 2026 10:22:02 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> The response to HCI_OP_LE_READ_CONN_INTERVAL carries a
> Minimum_Supported_Connection_Interval octet between the status and
> Num_Groups, which was missing from the structure. Without it the minimum
> interval was read as the number of groups, and every group after it
> from one octet off.
>
> [...]
Here is the summary with links:
- [v1] Bluetooth: Fix the LE Read Connection Interval response layout
https://git.kernel.org/bluetooth/bluetooth-next/c/d7629e8dabbc
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-14 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 14:22 [PATCH v1] Bluetooth: Fix the LE Read Connection Interval response layout Luiz Augusto von Dentz
2026-10-14 17:20 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox