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: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg 2012-02-22 15:10:59 +02:00
Родитель 6bf0e4699d
Коммит 5fc6ebb102
1 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -3437,14 +3437,13 @@ int mgmt_ssp_enable_complete(struct hci_dev *hdev, u8 enable, u8 status)
if (changed) if (changed)
err = new_settings(hdev, match.sk); err = new_settings(hdev, match.sk);
if (match.sk) { if (match.sk)
sock_put(match.sk); sock_put(match.sk);
if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags))
update_eir(hdev); update_eir(hdev);
else else
clear_eir(hdev); clear_eir(hdev);
}
return err; return err;
} }