Remove trace level and configurations for each subsystem

For a system like NFC it doesn't make sense to have different
trace/logging granularity for different functions. This patch removes
them.

Test: Boots, NFC Enable/Disable
Change-Id: Ifc8330566b1f46c1db5444318551977a6bd553ab
diff --git a/src/include/nfc_hal_int.h b/src/include/nfc_hal_int.h
index 2f99b92..99f3467 100644
--- a/src/include/nfc_hal_int.h
+++ b/src/include/nfc_hal_int.h
@@ -448,7 +448,6 @@
 
   uint8_t max_rf_credits; /* NFC Max RF data credits */
   uint8_t max_ee;         /* NFC Max number of NFCEE supported by NFCC */
-  uint8_t trace_level;    /* NFC HAL trace level */
 } tNFC_HAL_CB;
 
 /* Global NCI data */
diff --git a/src/include/nfc_hal_int_api.h b/src/include/nfc_hal_int_api.h
index e0408f1..6579c91 100644
--- a/src/include/nfc_hal_int_api.h
+++ b/src/include/nfc_hal_int_api.h
@@ -284,16 +284,4 @@
 *******************************************************************************/
 void HAL_NfcSetMaxRfDataCredits(uint8_t max_credits);
 
-/*******************************************************************************
-**
-** Function         HAL_NfcSetTraceLevel
-**
-** Description      This function sets the trace level for HAL.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t HAL_NfcSetTraceLevel(uint8_t new_level);
-
 #endif /* NFC_HAL_INT_API_H */
diff --git a/src/nfa/dm/nfa_dm_api.cc b/src/nfa/dm/nfa_dm_api.cc
index 25e9586..c674755 100644
--- a/src/nfa/dm/nfa_dm_api.cc
+++ b/src/nfa/dm/nfa_dm_api.cc
@@ -1286,21 +1286,6 @@
 
 /*******************************************************************************
 **
-** Function         NFA_SetTraceLevel
-**
-** Description      This function sets the trace level for NFA.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t NFA_SetTraceLevel(uint8_t new_level) {
-  if (new_level != 0xFF) nfa_sys_set_trace_level(new_level);
-
-  return (nfa_sys_cb.trace_level);
-}
-/*******************************************************************************
-**
 ** Function:        NFA_EnableDtamode
 **
 ** Description:     Enable DTA Mode
diff --git a/src/nfa/include/nfa_api.h b/src/nfa/include/nfa_api.h
index a69415e..79a5c16 100644
--- a/src/nfa/include/nfa_api.h
+++ b/src/nfa/include/nfa_api.h
@@ -1415,18 +1415,6 @@
                                         tNFA_VSC_CBACK* p_cback);
 
 /*******************************************************************************
-**
-** Function         NFA_SetTraceLevel
-**
-** Description      This function sets the trace level for NFA.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t NFA_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
 ** Function:        NFA_EnableDTA_TypeMode
 **
 ** Description:     Initialize and get global DTA type mode from .conf
diff --git a/src/nfa/include/nfa_p2p_api.h b/src/nfa/include/nfa_p2p_api.h
index 18cc6a6..49b9abd 100644
--- a/src/nfa/include/nfa_p2p_api.h
+++ b/src/nfa/include/nfa_p2p_api.h
@@ -556,16 +556,4 @@
                                  uint16_t* p_data_link_timeout,
                                  uint16_t* p_delay_first_pdu_timeout);
 
-/*******************************************************************************
-**
-** Function         NFA_P2pSetTraceLevel
-**
-** Description      This function sets the trace level for P2P.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t NFA_P2pSetTraceLevel(uint8_t new_level);
-
 #endif /* NFA_P2P_API_H */
diff --git a/src/nfa/include/nfa_p2p_int.h b/src/nfa/include/nfa_p2p_int.h
index 9d27914..9ed9e4b 100644
--- a/src/nfa/include/nfa_p2p_int.h
+++ b/src/nfa/include/nfa_p2p_int.h
@@ -31,7 +31,6 @@
 /*****************************************************************************
 **  Constants and data types
 *****************************************************************************/
