• P
    Bluetooth: Fix RFCOMM parent device for reused dlc · b4d21f19
    Peter Hurley 提交于
    The RFCOMM tty device is parented to the acl link device when
    the dlc state_change(BT_CONNECTED) notification is received.
    However, if the dlc from the RFCOMM socket is being reused
    (RFCOMM_REUSE_DLC is set), then the dlc may already be connected,
    and no notification will occur.
    
    Instead, always parent the RFCOMM tty device to the acl link
    device at registration time. If the acl link device is not available
    (eg, because the dlc is not connected) then the tty will remain
    unparented until the BT_CONNECTED notification is received.
    
    Fixes regression with ModemManager when the rfcomm device is
    created with the flag RFCOMM_REUSE_DLC.
    Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
    Tested-By: NAlexander Holler <holler@ahsoftware.de>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    b4d21f19
tty.c 26.3 KB