Bluetooth: Fix: LL PRivacy BLE device fails to connect
authorSathish Narasimman <nsathish41@gmail.com>
Thu, 29 Oct 2020 07:48:21 +0000 (13:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:05 +0000 (11:53 +0100)
commitc98d3357920623bbb5a316907bfbc9c300552873
tree2901837ed9cb0ebadc7ef56e8a04756a6983a932
parent147cdf5f344b8432f103bc154eb250f848c54767
Bluetooth: Fix: LL PRivacy BLE device fails to connect

[ Upstream commit 1fb17dfc258ff6208f7873cc7b8e40e27515d2d5 ]

When adding device to white list the device is added to resolving list
also. It has to be added only when HCI_ENABLE_LL_PRIVACY flag is set.
HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices
to resolving list. use_ll_privacy macro is used only to check if controller
supports LL_Privacy.

https://bugzilla.kernel.org/show_bug.cgi?id=209745

Fixes: 0eee35bdfa3b ("Bluetooth: Update resolving list when updating whitelist")
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_request.c