diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2014-02-03 11:56:18 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-13 02:51:44 -0500 |
commit | 15819a7065ac46eb804498bb7ccbba60d8f7d4d5 (patch) | |
tree | 61c6935eb81741cee0c115afe8ab62cef096358a /include/net/bluetooth | |
parent | 424ef94311512ef48a5464d173ef83862e4653cb (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/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 18 |
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 | ||
377 | struct 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 | |||
376 | extern struct list_head hci_dev_list; | 387 | extern struct list_head hci_dev_list; |
377 | extern struct list_head hci_cb_list; | 388 | extern struct list_head hci_cb_list; |
378 | extern rwlock_t hci_dev_list_lock; | 389 | extern rwlock_t hci_dev_list_lock; |
@@ -751,6 +762,13 @@ int hci_blacklist_clear(struct hci_dev *hdev); | |||
751 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 762 | int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
752 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); | 763 | int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); |
753 | 764 | ||
765 | struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev, | ||
766 | bdaddr_t *addr, u8 addr_type); | ||
767 | void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, | ||
768 | u16 conn_min_interval, u16 conn_max_interval); | ||
769 | void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type); | ||
770 | void hci_conn_params_clear(struct hci_dev *hdev); | ||
771 | |||
754 | int hci_uuids_clear(struct hci_dev *hdev); | 772 | int hci_uuids_clear(struct hci_dev *hdev); |
755 | 773 | ||
756 | int hci_link_keys_clear(struct hci_dev *hdev); | 774 | int hci_link_keys_clear(struct hci_dev *hdev); |