From 25afb14ace1b09da0f4727f7c296057bf5e31375 Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Tue, 24 Apr 2012 21:02:53 -0300 Subject: [PATCH] --- yaml --- r: 306907 b: refs/heads/master c: 31f7956c6648fbae9c9550e91d1c348d28276309 h: refs/heads/master i: 306905: 0cf33c54b357bfa79aa8bd123df819f32c2c2243 306903: c52bad72205940e345f9526f113a12a86d63a0de v: v3 --- [refs] | 2 +- trunk/include/net/bluetooth/hci_core.h | 2 ++ trunk/net/bluetooth/hci_core.c | 12 ++++++++++++ trunk/net/bluetooth/mgmt.c | 12 ------------ 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 068668f39345..e7cd78af0ae4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 378b5b7e8426f65a0ecb81b83a050c6a0c119e1f +refs/heads/master: 31f7956c6648fbae9c9550e91d1c348d28276309 diff --git a/trunk/include/net/bluetooth/hci_core.h b/trunk/include/net/bluetooth/hci_core.h index 6777432ca61e..7e7fe3f221fb 100644 --- a/trunk/include/net/bluetooth/hci_core.h +++ b/trunk/include/net/bluetooth/hci_core.h @@ -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 */ diff --git a/trunk/net/bluetooth/hci_core.c b/trunk/net/bluetooth/hci_core.c index aa45ea496f87..7bbd5c5767b9 100644 --- a/trunk/net/bluetooth/hci_core.c +++ b/trunk/net/bluetooth/hci_core.c @@ -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; + } +} diff --git a/trunk/net/bluetooth/mgmt.c b/trunk/net/bluetooth/mgmt.c index 605a35b284fe..4e26c2585817 100644 --- a/trunk/net/bluetooth/mgmt.c +++ b/trunk/net/bluetooth/mgmt.c @@ -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) {