From: Sudha Bheemanna Date: Thu, 8 Sep 2016 07:34:11 +0000 (+0530) Subject: Bluetooth: Change authentication requirement. X-Git-Tag: accepted/tizen/unified/riscv/20230725.071352~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44b6b55a9226674652a4430346fe3313da1c0cb3;p=platform%2Fkernel%2Flinux-starfive.git Bluetooth: Change authentication requirement. This patch updates the authentication requirement to general MITM if local and remote device IO capabilities are not NO_INPUT_NO_OUTPUT. Change-Id: Ie3955c3f8287418e74af20d40bdf30d0f1963e31 Signed-off-by: Sudha Bheemanna Signed-off-by: Amit Purwar Signed-off-by: Wootak Jung --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 7545c7213650..aa3ae004c24e 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5342,6 +5342,14 @@ unlock: static u8 hci_get_auth_req(struct hci_conn *conn) { +#ifdef TIZEN_BT + if (conn->remote_auth == HCI_AT_GENERAL_BONDING_MITM) { + if (conn->remote_cap != HCI_IO_NO_INPUT_OUTPUT && + conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) + return HCI_AT_GENERAL_BONDING_MITM; + } +#endif + /* If remote requests no-bonding follow that lead */ if (conn->remote_auth == HCI_AT_NO_BONDING || conn->remote_auth == HCI_AT_NO_BONDING_MITM)