Hi Gustavo, >> +static int rfcomm_accept_secure(struct hci_conn *conn, struct >> +rfcomm_dlc *d) { >> + BT_DBG(""); >> + >> + if (d->sec_level != BT_SECURITY_HIGH) >> + return 1; /* Accept */ >> + >> + if (conn->key_type == HCI_LK_AUTH_COMBINATION || >> + (conn->key_type == HCI_LK_COMBINATION && >> + conn->pin_length == 16)) >> + return 1; >> + >> + return 0; /* Reject */ >> +} > >I don't like the idea of mix HCI and RFCOMM code, I prefer >that you create an hci_accept_secure(conn, d->sec_level) instead. We could do like this static int hci_accept_secure(hci_conn *conn, u8 required_sec_level) { if (required_sec_level != BT_SECURITY_HIGH) return 1; /* Accept */ if (conn->sec_level == BT_SECURITY_HIGH) return 1; return 0; } Waldek-- 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