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

Commit e5805474 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Consolidate #defs BT_PSM_ am: 3c5babdc

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1533844

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6cba1e74bdff6b62f1806bfbfca4d8730df4f21f
parents 4219a938 3c5babdc
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -518,13 +518,13 @@ bool bta_jv_check_psm(uint16_t psm) {
    if (psm < 0x1001) {
      /* see if this is defined by spec */
      switch (psm) {
        case SDP_PSM:       /* 1 */
        case BT_PSM_SDP:
        case BT_PSM_RFCOMM: /* 3 */
          /* do not allow java app to use these 2 PSMs */
          break;

        case TCS_PSM_INTERCOM: /* 5 */
        case TCS_PSM_CORDLESS: /* 7 */
        case BT_PSM_TCS:
        case BT_PSM_CTP:
          if (!bta_sys_is_register(BTA_ID_CT) &&
              !bta_sys_is_register(BTA_ID_CG))
            ret = true;
@@ -534,8 +534,8 @@ bool bta_jv_check_psm(uint16_t psm) {
          if (!bta_sys_is_register(BTA_ID_PAN)) ret = true;
          break;

        case HID_PSM_CONTROL:   /* 0x11 */
        case HID_PSM_INTERRUPT: /* 0x13 */
        case BT_PSM_HIDC:
        case BT_PSM_HIDI:
          // FIX: allow HID Device and HID Host to coexist
          if (!bta_sys_is_register(BTA_ID_HD) ||
              !bta_sys_is_register(BTA_ID_HH))
+0 −2
Original line number Diff line number Diff line
@@ -238,9 +238,7 @@ enum : uint16_t {
  BT_PSM_SDP = 0x0001,
  BT_PSM_RFCOMM = 0x0003,
  BT_PSM_TCS = 0x0005,
  TCS_PSM_INTERCOM = 5,
  BT_PSM_CTP = 0x0007,
  TCS_PSM_CORDLESS = 7,
  BT_PSM_BNEP = 0x000F,
  BT_PSM_HIDC = 0x0011,
  HID_PSM_CONTROL = 0x0011,
+0 −3
Original line number Diff line number Diff line
@@ -46,9 +46,6 @@
#define SDP_DB_FULL 0xFFF4
#define SDP_CANCEL 0xFFF8

/* Define the PSM that SDP uses */
#define SDP_PSM 0x0001

/* Masks for attr_value field of tSDP_DISC_ATTR */
#define SDP_DISC_ATTR_LEN_MASK 0x0FFF
#define SDP_DISC_ATTR_TYPE(len_type) ((len_type) >> 12)
+2 −2
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ void sdp_init(void) {
  sdp_cb.reg_info.pL2CA_Error_Cb = sdp_on_l2cap_error;

  /* Now, register with L2CAP */
  if (!L2CA_Register2(SDP_PSM, sdp_cb.reg_info, true /* enable_snoop */,
  if (!L2CA_Register2(BT_PSM_SDP, sdp_cb.reg_info, true /* enable_snoop */,
                      nullptr, SDP_MTU_SIZE, 0, BTM_SEC_NONE)) {
    SDP_TRACE_ERROR("SDP Registration failed");
  }
@@ -343,7 +343,7 @@ tCONN_CB* sdp_conn_originate(const RawAddress& p_bd_addr) {
   */
  p_ccb->con_state = SDP_STATE_CONN_SETUP;

  cid = L2CA_ConnectReq2(SDP_PSM, p_bd_addr, BTM_SEC_NONE);
  cid = L2CA_ConnectReq2(BT_PSM_SDP, p_bd_addr, BTM_SEC_NONE);

  /* Check if L2CAP started the connection process */
  if (cid == 0) {