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

Commit 0e907a58 authored by Myles Watson's avatar Myles Watson
Browse files

btm: Finish renaming SMP_AUTH_<GEN_>BOND

Test: build, grep for SMP_AUTH_GEN_BOND
Change-Id: Ic9e1950282a60e1d644d79291d9c0822ac6c973e
parent 8ec8b8c3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1548,8 +1548,8 @@ tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
    case BTM_BLE_SEC_ENCRYPT_NO_MITM:
    case BTM_BLE_SEC_ENCRYPT_MITM:
      auth_req = (sec_act == BTM_BLE_SEC_ENCRYPT_NO_MITM)
                     ? SMP_AUTH_GEN_BOND
                     : (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT);
                     ? SMP_AUTH_BOND
                     : (SMP_AUTH_BOND | SMP_AUTH_YN_BIT);
      btm_ble_link_sec_check(bd_addr, auth_req, &sec_req_act);
      if (sec_req_act == BTM_BLE_SEC_REQ_ACT_NONE ||
          sec_req_act == BTM_BLE_SEC_REQ_ACT_DISCARD) {
+1 −1
Original line number Diff line number Diff line
@@ -1580,7 +1580,7 @@ typedef uint8_t tBTM_LE_EVT;
typedef uint8_t tBTM_LE_KEY_TYPE;

#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */
#define BTM_LE_AUTH_REQ_BOND SMP_AUTH_GEN_BOND   /* 1 << 0 */
#define BTM_LE_AUTH_REQ_BOND SMP_AUTH_BOND       /* 1 << 0 */
#define BTM_LE_AUTH_REQ_MITM SMP_AUTH_YN_BIT     /* 1 << 2 */
typedef uint8_t tBTM_LE_AUTH_REQ;
#define BTM_LE_SC_SUPPORT_BIT SMP_SC_SUPPORT_BIT /* (1 << 3) */
+9 −13
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ enum { SMP_OOB_INVALID_TYPE, SMP_OOB_PEER, SMP_OOB_LOCAL, SMP_OOB_BOTH };
typedef uint8_t tSMP_OOB_DATA_TYPE;

#define SMP_AUTH_NO_BOND 0x00
#define SMP_AUTH_GEN_BOND 0x01  // todo sdh change GEN_BOND to BOND
#define SMP_AUTH_BOND 0x01

/* SMP Authentication requirement */
#define SMP_AUTH_YN_BIT (1 << 2)
@@ -131,10 +131,8 @@ typedef uint8_t tSMP_OOB_DATA_TYPE;
#define SMP_H7_SUPPORT_BIT (1 << 5)

#define SMP_AUTH_MASK                                                          \
  (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT | SMP_SC_SUPPORT_BIT | \
   SMP_KP_SUPPORT_BIT | SMP_H7_SUPPORT_BIT)

#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND
  (SMP_AUTH_BOND | SMP_AUTH_YN_BIT | SMP_SC_SUPPORT_BIT | SMP_KP_SUPPORT_BIT | \
   SMP_H7_SUPPORT_BIT)

/* no MITM, No Bonding, encryption only */
#define SMP_AUTH_NB_ENC_ONLY 0x00  //(SMP_AUTH_MASK | BTM_AUTH_SP_NO)
@@ -143,18 +141,17 @@ typedef uint8_t tSMP_OOB_DATA_TYPE;
#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT)

/* No MITM, General Bonding, Encryption only */
#define SMP_AUTH_GB_ENC_ONLY (SMP_AUTH_GEN_BOND)
#define SMP_AUTH_GB_ENC_ONLY SMP_AUTH_BOND

/* MITM, General Bonding, Use IO Capability to determine authentication
 * procedure */
#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT)
#define SMP_AUTH_GB_IOCAP (SMP_AUTH_BOND | SMP_AUTH_YN_BIT)

/* Secure Connections, no MITM, no Bonding */
#define SMP_AUTH_SC_ENC_ONLY (SMP_H7_SUPPORT_BIT | SMP_SC_SUPPORT_BIT)

/* Secure Connections, no MITM, Bonding */
#define SMP_AUTH_SC_GB \
  (SMP_H7_SUPPORT_BIT | SMP_SC_SUPPORT_BIT | SMP_AUTH_GEN_BOND)
#define SMP_AUTH_SC_GB (SMP_H7_SUPPORT_BIT | SMP_SC_SUPPORT_BIT | SMP_AUTH_BOND)

/* Secure Connections, MITM, no Bonding */
#define SMP_AUTH_SC_MITM_NB \
@@ -162,8 +159,7 @@ typedef uint8_t tSMP_OOB_DATA_TYPE;

/* Secure Connections, MITM, Bonding */
#define SMP_AUTH_SC_MITM_GB \
  (SMP_H7_SUPPORT_BIT | SMP_SC_SUPPORT_BIT | SMP_AUTH_YN_BIT | \
   SMP_AUTH_GEN_BOND)
  (SMP_H7_SUPPORT_BIT | SMP_SC_SUPPORT_BIT | SMP_AUTH_YN_BIT | SMP_AUTH_BOND)

/* All AuthReq RFU bits are set to 1 - NOTE: reserved bit in Bonding_Flags is
 * not set */