diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-08 14:07:49 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-08 14:22:06 +0200 |
commit | 5ce194c4a751ac603966dd1567b62035a7dfbf89 (patch) | |
tree | 7ca6fbba2ac830ebfaba75d48f8d3247b0b963b7 /net/bluetooth/mgmt.c | |
parent | Bluetooth: Remove unnecessary mgmt_advertising function (diff) | |
download | linux-5ce194c4a751ac603966dd1567b62035a7dfbf89.tar.xz 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/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index dda1eb124208..be589d8d437f 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1046,12 +1046,12 @@ static void enable_advertising(struct hci_request *req) u8 own_addr_type, enable = 0x01; bool connectable; - /* Clear the HCI_ADVERTISING bit temporarily so that the + /* Clear the HCI_LE_ADV bit temporarily so that the * hci_update_random_address knows that it's safe to go ahead * and write a new random address. The flag will be set back on * as soon as the SET_ADV_ENABLE HCI command completes. */ - clear_bit(HCI_ADVERTISING, &hdev->dev_flags); + clear_bit(HCI_LE_ADV, &hdev->dev_flags); connectable = get_connectable(hdev); |