Bluetooth: Don't write static address during power on
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 23 Feb 2014 17:42:25 +0000 (19:42 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 23 Feb 2014 20:24:26 +0000 (12:24 -0800)
Since we always update the random address before enabling advertising,
scanning and initiating LE connections there is no need to write the
random address add power on.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c

index e369c871c7025db7c8b9f30a783914a21c499335..49d52a37bdac8340ef4dd4935de9465e08076a0c 100644 (file)
@@ -4608,11 +4608,6 @@ static int powered_update_hci(struct hci_dev *hdev)
        }
 
        if (lmp_le_capable(hdev)) {
-               /* Set random address to static address if configured */
-               if (bacmp(&hdev->static_addr, BDADDR_ANY))
-                       hci_req_add(&req, HCI_OP_LE_SET_RANDOM_ADDR, 6,
-                                   &hdev->static_addr);
-
                /* Make sure the controller has a good default for
                 * advertising data. This also applies to the case
                 * where BR/EDR was toggled during the AUTO_OFF phase.