* [bluez/bluez] 323d54: shared/hci: Add BPF filter for registered events
@ 2026-05-01 15:06 Luiz Augusto von Dentz
0 siblings, 0 replies; only message in thread
From: Luiz Augusto von Dentz @ 2026-05-01 15:06 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/1088547
Home: https://github.com/bluez/bluez
Commit: 323d54f958ff446ecd6897c8ce1aade29639e454
https://github.com/bluez/bluez/commit/323d54f958ff446ecd6897c8ce1aade29639e454
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M src/shared/hci.c
Log Message:
-----------
shared/hci: Add BPF filter for registered events
Implement a BPF socket filter in bt_hci_register/bt_hci_unregister that
uses setsockopt(SO_ATTACH_FILTER) to only accept HCI events that have
been registered, plus BT_HCI_EVT_CMD_COMPLETE and BT_HCI_EVT_CMD_STATUS
which are always needed for command response processing.
The filter is rebuilt each time an event is registered or unregistered,
and only applies to non-stream (raw socket) connections.
Assisted-by: Claude:claude-opus-4.6
Commit: 445437b236ab5b3c7b9c888ae1baa52176216928
https://github.com/bluez/bluez/commit/445437b236ab5b3c7b9c888ae1baa52176216928
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M src/shared/hci.c
M src/shared/hci.h
Log Message:
-----------
shared/hci: Add bt_hci_register_subevent for LE Meta events
Add bt_hci_register_subevent/bt_hci_unregister_subevent API that allows
registering for specific LE Meta Event subevents. The BPF filter is
extended to accept BT_HCI_EVT_LE_META_EVENT packets and then check the
subevent byte (offset 4) against registered subevents.
Since bt_hci_register_subevent is only used with BT_HCI_EVT_LE_META_EVENT,
the event parameter is omitted. The subevent list reuses struct evt where
evt->event stores the subevent code.
Assisted-by: Claude:claude-opus-4.6
Commit: 5b1e05389d250781fbfd1e72308395b297f9414a
https://github.com/bluez/bluez/commit/5b1e05389d250781fbfd1e72308395b297f9414a
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M profiles/ranging/rap_hci.c
Log Message:
-----------
ranging/rap_hci: Use bt_hci_register_subevent for LE CS events
Replace the single BT_HCI_EVT_LE_META_EVENT registration and subevent
dispatch table with individual bt_hci_register_subevent calls for each
CS subevent. This enables BPF filtering at the socket level for each
specific subevent and removes the manual subevent dispatch logic.
Event IDs are stored in a struct queue for flexible management.
Assisted-by: Claude:claude-opus-4.6
Commit: dfbc31a733555c70ff0c6e74ba1834908485a950
https://github.com/bluez/bluez/commit/dfbc31a733555c70ff0c6e74ba1834908485a950
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2026-05-01 (Fri, 01 May 2026)
Changed paths:
M tools/hci-tester.c
Log Message:
-----------
hci-tester: Use bt_hci_register_subevent for LE Meta events
Convert all bt_hci_register(BT_HCI_EVT_LE_META_EVENT) calls to use
bt_hci_register_subevent with the specific subevent code. Update
callbacks to work with data that no longer contains the subevent byte
prefix, since bt_hci_register_subevent strips it before dispatch.
Assisted-by: Claude:claude-opus-4.6
Compare: https://github.com/bluez/bluez/compare/323d54f958ff%5E...dfbc31a73355
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-01 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 15:06 [bluez/bluez] 323d54: shared/hci: Add BPF filter for registered events Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox