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

Commit 7eb12ef3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I6207de7d,Iaf1f72e8,Ia2fb869d,I0d78f030 into main

* changes:
  [9/24] Canonical form tBTM_STATUS::BTM_DEV_RESTRICT_LISTED
  [8/24] Canonical form tBTM_STATUS::BTM_DEV_RESET
  [7/24] Canonical form tBTM_STATUS::BTM_DEVICE_TIMEOUT
  [6/24] Canonical form tBTM_STATUS::BTM_DELAY_CHECK
parents 6657bd97 49e2b894
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1098,7 +1098,7 @@ bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits) {
      case tBTM_STATUS::BTM_CMD_STARTED:
        break;
      case BTM_MODE_UNSUPPORTED:
      case BTM_DEV_RESTRICT_LISTED:
      case tBTM_STATUS::BTM_DEV_RESTRICT_LISTED:
        // Role switch can never happen, but indicate to caller
        // a result such that a timer will not start to repeatedly
        // try something not possible.
+4 −4
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {

  if (interop_match_addr(INTEROP_DISABLE_ROLE_SWITCH, &remote_bd_addr)) {
    log::info("Remote device is on list preventing role switch");
    return BTM_DEV_RESTRICT_LISTED;
    return tBTM_STATUS::BTM_DEV_RESTRICT_LISTED;
  }

  if (get_btm_client_interface().sco.BTM_IsScoActiveByBdaddr(remote_bd_addr)) {
@@ -570,7 +570,7 @@ tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {

  if (interop_match_addr(INTEROP_DYNAMIC_ROLE_SWITCH, &remote_bd_addr)) {
    log::debug("Device restrict listed under INTEROP_DYNAMIC_ROLE_SWITCH");
    return BTM_DEV_RESTRICT_LISTED;
    return tBTM_STATUS::BTM_DEV_RESTRICT_LISTED;
  }

  tBTM_PM_MODE pwr_mode;
@@ -1783,7 +1783,7 @@ void btm_read_rssi_timeout(void* /* data */) {
  tBTM_RSSI_RESULT result;
  tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_rssi_cmpl_cb;
  btm_cb.devcb.p_rssi_cmpl_cb = NULL;
  result.status = BTM_DEVICE_TIMEOUT;
  result.status = tBTM_STATUS::BTM_DEVICE_TIMEOUT;
  if (p_cb) {
    (*p_cb)(&result);
  }
@@ -1855,7 +1855,7 @@ void btm_read_failed_contact_counter_timeout(void* /* data */) {
  tBTM_FAILED_CONTACT_COUNTER_RESULT result;
  tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_failed_contact_counter_cmpl_cb;
  btm_cb.devcb.p_failed_contact_counter_cmpl_cb = NULL;
  result.status = BTM_DEVICE_TIMEOUT;
  result.status = tBTM_STATUS::BTM_DEVICE_TIMEOUT;
  if (p_cb) {
    (*p_cb)(&result);
  }
+5 −5
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ void BTM_db_reset(void) {

    if (p_cb) {
      tBTM_RSSI_RESULT btm_rssi_result;
      btm_rssi_result.status = BTM_DEV_RESET;
      btm_rssi_result.status = tBTM_STATUS::BTM_DEV_RESET;
      (*p_cb)(&btm_rssi_result);
    }
  }
@@ -145,7 +145,7 @@ void BTM_db_reset(void) {

    if (p_cb) {
      tBTM_FAILED_CONTACT_COUNTER_RESULT btm_failed_contact_counter_result;
      btm_failed_contact_counter_result.status = BTM_DEV_RESET;
      btm_failed_contact_counter_result.status = tBTM_STATUS::BTM_DEV_RESET;
      (*p_cb)(&btm_failed_contact_counter_result);
    }
  }
@@ -156,7 +156,7 @@ void BTM_db_reset(void) {

    if (p_cb) {
      tBTM_AUTOMATIC_FLUSH_TIMEOUT_RESULT btm_automatic_flush_timeout_result;
      btm_automatic_flush_timeout_result.status = BTM_DEV_RESET;
      btm_automatic_flush_timeout_result.status = tBTM_STATUS::BTM_DEV_RESET;
      (*p_cb)(&btm_automatic_flush_timeout_result);
    }
  }
@@ -333,7 +333,7 @@ tBTM_STATUS BTM_SetLocalDeviceName(const char* p_name) {
  }

  if (bluetooth::shim::GetController() == nullptr) {
    return BTM_DEV_RESET;
    return tBTM_STATUS::BTM_DEV_RESET;
  }
  /* Save the device name if local storage is enabled */

@@ -434,7 +434,7 @@ tBTM_STATUS BTM_SetDeviceClass(DEV_CLASS dev_class) {
  btm_cb.devcb.dev_class = dev_class;

  if (bluetooth::shim::GetController() == nullptr) {
    return BTM_DEV_RESET;
    return tBTM_STATUS::BTM_DEV_RESET;
  }

  btsnd_hcic_write_dev_class(dev_class);
+1 −1
Original line number Diff line number Diff line
@@ -951,7 +951,7 @@ void btm_inq_db_reset(void) {
    btm_cb.rnr.remname_dev_type = BT_DEVICE_TYPE_UNKNOWN;

    if (btm_cb.rnr.p_remname_cmpl_cb) {
      rem_name.btm_status = BTM_DEV_RESET;
      rem_name.btm_status = tBTM_STATUS::BTM_DEV_RESET;
      rem_name.hci_status = HCI_SUCCESS;

      (*btm_cb.rnr.p_remname_cmpl_cb)(&rem_name);
+2 −2
Original line number Diff line number Diff line
@@ -1565,7 +1565,7 @@ tBTM_STATUS btm_sec_l2cap_access_req_by_requirement(const RawAddress& bd_addr,
     * as long as we have a link key, it's OK */
    if ((0 == (p_dev_rec->sec_rec.sec_flags & BTM_SEC_AUTHENTICATED)) ||
        (0 == (p_dev_rec->sec_rec.sec_flags & BTM_SEC_ENCRYPTED))) {
      rc = BTM_DELAY_CHECK;
      rc = tBTM_STATUS::BTM_DELAY_CHECK;
      /*
      2046 may report HCI_Encryption_Change and L2C Connection Request out of
      sequence
@@ -3642,7 +3642,7 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, tHCI_STATUS statu

    if (status == HCI_ERR_CONNECTION_TOUT || status == HCI_ERR_LMP_RESPONSE_TIMEOUT ||
        status == HCI_ERR_UNSPECIFIED || status == HCI_ERR_PAGE_TIMEOUT) {
      btm_sec_dev_rec_cback_event(p_dev_rec, BTM_DEVICE_TIMEOUT, false);
      btm_sec_dev_rec_cback_event(p_dev_rec, tBTM_STATUS::BTM_DEVICE_TIMEOUT, false);
    } else {
      btm_sec_dev_rec_cback_event(p_dev_rec, BTM_ERR_PROCESSING, false);
    }
Loading