* [PATCH BlueZ] hog-lib: Check if Report ID is set before prepending it
@ 2022-04-20 20:14 Luiz Augusto von Dentz
2022-04-20 21:23 ` [BlueZ] " bluez.test.bot
2022-04-22 20:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-04-20 20:14 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Before prepending the Report ID check if it is non-zero:
BLUETOOTH SPECIFICATION Page 16 of 26
HID Service Specification
Report ID shall be nonzero in a Report Reference characteristic
descriptor where there is more than one instance of the Report
characteristic for any given Report Type.
Fixes: https://github.com/bluez/bluez/issues/334
Fixes: https://github.com/bluez/bluez/issues/320
Fixes: https://www.spinics.net/lists/linux-bluetooth/msg97262.html
---
profiles/input/hog-lib.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index b611f6b4a..e69ea1ba4 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -348,7 +348,14 @@ static void report_value_cb(const guint8 *pdu, guint16 len, gpointer user_data)
ev.type = UHID_INPUT;
buf = ev.u.input.data;
- if (report->numbered) {
+ /* BLUETOOTH SPECIFICATION Page 16 of 26
+ * HID Service Specification
+ *
+ * Report ID shall be nonzero in a Report Reference characteristic
+ * descriptor where there is more than one instance of the Report
+ * characteristic for any given Report Type.
+ */
+ if (report->numbered && report->id) {
buf[0] = report->id;
len = MIN(len, sizeof(ev.u.input.data) - 1);
memcpy(buf + 1, pdu, len);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] hog-lib: Check if Report ID is set before prepending it
2022-04-20 20:14 [PATCH BlueZ] hog-lib: Check if Report ID is set before prepending it Luiz Augusto von Dentz
@ 2022-04-20 21:23 ` bluez.test.bot
2022-04-22 20:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-04-20 21:23 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 995 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=633916
---Test result---
Test Summary:
CheckPatch PASS 1.43 seconds
GitLint PASS 0.99 seconds
Prep - Setup ELL PASS 42.85 seconds
Build - Prep PASS 0.76 seconds
Build - Configure PASS 8.67 seconds
Build - Make PASS 1271.22 seconds
Make Check PASS 11.98 seconds
Make Check w/Valgrind PASS 444.82 seconds
Make Distcheck PASS 231.22 seconds
Build w/ext ELL - Configure PASS 8.82 seconds
Build w/ext ELL - Make PASS 1263.07 seconds
Incremental Build with patchesPASS 0.00 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] hog-lib: Check if Report ID is set before prepending it
2022-04-20 20:14 [PATCH BlueZ] hog-lib: Check if Report ID is set before prepending it Luiz Augusto von Dentz
2022-04-20 21:23 ` [BlueZ] " bluez.test.bot
@ 2022-04-22 20:10 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-04-22 20:10 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 20 Apr 2022 13:14:37 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> Before prepending the Report ID check if it is non-zero:
>
> BLUETOOTH SPECIFICATION Page 16 of 26
> HID Service Specification
>
> [...]
Here is the summary with links:
- [BlueZ] hog-lib: Check if Report ID is set before prepending it
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c535623a713c
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] 3+ messages in thread
end of thread, other threads:[~2022-04-22 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 20:14 [PATCH BlueZ] hog-lib: Check if Report ID is set before prepending it Luiz Augusto von Dentz
2022-04-20 21:23 ` [BlueZ] " bluez.test.bot
2022-04-22 20:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth
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.