提交 f1f0eb02 编写于 作者: J Johan Hedberg

Bluetooth: mgmt: Fix current settings values when powered off

We should not stop iterating through the various settings if powered off
since most may still be set even then.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
上级 df2c6c5e
......@@ -392,10 +392,7 @@ static u32 get_current_settings(struct hci_dev *hdev)
{
u32 settings = 0;
if (!test_bit(HCI_UP, &hdev->flags))
return settings;
if (!test_bit(HCI_AUTO_OFF, &hdev->dev_flags))
if (hdev_is_powered(hdev))
settings |= MGMT_SETTING_POWERED;
if (test_bit(HCI_CONNECTABLE, &hdev->dev_flags))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册