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

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

Merge changes Ia3a8c7e1,I65bac30e,Ide1a5faa,I64f5be7d,Id19aa6c9, ...

* changes:
  enum-ify bta/include/bta_api::BTA_DM_PM_
  Remove #def and use IsEprAvailable
  Use proper tHCI_STATUS types
  Inclusive language BTM_DEV_BLACKLISTED => BTM_DEV_RESTRICT_LISTED
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_features_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_tx_power_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_automatic_flush_timeout_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_rssi_complete
  Re-log and properly type bta/dm/bta_dm_pm::bta_dm_pm_sniff
  Properly type bta/.../::BTA_SYS_CONN_OPEN
  Properly type args stack/acl/btm_pm::BTM_ReadPowerMode
  Add bta/sys/bta_sys::bta_sys_conn_status_text
  enum-ify bta/sys/bta_sys::tBTA_SYS_CONN_STATUS
  Add stack/include/btm_status::btm_status_text
  gd_acl: Remove redundant call stack/l2cap/l2c_link
parents 83ed27b5 92b0e722
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ void bta_ag_start_open(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
    /* Let the incoming connection goes through.                        */
    /* Issue collision for this scb for now.                            */
    /* We will decide what to do when we find incoming connetion later. */
    bta_ag_collision_cback(0, BTA_ID_AG, 0, p_scb->peer_addr);
    bta_ag_collision_cback(BTA_SYS_CONN_OPEN, BTA_ID_AG, 0, p_scb->peer_addr);
    return;
  }

