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

Commit bce857ba authored by Hemant Gupta's avatar Hemant Gupta Committed by android-build-merger
Browse files

Merge "BLE: Don't set SC bit in AuthReq for Legacy Devices" am: c9a06de6

am: 8f195a52

Change-Id: I84b8fb11dbd5f82bc11405f0d4d5a9d78b7ab0da
parents 6ddd86dd 8f195a52
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -165,15 +165,17 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {

          p_cb->secure_connections_only_mode_required =
              (btm_cb.security_mode == BTM_SEC_MODE_SC) ? true : false;

          /* just for PTS, force SC bit */
          if (p_cb->secure_connections_only_mode_required) {
            p_cb->loc_auth_req |= SMP_SC_SUPPORT_BIT;
          }

          if (!(p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ||
          if (!p_cb->secure_connections_only_mode_required &&
              (!(p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ||
               lmp_version_below(p_cb->pairing_bda, HCI_PROTO_VERSION_4_2) ||
               interop_match_addr(INTEROP_DISABLE_LE_SECURE_CONNECTIONS,
                                 (const RawAddress*)&p_cb->pairing_bda)) {
                                  (const RawAddress*)&p_cb->pairing_bda))) {
            p_cb->loc_auth_req &= ~SMP_SC_SUPPORT_BIT;
            p_cb->loc_auth_req &= ~SMP_KP_SUPPORT_BIT;
            p_cb->local_i_key &= ~SMP_SEC_KEY_TYPE_LK;
            p_cb->local_r_key &= ~SMP_SEC_KEY_TYPE_LK;