diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-03-15 17:07:10 -0500 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-03-18 14:02:09 -0300 |
commit | e36a37691e53b54edb78209757fab0dd76c4614f (patch) | |
tree | ee0f6ed71ce5f35498025ca49af30622ef1e3962 /net/bluetooth/mgmt.c | |
parent | 406d78045d6c3f5912aefe69b9b02e96479d51c8 (diff) | |
download | linux-e36a37691e53b54edb78209757fab0dd76c4614f.tar.bz2 |
Bluetooth: Disable fast connectable when disabling connectable
When the connectable setting is disabled the fast connectable setting
must also be disabled. This is so that we're consistent with the
pre-requisites for enabling fast connectable, one of which is that the
connectable setting is enabled.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f03b10cf92e3..98f6295edbec 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1119,6 +1119,9 @@ static int set_connectable(struct sock *sk, struct hci_dev *hdev, void *data, hci_req_add(&req, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); + if (!cp->val && test_bit(HCI_FAST_CONNECTABLE, &hdev->dev_flags)) + write_fast_connectable(&req, false); + err = hci_req_run(&req, set_connectable_complete); if (err < 0) mgmt_pending_remove(cmd); |