diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-03-11 22:11:11 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-11 22:11:11 +0300 |
commit | 409ec36c320d580a036045e603f96286c362c609 (patch) | |
tree | 3dd9b3569799f7962b523a068052445e2d2c51aa /net/bluetooth/hci_conn.c | |
parent | 1b7fe59322bef9e7a2c05b64a07a66b875299736 (diff) | |
parent | 8d5eab5aa676378b4c9daa62d10d08a0bca04677 (diff) | |
download | linux-409ec36c320d580a036045e603f96286c362c609.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a050a6984901..7a6f56b2f49d 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -286,6 +286,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) conn->state = BT_OPEN; conn->auth_type = HCI_AT_GENERAL_BONDING; conn->io_capability = hdev->io_capability; + conn->remote_auth = 0xff; conn->power_save = 1; conn->disc_timeout = HCI_DISCONN_TIMEOUT; @@ -429,10 +430,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 if (type == LE_LINK) { le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst); + if (le) + return ERR_PTR(-EBUSY); + le = hci_conn_add(hdev, LE_LINK, dst); if (!le) - le = hci_conn_add(hdev, LE_LINK, dst); - if (!le) - return NULL; + return ERR_PTR(-ENOMEM); if (le->state == BT_OPEN) hci_le_connect(le); |