diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2014-02-26 18:21:44 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-26 22:41:34 -0500 |
commit | 04a6c5898e8cbb46313b7d425001b701f0fa4e3d (patch) | |
tree | 33193eddde45abfa9683b1daea8be4ae9d761a3c /include/net/bluetooth | |
parent | c99ed8343cdf84279f4d1937d25a3b644a14ed0d (diff) |
Bluetooth: Refactor HCI connection code
hci_connect() is a very simple and useless wrapper of hci_connect_acl
and hci_connect_le functions. Addtionally, all places where hci_connect
is called the link type value is passed explicitly. This way, we can
safely delete hci_connect, declare hci_connect_acl and hci_connect_le
in hci_core.h and call them directly.
No functionality is changed by this patch.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4253bdfc2f81..20bdb2eafeea 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -641,8 +641,10 @@ void hci_chan_del(struct hci_chan *chan); | |||
641 | void hci_chan_list_flush(struct hci_conn *conn); | 641 | void hci_chan_list_flush(struct hci_conn *conn); |
642 | struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle); | 642 | struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle); |
643 | 643 | ||
644 | struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, | 644 | struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, |
645 | __u8 dst_type, __u8 sec_level, __u8 auth_type); | 645 | u8 dst_type, u8 sec_level, u8 auth_type); |
646 | struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst, | ||
647 | u8 sec_level, u8 auth_type); | ||
646 | struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst, | 648 | struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst, |
647 | __u16 setting); | 649 | __u16 setting); |
648 | int hci_conn_check_link_mode(struct hci_conn *conn); | 650 | int hci_conn_check_link_mode(struct hci_conn *conn); |