]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Move bdaddr_to_le to hci_core
authorAndre Guedes <andre.guedes@openbossa.org>
Wed, 25 Apr 2012 00:02:53 +0000 (21:02 -0300)
committerGustavo Padovan <gustavo@padovan.org>
Sun, 29 Apr 2012 20:27:42 +0000 (17:27 -0300)
This patch moves the helper function bdaddr_to_le to hci_core, so it
can be used in mgmt.c and hci_conn.c.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-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
net/bluetooth/mgmt.c

index 6777432ca61e673e4e8b2da6ab6a676dd1378f7b..7e7fe3f221fb6aa718e2b0ce569bf9dccee4689f 100644 (file)
@@ -1073,4 +1073,6 @@ int hci_le_scan(struct hci_dev *hdev, u8 type, u16 interval, u16 window,
                int timeout);
 int hci_cancel_le_scan(struct hci_dev *hdev);
 
+u8 bdaddr_to_le(u8 bdaddr_type);
+
 #endif /* __HCI_CORE_H */
index 174f7878e44505212bfc85351a514ad8afad3b2b..178a55ef42fe98e9152166bc722bf4d3d9f046f8 100644 (file)
@@ -2946,3 +2946,15 @@ int hci_cancel_inquiry(struct hci_dev *hdev)
 
        return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
 }
+
+u8 bdaddr_to_le(u8 bdaddr_type)
+{
+       switch (bdaddr_type) {
+       case BDADDR_LE_PUBLIC:
+               return ADDR_LE_DEV_PUBLIC;
+
+       default:
+               /* Fallback to LE Random address type */
+               return ADDR_LE_DEV_RANDOM;
+       }
+}
index 6d80cb3547b3b2d20590e165e22c5d18a44ae36d..2c77473746190dccbbb66a97da334d2a16a59acf 100644 (file)
@@ -1644,18 +1644,6 @@ static u8 link_to_bdaddr(u8 link_type, u8 addr_type)
        }
 }
 
-static u8 bdaddr_to_le(u8 bdaddr_type)
-{
-       switch (bdaddr_type) {
-       case BDADDR_LE_PUBLIC:
-               return ADDR_LE_DEV_PUBLIC;
-
-       default:
-               /* Fallback to LE Random address type */
-               return ADDR_LE_DEV_RANDOM;
-       }
-}
-
 static int get_connections(struct sock *sk, struct hci_dev *hdev, void *data,
                           u16 data_len)
 {