Bluetooth: Move SMP initialization after HCI init
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 8 Aug 2014 06:32:51 +0000 (09:32 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 14 Aug 2014 06:49:17 +0000 (08:49 +0200)
commit54506918059a5bdbf396f34f2e0a2735803024db
tree6f49d893d86f04e5d707628f87c847428e5fb546
parent222916e3e509f04678d0b6f13f7b17bbc8dd14b6
Bluetooth: Move SMP initialization after HCI init

First of all, it's wasteful to initialize SMP if it's never going to be
used (e.g. on non-LE controllers). Second of all, when we move to use
l2cap_chan we need to know the real local address, meaning we must have
completed at least part of the HCI init. This patch moves the SMP
initialization to after the HCI init procedure and makes it depend on
whether the controller actually supports LE.

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