• Johan Hedberg's avatar
    Bluetooth: Add a role parameter to hci_conn_add() · a5c4e309
    Johan Hedberg authored
    We need to be able to track slave vs master LE connections in
    hci_conn_hash, and to be able to do that we need to know the role of the
    connection by the time hci_conn_add_has() is called. This means in
    practice the hci_conn_add() call that creates the hci_conn_object.
    
    This patch adds a new role parameter to hci_conn_add() function to give
    the object its initial role value, and updates the callers to pass the
    appropriate role to it. Since the function now takes care of
    initializing both conn->role and conn->out values we can remove some
    other unnecessary assignments.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    a5c4e309
amp.c 11.2 KB