+1 −1
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits) {
            "%s: peer %s BTM_SwitchRoleToCentral(HCI_ROLE_CENTRAL) error: %d",
            __func__, p_scb->PeerAddress().ToString().c_str(), status);
      }
      if (status != BTM_MODE_UNSUPPORTED && status != BTM_DEV_BLACKLISTED) {
      if (status != BTM_MODE_UNSUPPORTED && status != BTM_DEV_RESTRICT_LISTED) {
        is_ok = false;
        p_scb->wait |= BTA_AV_WAIT_ROLE_SW_RES_START;
      }
+6 −3
Original line number Diff line number Diff line
@@ -695,7 +695,7 @@ static bool bta_dm_pm_park(const RawAddress& peer_addr) {
 *
 ******************************************************************************/
static void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
  tBTM_PM_MODE mode = BTM_PM_STS_ACTIVE;
  tBTM_PM_MODE mode = BTM_PM_MD_ACTIVE;
  tBTM_PM_PWR_MD pwr_md;
  tBTM_STATUS status;

@@ -703,10 +703,13 @@ static void bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) {
    LOG_WARN("Unable to read power mode for peer:%s",
             PRIVATE_ADDRESS(p_peer_dev->peer_bdaddr));
  }
  tBTM_PM_STATUS mode_status = static_cast<tBTM_PM_STATUS>(mode);
  LOG_DEBUG("Current power mode:%s[0x%x] peer_mode:x%02x",
            power_mode_status_text(mode_status).c_str(), mode_status,
            p_peer_dev->info);

  uint8_t* p_rem_feat = BTM_ReadRemoteFeatures(p_peer_dev->peer_bdaddr);
  APPL_TRACE_DEBUG("bta_dm_pm_sniff cur:%d, idx:%d, info:x%x", mode, index,
                   p_peer_dev->info);

  const controller_t* controller = controller_get_interface();
  if (mode != BTM_PM_MD_SNIFF ||
      (controller->supports_sniff_subrating() && p_rem_feat &&
+2 −1
Original line number Diff line number Diff line
@@ -107,7 +107,8 @@ void bta_hf_client_start_open(tBTA_HF_CLIENT_DATA* p_data) {
    /* Let the incoming connection goes through.                        */
    /* Issue collision for now.                                         */
    /* We will decide what to do when we find incoming connection later.*/
    bta_hf_client_collision_cback(0, BTA_ID_HS, 0, client_cb->peer_addr);
    bta_hf_client_collision_cback(BTA_SYS_CONN_OPEN, BTA_ID_HS, 0,
                                  client_cb->peer_addr);
    return;
  }

+22 −22
Original line number Diff line number Diff line
@@ -457,28 +457,28 @@ typedef void(tBTA_BLE_ENERGY_INFO_CBACK)(tBTM_BLE_TX_TIME_MS tx_time,
/* Maximum service name length */
#define BTA_SERVICE_NAME_LEN 35

enum : uint8_t {
  /* power mode actions  */
#define BTA_DM_PM_NO_ACTION 0x00 /* no change to the current pm setting */
#define BTA_DM_PM_PARK 0x10      /* prefers park mode */
#define BTA_DM_PM_SNIFF 0x20     /* prefers sniff mode */
#define BTA_DM_PM_SNIFF1 0x21    /* prefers sniff1 mode */
#define BTA_DM_PM_SNIFF2 0x22    /* prefers sniff2 mode */
#define BTA_DM_PM_SNIFF3 0x23    /* prefers sniff3 mode */
#define BTA_DM_PM_SNIFF4 0x24    /* prefers sniff4 mode */
#define BTA_DM_PM_SNIFF5 0x25    /* prefers sniff5 mode */
#define BTA_DM_PM_SNIFF6 0x26    /* prefers sniff6 mode */
#define BTA_DM_PM_SNIFF7 0x27    /* prefers sniff7 mode */
#define BTA_DM_PM_SNIFF_USER0 \
  0x28 /* prefers user-defined sniff0 mode (testtool only) */
#define BTA_DM_PM_SNIFF_USER1 \
  0x29 /* prefers user-defined sniff1 mode (testtool only) */
#define BTA_DM_PM_ACTIVE 0x40  /* prefers active mode */
#define BTA_DM_PM_RETRY 0x80   /* retry power mode based on current settings */
#define BTA_DM_PM_SUSPEND 0x04 /* prefers suspend mode */
#define BTA_DM_PM_NO_PREF                                                   \
  0x01 /* service has no prefernce on power mode setting. eg. connection to \
          service got closed */

  BTA_DM_PM_NO_ACTION = 0x00, /* no change to the current pm setting */
  BTA_DM_PM_PARK = 0x10,      /* prefers park mode */
  BTA_DM_PM_SNIFF = 0x20,     /* prefers sniff mode */
  BTA_DM_PM_SNIFF1 = 0x21,    /* prefers sniff1 mode */
  BTA_DM_PM_SNIFF2 = 0x22,    /* prefers sniff2 mode */
  BTA_DM_PM_SNIFF3 = 0x23,    /* prefers sniff3 mode */
  BTA_DM_PM_SNIFF4 = 0x24,    /* prefers sniff4 mode */
  BTA_DM_PM_SNIFF5 = 0x25,    /* prefers sniff5 mode */
  BTA_DM_PM_SNIFF6 = 0x26,    /* prefers sniff6 mode */
  BTA_DM_PM_SNIFF7 = 0x27,    /* prefers sniff7 mode */
  BTA_DM_PM_SNIFF_USER0 =
      0x28, /* prefers user-defined sniff0 mode (testtool only) */
  BTA_DM_PM_SNIFF_USER1 =
      0x29, /* prefers user-defined sniff1 mode (testtool only) */
  BTA_DM_PM_ACTIVE = 0x40,  /* prefers active mode */
  BTA_DM_PM_RETRY = 0x80,   /* retry power mode based on current settings */
  BTA_DM_PM_SUSPEND = 0x04, /* prefers suspend mode */
  BTA_DM_PM_NO_PREF = 0x01, /* service has no preference on power mode setting.
                               eg. connection to \ service got closed */
};
typedef uint8_t tBTA_DM_PM_ACTION;

/* index to bta_dm_ssr_spec */
Loading