Commit f1f0eb02 authored by Johan Hedberg's avatar 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: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment