Bluetooth: Don't bother user space without IO capabilities
[deliverable/linux.git] / net / bluetooth / smp.c
index 70b726518d7bb06ac0006e59ce308009e0a3d6b5..74a0308e39f38f227700c1638047883341a220fe 100644 (file)
@@ -431,6 +431,10 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
        if (method == JUST_CFM && test_bit(SMP_FLAG_INITIATOR, &smp->flags))
                method = JUST_WORKS;
 
+       /* Don't bother user space with no IO capabilities */
+       if (method == JUST_CFM && hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
+               method = JUST_WORKS;
+
        /* If Just Works, Continue with Zero TK */
        if (method == JUST_WORKS) {
                set_bit(SMP_FLAG_TK_VALID, &smp->flags);
This page took 0.034118 seconds and 5 git commands to generate.