Commit 5fc6ebb1 authored by Johan Hedberg's avatar Johan Hedberg

Bluetooth: mgmt: Fix EIR toggling with SSP

This patch fixes setting the EIR properly when the SSP flag has been set
when powered off (in such a case there is no pending Set_SSP command).
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 6bf0e469
......@@ -3437,14 +3437,13 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
if (changed)
err = new_settings(hdev, match.sk);
if (match.sk) {
if (match.sk)
sock_put(match.sk);
if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
update_eir(hdev);
else
clear_eir(hdev);
}
if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
update_eir(hdev);
else
clear_eir(hdev);
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment