提交 7fabc0f4 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 b3c6410b
......@@ -2726,8 +2726,8 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg)
changed = !test_and_set_bit(HCI_CONNECTABLE,
&hdev->dev_flags);
else
changed = test_and_set_bit(HCI_CONNECTABLE,
&hdev->dev_flags);
changed = test_and_clear_bit(HCI_CONNECTABLE,
&hdev->dev_flags);
if (changed)
mgmt_new_settings(hdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册