Bluetooth: Don't register any SMP channel if LE is not supported

When LE features are not supported, then do not bother registering any
kind of SMP channel.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Marcel Holtmann 2015-01-14 15:43:10 -08:00 committed by Johan Hedberg
parent 157029ba30
commit 7e7ec44564
1 changed files with 6 additions and 0 deletions

View File

@ -3066,6 +3066,12 @@ int smp_register(struct hci_dev *hdev)
BT_DBG("%s", hdev->name);
/* If the controller does not support Low Energy operation, then
* there is also no need to register any SMP channel.
*/
if (!lmp_le_capable(hdev))
return 0;
chan = smp_add_cid(hdev, L2CAP_CID_SMP);
if (IS_ERR(chan))
return PTR_ERR(chan);