Skip to content

Bluetooth: Add custom HCI command termination support

Johan Hedberg linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Bluetooth: Add support for custom event terminated commandsinclude/net/bluetooth/bluetooth.h include/net/bluetooth/hci_core.h net/bluetooth/hci_core.c +1 more+22 -22 replies
2/2Bluetooth: Add __hci_cmd_sync_ev functioninclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c+19 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Bluetooth: Add custom HCI command termination support

Hi,

These two patches add support for having commands that do not end with a command complete event but with some other event. We know that this is at least needed for the hdev->setup() routine for some specific hardware where a vendor command doesn't result in command complete but a vendor specific event instead.

Another option to doing it this way is to add a __hci_wait_evt_sync function and do __hci_cmd_sync() + __hci_wait_evt_sync(). However, considering that this has the risk of being racy if the needed event comes between the two function calls I'd still prefer the solution offered by this patch set.

Johan

----------------------------------------------------------------
Johan Hedberg (2):
Bluetooth: Add support for custom event terminated commands
Bluetooth: Add __hci_cmd_sync_ev function

 include/net/bluetooth/bluetooth.h |    1 +
 include/net/bluetooth/hci_core.h  |    4 ++++
 net/bluetooth/hci_core.c          |   32 ++++++++++++++++++++++++++------
 net/bluetooth/hci_event.c         |   11 ++++++++++-
 4 files changed, 41 insertions(+), 7 deletions(-)