OSDN Git Service

L2cap: LE address type is not used
authorHansong Zhang <hsz@google.com>
Thu, 1 Oct 2020 07:03:59 +0000 (00:03 -0700)
committerHansong Zhang <hsz@google.com>
Fri, 2 Oct 2020 22:50:58 +0000 (15:50 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie13f6e7cda6feb23d25ae661abeb7221757e9da7

stack/l2cap/l2c_int.h
stack/l2cap/l2c_utils.cc

index d4e00a0..68eb905 100644 (file)
@@ -399,8 +399,6 @@ typedef struct t_l2c_linkcb {
   bool is_transport_br_edr() const { return transport == BT_TRANSPORT_BR_EDR; }
   bool is_transport_ble() const { return transport == BT_TRANSPORT_LE; }
 
-  uint8_t initiating_phys;  // LE PHY used for connection initiation
-  tBLE_ADDR_TYPE ble_addr_type;
   uint16_t tx_data_len; /* tx data length used in data length extension */
   fixed_queue_t* le_sec_pending_q; /* LE coc channels waiting for security check
                                       completion */
index 70221da..b1614dd 100644 (file)
@@ -1970,16 +1970,9 @@ bool l2cu_create_conn_le(tL2C_LCB* p_lcb) {
 /* This function initiates an acl connection to a LE device.
  * Returns true if request started successfully, false otherwise. */
 bool l2cu_create_conn_le(tL2C_LCB* p_lcb, uint8_t initiating_phys) {
-  tBT_DEVICE_TYPE dev_type;
-  tBLE_ADDR_TYPE addr_type;
-
-  BTM_ReadDevInfo(p_lcb->remote_bd_addr, &dev_type, &addr_type);
-
   if (!controller_get_interface()->supports_ble()) return false;
 
-  p_lcb->ble_addr_type = addr_type;
   p_lcb->transport = BT_TRANSPORT_LE;
-  p_lcb->initiating_phys = initiating_phys;
 
   return (l2cble_create_conn(p_lcb));
 }