Skip to content

Bluetooth: Clean up Set Connectable related code

[email protected] linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Bluetooth: Reorganize set_connectable HCI command sendingnet/bluetooth/mgmt.c+20 -160 replies
2/5Bluetooth: Move move logic into set_connectable complete callbacknet/bluetooth/mgmt.c+19 -40 replies
3/5Bluetooth: Add missing error handling for Set Connectablenet/bluetooth/mgmt.c+7 -00 replies
4/5Bluetooth: Move static advertising functions to avoid forward declarationsnet/bluetooth/mgmt.c+28 -280 replies
5/5Bluetooth: Fix updating advertising data needlesslynet/bluetooth/hci_event.c+1 -10 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/5] Bluetooth: Clean up Set Connectable related code

Hi,

This is a set of cleanup patches (and one fix) split out from my earlier set. I'm hoping to get these in first to make it easier to understand how the code works and what the possible ways of adding LE Advertising hooks are.

The main thing with these patches is that we make a clear separation of what happens if someone uses a raw HCI socket compared to sending a Set Connectable command using the management interface. Now both cases have their clear functions for handling the HCI_CONNECTABLE flag and the necessary mgmt events.

----------------------------------------------------------------
Johan Hedberg (5):
Bluetooth: Reorganize set_connectable HCI command sending
Bluetooth: Move move logic into set_connectable complete callback
Bluetooth: Add missing error handling for Set Connectable
Bluetooth: Move static advertising functions to avoid forward declarations
Bluetooth: Fix updating advertising data needlessly

 net/bluetooth/hci_event.c |   2 +-
 net/bluetooth/mgmt.c      | 122 ++++++++++++++++++++++++++++------------------
 2 files changed, 75 insertions(+), 49 deletions(-)