• Johan Hedberg's avatar
    Bluetooth: Fix L2CAP information request handling for fixed channels · aeaeb4bb
    Johan Hedberg authored
    Even if we have no connection-oriented channels we should perform the
    L2CAP Information Request procedures before notifying L2CAP channels of
    the connection. This is so that the L2CAP channel implementations can
    perform checks on what the remote side supports (e.g. does it support
    the fixed channel in question).
    
    So far the code has relied on the l2cap_do_start() function to initiate
    the Information Request, however l2cap_do_start() is used on a
    per-channel basis and only for connection-oriented channels. This means
    that if there are no connection-oriented channels on the system we would
    never start the Information Request procedure.
    
    This patch creates a new l2cap_request_info() helper function to
    initiate the Information Request procedure, and ensures that it is
    called whenever a BR/EDR connection has been established. The patch also
    updates fixed channels to be notified of connection readiness only once
    the Information Request procedure has completed.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    aeaeb4bb
l2cap_core.c 176 KB