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

Commit 8723ee4e authored by Chris Manton's avatar Chris Manton
Browse files

Prevent le links from setting packet types

stack/acl/btm_ac::btm_set_packet_types_from_address

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I738e5d12f320f6c10f8c57d10fd5b9a7bd65f08b
parent b0061b1e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1526,6 +1526,14 @@ tBTM_STATUS StackAclBtmAcl::btm_set_packet_types(tACL_CONN* p,
void btm_set_packet_types_from_address(const RawAddress& bd_addr,
                                       tBT_TRANSPORT transport,
                                       uint16_t pkt_types) {
  if (transport == BT_TRANSPORT_LE) {
    LOG_WARN("Unable to set packet types on le transport");
    return;
  }
  if (btm_pm_is_le_link(bd_addr)) {
    LOG_DEBUG("Unable to set packet types on provided le acl");
    return;
  }
  tACL_CONN* p_acl_cb = internal_.btm_bda_to_acl(bd_addr, transport);
  if (p_acl_cb == nullptr) {
    LOG_WARN("Unable to find active acl");