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

Commit 6859e5dc authored by Hansong Zhang's avatar Hansong Zhang
Browse files

no_smp_on_br is never true

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idea65ba2ce06532f6739c801136fad1526c7e000
parent 9ae5d227
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -414,7 +414,6 @@ void btm_consolidate_dev(tBTM_SEC_DEV_REC* p_target_rec) {

      p_target_rec->new_encryption_key_is_p256 =
          temp_rec.new_encryption_key_is_p256;
      p_target_rec->no_smp_on_br = temp_rec.no_smp_on_br;
      p_target_rec->bond_type = temp_rec.bond_type;

      /* remove the combined record */
+2 −6
Original line number Diff line number Diff line
@@ -3385,13 +3385,9 @@ void btm_sec_encrypt_change(uint16_t handle, uint8_t status,
        /* BR/EDR is encrypted with LK that can be used to derive LE LTK */
        p_dev_rec->new_encryption_key_is_p256 = false;

        if (p_dev_rec->no_smp_on_br) {
          BTM_TRACE_DEBUG("%s NO SM over BR/EDR", __func__);
        } else {
        BTM_TRACE_DEBUG("%s start SM over BR/EDR", __func__);
        SMP_BR_PairWith(p_dev_rec->bd_addr);
      }
      }
    } else {
      // BR/EDR is successfully encrypted. Correct LK type if needed
      // (BR/EDR LK derived from LE LTK was used for encryption)
+0 −3
Original line number Diff line number Diff line
@@ -447,9 +447,6 @@ typedef struct {
                                   ** Link encrypted with such LK can be used
                                   ** for SM over BR/EDR.
                                   */
  bool no_smp_on_br;        /* if set to true then SMP on BR/EDR doesn't */
                            /* work, i.e. link keys crosspairing */
                            /* SC BR/EDR->SC LE doesn't happen */
  tBTM_BOND_TYPE bond_type; /* peering bond type */

  tBTM_SEC_BLE ble;