aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2014-02-26 18:21:48 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-02-26 22:41:34 -0500
commit9fcb18ef3acb51e54b6bca6d2d803676ac86813d (patch)
treec19f7f9d5fcca619785894898fb08522bb2b95e0 /include/net
parenta4790dbd43d1617b09d57e96494fde5a4b01980a (diff)
Bluetooth: Introduce LE auto connect options
This patch introduces the LE auto connection options: HCI_AUTO_CONN_ ALWAYS and HCI_AUTO_CONN_LINK_LOSS. Their working mechanism are described as follows: The HCI_AUTO_CONN_ALWAYS option configures the kernel to always re- establish the connection, no matter the reason the connection was terminated. This feature is required by some LE profiles such as HID over GATT, Health Thermometer and Blood Pressure. These profiles require the host autonomously connect to the device as soon as it enters in connectable mode (start advertising) so the device is able to delivery notifications or indications. The BT_AUTO_CONN_LINK_LOSS option configures the kernel to re- establish the connection in case the connection was terminated due to a link loss. This feature is required by the majority of LE profiles such as Proximity, Find Me, Cycling Speed and Cadence and Time. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 617cf495a449..b159810f67a6 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -402,6 +402,12 @@ struct hci_conn_params {
402 402
403 u16 conn_min_interval; 403 u16 conn_min_interval;
404 u16 conn_max_interval; 404 u16 conn_max_interval;
405
406 enum {
407 HCI_AUTO_CONN_DISABLED,
408 HCI_AUTO_CONN_ALWAYS,
409 HCI_AUTO_CONN_LINK_LOSS,
410 } auto_connect;
405}; 411};
406 412
407extern struct list_head hci_dev_list; 413extern struct list_head hci_dev_list;
@@ -796,7 +802,8 @@ int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
796struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev, 802struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
797 bdaddr_t *addr, u8 addr_type); 803 bdaddr_t *addr, u8 addr_type);
798void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, 804void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
799 u16 conn_min_interval, u16 conn_max_interval); 805 u8 auto_connect, u16 conn_min_interval,
806 u16 conn_max_interval);
800void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); 807void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type);
801void hci_conn_params_clear(struct hci_dev *hdev); 808void hci_conn_params_clear(struct hci_dev *hdev);
802 809