Bluetooth: Bind the SMP channel registration to management power state
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 14 Jan 2015 23:43:11 +0000 (15:43 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 15 Jan 2015 10:54:31 +0000 (12:54 +0200)
commit162a3bac8d007aae3d1ba9da9b0d0b9ecfef87cc
tree133dd1138167c94e30661c6c9e757b80b5855943
parent7e7ec44564cacd4a19cca9523a7be1916b108aa6
Bluetooth: Bind the SMP channel registration to management power state

When the controller gets powered on via the management interface, then
register the supported SMP channels. There is no point in registering
these channels earlier since it is not know what identity address the
controller is going to operate with.

When powering down a controller unregister all SMP channels. This is
required since a powered down controller is allowed to change its
identity address.

In addition the SMP channels are only available when the controller
is powered via the management interface. When using legacy ioctl, then
Bluetooth Low Energy is not supported and registering kernel side SMP
integration may actually cause confusion.

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