]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix not generating RPA when required
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 2 Aug 2021 23:56:19 +0000 (16:56 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 3 Aug 2021 21:30:50 +0000 (23:30 +0200)
commit3b979227b9e28bdce0857ba1038d4eb4d402bca8
treee160aa1fcac3d4dd27fdceb63ed1d5946b47839d
parentd117f07b316980e25543d05e173b211db674914e
Bluetooth: Fix not generating RPA when required

Code was checking if random_addr and hdev->rpa match without first
checking if the RPA has not been set (BDADDR_ANY), furthermore it was
clearing HCI_RPA_EXPIRED before the command completes and the RPA is
actually programmed which in case of failure would leave the expired
RPA still set.

Since advertising instance have a similar problem the clearing of
HCI_RPA_EXPIRED has been moved to hci_event.c after checking the random
address is in fact the hdev->rap and then proceed to set the expire
timeout.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_event.c
net/bluetooth/hci_request.c