Commit d839c81372d1f0caee47f87b26a68e91d4ff3847

Authored by Gustavo Padovan
Committed by Gustavo Padovan
1 parent c5daa683f2

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/bluetooth/hci_event.c
... ... @@ -2063,7 +2063,7 @@
2063 2063 clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
2064 2064  
2065 2065 if (ev->status && conn->state == BT_CONNECTED) {
2066   - hci_acl_disconn(conn, 0x13);
  2066 + hci_acl_disconn(conn, HCI_ERROR_AUTH_FAILURE);
2067 2067 hci_conn_put(conn);
2068 2068 goto unlock;
2069 2069 }