diff options
| author | Andre Guedes <andre.guedes@openbossa.org> | 2012-04-24 20:02:54 -0400 |
|---|---|---|
| committer | Gustavo Padovan <gustavo@padovan.org> | 2012-05-09 00:40:45 -0400 |
| commit | b12f62cfd9f46ac70013ce661640174b489efd39 (patch) | |
| tree | 5ad852475d40051fa86fe613d2b9990cd816656b /net/bluetooth/mgmt.c | |
| parent | 31f7956c6648fbae9c9550e91d1c348d28276309 (diff) | |
Bluetooth: Add dst_type parameter to hci_connect
This patch adds the dst_type parameter to hci_connect function.
Instead of searching the address type in advertising cache, we
use the dst_type parameter to establish LE connections.
The dst_type is ignored for BR/EDR connection establishment.
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/mgmt.c')
| -rw-r--r-- | net/bluetooth/mgmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 4e26c2585817..9038118d37a3 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
| @@ -1903,11 +1903,11 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data, | |||
| 1903 | auth_type = HCI_AT_DEDICATED_BONDING_MITM; | 1903 | auth_type = HCI_AT_DEDICATED_BONDING_MITM; |
| 1904 | 1904 | ||
| 1905 | if (cp->addr.type == BDADDR_BREDR) | 1905 | if (cp->addr.type == BDADDR_BREDR) |
| 1906 | conn = hci_connect(hdev, ACL_LINK, &cp->addr.bdaddr, sec_level, | 1906 | conn = hci_connect(hdev, ACL_LINK, &cp->addr.bdaddr, |
| 1907 | auth_type); | 1907 | cp->addr.type, sec_level, auth_type); |
| 1908 | else | 1908 | else |
| 1909 | conn = hci_connect(hdev, LE_LINK, &cp->addr.bdaddr, sec_level, | 1909 | conn = hci_connect(hdev, LE_LINK, &cp->addr.bdaddr, |
| 1910 | auth_type); | 1910 | cp->addr.type, sec_level, auth_type); |
| 1911 | 1911 | ||
| 1912 | memset(&rp, 0, sizeof(rp)); | 1912 | memset(&rp, 0, sizeof(rp)); |
| 1913 | bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); | 1913 | bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); |
