Skip to content

Commit

Permalink
Bluetooth: hci_sync: Fix not able to set force_static_address
Browse files Browse the repository at this point in the history
force_static_address shall be writable while hdev is initing but is not
considered powered yet since the static address is written only when
powered.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Brian Gix <brian.gix@intel.com>
  • Loading branch information
Luiz Augusto von Dentz committed Dec 12, 2022
1 parent e411443 commit eeb1aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_debugfs.c
Original file line number Diff line number Diff line change
@@ -757,7 +757,7 @@ static ssize_t force_static_address_write(struct file *file,
bool enable;
int err;

if (test_bit(HCI_UP, &hdev->flags))
if (hdev_is_powered(hdev))
return -EBUSY;

err = kstrtobool_from_user(user_buf, count, &enable);

0 comments on commit eeb1aaf

Please sign in to comment.