Bluetooth: Add hci_le_scan()
authorAndre Guedes <andre.guedes@openbossa.org>
Fri, 3 Feb 2012 20:48:00 +0000 (17:48 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 13 Feb 2012 15:01:34 +0000 (17:01 +0200)
commit28b75a89480df99a17c8facd5c33985847d06bb6
treeddb050dd79624ed01e12d1d072f8be646a15815f
parent7ba8b4be38e7c83b2b13333a82a0ecde921a7390
Bluetooth: Add hci_le_scan()

We are not supposed to block in start_discovery() because
start_discovery code is running in write() syscall context
and this would block the write operation on the mgmt socket.
This way, we cannot directly call hci_do_le_scan() to scan
LE devices in start_discovery(). To overcome this issue a
derefered work (hdev->le_scan) was created so we can properly
call hci_do_le_scan().

The helper function hci_le_scan() simply set LE scan parameters
and queue hdev->le_scan work. The work is queued on system_long_wq
since it can sleep for a few seconds in the worst case (timeout).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
This page took 0.027104 seconds and 5 git commands to generate.