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

Commit 1945ff03 authored by Chris Manton's avatar Chris Manton
Browse files

Remove idempotent variable in loop stack/btm/btm_pm.cc

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If29dd9fb3ccdcc368352cca4562ab0b26ede6d89
parent ebc1761f
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -790,6 +790,12 @@ void btm_pm_proc_ssr_evt(uint8_t* p, UNUSED_ATTR uint16_t evt_len) {
  p_cb = &(btm_cb.pm_mode_db[xx]);

  tACL_CONN* p_acl = &btm_cb.acl_cb_.acl_db[xx];
  if (p_acl == nullptr) {
    BTM_TRACE_EVENT("%s Received sniff subrating event with no active ACL",
                    __func__);
    return;
  }

  if (p_cb->interval == max_rx_lat) {
    /* using legacy sniff */
    use_ssr = false;
@@ -798,10 +804,8 @@ void btm_pm_proc_ssr_evt(uint8_t* p, UNUSED_ATTR uint16_t evt_len) {
  /* notify registered parties */
  for (yy = 0; yy < BTM_MAX_PM_RECORDS; yy++) {
    if (btm_cb.pm_reg_db[yy].mask & BTM_PM_REG_NOTIF) {
      if (p_acl) {
        (*btm_cb.pm_reg_db[yy].cback)(p_acl->remote_addr, BTM_PM_STS_SSR,
                                      use_ssr, status);
      }
      (*btm_cb.pm_reg_db[yy].cback)(p_acl->remote_addr, BTM_PM_STS_SSR, use_ssr,
                                    status);
    }
  }
}