summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-07-08 14:07:49 +0200
committerMarcel Holtmann2014-07-08 14:22:06 +0200
commit5ce194c4a751ac603966dd1567b62035a7dfbf89 (patch)
tree7ca6fbba2ac830ebfaba75d48f8d3247b0b963b7 /net/bluetooth/hci_core.c
parentBluetooth: Remove unnecessary mgmt_advertising function (diff)
downloadkernel-qcow2-linux-5ce194c4a751ac603966dd1567b62035a7dfbf89.tar.gz
kernel-qcow2-linux-5ce194c4a751ac603966dd1567b62035a7dfbf89.tar.xz
kernel-qcow2-linux-5ce194c4a751ac603966dd1567b62035a7dfbf89.zip
Bluetooth: Use real advertising state to random address update decision
Now that we have a flag for tracking the real advertising state we should use that to determine whether it's safe to update the random address or not. The couple of places that were clearing the flag due to a pending request need to be updated too. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f1c5a077e558..8ffaca0290f8 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3746,7 +3746,7 @@ static void set_random_addr(struct hci_request *req, bdaddr_t *rpa)
* In this kind of scenario skip the update and let the random
* address be updated at the next cycle.
*/
- if (test_bit(HCI_ADVERTISING, &hdev->dev_flags) ||
+ 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");
return;