diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-02 10:37:27 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:57 -0400 |
commit | a3451d279f839d987cbcf25b0f3be666aef99d0b (patch) | |
tree | 3f7573f26dfca7dfb28945e5b41388ee1dcbc1e2 | |
parent | 55af49a8fe85278ea244e72d2d264cf5e0941c61 (diff) |
Bluetooth: Add new auto_conn value matching mgmt action 0x00
The 0x00 action value of mgmt means "scan and report" but do not
connect. This is different from HCI_AUTO_CONN_DISABLED so we need a new
value for it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 1 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 2091e0013b8c..f4a2f50f30b5 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -449,6 +449,7 @@ struct hci_conn_params { | |||
449 | 449 | ||
450 | enum { | 450 | enum { |
451 | HCI_AUTO_CONN_DISABLED, | 451 | HCI_AUTO_CONN_DISABLED, |
452 | HCI_AUTO_CONN_REPORT, | ||
452 | HCI_AUTO_CONN_ALWAYS, | 453 | HCI_AUTO_CONN_ALWAYS, |
453 | HCI_AUTO_CONN_LINK_LOSS, | 454 | HCI_AUTO_CONN_LINK_LOSS, |
454 | } auto_connect; | 455 | } auto_connect; |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 7e46a7c6092f..a3cd0bbd3518 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -3547,6 +3547,7 @@ int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type, | |||
3547 | 3547 | ||
3548 | switch (auto_connect) { | 3548 | switch (auto_connect) { |
3549 | case HCI_AUTO_CONN_DISABLED: | 3549 | case HCI_AUTO_CONN_DISABLED: |
3550 | case HCI_AUTO_CONN_REPORT: | ||
3550 | case HCI_AUTO_CONN_LINK_LOSS: | 3551 | case HCI_AUTO_CONN_LINK_LOSS: |
3551 | hci_pend_le_conn_del(hdev, addr, addr_type); | 3552 | hci_pend_le_conn_del(hdev, addr, addr_type); |
3552 | break; | 3553 | break; |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 29850e76ea3c..f7217f9eda03 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -5034,7 +5034,7 @@ static int add_device(struct sock *sk, struct hci_dev *hdev, | |||
5034 | if (cp->action) | 5034 | if (cp->action) |
5035 | auto_conn = HCI_AUTO_CONN_ALWAYS; | 5035 | auto_conn = HCI_AUTO_CONN_ALWAYS; |
5036 | else | 5036 | else |
5037 | auto_conn = HCI_AUTO_CONN_DISABLED; | 5037 | auto_conn = HCI_AUTO_CONN_REPORT; |
5038 | 5038 | ||
5039 | /* If the connection parameters don't exist for this device, | 5039 | /* If the connection parameters don't exist for this device, |
5040 | * they will be created and configured with defaults. | 5040 | * they will be created and configured with defaults. |