Bluetooth: Handle AD updating through an async request
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Mar 2013 22:07:01 +0000 (17:07 -0500)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 18 Mar 2013 17:02:04 +0000 (14:02 -0300)
commit04b4edcbc9049e100681c0149b572de439be42ab
tree9256c6de723509d3df7b1ae5bc7f24302963e399
parent13928971396fb5ad022ec65f694cea367ca48504
Bluetooth: Handle AD updating through an async request

For proper control of the AD update and the related HCI commands it's
best to run the AD update through an async request instead of a
standalone HCI command. This patch changes the hci_update_ad() function
to take a request pointer and updates its users appropriately. E.g. the
function is no longer called after the init sequence but during stage 3
of the init sequence.

The TX power is read during the init sequence, so we don't need an
explicit update whenever it is read and the AD update based on the local
name should be done through the local name mgmt handler. The only other
user is the update based on enabling advertising. This part is still
kept as there is no mgmt API to enable it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c