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

Commit 327257fb authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Enable EATT when encryption is enabled on link" am: 72e96e31

parents f843e97d 72e96e31
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include "stack/btm/btm_int_types.h"
#include "stack/btm/security_device_record.h"
#include "stack/crypto_toolbox/crypto_toolbox.h"
#include "stack/eatt/eatt.h"
#include "stack/include/acl_api.h"
#include "stack/include/bt_octets.h"
#include "stack/include/bt_types.h"
@@ -1547,6 +1548,13 @@ void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
    else if (p_dev_rec->role_central)
      btm_sec_dev_rec_cback_event(p_dev_rec, BTM_ERR_PROCESSING, true);
  }

  if (encr_enable) {
    /* Link is encrypted, start EATT */
    bluetooth::eatt::EattExtension::GetInstance()->Connect(
        p_dev_rec->ble.pseudo_addr);
  }

  /* to notify GATT to send data if any request is pending */
  gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr);
}
+0 −7
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@
#include "osi/include/properties.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/security_device_record.h"
#include "stack/eatt/eatt.h"
#include "stack/include/acl_api.h"
#include "stack/include/acl_hci_link_interface.h"
#include "stack/include/btm_status.h"
@@ -4814,12 +4813,6 @@ void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec,
  }

  btm_sec_check_pending_reqs();

  if (btm_status == BTM_SUCCESS && is_le_transport) {
    /* Link is encrypted, start EATT */
    bluetooth::eatt::EattExtension::GetInstance()->Connect(
        p_dev_rec->ble.pseudo_addr);
  }
}

void btm_sec_cr_loc_oob_data_cback_event(const RawAddress& address,