diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-06-23 12:14:51 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 17:42:45 +0200 |
commit | a720d7351e2571bf7498681970b076e366a7d221 (patch) | |
tree | 2ce984173d49f7b1c4a112456835110f1f6f05e3 /net/bluetooth/hci_event.c | |
parent | 1855d92dce0dc0ed81a78eacae710529600513f4 (diff) | |
download | lwn-a720d7351e2571bf7498681970b076e366a7d221.tar.gz lwn-a720d7351e2571bf7498681970b076e366a7d221.zip |
Bluetooth: Set default min/max connection interval for LE slaves
For all incoming LE connections, the minimum and maximum connection
interval is a value that should be copied from the controller default
values. This allows to properly check if the resulting connection
interval of a newly established connection is in the range we are
expecting.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index e239435312dc..e1e1ecb4db10 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4026,6 +4026,14 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) conn->init_addr_type = ev->bdaddr_type; bacpy(&conn->init_addr, &ev->bdaddr); + + /* For incoming connections, set the default minimum + * and maximum connection interval. They will be used + * to check if the parameters are in range and if not + * trigger the connection update procedure. + */ + conn->le_conn_min_interval = hdev->le_conn_min_interval; + conn->le_conn_max_interval = hdev->le_conn_max_interval; } /* Lookup the identity address from the stored connection |