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>
This commit is contained in:
committed by
Johan Hedberg
parent
424ef94311
commit
15819a7065
@@ -269,6 +269,7 @@ struct hci_dev {
|
||||
struct list_head link_keys;
|
||||
struct list_head long_term_keys;
|
||||
struct list_head remote_oob_data;
|
||||
struct list_head le_conn_params;
|
||||
|
||||
struct hci_dev_stats stat;
|
||||
|
||||
@@ -373,6 +374,16 @@ struct hci_chan {
|
||||
__u8 state;
|
||||
};
|
||||
|
||||
struct hci_conn_params {
|
||||
struct list_head list;
|
||||
|
||||
bdaddr_t addr;
|
||||
u8 addr_type;
|
||||
|
||||
u16 conn_min_interval;
|
||||
u16 conn_max_interval;
|
||||
};
|
||||
|
||||
extern struct list_head hci_dev_list;
|
||||
extern struct list_head hci_cb_list;
|
||||
extern rwlock_t hci_dev_list_lock;
|
||||
@@ -751,6 +762,13 @@ int hci_blacklist_clear(struct hci_dev *hdev);
|
||||
int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
|
||||
int hci_blacklist_del(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
|
||||
|
||||
struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
|
||||
bdaddr_t *addr, u8 addr_type);
|
||||
void hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
|
||||
u16 conn_min_interval, u16 conn_max_interval);
|
||||
void hci_conn_params_del(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type);
|
||||
void hci_conn_params_clear(struct hci_dev *hdev);
|
||||
|
||||
int hci_uuids_clear(struct hci_dev *hdev);
|
||||
|
||||
int hci_link_keys_clear(struct hci_dev *hdev);
|
||||
|
||||
Reference in New Issue
Block a user