diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2014-02-26 20:21:42 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-26 19:41:33 -0800 |
commit | 2acf3d9066b36e1b05db42bfe43152eee07a5e9e (patch) | |
tree | b677f53f8cef51eb29452a9cec30c259ddf64742 /include/net/bluetooth | |
parent | 06c053fb54c10be49ef30fc9b6b01e42cc9a1b61 (diff) | |
download | lwn-2acf3d9066b36e1b05db42bfe43152eee07a5e9e.tar.gz lwn-2acf3d9066b36e1b05db42bfe43152eee07a5e9e.zip |
Bluetooth: Stop scanning on LE connection
Some LE controllers don't support scanning and creating a connection
at the same time. So we should always stop scanning in order to
establish the connection.
Since we may prematurely stop the discovery procedure in favor of
the connection establishment, we should also cancel hdev->le_scan_
disable delayed work and set the discovery state to DISCOVERY_STOPPED.
This change does a small improvement since it is not mandatory the
user stops scanning before connecting anymore. Moreover, this change
is required by upcoming LE auto connection mechanism in order to work
properly with controllers that don't support background scanning and
connection establishment at the same time.
In future, we might want to do a small optimization by checking if
controller is able to scan and connect at the same time. For now,
we want the simplest approach so we always stop scanning (even if
the controller is able to carry out both operations).
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 1bb45a47a78a..c3834d3aecbb 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -356,6 +356,7 @@ enum { /* ---- HCI Error Codes ---- */ #define HCI_ERROR_AUTH_FAILURE 0x05 +#define HCI_ERROR_MEMORY_EXCEEDED 0x07 #define HCI_ERROR_CONNECTION_TIMEOUT 0x08 #define HCI_ERROR_REJ_BAD_ADDR 0x0f #define HCI_ERROR_REMOTE_USER_TERM 0x13 |