Skip to content

Commit

Permalink
Bluetooth: Don't register any SMP channel if LE is not supported
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcel Holtmann authored and Johan Hedberg committed Jan 15, 2015
1 parent 157029b commit 7e7ec44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/bluetooth/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e7ec44

Please sign in to comment.