• Jie Jiang's avatar
    arc: bluetooth: Implement L2CAP LE socket (1/2) · 80ed9c28
    Jie Jiang authored
    L2CAP LE socket is added in Android from Q and these two patches
    implements for ARC++.
    
    The code for this new socket is quite similar to the existing code for
    RFCOMM. Since we cannot just change the name of an existing interface,
    in the next patch, we will add two new interfaces (listen and connect
    socket) which can be used for both RFCOMM and L2CAP, and deprecates the
    old ones, when both P and R get the corresponding patch(es).
    
    This patch doesn't change any functionalities. It just refactors the
    current code a bit, including:
    - Renaming RFCOMM-specific stuff into more generic ones;
    - Changing to calling bind() for both listen and connect sockets:
      calling bind() for RFCOMM connect sockets is not required but needed
      by L2CAP LE sockets;
    - Changing type of |channel| in some methods to uint16_t for PSM value;
    - Fixing a wrong usage of PLOG.
    
    BUG=b:163099156
    TEST=RFCOMM tests in cts verifier on octopus
    
    Change-Id: If09794e00fa60599e8c9e9ec941d06cfdeb28741
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368615Reviewed-by: default avatarSonny Sasaka <sonnysasaka@chromium.org>
    Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
    Reviewed-by: default avatarMiao-chen Chou <mcchou@chromium.org>
    Commit-Queue: Jie Jiang <jiejiang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#813021}
    80ed9c28
arc_bluetooth_bridge.cc 125 KB