Hi Johan, On 15:43 Mon 06 Jun, Johan Hedberg wrote: > Hi Vinicius, > > On Thu, Jun 02, 2011, Vinicius Costa Gomes wrote: > > @@ -357,21 +375,16 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level) > > if (IS_ERR(hcon->hdev->tfm)) > > return 1; > > > > - switch (sec_level) { > > - case BT_SECURITY_MEDIUM: > > - /* Encrypted, no MITM protection */ > > - authreq = HCI_AT_NO_BONDING_MITM; > > - break; > > + if (test_bit(HCI_CONN_ENCRYPT_PEND, &hcon->pend)) > > + return -EINPROGRESS; > > This doesn't look right to me. Like hci_conn_security, smp_conn_security > is supposed to be a boolean function by only returning 0 or 1. That's > also how all places use it: "if (smp_conn_security(...))". So returning > a negative error like this looks wrong. Yeah, this is wrong. Was fixed in a later commit, but will fix here too. Thanks. > > Johan Cheers, -- Vinicius -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html