• J
    Bluetooth: Add passkey entry support for LE SC · 38606f14
    Johan Hedberg 提交于
    The passkey entry mechanism involves either both sides requesting the
    user for a passkey, or one side requesting the passkey while the other
    one displays it. The behavior as far as SMP PDUs are concerned are
    considerably different from numeric comparison and therefore requires
    several new functions to handle it.
    
    In essence passkey entry involves both sides gradually committing to
    each bit of the passkey which involves 20 rounds of pairing confirm and
    pairing random PDUS being sent in both directions.
    
    This patch adds a new smp->passkey_round variable to track the current
    round of the passkey commitment and reuses the variables already present
    in struct hci_conn for the passkey and entered key count.
    Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    38606f14
smp.c 62.5 KB