From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v4 10/20] shared/uhid: Fix size of Get Report reply with a Report ID
Date: Thu, 24 Sep 2026 18:30:35 -0400 [thread overview]
Message-ID: <20260924223046.605543-11-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260924223046.605543-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The size of the reply did not account for the Report ID prepended to
the data of numbered reports, dropping the last byte of the report,
unlike Input Reports which already account for it.
Assisted-by: OpenCode:claude-opus-5.5
---
src/shared/uhid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/uhid.c b/src/shared/uhid.c
index 919618a71b00..36a16c331e83 100644
--- a/src/shared/uhid.c
+++ b/src/shared/uhid.c
@@ -530,7 +530,7 @@ int bt_uhid_get_report_reply(struct bt_uhid *uhid, uint32_t id, uint8_t number,
if (number) {
rsp->data[len++] = number;
- rsp->size += MIN(size, sizeof(rsp->data) - 1);
+ rsp->size = 1 + MIN(size, sizeof(rsp->data) - 1);
} else
rsp->size = MIN(size, sizeof(ev.u.input.data));
--
2.55.0
next prev parent reply other threads:[~2026-09-24 22:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 22:30 [PATCH BlueZ v4 00/20] Add HoG functional tests and shared/hog Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 01/20] shared/gatt-client: Fix calling destroy after unregistering notify Luiz Augusto von Dentz
2026-09-25 0:45 ` Add HoG functional tests and shared/hog bluez.test.bot
2026-09-24 22:30 ` [PATCH BlueZ v4 02/20] client/gatt: Fix setting descriptor value from scripts Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 03/20] client/mgmt: Print Connection Subrate event Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 04/20] emulator: Default to the latest BR/EDR+LE version Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 05/20] client/scripts: Add HoG device scripts Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 06/20] doc: Add functional-hog documentation Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 07/20] test: functional: add HoG tests Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 08/20] test: functional: limit the workers by the memory available Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 09/20] client/agent: Fix crash on Cancel with no pending request Luiz Augusto von Dentz
2026-09-24 22:30 ` Luiz Augusto von Dentz [this message]
2026-09-24 22:30 ` [PATCH BlueZ v4 11/20] shared/uhid: Keep reading when an event is not available Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 12/20] shared/tester: Allow expecting a PDU with no response Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 13/20] shared/hog: Add initial implementation Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 14/20] unit/test-hog: Use shared/hog Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 15/20] test: functional: change the HoG SCI mode with the HID Control Point Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 16/20] input/hog: Use shared/hog Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 17/20] doc: Add CONFIG_HIDRAW to the tester kernel config Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 18/20] unit/test-uhid: Add Get Report tests Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 19/20] device: Use bt_att instead of GAttrib Luiz Augusto von Dentz
2026-09-24 22:30 ` [PATCH BlueZ v4 20/20] attrib: Remove GAttrib and gatttool Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260924223046.605543-11-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox