summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-07-02 16:37:33 +0200
committerMarcel Holtmann2014-07-03 17:42:57 +0200
commitc46245b3efce80884acf65c01443582aec1f31ed (patch)
treeb48318f715ab35c33e3729d92c7420fdc3c173cb /net/bluetooth/hci_core.c
parentBluetooth: Pass store hint to mgmt_new_conn_param (diff)
downloadkernel-qcow2-linux-c46245b3efce80884acf65c01443582aec1f31ed.tar.gz
kernel-qcow2-linux-c46245b3efce80884acf65c01443582aec1f31ed.tar.xz
kernel-qcow2-linux-c46245b3efce80884acf65c01443582aec1f31ed.zip
Bluetooth: Make is_identity_address a global function
There are more places that can take advantage of is_identity_address() besides hci_core.c. This patch moves the function to hci_core.h and gives it the appropriate hci_ prefix. Signed-off-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.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a3cd0bbd3518..1fff3d890f41 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3412,18 +3412,6 @@ static bool is_connected(struct hci_dev *hdev, bdaddr_t *addr, u8 type)
return true;
}
-static bool is_identity_address(bdaddr_t *addr, u8 addr_type)
-{
- if (addr_type == ADDR_LE_DEV_PUBLIC)
- return true;
-
- /* Check for Random Static address type */
- if ((addr->b[5] & 0xc0) == 0xc0)
- return true;
-
- return false;
-}
-
/* This function requires the caller holds hdev->lock */
struct bdaddr_list *hci_pend_le_conn_lookup(struct hci_dev *hdev,
bdaddr_t *addr, u8 addr_type)
@@ -3504,7 +3492,7 @@ struct hci_conn_params *hci_conn_params_add(struct hci_dev *hdev,
{
struct hci_conn_params *params;
- if (!is_identity_address(addr, addr_type))
+ if (!hci_is_identity_address(addr, addr_type))
return NULL;
params = hci_conn_params_lookup(hdev, addr, addr_type);