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

Commit ae0a072a authored by Chris Manton's avatar Chris Manton
Browse files

Simplify stack/acl/btm_acl::btm_acl_created()

Remove copy once/read never fields:
DEV_CLASS
BD_NAME

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id53d86f370777cc999c4a060aa99a87edd2eb08c
parent 9d29c7ea
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -112,9 +112,8 @@ typedef struct {
  friend void BTM_default_block_role_switch();
  friend void BTM_default_unblock_role_switch();
  friend void acl_set_disconnect_reason(uint8_t acl_disc_reason);
  friend void btm_acl_created(const RawAddress& bda, DEV_CLASS dc, BD_NAME bdn,
                              uint16_t hci_handle, uint8_t link_role,
                              tBT_TRANSPORT transport);
  friend void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
                              uint8_t link_role, tBT_TRANSPORT transport);
  friend void btm_acl_device_down(void);
  friend void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
                                     uint8_t encr_enable);
+2 −3
Original line number Diff line number Diff line
@@ -323,9 +323,8 @@ void btm_acl_process_sca_cmpl_pkt(uint8_t len, uint8_t* data) {
 * Returns          void
 *
 ******************************************************************************/
void btm_acl_created(const RawAddress& bda, DEV_CLASS dc, BD_NAME bdn,
                     uint16_t hci_handle, uint8_t link_role,
                     tBT_TRANSPORT transport) {
void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
                     uint8_t link_role, tBT_TRANSPORT transport) {
  tBTM_SEC_DEV_REC* p_dev_rec = NULL;
  tACL_CONN* p;
  uint8_t xx;
+0 −3
Original line number Diff line number Diff line
@@ -78,9 +78,6 @@ extern bool btm_inq_find_bdaddr(const RawAddress& p_bda);
 *******************************************
*/
extern void btm_acl_init(void);
extern void btm_acl_created(const RawAddress& bda, DEV_CLASS dc, BD_NAME bdn,
                            uint16_t hci_handle, uint8_t link_role,
                            tBT_TRANSPORT transport);
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);
+1 −2
Original line number Diff line number Diff line
@@ -3772,8 +3772,7 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
  btm_set_packet_types_from_address(bda, BT_TRANSPORT_BR_EDR,
                                    acl_get_supported_packet_types());

  btm_acl_created(bda, p_dev_rec->dev_class, p_dev_rec->sec_bd_name, handle,
                  HCI_ROLE_SLAVE, BT_TRANSPORT_BR_EDR);
  btm_acl_created(bda, handle, HCI_ROLE_SLAVE, BT_TRANSPORT_BR_EDR);

  /* Initialize security flags.  We need to do that because some            */
  /* authorization complete could have come after the connection is dropped */
+2 −3
Original line number Diff line number Diff line
@@ -343,6 +343,5 @@ void btm_acl_update_conn_addr(uint16_t conn_handle, const RawAddress& address);
 ******************************************************************************/
bool BTM_ReadPowerMode(const RawAddress& remote_bda, tBTM_PM_MODE* p_mode);

void acl_create_classic_connection(const RawAddress& bd_addr,
                                   bool there_are_high_priority_channels,
                                   bool is_bonding);
void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
                     uint8_t link_role, tBT_TRANSPORT transport);
Loading