From: Johan Hedberg <johan.hedberg@xxxxxxxxx> The Fast Connectable setting can only be enabled when powered on, so it should implicitly be cleared when powering off. So far the code was relying on HCI_Reset clearing the flag in dev_flags, however usually this happens only upon power on, meaning the flag is left dangling while powered off. Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx> --- net/bluetooth/mgmt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index d769b428b630..840c245a5cf4 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -6509,6 +6509,11 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered) goto new_settings; } + /* Fast Connectable is only valid while the controller is + * powered on. + */ + clear_bit(HCI_FAST_CONNECTABLE, &hdev->dev_flags); + mgmt_pending_foreach(MGMT_OP_SET_POWERED, hdev, settings_rsp, &match); /* If the power off is because of hdev unregistration let -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html