-#define NFA_P2P_DEBUG BT_TRACE_VERBOSE
 
 /* NFA P2P LLCP link state */
 enum {
@@ -255,8 +254,6 @@
       total_pending_ui_pdu; /* total number of tx UI PDU not processed by NFA */
   uint8_t
       total_pending_i_pdu; /* total number of tx I PDU not processed by NFA */
-
-  uint8_t trace_level;
 } tNFA_P2P_CB;
 
 /*****************************************************************************
diff --git a/src/nfa/include/nfa_snep_api.h b/src/nfa/include/nfa_snep_api.h
index 604fff8..ca1dc07 100644
--- a/src/nfa/include/nfa_snep_api.h
+++ b/src/nfa/include/nfa_snep_api.h
@@ -467,16 +467,4 @@
 *******************************************************************************/
 extern tNFA_STATUS NFA_SnepDisconnect(tNFA_HANDLE conn_handle, bool flush);
 
-/*******************************************************************************
-**
-** Function         NFA_SnepSetTraceLevel
-**
-** Description      This function sets the trace level for SNEP.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t NFA_SnepSetTraceLevel(uint8_t new_level);
-
 #endif /* NFA_P2P_API_H */
diff --git a/src/nfa/include/nfa_snep_int.h b/src/nfa/include/nfa_snep_int.h
index d4db0aa..cff4710 100644
--- a/src/nfa/include/nfa_snep_int.h
+++ b/src/nfa/include/nfa_snep_int.h
@@ -197,7 +197,6 @@
   tNFA_SNEP_CONN conn[NFA_SNEP_MAX_CONN];
   bool listen_enabled;
   bool is_dta_mode;
-  uint8_t trace_level;
 } tNFA_SNEP_CB;
 
 /*
diff --git a/src/nfa/include/nfa_sys.h b/src/nfa/include/nfa_sys.h
index 4aa76d3..636d0b4 100644
--- a/src/nfa/include/nfa_sys.h
+++ b/src/nfa/include/nfa_sys.h
@@ -78,7 +78,6 @@
   uint16_t mbox_evt;   /* GKI mailbox event */
   uint8_t mbox;        /* GKI mailbox id */
   uint8_t timer;       /* GKI timer id */
-  uint8_t trace_level; /* initial trace level */
 } tNFA_SYS_CFG;
 
 /*****************************************************************************
@@ -100,7 +99,6 @@
 extern void nfa_sys_event(NFC_HDR* p_msg);
 extern void nfa_sys_timer_update(void);
 extern void nfa_sys_disable_timers(void);
-extern void nfa_sys_set_trace_level(uint8_t level);
 
 extern void nfa_sys_register(uint8_t id, const tNFA_SYS_REG* p_reg);
 extern void nfa_sys_deregister(uint8_t id);
diff --git a/src/nfa/include/nfa_sys_int.h b/src/nfa/include/nfa_sys_int.h
index c93b3f4..d4fc053 100644
--- a/src/nfa/include/nfa_sys_int.h
+++ b/src/nfa/include/nfa_sys_int.h
@@ -53,7 +53,6 @@
 
   bool graceful_disable; /* TRUE if NFA_Disable () is called with TRUE */
   bool timers_disabled;  /* TRUE if sys timers disabled */
-  uint8_t trace_level;   /* Trace level */
 } tNFA_SYS_CB;
 
 /*****************************************************************************
diff --git a/src/nfa/p2p/nfa_p2p_api.cc b/src/nfa/p2p/nfa_p2p_api.cc
index fc0ef4c..58efa37 100644
--- a/src/nfa/p2p/nfa_p2p_api.cc
+++ b/src/nfa/p2p/nfa_p2p_api.cc
@@ -1049,19 +1049,3 @@
       << StringPrintf("                       delay_first_pdu_timeout:%d",
                       *p_delay_first_pdu_timeout);
 }
-
-/*******************************************************************************
-**
-** Function         NFA_P2pSetTraceLevel
-**
-** Description      This function sets the trace level for P2P.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t NFA_P2pSetTraceLevel(uint8_t new_level) {
-  if (new_level != 0xFF) nfa_p2p_cb.trace_level = new_level;
-
-  return (nfa_p2p_cb.trace_level);
-}
diff --git a/src/nfa/p2p/nfa_p2p_main.cc b/src/nfa/p2p/nfa_p2p_main.cc
index 4f14f07..4e2fac4 100644
--- a/src/nfa/p2p/nfa_p2p_main.cc
+++ b/src/nfa/p2p/nfa_p2p_main.cc
@@ -475,7 +475,6 @@
   /* initialize control block */
   memset(&nfa_p2p_cb, 0, sizeof(tNFA_P2P_CB));
   nfa_p2p_cb.dm_disc_handle = NFA_HANDLE_INVALID;
