summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-10-08 04:08:43 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-12-13 01:19:23 +0300
commiteeb1aafe97fa6da558157d2eb18cce25878b8656 (patch)
tree3a2dc12de0b11e0357fc728efdc92a0384e39754 /net/bluetooth
parente411443c32554b4db157eb49f199d9cfebda2817 (diff)
downloadlinux-eeb1aafe97fa6da558157d2eb18cce25878b8656.tar.xz
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 <luiz.von.dentz@intel.com> Tested-by: Brian Gix <brian.gix@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c
index 3f401ec5bb0c..b7f682922a16 100644
--- a/net/bluetooth/hci_debugfs.c
+++ b/net/bluetooth/hci_debugfs.c
@@ -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);