diff options
author | Gustavo Padovan <gustavo@padovan.org> | 2012-05-16 11:17:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-05-16 15:14:24 -0400 |
commit | d839c81372d1f0caee47f87b26a68e91d4ff3847 (patch) | |
tree | 6b5ce2497f0cdab872f7cfb770481e8467fafa41 | |
parent | c5daa683f2d3315cd766f550ef7d88bfca1671f4 (diff) |
Bluetooth: Report proper error number in disconnection
If encryption change fails we should disconnect with auth failure error
code.
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | net/bluetooth/hci_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 9c60e0d8db5f..4eefb7f65cf6 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -2063,7 +2063,7 @@ static inline void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff * | |||
2063 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); | 2063 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); |
2064 | 2064 | ||
2065 | if (ev->status && conn->state == BT_CONNECTED) { | 2065 | if (ev->status && conn->state == BT_CONNECTED) { |
2066 | hci_acl_disconn(conn, 0x13); | 2066 | hci_acl_disconn(conn, HCI_ERROR_AUTH_FAILURE); |
2067 | hci_conn_put(conn); | 2067 | hci_conn_put(conn); |
2068 | goto unlock; | 2068 | goto unlock; |
2069 | } | 2069 | } |