summaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci_core.h
diff options
context:
space:
mode:
authorAndre Guedes2012-02-03 21:47:59 +0100
committerJohan Hedberg2012-02-13 16:01:34 +0100
commit7ba8b4be38e7c83b2b13333a82a0ecde921a7390 (patch)
tree1ad9bb8b0eafed266538a2e238649149439ccc29 /include/net/bluetooth/hci_core.h
parentBluetooth: Minor code refactoring (diff)
downloadkernel-qcow2-linux-7ba8b4be38e7c83b2b13333a82a0ecde921a7390.tar.gz
kernel-qcow2-linux-7ba8b4be38e7c83b2b13333a82a0ecde921a7390.tar.xz
kernel-qcow2-linux-7ba8b4be38e7c83b2b13333a82a0ecde921a7390.zip
Bluetooth: Add hci_do_le_scan()
This patch adds to hci_core the hci_do_le_scan function which should be used to scan LE devices. In order to enable LE scan, hci_do_le_scan() sends commands (Set LE Scan Parameters and Set LE Scan Enable) to the controller and waits for its results. If commands were executed successfully a delayed work is scheduled to disable the ongoing scanning after some amount of time. This function blocks. 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>
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r--include/net/bluetooth/hci_core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index bf2ef5667887..3e70872bffea 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -122,6 +122,12 @@ struct adv_entry {
u8 bdaddr_type;
};
+struct le_scan_params {
+ u8 type;
+ u16 interval;
+ u16 window;
+};
+
#define NUM_REASSEMBLY 4
struct hci_dev {
struct list_head list;
@@ -261,6 +267,8 @@ struct hci_dev {
unsigned long dev_flags;
+ struct delayed_work le_scan_disable;
+
int (*open)(struct hci_dev *hdev);
int (*close)(struct hci_dev *hdev);
int (*flush)(struct hci_dev *hdev);