-  nfa_p2p_cb.trace_level = APPL_INITIAL_TRACE_LEVEL;
 
   for (xx = 0; xx < LLCP_MAX_SDP_TRANSAC; xx++) {
     nfa_p2p_cb.sdp_cb[xx].local_sap = LLCP_INVALID_SAP;
diff --git a/src/nfa/sys/nfa_sys_cfg.cc b/src/nfa/sys/nfa_sys_cfg.cc
index 0c6a199..4f0d4dc 100644
--- a/src/nfa/sys/nfa_sys_cfg.cc
+++ b/src/nfa/sys/nfa_sys_cfg.cc
@@ -31,7 +31,6 @@
     NFA_MBOX_EVT_MASK,       /* GKI mailbox event */
     NFA_MBOX_ID,             /* GKI mailbox id */
     NFA_TIMER_ID,            /* GKI timer id */
-    APPL_INITIAL_TRACE_LEVEL /* initial trace level */
 };
 
 tNFA_SYS_CFG* p_nfa_sys_cfg = (tNFA_SYS_CFG*)&nfa_sys_cfg;
diff --git a/src/nfa/sys/nfa_sys_main.cc b/src/nfa/sys/nfa_sys_main.cc
index 8dcf242..c900471 100644
--- a/src/nfa/sys/nfa_sys_main.cc
+++ b/src/nfa/sys/nfa_sys_main.cc
@@ -53,7 +53,6 @@
   nfa_sys_cb.flags |= NFA_SYS_FL_INITIALIZED;
   nfa_sys_ptim_init(&nfa_sys_cb.ptim_cb, NFA_SYS_TIMER_PERIOD,
                     p_nfa_sys_cfg->timer);
-  nfa_sys_cb.trace_level = p_nfa_sys_cfg->trace_level;
 }
 
 /*******************************************************************************
@@ -364,14 +363,3 @@
 **
 *******************************************************************************/
 void nfa_sys_disable_timers(void) { nfa_sys_cb.timers_disabled = true; }
-
-/*******************************************************************************
-**
-** Function         nfa_sys_set_trace_level
-**
-** Description      Set trace level for BTA
-**
-** Returns          void
-**
-*******************************************************************************/
-void nfa_sys_set_trace_level(uint8_t level) { nfa_sys_cb.trace_level = level; }
diff --git a/src/nfc/include/ce_api.h b/src/nfc/include/ce_api.h
index 0432545..680493a 100644
--- a/src/nfc/include/ce_api.h
+++ b/src/nfc/include/ce_api.h
@@ -242,18 +242,4 @@
 extern tNFC_STATUS CE_SetActivatedTagType(tNFC_ACTIVATE_DEVT* p_activate_params,
                                           uint16_t t3t_system_code,
                                           tCE_CBACK* p_cback);
-
-/*******************************************************************************
-**
-** Function         CE_SetTraceLevel
-**
-** Description      This function sets the trace level for Card Emulation mode.
-**                  If called with a value of 0xFF,
-**                  it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t CE_SetTraceLevel(uint8_t new_level);
-
 #endif /* CE_API_H */
diff --git a/src/nfc/include/ce_int.h b/src/nfc/include/ce_int.h
index 70d7292..9ae7119 100644
--- a/src/nfc/include/ce_int.h
+++ b/src/nfc/include/ce_int.h
@@ -133,8 +133,6 @@
   uint16_t ndef_max; /* max size of p_ndef */
   uint16_t ndef_cur; /* current size of p_ndef */
   tNFC_RF_TECH tech;
