]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Don't try background scanning if LE is not enabled
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 7 Jul 2014 12:19:50 +0000 (15:19 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Jul 2014 13:18:16 +0000 (15:18 +0200)
commit02ce7248bf6d1088702532b965394c30d4de6193
treeda81f377da03693a268fb9d9621fcdf98b1accf8
parent948fe56b6a9dd8fa779e5e272e45c42e7aeb5073
Bluetooth: Don't try background scanning if LE is not enabled

For adapters that do not support LE and ones where LE hasn't been
enabled we shouldn't be trying to initiate background scanning. This
patch adds an extra check to the hci_update_background_scan() to ensure
that we bail out if HCI_LE_ENABLED is not set.

Since we do allow user space to feed the kernel with LE connection
parameters even when LE is not enabled we now need to also call
hci_update_background_scan() as soon as LE gets enabled so that scanning
gets started if necessary.

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