• Johan Hedberg's avatar
    Bluetooth: Convert Pair Device to use cmd_complete callback · 04ab2749
    Johan Hedberg authored
    This patch converts the Pair Device mgmt command to use the new
    cmd_complete callback for pending mgmt commands. The already existing
    pairing_complete() function is exactly what's needed and doesn't need
    changing.
    
    In addition to getting the return parameters always right this patch
    actually fixes a reference counting bug and memory leak with the
    hci_conn that's attached to the pending mgmt command - something that
    would occur when powering off or unplugging the adapter while pairing is
    in progress.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    04ab2749
mgmt.c 171 KB