-  uint8_t trace_level;
-
 } tCE_CB;
 
 /*
diff --git a/src/nfc/include/llcp_api.h b/src/nfc/include/llcp_api.h
index c2e4f51..84d2e56 100644
--- a/src/nfc/include/llcp_api.h
+++ b/src/nfc/include/llcp_api.h
@@ -658,18 +658,6 @@
 
 /*******************************************************************************
 **
-** Function         LLCP_SetTraceLevel
-**
-** Description      This function sets the trace level for LLCP.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-
-extern uint8_t LLCP_SetTraceLevel(uint8_t new_level);
-/*******************************************************************************
-**
 ** Function         LLCP_RegisterDtaCback
 **
 ** Description      Register callback function for LLCP DTA testing
diff --git a/src/nfc/include/llcp_int.h b/src/nfc/include/llcp_int.h
index 84f6617..19eacdb 100644
--- a/src/nfc/include/llcp_int.h
+++ b/src/nfc/include/llcp_int.h
@@ -217,8 +217,6 @@
 */
 
 typedef struct {
-  uint8_t trace_level; /* LLCP trace level                             */
-
   tLLCP_SDP_CB sdp_cb; /* SDP control block                            */
   tLLCP_LCB lcb;       /* LLCP link control block                      */
   tLLCP_APP_CB wks_cb[LLCP_MAX_WKS]; /* Application's registration for
diff --git a/src/nfc/include/nfc_api.h b/src/nfc/include/nfc_api.h
index d8b33cf..02401ec 100644
--- a/src/nfc/include/nfc_api.h
+++ b/src/nfc/include/nfc_api.h
@@ -1349,18 +1349,6 @@
 
 /*******************************************************************************
 **
-** Function         NFC_SetTraceLevel
-**
-** Description      This function sets the trace level for NFC.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t NFC_SetTraceLevel(uint8_t new_level);
-
-/*******************************************************************************
-**
 ** Function         NFC_ISODEPNakPresCheck
 **
 ** Description      This function is called to send the ISO DEP nak presence
diff --git a/src/nfc/include/nfc_int.h b/src/nfc/include/nfc_int.h
index 9c04fea..f8b013f 100644
--- a/src/nfc/include/nfc_int.h
+++ b/src/nfc/include/nfc_int.h
@@ -201,7 +201,6 @@
 
   tNFC_STATE nfc_state;
   bool reassembly; /* Reassemble fragmented data pkt */
-  uint8_t trace_level;
   uint8_t last_hdr[NFC_SAVED_HDR_SIZE]; /* part of last NCI command header */
   uint8_t last_cmd[NFC_SAVED_CMD_SIZE]; /* part of last NCI command payload */
   void* p_vsc_cback;       /* the callback function for last VSC command */
diff --git a/src/nfc/include/rw_api.h b/src/nfc/include/rw_api.h
index 301b14e..fb706e6 100644
--- a/src/nfc/include/rw_api.h
+++ b/src/nfc/include/rw_api.h
@@ -1339,18 +1339,4 @@
 *******************************************************************************/
 extern tNFC_STATUS RW_SetActivatedTagType(tNFC_ACTIVATE_DEVT* p_activate_params,
                                           tRW_CBACK* p_cback);
-
-/*******************************************************************************
-**
-** Function         RW_SetTraceLevel
-**
-** Description      This function sets the trace level for Reader/Writer mode.
-**                  If called with a value of 0xFF,
-**                  it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-extern uint8_t RW_SetTraceLevel(uint8_t new_level);
-
 #endif /* RW_API_H */
diff --git a/src/nfc/include/rw_int.h b/src/nfc/include/rw_int.h
index 0ccdd2d..5f8f062 100644
--- a/src/nfc/include/rw_int.h
+++ b/src/nfc/include/rw_int.h
@@ -713,7 +713,6 @@
 #if (RW_STATS_INCLUDED == TRUE)
   tRW_STATS stats;
 #endif /* RW_STATS_INCLUDED */
-  uint8_t trace_level;
 } tRW_CB;
 
 /*****************************************************************************
diff --git a/src/nfc/llcp/llcp_main.cc b/src/nfc/llcp/llcp_main.cc
index f755c5b..c1f4b94 100644
--- a/src/nfc/llcp/llcp_main.cc
+++ b/src/nfc/llcp/llcp_main.cc
@@ -170,19 +170,3 @@
       break;
   }
 }
-
-/*******************************************************************************
-**
-** Function         LLCP_SetTraceLevel
-**
-** Description      This function sets the trace level for LLCP.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t LLCP_SetTraceLevel(uint8_t new_level) {
-  if (new_level != 0xFF) llcp_cb.trace_level = new_level;
-
-  return (llcp_cb.trace_level);
-}
diff --git a/src/nfc/nfc/nfc_main.cc b/src/nfc/nfc/nfc_main.cc
index f50d86b..0a394ac 100644
--- a/src/nfc/nfc/nfc_main.cc
+++ b/src/nfc/nfc/nfc_main.cc
@@ -720,7 +720,6 @@
   nfc_cb.nci_wait_rsp_tout = NFC_CMD_CMPL_TIMEOUT;
   nfc_cb.p_disc_maps = nfc_interface_mapping;
   nfc_cb.num_disc_maps = NFC_NUM_INTERFACE_MAP;
-  nfc_cb.trace_level = NFC_INITIAL_TRACE_LEVEL;
   nfc_cb.nci_ctrl_size = NCI_CTRL_INIT_SIZE;
   nfc_cb.reassembly = true;
   nfc_cb.nci_version = NCI_VERSION_UNKNOWN;
@@ -1278,24 +1277,6 @@
 
 /*******************************************************************************
 **
-** Function         NFC_SetTraceLevel
-**
-** Description      This function sets the trace level for NFC.  If called with
-**                  a value of 0xFF, it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t NFC_SetTraceLevel(uint8_t new_level) {
-  NFC_TRACE_API1("NFC_SetTraceLevel () new_level = %d", new_level);
-
-  if (new_level != 0xFF) nfc_cb.trace_level = new_level;
-
-  return (nfc_cb.trace_level);
-}
-
-/*******************************************************************************
-**
 ** Function         NFC_GetNCIVersion
 **
 ** Description      Called by higher layer to get the current nci
diff --git a/src/nfc/nfc/nfc_task.cc b/src/nfc/nfc/nfc_task.cc
index fd4fe02..5cf0c0c 100644
--- a/src/nfc/nfc/nfc_task.cc
+++ b/src/nfc/nfc/nfc_task.cc
@@ -339,7 +339,6 @@
 
   /* Initialize the nfc control block */
   memset(&nfc_cb, 0, sizeof(tNFC_CB));
