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

Commit 1ce34dda authored by Sharvil Nanavati's avatar Sharvil Nanavati Committed by Andre Eisenbach
Browse files

Collapse RFCOMM_INCLUDED and GAP_INCLUDED guards.

Both of these features are always available in bluedroid.
parent 98813794
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1031,10 +1031,6 @@ extern "C" {
**
******************************************************************************/

#ifndef RFCOMM_INCLUDED
#define RFCOMM_INCLUDED             TRUE
#endif

/* The maximum number of ports supported. */
#ifndef MAX_RFC_PORTS
#define MAX_RFC_PORTS               30
@@ -1350,10 +1346,6 @@ extern "C" {
**
******************************************************************************/

#ifndef GAP_INCLUDED
#define GAP_INCLUDED                TRUE
#endif

/* keep the raw data received from SDP server in database. */
#ifndef SDP_RAW_DATA_INCLUDED
#define SDP_RAW_DATA_INCLUDED       TRUE
+0 −12
Original line number Diff line number Diff line
@@ -31,17 +31,13 @@
#endif

/* Include initialization functions definitions */
#if (defined(RFCOMM_INCLUDED) && RFCOMM_INCLUDED == TRUE)
#include "port_api.h"
#endif

#if (defined(BNEP_INCLUDED) && BNEP_INCLUDED == TRUE)
#include "bnep_api.h"
#endif

#if (defined(GAP_INCLUDED) && GAP_INCLUDED == TRUE)
#include "gap_api.h"
#endif

#if (defined(PAN_INCLUDED) && PAN_INCLUDED == TRUE)
#include "pan_api.h"
@@ -143,13 +139,7 @@ tBTA_JV_CB *bta_jv_cb_ptr = NULL;
void BTE_InitStack(void)
{
/* Initialize the optional stack components */

/****************************
** RFCOMM and its profiles **
*****************************/
#if (defined(RFCOMM_INCLUDED) && RFCOMM_INCLUDED == TRUE)
    RFCOMM_Init();
#endif  /* RFCOMM Included */

/**************************
** BNEP and its profiles **
@@ -179,9 +169,7 @@ void BTE_InitStack(void)
/***********
** Others **
************/
#if (defined(GAP_INCLUDED) && GAP_INCLUDED == TRUE)
    GAP_Init();
#endif  /* GAP Included */

#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
    HID_HostInit();
+0 −8
Original line number Diff line number Diff line
@@ -34,9 +34,7 @@
#include "osi/include/log.h"
#include "stack_config.h"

#if (RFCOMM_INCLUDED==TRUE)
#include "port_api.h"
#endif
#if (AVCT_INCLUDED==TRUE)
#include "avct_api.h"
#endif
@@ -56,9 +54,7 @@
#include "bnep_api.h"
#endif
#include "btm_api.h"
#if (GAP_INCLUDED==TRUE)
#include "gap_api.h"
#endif
#if (PAN_INCLUDED==TRUE)
#include "pan_api.h"
#endif
@@ -146,9 +142,7 @@ static uint8_t BTU_SetTraceLevel(uint8_t new_level);
static tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
  {BTTRC_ID_STK_BTU, BTTRC_ID_STK_HCI, BTU_SetTraceLevel, "TRC_HCI", DEFAULT_CONF_TRACE_LEVEL},
  {BTTRC_ID_STK_L2CAP, BTTRC_ID_STK_L2CAP, L2CA_SetTraceLevel, "TRC_L2CAP", DEFAULT_CONF_TRACE_LEVEL},
#if (RFCOMM_INCLUDED==TRUE)
  {BTTRC_ID_STK_RFCOMM, BTTRC_ID_STK_RFCOMM_DATA, PORT_SetTraceLevel, "TRC_RFCOMM", DEFAULT_CONF_TRACE_LEVEL},
#endif
#if (AVCT_INCLUDED==TRUE)
  //{BTTRC_ID_STK_AVCT, BTTRC_ID_STK_AVCT, NULL, "TRC_AVCT", DEFAULT_CONF_TRACE_LEVEL},
#endif
@@ -168,9 +162,7 @@ static tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
  {BTTRC_ID_STK_BNEP, BTTRC_ID_STK_BNEP, BNEP_SetTraceLevel, "TRC_BNEP", DEFAULT_CONF_TRACE_LEVEL},
#endif
  {BTTRC_ID_STK_BTM_ACL, BTTRC_ID_STK_BTM_SEC, BTM_SetTraceLevel, "TRC_BTM", DEFAULT_CONF_TRACE_LEVEL},
#if (GAP_INCLUDED==TRUE)
  {BTTRC_ID_STK_GAP, BTTRC_ID_STK_GAP, GAP_SetTraceLevel, "TRC_GAP", DEFAULT_CONF_TRACE_LEVEL},
#endif
#if (PAN_INCLUDED==TRUE)
  {BTTRC_ID_STK_PAN, BTTRC_ID_STK_PAN, PAN_SetTraceLevel, "TRC_PAN", DEFAULT_CONF_TRACE_LEVEL},
#endif
+0 −18
Original line number Diff line number Diff line
@@ -62,9 +62,7 @@ void btm_acl_init (void)
    BTM_TRACE_DEBUG ("btm_acl_init");
#if 0  /* cleared in btm_init; put back in if called from anywhere else! */
    memset (&btm_cb.acl_db, 0, sizeof (btm_cb.acl_db));
#if RFCOMM_INCLUDED == TRUE
    memset (btm_cb.btm_scn, 0, BTM_MAX_SCN);          /* Initialize the SCN usage to FALSE */
#endif
    btm_cb.btm_def_link_policy     = 0;
    btm_cb.p_bl_changed_cb         = NULL;
#endif
@@ -1594,7 +1592,6 @@ void btm_acl_role_changed (UINT8 hci_status, BD_ADDR bd_addr, UINT8 new_role)

}

#if (RFCOMM_INCLUDED==TRUE)
/*******************************************************************************
**
** Function         BTM_AllocateSCN
@@ -1674,21 +1671,6 @@ BOOLEAN BTM_FreeSCN(UINT8 scn)
        return(FALSE);      /* Illegal SCN passed in */
}

#else

/* Make dummy functions for the RPC to link against */
UINT8 BTM_AllocateSCN(void)
{
    return(0);
}

BOOLEAN BTM_FreeSCN(UINT8 scn)
{
    return(FALSE);
}

#endif

/*******************************************************************************
**
** Function         btm_set_packet_types
+0 −2
Original line number Diff line number Diff line
@@ -33,9 +33,7 @@
#include "btu.h"
#include "device/include/controller.h"
#include "hcimsgs.h"
#if (GAP_INCLUDED == TRUE)
#include "gap_api.h"
#endif

#if BLE_INCLUDED == TRUE
#include "l2c_int.h"
Loading