diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-10 04:50:27 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-10 04:52:09 -0400 |
commit | 7fabc0f4c7bd2206c368a79e3ed79b7d36625cfd (patch) | |
tree | 3c7261ab5c2a87b3ef7df3e95f6f55b09d0c782e /net/bluetooth | |
parent | b3c6410b8c75cd48e4242af0173bb55701939b9b (diff) |
Bluetooth: Fix using test_and_clear instead of test_and_set
The code for updating the HCI_CONNECTABLE flag was incorrectly using
test_and_set_bit instead of test_and_clear_bit when HCI_CONNECTABLE is
to be cleared.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 84431b86af96..8f9df768f250 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -2726,8 +2726,8 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg) | |||
2726 | changed = !test_and_set_bit(HCI_CONNECTABLE, | 2726 | changed = !test_and_set_bit(HCI_CONNECTABLE, |
2727 | &hdev->dev_flags); | 2727 | &hdev->dev_flags); |
2728 | else | 2728 | else |
2729 | changed = test_and_set_bit(HCI_CONNECTABLE, | 2729 | changed = test_and_clear_bit(HCI_CONNECTABLE, |
2730 | &hdev->dev_flags); | 2730 | &hdev->dev_flags); |
2731 | 2731 | ||
2732 | if (changed) | 2732 | if (changed) |
2733 | mgmt_new_settings(hdev); | 2733 | mgmt_new_settings(hdev); |