OSDN Git Service

Bluetooth: Connection parameters and auto connection
authorAndre Guedes <andre.guedes@openbossa.org>
Wed, 26 Feb 2014 23:21:49 +0000 (20:21 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 27 Feb 2014 03:41:34 +0000 (19:41 -0800)
commitcef952ce760a1113207b277af65a6ea2644a1b4a
treedaa8da90f452259227bd5dd687d17507db21fa36
parent9fcb18ef3acb51e54b6bca6d2d803676ac86813d
Bluetooth: Connection parameters and auto connection

This patch modifies hci_conn_params_add() and hci_conn_params_del() so
they also add/delete pending LE connections according to the auto_
connect option. This way, background scan is automatically triggered/
untriggered when connection parameters are added/removed.

For instance, when a new connection parameters with HCI_AUTO_CONN_ALWAYS
option is added and we are not connected to the device, we add a pending
LE connection for that device.

Likewise, when the connection parameters are updated we add or delete
a pending LE connection according to its new auto_connect option.

Finally, when the connection parameter is deleted we also delete the
pending LE connection (if any).

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c