-  nfc_cb.trace_level = NFC_INITIAL_TRACE_LEVEL;
 
   DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf("NFC_TASK started.");
 
diff --git a/src/nfc/tags/ce_main.cc b/src/nfc/tags/ce_main.cc
index 63cacf4..c109d86 100644
--- a/src/nfc/tags/ce_main.cc
+++ b/src/nfc/tags/ce_main.cc
@@ -39,7 +39,6 @@
 *******************************************************************************/
 void ce_init(void) {
   memset(&ce_cb, 0, sizeof(tCE_CB));
-  ce_cb.trace_level = NFC_INITIAL_TRACE_LEVEL;
 
   /* Initialize tag-specific fields of ce control block */
   ce_t3t_init();
@@ -122,20 +121,3 @@
   }
   return status;
 }
-
-/*******************************************************************************
-**
-** Function         CE_SetTraceLevel
-**
-** Description      This function sets the trace level for Card Emulation mode.
-**                  If called with a value of 0xFF,
-**                  it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t CE_SetTraceLevel(uint8_t new_level) {
-  if (new_level != 0xFF) ce_cb.trace_level = new_level;
-
-  return (ce_cb.trace_level);
-}
diff --git a/src/nfc/tags/rw_main.cc b/src/nfc/tags/rw_main.cc
index 83e49ab..0eb5d8f 100644
--- a/src/nfc/tags/rw_main.cc
+++ b/src/nfc/tags/rw_main.cc
@@ -37,7 +37,6 @@
 *******************************************************************************/
 void rw_init(void) {
   memset(&rw_cb, 0, sizeof(tRW_CB));
-  rw_cb.trace_level = NFC_INITIAL_TRACE_LEVEL;
 }
 
 #if (RW_STATS_INCLUDED == TRUE)
@@ -257,20 +256,3 @@
   if (status != NFC_STATUS_OK) rw_cb.p_cback = NULL;
   return status;
 }
-
-/*******************************************************************************
-**
-** Function         RW_SetTraceLevel
-**
-** Description      This function sets the trace level for Reader/Writer mode.
-**                  If called with a value of 0xFF,
-**                  it simply returns the current trace level.
-**
-** Returns          The new or current trace level
-**
-*******************************************************************************/
-uint8_t RW_SetTraceLevel(uint8_t new_level) {
-  if (new_level != 0xFF) rw_cb.trace_level = new_level;
-
-  return (rw_cb.trace_level);
-}