UPSTREAM: Bluetooth: Fix: LL PRivacy BLE device fails to connect

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>
(cherry picked from commit 1fb17dfc258ff6208f7873cc7b8e40e27515d2d5
 git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master)

BUG=b:149985096
TEST=Since HCI_ENABLE_LL_PRIVACY is not enabled, this series is only
validated against existing scenarios, including discovering, pairing and
reconnecting a hid device as well as resume from suspend.

Signed-off-by: Alain Michaud <alainm@chromium.org>
Change-Id: Ied4ee199e29045e16d4d1b700923df4e8cede68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2559303
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Winkler <danielwinkler@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
1 file changed