aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-09-12 12:31:52 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-09-12 12:34:25 -0400
commit9a783a139c32a905825ee0aa9597f485ea461f76 (patch)
treee5705626f781e83cfa65b476bdd3f3c457c1747d /net/bluetooth/hci_core.c
parent7ed3fa20780a5efd22bb192be0908468e7c376ed (diff)
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 <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0d3782ad9a5b..067526d9680d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3872,6 +3872,7 @@ static void set_random_addr(struct hci_request *req, bdaddr_t *rpa)
3872 if (test_bit(HCI_LE_ADV, &hdev->dev_flags) || 3872 if (test_bit(HCI_LE_ADV, &hdev->dev_flags) ||
3873 hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT)) { 3873 hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT)) {
3874 BT_DBG("Deferring random address update"); 3874 BT_DBG("Deferring random address update");
3875 set_bit(HCI_RPA_EXPIRED, &hdev->dev_flags);
3875 return; 3876 return;
3876 } 3877 }
3877 3878