mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 06:02:05 +00:00
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: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
df2c6c5ed5
commit
f1f0eb0221
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user