Bluetooth: Fix error returned to bluez on LE Pairing Failure
Change-Id: I1e7908e133d53b41bdd58a54a2e293526e96e160
Signed-off-by: Brian Gix <bgix@codeaurora.org>
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 6838fd5..94d0f06 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -850,7 +850,7 @@
err = -EPERM;
del_timer(&hcon->smp_timer);
clear_bit(HCI_CONN_ENCRYPT_PEND, &hcon->pend);
- mgmt_auth_failed(hcon->hdev->id, conn->dst, skb->data[1]);
+ mgmt_auth_failed(hcon->hdev->id, conn->dst, skb->data[0]);
hci_conn_put(hcon);
break;