Bluetooth: Connection parameters check helper

This patch renames l2cap_check_conn_param() to hci_check_conn_params()
and moves it to hci_core.h so it can reused in others files. This helper
will be reused in the next patch.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Connection Parameter Update Procedure

This patch adds support for LE Connection Parameters Request Link
Layer control procedure introduced in Core spec 4.1. This procedure
allows a Peripheral or Central to update the Link Layer connection
parameters of an established connection.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Save connection parameters in hci_conn

This patch adds the connection interval, latency and supervision
timeout parameters to hci_conn. This way, we are able to track what
values are being currently used.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Add LE Conn Update Complete Event handler

When a LE Conn Update Complete Event occurs, we should update the
connection parameters in hci_conn object.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Remove min/max connection interval from hci_conn

hci_conn already keeps track of connection parameters so there is
no reason to save minimum and maximum connection interval values in
hci_conn. Therefore, this patch removes them.

Since they are removed from hci_conn, this patch also moves the
connection parameters lookup to hci_req_add_le_create_conn().

The minimum and maximum connection interval values will be reported
to user through a mgmt event. This event will be sent during Connection
Parameter Update Procedure.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Export slave latency parameter

This patch exports slave latency parameter through Bluetooth debugfs
interface. The default value is 0 and it may be changed by writing the
new value in conn_latenty file. The acceptable values range from 0x0000
to 0x01F3, according described in Core 4.1, Vol 2, 7.8.12.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Export supervision timeout parameter

This patch exports supervision timeout parameter through Bluetooth
debugfs interface. The default value is 0x002a and it may be changed by
writing the new value in conn_supervision_timeout file. The acceptable
values range from 0x000a to 0x0c80 according described in Core 4.1,
Vol 2, 7.8.12.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Bluetooth: Extend LE connection parameters infrastructure

This patch extends connection parameters infrastructure (hci_conn_
params and helper functions) to consider slave latency and supervision
timeout parameters.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>