]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Run controller setup after external configuration
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 6 Jul 2014 10:11:14 +0000 (12:11 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Jul 2014 10:41:51 +0000 (13:41 +0300)
commitf292970705adb47c038633b576afc8b500befc1b
tree0bce0af1355d27fa8658d81875c3602cf3332475
parent59e64d0aa47b68bfe531f016ec54b7b09003f728
Bluetooth: Run controller setup after external configuration

When the external configuration triggers the switch to a configured
controller, it means the setup needs to be run. Controllers that start
out unconfigured have only run limited set of HCI commands. This is
not enough for complete operation and thus run the setup procedure
before announcing the new controller index.

This introduces HCI_CONFIG flag as companion to HCI_SETUP flag. The
HCI_SETUP flag is only used once for the initial setup procedure. And
during that procedure hdev->setup driver callback is called. With the
new HCI_CONFIG the switch from unconfigured to configured state is
triggering the same setup procedure just without hdev->setup. This
is required since bringing a controller back to unconfigured state
from configured state is possible.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sock.c
net/bluetooth/mgmt.c