mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Bluetooth: Fix re-setting RPA as expired when deferring update
The hci_update_random_address will clear the RPA_EXPIRED flag and proceed with setting a new one if the flag was set. However, the set_random_addr() function that is called may choose to defer the update to a later moment. In such a case the flag would incorrectly remain unset unless set_random_addr() re-sets it. This patch fixes the issue. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
7ed3fa2078
commit
9a783a139c
1 changed files with 1 additions and 0 deletions
|
|
@ -3872,6 +3872,7 @@ static void set_random_addr(struct hci_request *req, bdaddr_t *rpa)
|
|||
if (test_bit(HCI_LE_ADV, &hdev->dev_flags) ||
|
||||
hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT)) {
|
||||
BT_DBG("Deferring random address update");
|
||||
set_bit(HCI_RPA_EXPIRED, &hdev->dev_flags);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue