OSDN Git Service

Clean up L2cap usage of btm_int
authorHansong Zhang <hsz@google.com>
Wed, 26 Aug 2020 23:20:21 +0000 (16:20 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 27 Aug 2020 05:59:59 +0000 (22:59 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id79da6828e10ccdff25b8c7712a027815542c9ec

stack/acl/btm_acl.cc
stack/btm/btm_int.h
stack/include/acl_api.h
stack/include/l2cap_acl_interface.h
stack/l2cap/l2c_ble.cc
stack/l2cap/l2c_csm.cc
stack/l2cap/l2c_utils.cc

index b2f2a81..8f929f5 100644 (file)
@@ -2868,11 +2868,3 @@ void acl_write_automatic_flush_timeout(const RawAddress& bd_addr,
   btsnd_hcic_write_auto_flush_tout(p_acl->hci_handle, flush_timeout_in_ticks);
 }
 
-uint16_t acl_read_cached_automatic_flush_timeout(const RawAddress& bd_addr) {
-  tACL_CONN* p_acl = internal_.btm_bda_to_acl(bd_addr, BT_TRANSPORT_BR_EDR);
-  if (p_acl == nullptr) {
-    LOG_ERROR("%s Unknown peer ACL", __func__);
-    return HCI_DEFAULT_AUTOMATIC_FLUSH_TIMEOUT;
-  }
-  return p_acl->flush_timeout_in_ticks;
-}
index fc4c37c..bcae9f0 100644 (file)
@@ -78,7 +78,6 @@ extern bool btm_inq_find_bdaddr(const RawAddress& p_bda);
  *******************************************
 */
 extern void btm_acl_init(void);
-extern void btm_acl_removed(const RawAddress& bda, tBT_TRANSPORT transport);
 extern void btm_acl_device_down(void);
 extern void btm_acl_set_paging(bool value);
 extern void btm_acl_update_inquiry_status(uint8_t state);
index 322c11d..c349540 100644 (file)
@@ -331,6 +331,8 @@ bool BTM_ReadPowerMode(const RawAddress& remote_bda, tBTM_PM_MODE* p_mode);
 void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
                      uint8_t link_role, tBT_TRANSPORT transport);
 
+void btm_acl_removed(const RawAddress& bda, tBT_TRANSPORT transport);
+
 void acl_disconnect(const RawAddress& bd_addr, tBT_TRANSPORT transport,
                     uint8_t reason);
 
index 6f51edc..bc64163 100644 (file)
@@ -22,7 +22,6 @@
 
 // This header contains functions for L2cap-ACL to invoke
 //
-uint16_t acl_read_cached_automatic_flush_timeout(const RawAddress& bd_addr);
 void acl_accept_connection_request(const RawAddress& bd_addr, uint8_t role);
 void acl_create_classic_connection(const RawAddress& bd_addr,
                                    bool there_are_high_priority_channels,
index 3d7039a..75deabe 100644 (file)
@@ -26,7 +26,6 @@
 #include <base/strings/stringprintf.h>
 #include "bt_target.h"
 #include "bta_hearing_aid_api.h"
-#include "btm_int.h"
 #include "device/include/controller.h"
 #include "hcimsgs.h"
 #include "l2c_api.h"
index d40c342..33fa428 100644 (file)
 
 #include "bt_common.h"
 #include "bt_target.h"
-#include "btm_int.h"
 #include "common/time_util.h"
 #include "hcidefs.h"
-#include "hcimsgs.h"
 #include "l2c_int.h"
 #include "l2cdefs.h"
 #include "stack/btm/btm_sec.h"
index 1b9bfda..2125354 100644 (file)
 #include "bt_common.h"
 #include "bt_types.h"
 #include "btm_api.h"
-#include "btm_int.h"
 #include "device/include/controller.h"
 #include "hci/include/btsnoop.h"
 #include "hcidefs.h"
-#include "hcimsgs.h"
 #include "l2c_int.h"
 #include "l2cdefs.h"
 #include "osi/include/allocator.h"