Skip to content

Commit eeb1aaf

Browse files
committed
Bluetooth: hci_sync: Fix not able to set force_static_address
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 <[email protected]> Tested-by: Brian Gix <[email protected]>
1 parent e411443 commit eeb1aaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ static ssize_t force_static_address_write(struct file *file,
757757
bool enable;
758758
int err;
759759

760-
if (test_bit(HCI_UP, &hdev->flags))
760+
if (hdev_is_powered(hdev))
761761
return -EBUSY;
762762

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

0 commit comments

Comments
 (0)