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

Commit 20fff8ce authored by Chris Manton's avatar Chris Manton
Browse files

gd_acl_shim: Wrap remote version check

With gd the remote version information may not yet
be complete when smp calculates pairing
authentication requirements.

Bug: 166280067
Tag: #refactor
Test: Paired phones on le link

Change-Id: I4755b1f8475383fbced6fd3c7c4c3871d2c9e3b8
parent 1f27b5f7
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "btif_storage.h"
#include "device/include/interop.h"
#include "internal_include/bt_target.h"
#include "main/shim/shim.h"
#include "osi/include/log.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int.h"
@@ -174,6 +175,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
                remote_lmp_version);
          }

          if (!bluetooth::shim::is_gd_acl_enabled()) {
            if (!p_cb->secure_connections_only_mode_required &&
                (!(p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ||
                 remote_lmp_version < HCI_PROTO_VERSION_4_2 ||
@@ -188,6 +190,7 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
            if (remote_lmp_version < HCI_PROTO_VERSION_5_0) {
              p_cb->loc_auth_req &= ~SMP_H7_SUPPORT_BIT;
            }
          }

          LOG_DEBUG(
              "Remote request IO capabilities postcondition auth_req: 0x%02x,"