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

Commit 2639470b authored by Chris Manton's avatar Chris Manton
Browse files

[17/24] Canonical form tBTM_STATUS::BTM_MODE_UNSUPPORTED

Prepare for class enum-ify tBTM_STATUS

Bug: 358402071
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I3876332cd6918d1c232ed26bd43dc64bdbfc3236
parent 02f7ac35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ TEST_F(BtaDmTest, bta_dm_set_encryption) {
          [](const RawAddress& bd_addr, tBT_TRANSPORT transport, tBTM_SEC_CALLBACK* p_callback,
             void* p_ref_data, tBTM_BLE_SEC_ACT sec_act) -> tBTM_STATUS {
    inc_func_call_count("BTM_SetEncryption");
    return BTM_MODE_UNSUPPORTED;
    return tBTM_STATUS::BTM_MODE_UNSUPPORTED;
  };

  bta_dm_set_encryption(kRawAddress, transport, BTA_DM_ENCRYPT_CBACK, sec_act);
+3 −3
Original line number Diff line number Diff line
@@ -531,7 +531,7 @@ tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role) {
 *                  BTM_NO_RESOURCES if couldn't allocate memory to issue
 *                                   command
 *                  BTM_UNKNOWN_ADDR if no active link with bd addr specified
 *                  BTM_MODE_UNSUPPORTED if local device does not support role
 *                  tBTM_STATUS::BTM_MODE_UNSUPPORTED if local device does not support role
 *                                       switching
 *                  tBTM_STATUS::BTM_BUSY if the previous command is not completed
 *
@@ -539,7 +539,7 @@ tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role) {
tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {
  if (!bluetooth::shim::GetController()->SupportsRoleSwitch()) {
    log::info("Local controller does not support role switching");
    return BTM_MODE_UNSUPPORTED;
    return tBTM_STATUS::BTM_MODE_UNSUPPORTED;
  }

  tACL_CONN* p_acl = internal_.btm_bda_to_acl(remote_bd_addr, BT_TRANSPORT_BR_EDR);
@@ -1063,7 +1063,7 @@ tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda, uint16_t timeout)
              "UNSUPPORTED by controller write link supervision timeout:{:.2f}ms "
              "bd_addr:{}",
              supervision_timeout_to_seconds(timeout), remote_bda);
      return BTM_MODE_UNSUPPORTED;
      return tBTM_STATUS::BTM_MODE_UNSUPPORTED;
    }
    p_acl->link_super_tout = timeout;
    btsnd_hcic_write_link_super_tout(p_acl->hci_handle, timeout);
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
        (mode == BTM_PM_MD_PARK && !controller->SupportsParkMode()) ||
        interop_match_addr(INTEROP_DISABLE_SNIFF, &remote_bda)) {
      log::error("pm_id {} mode {} is not supported for {}", pm_id, mode, remote_bda);
      return BTM_MODE_UNSUPPORTED;
      return tBTM_STATUS::BTM_MODE_UNSUPPORTED;
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ void BTM_BleAdvFilterParamSetup(tBTM_BLE_SCAN_COND_OP action, tBTM_BLE_PF_FILT_I
  uint8_t param[len], *p;

  if (!is_filtering_supported()) {
    cb.Run(0, BTM_BLE_PF_ENABLE, BTM_MODE_UNSUPPORTED);
    cb.Run(0, BTM_BLE_PF_ENABLE, tBTM_STATUS::BTM_MODE_UNSUPPORTED);
    return;
  }

+1 −1
Original line number Diff line number Diff line
@@ -730,7 +730,7 @@ tBTM_STATUS btm_ble_start_sec_check(const RawAddress& bd_addr, uint16_t psm, boo
   */
  if (!p_serv_rec) {
    log::warn("PSM: {} no application registered", psm);
    (*p_callback)(bd_addr, BT_TRANSPORT_LE, p_ref_data, BTM_MODE_UNSUPPORTED);
    (*p_callback)(bd_addr, BT_TRANSPORT_LE, p_ref_data, tBTM_STATUS::BTM_MODE_UNSUPPORTED);
    return tBTM_STATUS::BTM_ILLEGAL_VALUE;
  }

Loading