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

Commit 163dbe4b authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Make link supervision timeout as a constant

It's always 5 seconds.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: I98326987479e03e71e64d0748aa0e6b15951f12b
parent 7e896e4a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -326,7 +326,6 @@ void BTA_dm_on_hw_on() {
    get_btm_client_interface().security.BTM_SecRegister(&bta_security);
  }

  BTM_SetDefaultLinkSuperTout(p_bta_dm_cfg->link_timeout);
  BTM_WritePageTimeout(p_bta_dm_cfg->page_timeout);

#if (BLE_VND_INCLUDED == TRUE)
+0 −7
Original line number Diff line number Diff line
@@ -37,11 +37,6 @@
#define BTA_DM_PAGE_TIMEOUT 8192
#endif

/* link supervision timeout in 625uS (5 secs) */
#ifndef BTA_DM_LINK_TIMEOUT
#define BTA_DM_LINK_TIMEOUT 8000
#endif

/* TRUE to avoid scatternet when av is streaming (be the central) */
#ifndef BTA_DM_AVOID_SCATTER_A2DP
#define BTA_DM_AVOID_SCATTER_A2DP TRUE
@@ -60,8 +55,6 @@ const tBTA_DM_CFG bta_dm_cfg = {
    BTA_DM_COD,
    /* page timeout in 625uS */
    BTA_DM_PAGE_TIMEOUT,
    /* link supervision timeout in 625uS*/
    BTA_DM_LINK_TIMEOUT,
    /* true to avoid scatternet when av is streaming (be the central) */
    BTA_DM_AVOID_SCATTER_A2DP};

+0 −1
Original line number Diff line number Diff line
@@ -395,7 +395,6 @@ enum {
typedef struct {
  DEV_CLASS dev_class; /* local device class */
  uint16_t page_timeout; /* timeout for page in slots */
  uint16_t link_timeout; /* link supervision timeout in slots */
  bool avoid_scatter; /* true to avoid scatternet when av is streaming (be the
                         central) */

+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ void sACL_CONN::Reset() {
}

void sACL_CB::Init() {
  btm_def_link_super_tout = HCI_DEFAULT_INACT_TOUT;
  acl_disc_reason = HCI_ERR_UNDEFINED;

  btm_acl_pkt_types_supported =
+0 −6
Original line number Diff line number Diff line
@@ -397,7 +397,6 @@ struct sACL_CB {
                                      uint16_t max_lat, uint16_t min_rmt_to,
                                      uint16_t min_loc_to);
  friend uint16_t BTM_GetNumAclLinks(void);
  friend uint16_t acl_get_link_supervision_timeout();
  friend uint16_t acl_get_supported_packet_types();
  friend uint8_t btm_handle_to_acl_index(uint16_t hci_handle);
  friend void BTM_SetDefaultLinkSuperTout(uint16_t timeout);
@@ -425,7 +424,6 @@ struct sACL_CB {
  tBTM_ROLE_SWITCH_CMPL switch_role_ref_data;
  uint16_t btm_acl_pkt_types_supported;
  uint16_t btm_def_link_policy;
  uint16_t btm_def_link_super_tout;
  tHCI_STATUS acl_disc_reason;
  uint8_t pm_pend_link;

@@ -437,10 +435,6 @@ struct sACL_CB {
  void set_disconnect_reason(tHCI_STATUS reason) { acl_disc_reason = reason; }
  uint16_t DefaultPacketTypes() const { return btm_acl_pkt_types_supported; }
  uint16_t DefaultLinkPolicy() const { return btm_def_link_policy; }
  uint16_t DefaultSupervisorTimeout() const { return btm_def_link_super_tout; }
  void SetDefaultSupervisorTimeout(uint16_t timeout) {
    btm_def_link_super_tout = timeout;
  }

  tBTM_PM_RCB pm_reg_db[BTM_MAX_PM_RECORDS + 1]; /* per application/module */

Loading