Fix not able to disconnect from the Host after SMP requests
The following fixes were added:
1. While using whitelist API for connection, if SMP requests are received
before the L2CAP channel is correctly setup, queue the SMP requets
and execute them once the channel state is bounded and connected and
therefore maintaining the correct connection reference count.
2. If the status LE start encryption command is not successful,
then call hci_conn put which would decrement the HCI connection
reference count.
CRs-fixed: 447092
Change-Id: Ibb11ecf94f28e0b0aff5eacc86d1660e7ec2e25d
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h
index 71845dd..f0f2842 100644
--- a/include/net/bluetooth/smp.h
+++ b/include/net/bluetooth/smp.h
@@ -126,6 +126,7 @@
int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level);
int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb);
int smp_link_encrypt_cmplt(struct l2cap_conn *conn, __u8 status, __u8 encrypt);
+void smp_conn_security_fail(struct l2cap_conn *conn, __u8 code, __u8 reason);
void smp_timeout(unsigned long l2cap_conn);
#endif /* __SMP_H */