diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2015-02-11 12:31:41 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-02-14 05:19:59 +0100 |
commit | c411110e1f13abd64886c8abdf6f31c10136969f (patch) | |
tree | 4bcfaddf25f3d3ed7c6762622dccf93d922becbc /net/bluetooth/hci_conn.c | |
parent | 152d386e111fed3fee5fe888f38b0ae73ea15400 (diff) | |
download | op-kernel-dev-c411110e1f13abd64886c8abdf6f31c10136969f.zip op-kernel-dev-c411110e1f13abd64886c8abdf6f31c10136969f.tar.gz |
Bluetooth: Improve error handling in connect acl
With this patch -EOPNOTSUPP will be returned by hci_connect_acl for LE
only controllers. If it is dual device with disabled BREDR -ECONNREFUSED
will be returned
Signed-off-by: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 409c05e..e3263b6 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -864,8 +864,12 @@ struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst, { struct hci_conn *acl; - if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags)) + if (!test_bit(HCI_BREDR_ENABLED, &hdev->dev_flags)) { + if (lmp_bredr_capable(hdev)) + return ERR_PTR(-ECONNREFUSED); + return ERR_PTR(-EOPNOTSUPP); + } acl = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst); if (!acl) { |