diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-01-14 18:43:10 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-01-15 05:54:30 -0500 |
commit | 7e7ec44564cacd4a19cca9523a7be1916b108aa6 (patch) | |
tree | f0b6a85a66529f03395cb855f9cb5fe276d9047e /net/bluetooth | |
parent | 157029ba3014e2025170c7bf83bbe7d4ccb16692 (diff) |
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 3e4de935f667..08a9314f3ca7 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -3066,6 +3066,12 @@ int smp_register(struct hci_dev *hdev) | |||
3066 | 3066 | ||
3067 | BT_DBG("%s", hdev->name); | 3067 | BT_DBG("%s", hdev->name); |
3068 | 3068 | ||
3069 | /* If the controller does not support Low Energy operation, then | ||
3070 | * there is also no need to register any SMP channel. | ||
3071 | */ | ||
3072 | if (!lmp_le_capable(hdev)) | ||
3073 | return 0; | ||
3074 | |||
3069 | chan = smp_add_cid(hdev, L2CAP_CID_SMP); | 3075 | chan = smp_add_cid(hdev, L2CAP_CID_SMP); |
3070 | if (IS_ERR(chan)) | 3076 | if (IS_ERR(chan)) |
3071 | return PTR_ERR(chan); | 3077 | return PTR_ERR(chan); |