aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-04-24 20:02:53 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:40:44 -0400
commit31f7956c6648fbae9c9550e91d1c348d28276309 (patch)
tree1493deb456bfb82bf9ff3ad2380bdd2dcf60baae /net/bluetooth/hci_core.c
parent378b5b7e8426f65a0ecb81b83a050c6a0c119e1f (diff)
Bluetooth: Move bdaddr_to_le to hci_core
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>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index aa45ea496f87..7bbd5c5767b9 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2946,3 +2946,15 @@ int hci_cancel_inquiry(struct hci_dev *hdev)
2946 2946
2947 return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL); 2947 return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
2948} 2948}
2949
2950u8 bdaddr_to_le(u8 bdaddr_type)
2951{
2952 switch (bdaddr_type) {
2953 case BDADDR_LE_PUBLIC:
2954 return ADDR_LE_DEV_PUBLIC;
2955
2956 default:
2957 /* Fallback to LE Random address type */
2958 return ADDR_LE_DEV_RANDOM;
2959 }
2960}