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

Commit 00dc1073 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Don't set CT2 bit when talking to pre-5.0 devices

Prior to 5.0 spec, CT2 bit in AuthReq was reserved. Setting it cause
bonding failure with devices that handle it incorrectly.

Bug: 66179701
Bug: 66931978
Test: Bond with device that have 4.2 chip
Change-Id: Idbbf2c39c499698844218059a35cb686996c136a
parent 9ef4e95b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -174,6 +174,10 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
            p_cb->local_r_key &= ~SMP_SEC_KEY_TYPE_LK;
          }

          if (lmp_version_below(p_cb->pairing_bda, HCI_PROTO_VERSION_5_0)) {
            p_cb->loc_auth_req &= ~SMP_H7_SUPPORT_BIT;
          }

          SMP_TRACE_WARNING(
              "set auth_req: 0x%02x, local_i_key: 0x%02x, local_r_key: 0x%02x",
              p_cb->loc_auth_req, p_cb->local_i_key, p_cb->local_r_key);