• Mat Martineau's avatar
    Bluetooth: Use event-driven approach for handling ERTM receive buffer · e328140f
    Mat Martineau authored
    This change moves most L2CAP ERTM receive buffer handling out of the
    L2CAP core and in to the socket code.  It's up to the higher layer
    (the socket code, in this case) to tell the core when its buffer is
    full or has space available.  The recv op should always accept
    incoming ERTM data or else the connection will go down.
    
    Within the socket layer, an skb that does not fit in the socket
    receive buffer will be temporarily stored.  When the socket is read
    from, that skb will be placed in the receive buffer if possible.  Once
    adequate buffer space becomes available, the L2CAP core is informed
    and the ERTM local busy state is cleared.
    
    Receive buffer management for non-ERTM modes is unchanged.
    Signed-off-by: default avatarMat Martineau <mathewm@codeaurora.org>
    Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
    e328140f
l2cap_core.c 99.9 KB