]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Bluetooth: Remove unneeded hdev->own_addr_type
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 23 Feb 2014 17:42:29 +0000 (19:42 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 23 Feb 2014 20:24:27 +0000 (12:24 -0800)
Now that the identity address type is always looked up for all
successful connections, the hdev->own_addr_type variable has become
completely unnecessary. Simply remove it.

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

index 2506963c7a06fbb44dc476d56662c73b5bf485dd..43b6d1131c4d75ec82ed2f0af38328d600c4a41a 100644 (file)
@@ -156,7 +156,6 @@ struct hci_dev {
        bdaddr_t        bdaddr;
        bdaddr_t        random_addr;
        bdaddr_t        static_addr;
-       __u8            own_addr_type;
        __u8            dev_name[HCI_MAX_NAME_LENGTH];
        __u8            short_name[HCI_MAX_SHORT_NAME_LENGTH];
        __u8            eir[HCI_MAX_EIR_LENGTH];
index 629919be071c99171df89b0d0c79fb3e4f006a1b..1651de959d9cb2d2153aee61443a72404183ac29 100644 (file)
@@ -1506,23 +1506,8 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
        if (hdev->commands[5] & 0x10)
                hci_setup_link_policy(req);
 
-       if (lmp_le_capable(hdev)) {
-               /* If the controller has a public BD_ADDR, then by default
-                * use that one. If this is a LE only controller without
-                * a public address, default to the random address.
-                *
-                * For debugging purposes it is possible to force
-                * controllers with a public address to use the
-                * random address instead.
-                */
-               if (test_bit(HCI_FORCE_STATIC_ADDR, &hdev->dev_flags) ||
-                   !bacmp(&hdev->bdaddr, BDADDR_ANY))
-                       hdev->own_addr_type = ADDR_LE_DEV_RANDOM;
-               else
-                       hdev->own_addr_type = ADDR_LE_DEV_PUBLIC;
-
+       if (lmp_le_capable(hdev))
                hci_set_le_support(req);
-       }
 
        /* Read features beyond page 1 if available */
        for (p = 2; p < HCI_MAX_PAGES && p <= hdev->max_page; p++) {