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

Commit 339283a4 authored by Srinu Jella's avatar Srinu Jella Committed by Myles Watson
Browse files

Group BR-EDR related SDP variables under transport

Use Case: Random RNR initiated after HOGP Keyboard disconnection

steps:
1. keep madcatz in advertisement mode and scan, pair from DUT.
2. keep dailog Keyboard in advertisement mode and scan, pair from DUT.
3. Take Keyboard out of range to initiate disconnection from remote
or initiate disconnection from remote.

Failure: DUT trying to do RNR to random device.

Root Cause: when the disconnection happened for LE device, it sets
the wait_disc to true, that is causing random RNR to go for BR-EDR
device.

Fix: Group all BR-EDR related SDP variables under transport check
so that if some other operation on LE will not corrupt these BR-EDR
variables to mislead.

Test: code compilation.
Bug: 69031582
Change-Id: Ic9003f2b85bbaaa30b201b8a639a9d9b52055ac5
parent dce81236
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -1974,12 +1974,13 @@ static void bta_dm_discover_device(const RawAddress& remote_bd_addr) {
      /* check whether connection already exists to the device
         if connection exists, we don't have to wait for ACL
         link to go down to start search on next device */
      if (transport == BT_TRANSPORT_BR_EDR) {
        if (BTM_IsAclConnectionUp(bta_dm_search_cb.peer_bdaddr,
                                  BT_TRANSPORT_BR_EDR))
          bta_dm_search_cb.wait_disc = false;
        else
          bta_dm_search_cb.wait_disc = true;

      }
      if (bta_dm_search_cb.p_btm_inq_info) {
        APPL_TRACE_DEBUG(
            "%s p_btm_inq_info 0x%x results.device_type 0x%x "
@@ -2782,7 +2783,9 @@ static void bta_dm_acl_change(bool is_new, const RawAddress& bd_addr,
      bta_dm_cb.device_list.le_count--;
    conn.link_down.link_type = transport;

    if (bta_dm_search_cb.wait_disc && bta_dm_search_cb.peer_bdaddr == bd_addr) {
    if ((transport == BT_TRANSPORT_BR_EDR) &&
        (bta_dm_search_cb.wait_disc &&
         bta_dm_search_cb.peer_bdaddr == bd_addr)) {
      bta_dm_search_cb.wait_disc = false;

      if (bta_dm_search_cb.sdp_results) {