OSDN Git Service

Restore Le transport for SetPhy function
authorChris Manton <cmanton@google.com>
Fri, 25 Sep 2020 19:53:32 +0000 (12:53 -0700)
committerChris Manton <cmanton@google.com>
Tue, 29 Sep 2020 15:24:04 +0000 (15:24 +0000)
Bug: 163134718
Tag: #refactor
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: I5952932176fdd1392142eb3a3df9e2f4f0e94dab

stack/btm/btm_ble.cc

index 8c8aa19..1ac7fa2 100644 (file)
@@ -805,7 +805,7 @@ void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
     return bluetooth::shim::BTM_BleSetPhy(bd_addr, tx_phys, rx_phys,
                                           phy_options);
   }
-  if (!BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR)) {
+  if (!BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
     BTM_TRACE_ERROR("%s: Wrong mode: no LE link exist or LE not supported",
                     __func__);
     return;
@@ -820,7 +820,7 @@ void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
       "= 0x%04x",
       __func__, all_phys, tx_phys, rx_phys, phy_options);
 
-  uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_BR_EDR);
+  uint16_t handle = acl_get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE);
 
   // checking if local controller supports it!
   if (!controller_get_interface()->supports_ble_2m_phy() &&