Skip to content

Bluetooth: Add/Remove Device completion through hci_request

Johan Hedberg linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Bluetooth: Move struct hci_request definition higher up in hci_core.hinclude/net/bluetooth/hci_core.h+10 -103 replies
2/4Bluetooth: Add hci_request parameter to hci_update_background_scaninclude/net/bluetooth/hci_core.h net/bluetooth/hci_conn.c net/bluetooth/hci_core.c +2 more+33 -273 replies
3/4Bluetooth: Fix Remove Device to wait for HCI before sending cmd_completenet/bluetooth/mgmt.c+43 -61 reply
4/4Bluetooth: Fix Add Device to wait for HCI before sending cmd_completeinclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/mgmt.c+50 -154 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/4] Bluetooth: Add/Remove Device completion through hci_request

Hi,

So far the last couple of Remove Device tests in mgmt-tester have been randomly failing some 50% of the time, mainly because the Add/Remove mgmt command implementation wouldn't wait for HCI command completion before returning. This would let the tests proceed from the setup to the test phase when there are still setup phase HCI command uncompleted.

This set of patches updates the HCI scanning functions to take a hci_request parameter so that the completion of any HCI commands can be hooked up to sending the mgmt response to user space.

Johan

----------------------------------------------------------------
Johan Hedberg (4):
Bluetooth: Move struct hci_request definition higher up in hci_core.h
Bluetooth: Add hci_request parameter to hci_update_background_scan
Bluetooth: Fix Remove Device to wait for HCI before sending cmd_complete
Bluetooth: Fix Add Device to wait for HCI before sending cmd_complete

 include/net/bluetooth/hci_core.h |  24 +++----
 net/bluetooth/hci_conn.c         |   2 +-
 net/bluetooth/hci_core.c         |  35 ++++++-----
 net/bluetooth/hci_event.c        |   4 +-
 net/bluetooth/mgmt.c             | 119 ++++++++++++++++++++++++++++-------
 5 files changed, 131 insertions(+), 53 deletions(-)