aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2014-02-03 11:56:18 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2014-02-13 02:51:44 -0500
commit15819a7065ac46eb804498bb7ccbba60d8f7d4d5 (patch)
tree61c6935eb81741cee0c115afe8ab62cef096358a /include
parent424ef94311512ef48a5464d173ef83862e4653cb (diff)
Bluetooth: Introduce connection parameters list
This patch adds to hdev the connection parameters list (hdev->le_ conn_params). The elements from this list (struct hci_conn_params) contains the connection parameters (for now, minimum and maximum connection interval) that should be used during the connection establishment. Moreover, this patch adds helper functions to manipulate hdev->le_ conn_params list. Some of these functions are also declared in hci_core.h since they will be used outside hci_core.c in upcoming patches. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 4e878780fa01..92fa75fce29d 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -269,6 +269,7 @@ struct hci_dev {
269 struct list_head link_keys; 269 struct list_head link_keys;
270 struct list_head long_term_keys; 270 struct list_head long_term_keys;
271 struct list_head remote_oob_data; 271 struct list_head remote_oob_data;
272 struct list_head le_conn_params;
272 273
273 struct hci_dev_stats stat; 274 struct hci_dev_stats stat;
274 275
@@ -373,6 +374,16 @@ struct hci_chan {
373 __u8 state; 374 __u8 state;
374}; 375};
375 376
377struct hci_conn_params {
378 struct list_head list;
379
380 bdaddr_t addr;
381 u8 addr_type;
382
383 u16 conn_min_interval;
384 u16 conn_max_interval;
385};
386
376extern struct list_head hci_dev_list; 387extern struct list_head hci_dev_list;
377extern struct list_head hci_cb_list; 388extern struct list_head hci_cb_list;
378extern rwlock_t hci_dev_list_lock; 389extern rwlock_t hci_dev_list_lock;
@@ -751,6 +762,13 @@ int hci_blacklist_clear(struct hci_dev *hdev);
751int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 762int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
752int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 763int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
753 764
765struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
766 bdaddr_t *addr, u8 addr_type);
767void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
768 u16 conn_min_interval, u16 conn_max_interval);
769void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type);
770void hci_conn_params_clear(struct hci_dev *hdev);
771
754int hci_uuids_clear(struct hci_dev *hdev); 772int hci_uuids_clear(struct hci_dev *hdev);
755 773
756int hci_link_keys_clear(struct hci_dev *hdev); 774int hci_link_keys_clear(struct hci_dev *hdev);