OSDN Git Service

Remove always false TCS_INCLUDED macro & friends
authorZach Johnson <zachoverflow@google.com>
Mon, 20 Oct 2014 18:43:02 +0000 (11:43 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 16 Mar 2015 23:51:36 +0000 (16:51 -0700)
Referenced non existent headers, so would not compile if set to true.

include/bt_target.h
main/bte_init.c
stack/l2cap/l2c_main.c
stack/l2cap/l2c_utils.c

index 4741239..4fb0c84 100644 (file)
@@ -1179,26 +1179,6 @@ extern "C" {
 
 /******************************************************************************
 **
-** TCS
-**
-******************************************************************************/
-
-#ifndef TCS_INCLUDED
-#define TCS_INCLUDED                FALSE
-#endif
-
-/* To include/exclude point-to-multipoint broadcast SETUP configuration. */
-#ifndef TCS_BCST_SETUP_INCLUDED
-#define TCS_BCST_SETUP_INCLUDED     TRUE
-#endif
-
-/* To include/exclude WUG member role. */
-#ifndef TCS_WUG_MEMBER_INCLUDED
-#define TCS_WUG_MEMBER_INCLUDED     TRUE
-#endif
-
-/******************************************************************************
-**
 ** OBX
 **
 ******************************************************************************/
@@ -1522,31 +1502,6 @@ Note:  This pool needs to have enough buffers to hold two times the window size
 
 /******************************************************************************
 **
-** CTP
-**
-******************************************************************************/
-
-#ifndef CTP_INCLUDED
-#define CTP_INCLUDED                FALSE
-#endif
-
-/* The CTP discovery record size. */
-#ifndef CTP_DISC_REC_SIZE
-#define CTP_DISC_REC_SIZE           60
-#endif
-
-/******************************************************************************
-**
-** ICP
-**
-******************************************************************************/
-
-#ifndef ICP_INCLUDED
-#define ICP_INCLUDED                FALSE
-#endif
-
-/******************************************************************************
-**
 ** SPP
 **
 ******************************************************************************/
index 0fb0c73..ab58b2c 100644 (file)
 #include "port_api.h"
 #endif
 
-#if (defined(TCS_INCLUDED) && TCS_INCLUDED == TRUE)
-#include "tcs_api.h"
-#endif
-
 #if (defined(OBX_INCLUDED) && OBX_INCLUDED == TRUE)
 #include "obx_api.h"
 #endif
 #include "gap_api.h"
 #endif
 
-#if ((defined(CTP_INCLUDED) && CTP_INCLUDED == TRUE))
-#include "ctp_api.h"
-#endif
-
-#if ((defined(ICP_INCLUDED) && ICP_INCLUDED == TRUE))
-#include "icp_api.h"
-#endif
-
 #if (defined(SPP_INCLUDED) && SPP_INCLUDED == TRUE)
 #include "spp_api.h"
 #endif
@@ -332,23 +320,6 @@ void BTE_InitStack(void)
 
 #endif  /* RFCOMM Included */
 
-/*************************
-** TCS and its profiles **
-**************************/
-#if (defined(TCS_INCLUDED) && TCS_INCLUDED == TRUE)
-    TCS_Init();
-
-#if (defined(CTP_INCLUDED) && CTP_INCLUDED == TRUE)
-    CTP_Init();
-#endif /* CTP_INCLUDED */
-
-#if (defined(ICP_INCLUDED) && ICP_INCLUDED == TRUE)
-    ICP_Init();
-#endif /* ICP_INCLUDED */
-
-#endif /* TCS_INCLUDED */
-
-
 /**************************
 ** BNEP and its profiles **
 ***************************/
index 4ca28eb..caef05f 100755 (executable)
@@ -48,10 +48,6 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
 tL2C_CB l2cb;
 #endif
 
-/* Temporary - until l2cap implements group management */
-#if (TCS_BCST_SETUP_INCLUDED == TRUE && TCS_INCLUDED == TRUE)
-extern void tcs_proc_bcst_msg( BD_ADDR addr, BT_HDR *p_msg ) ;
-#endif
 /*******************************************************************************
 **
 ** Function         l2c_bcst_msg
@@ -230,16 +226,6 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
         /* process_connectionless_data (p_lcb); */
         STREAM_TO_UINT16 (psm, p);
         L2CAP_TRACE_DEBUG( "GOT CONNECTIONLESS DATA PSM:%d", psm ) ;
-#if (TCS_BCST_SETUP_INCLUDED == TRUE && TCS_INCLUDED == TRUE)
-        if (psm == TCS_PSM_INTERCOM || psm == TCS_PSM_CORDLESS)
-        {
-            p_msg->offset += L2CAP_BCST_OVERHEAD;
-            p_msg->len -= L2CAP_BCST_OVERHEAD;
-            tcs_proc_bcst_msg( p_lcb->remote_bd_addr, p_msg ) ;
-            GKI_freebuf (p_msg);
-        }
-        else
-#endif
 
 #if (L2CAP_UCD_INCLUDED == TRUE)
         /* if it is not broadcast, check UCD registration */
index 0dc2f8b..98697fc 100644 (file)
@@ -2206,10 +2206,6 @@ void l2cu_device_reset (void)
 #endif
 }
 
-#if (TCS_WUG_MEMBER_INCLUDED == TRUE && TCS_INCLUDED == TRUE)
-extern UINT16 tcs_wug_get_clk_offset( BD_ADDR addr ) ;
-#endif
-
 /*******************************************************************************
 **
 ** Function         l2cu_create_conn
@@ -2356,35 +2352,21 @@ BOOLEAN l2cu_create_conn_after_switch (tL2C_LCB *p_lcb)
 
     p_lcb->link_state = LST_CONNECTING;
 
-
-#if (TCS_WUG_MEMBER_INCLUDED == TRUE && TCS_INCLUDED == TRUE)
-    if ( (clock_offset = tcs_wug_get_clk_offset( p_lcb->remote_bd_addr )) != 0 )
+    /* Check with the BT manager if details about remote device are known */
+    if ((p_inq_info = BTM_InqDbRead(p_lcb->remote_bd_addr)) != NULL)
     {
-        page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R0;
-        page_scan_mode = HCI_MANDATARY_PAGE_SCAN_MODE;
+        page_scan_rep_mode = p_inq_info->results.page_scan_rep_mode;
+        page_scan_mode = p_inq_info->results.page_scan_mode;
+        clock_offset = (UINT16)(p_inq_info->results.clock_offset);
     }
     else
     {
-#endif
-
-        /* Check with the BT manager if details about remote device are known */
-        if ((p_inq_info = BTM_InqDbRead(p_lcb->remote_bd_addr)) != NULL)
-        {
-            page_scan_rep_mode = p_inq_info->results.page_scan_rep_mode;
-            page_scan_mode = p_inq_info->results.page_scan_mode;
-            clock_offset = (UINT16)(p_inq_info->results.clock_offset);
-        }
-        else
-        {
-            /* No info known. Use default settings */
-            page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R1;
-            page_scan_mode = HCI_MANDATARY_PAGE_SCAN_MODE;
+        /* No info known. Use default settings */
+        page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R1;
+        page_scan_mode = HCI_MANDATARY_PAGE_SCAN_MODE;
 
-            clock_offset = (p_dev_rec) ? p_dev_rec->clock_offset : 0;
-        }
-#if (TCS_WUG_MEMBER_INCLUDED == TRUE && TCS_INCLUDED == TRUE)
+        clock_offset = (p_dev_rec) ? p_dev_rec->clock_offset : 0;
     }
-#endif
 
     if (!btsnd_hcic_create_conn (p_lcb->remote_bd_addr,
                                  ( HCI_PKT_TYPES_MASK_DM1 | HCI_PKT_TYPES_MASK_DH1