Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ff6112b authored by janardhana rao bokka's avatar janardhana rao bokka Committed by Jack He
Browse files

L2CAP: Failed to send data to remote device on LE transport.

Precondition:
1. Remote device is Dual mode device and uses same BD_ADDR
   for both BREDR and LE transport (i.e no privacy enabled)
2. Connection on BREDR goes to sniff mode while there is active
   data transfer on LE transport (i.e. during Step 5 as per below
         use case).
   Steps to reproduce:
   1. Pair and connect RD1 and RD2
   2. RD2 is now active, confirmed that music playback is heard
      over Rd2
   3. Make RD1 active, check for audio presence
   4. Make RD2 active, check for audio presence
   5. Repeat step 3-4 multiple times
   6. Randomly after 2-3 attempts at step 3 audio loss is observed

Fix:
This change checks the transport before checking the power
mode associated with the l2cap lcb. If the transport is LE
it would return immediately.

Test: After above steps issue not seen
Tag: #feature
Bug: 208221015

Change-Id: I99ba5c67a34be06c543bd531ef392ef270ca00b8
parent c090ca4c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -833,6 +833,8 @@ void l2c_pin_code_request(const RawAddress& bd_addr) {
static bool l2c_link_check_power_mode(tL2C_LCB* p_lcb) {
  bool need_to_active = false;

  // Return false as LM modes are applicable for BREDR transport
  if (p_lcb->is_transport_ble()) return false;
  /*
   * We only switch park to active only if we have unsent packets
   */
@@ -849,7 +851,7 @@ static bool l2c_link_check_power_mode(tL2C_LCB* p_lcb) {
  }

  /* if we have packets to send */
  if (need_to_active && !p_lcb->is_transport_ble()) {
  if (need_to_active) {
    /* check power mode */
    tBTM_PM_MODE mode;
    if (BTM_ReadPowerMode(p_lcb->remote_bd_addr, &mode)) {