OSDN Git Service

Logging cleanup: L2CAP and SDP.
authorSharvil Nanavati <sharvil@google.com>
Sun, 4 May 2014 08:08:21 +0000 (01:08 -0700)
committerSharvil Nanavati <sharvil@google.com>
Thu, 19 Jun 2014 06:44:07 +0000 (06:44 +0000)
Change-Id: I62b5d4f330312dc466a758cb554952017f899696

15 files changed:
include/bt_trace.h
stack/l2cap/l2c_api.c
stack/l2cap/l2c_ble.c
stack/l2cap/l2c_csm.c
stack/l2cap/l2c_fcr.c
stack/l2cap/l2c_link.c
stack/l2cap/l2c_main.c
stack/l2cap/l2c_ucd.c
stack/l2cap/l2c_utils.c
stack/sdp/sdp_api.c
stack/sdp/sdp_db.c
stack/sdp/sdp_discovery.c
stack/sdp/sdp_main.c
stack/sdp/sdp_server.c
stack/sdp/sdp_utils.c

index 6f3687c..b9a76c8 100644 (file)
@@ -616,16 +616,16 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
 
 #if (BT_USE_TRACES == TRUE)
 
-#define BT_TRACE(l,t,...)                         LogMsg((TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | (t)), ##__VA_ARGS__)
-#define BT_ERROR_TRACE(l,...)                     LogMsg(TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | TRACE_TYPE_ERROR, ##__VA_ARGS__)
+#define BT_TRACE(l,t,...)                        LogMsg((TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | (t)), ##__VA_ARGS__)
+#define BT_ERROR_TRACE(l,...)                    LogMsg(TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | TRACE_TYPE_ERROR, ##__VA_ARGS__)
 
 /* Define tracing for the HCI unit
 */
 
-#define HCI_TRACE_ERROR(...)                   {if (btu_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_ERROR, ##__VA_ARGS__);}
-#define HCI_TRACE_WARNING(...)                 {if (btu_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_WARNING, ##__VA_ARGS__);}
-#define HCI_TRACE_EVENT(...)                   {if (btu_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_EVENT, ##__VA_ARGS__);}
-#define HCI_TRACE_DEBUG(...)                   {if (btu_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
+#define HCI_TRACE_ERROR(...)                     {if (btu_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_ERROR, ##__VA_ARGS__);}
+#define HCI_TRACE_WARNING(...)                   {if (btu_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_WARNING, ##__VA_ARGS__);}
+#define HCI_TRACE_EVENT(...)                     {if (btu_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_EVENT, ##__VA_ARGS__);}
+#define HCI_TRACE_DEBUG(...)                     {if (btu_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_HCI, TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
 
 
 /* Define tracing for BTM
@@ -639,129 +639,19 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
 
 /* Define tracing for the L2CAP unit
 */
-#define L2CAP_TRACE_ERROR0(m)                     {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m);}
-#define L2CAP_TRACE_ERROR1(m,p1)                  {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1);}
-#define L2CAP_TRACE_ERROR2(m,p1,p2)               {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1,p2);}
-#define L2CAP_TRACE_ERROR3(m,p1,p2,p3)            {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1,p2,p3);}
-#define L2CAP_TRACE_ERROR4(m,p1,p2,p3,p4)         {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4);}
-#define L2CAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)      {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5);}
-#define L2CAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5,p6);}
-
-#define L2CAP_TRACE_WARNING0(m)                   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m);}
-#define L2CAP_TRACE_WARNING1(m,p1)                {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1);}
-#define L2CAP_TRACE_WARNING2(m,p1,p2)             {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1,p2);}
-#define L2CAP_TRACE_WARNING3(m,p1,p2,p3)          {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1,p2,p3);}
-#define L2CAP_TRACE_WARNING4(m,p1,p2,p3,p4)       {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4);}
-#define L2CAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)    {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5);}
-#define L2CAP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5,p6);}
-
-#define L2CAP_TRACE_API0(m)                       {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m);}
-#define L2CAP_TRACE_API1(m,p1)                    {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1);}
-#define L2CAP_TRACE_API2(m,p1,p2)                 {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1,p2);}
-#define L2CAP_TRACE_API3(m,p1,p2,p3)              {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1,p2,p3);}
-#define L2CAP_TRACE_API4(m,p1,p2,p3,p4)           {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1,p2,p3,p4);}
-#define L2CAP_TRACE_API5(m,p1,p2,p3,p4,p5)        {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5);}
-#define L2CAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)     {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5,p6);}
-
-#define L2CAP_TRACE_EVENT0(m)                     {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m);}
-#define L2CAP_TRACE_EVENT1(m,p1)                  {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m, p1);}
-#define L2CAP_TRACE_EVENT2(m,p1,p2)               {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m,p1,p2);}
-#define L2CAP_TRACE_EVENT3(m,p1,p2,p3)            {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m,p1,p2,p3);}
-#define L2CAP_TRACE_EVENT4(m,p1,p2,p3,p4)         {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4);}
-#define L2CAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)      {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5);}
-#define L2CAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5,p6);}
-
-#define L2CAP_TRACE_DEBUG0(m)                     {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m);}
-#define L2CAP_TRACE_DEBUG1(m,p1)                  {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1);}
-#define L2CAP_TRACE_DEBUG2(m,p1,p2)               {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1,p2);}
-#define L2CAP_TRACE_DEBUG3(m,p1,p2,p3)            {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1,p2,p3);}
-#define L2CAP_TRACE_DEBUG4(m,p1,p2,p3,p4)         {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4);}
-#define L2CAP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)      {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5);}
-#define L2CAP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5,p6);}
-
-/* Define tracing for the LLCP unit
-*/
-#define LLCP_TRACE_ERROR0(m)                     {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m);}
-#define LLCP_TRACE_ERROR1(m,p1)                  {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1);}
-#define LLCP_TRACE_ERROR2(m,p1,p2)               {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1,p2);}
-#define LLCP_TRACE_ERROR3(m,p1,p2,p3)            {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1,p2,p3);}
-#define LLCP_TRACE_ERROR4(m,p1,p2,p3,p4)         {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4);}
-#define LLCP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)      {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5);}
-#define LLCP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)   {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5,p6);}
-
-#define LLCP_TRACE_WARNING0(m)                   {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m);}
-#define LLCP_TRACE_WARNING1(m,p1)                {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1);}
-#define LLCP_TRACE_WARNING2(m,p1,p2)             {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1,p2);}
-#define LLCP_TRACE_WARNING3(m,p1,p2,p3)          {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1,p2,p3);}
-#define LLCP_TRACE_WARNING4(m,p1,p2,p3,p4)       {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4);}
-#define LLCP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)    {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5);}
-#define LLCP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5,p6);}
-
-#define LLCP_TRACE_API0(m)                       {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m);}
-#define LLCP_TRACE_API1(m,p1)                    {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1);}
-#define LLCP_TRACE_API2(m,p1,p2)                 {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1,p2);}
-#define LLCP_TRACE_API3(m,p1,p2,p3)              {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1,p2,p3);}
-#define LLCP_TRACE_API4(m,p1,p2,p3,p4)           {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1,p2,p3,p4);}
-#define LLCP_TRACE_API5(m,p1,p2,p3,p4,p5)        {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5);}
-#define LLCP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)     {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5,p6);}
-
-#define LLCP_TRACE_EVENT0(m)                     {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m);}
-#define LLCP_TRACE_EVENT1(m,p1)                  {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m, p1);}
-#define LLCP_TRACE_EVENT2(m,p1,p2)               {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m,p1,p2);}
-#define LLCP_TRACE_EVENT3(m,p1,p2,p3)            {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m,p1,p2,p3);}
-#define LLCP_TRACE_EVENT4(m,p1,p2,p3,p4)         {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4);}
-#define LLCP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)      {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5);}
-#define LLCP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)   {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5,p6);}
-
-#define LLCP_TRACE_DEBUG0(m)                     {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m);}
-#define LLCP_TRACE_DEBUG1(m,p1)                  {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1);}
-#define LLCP_TRACE_DEBUG2(m,p1,p2)               {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1,p2);}
-#define LLCP_TRACE_DEBUG3(m,p1,p2,p3)            {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1,p2,p3);}
-#define LLCP_TRACE_DEBUG4(m,p1,p2,p3,p4)         {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4);}
-#define LLCP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)      {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5);}
-#define LLCP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)   {if (llcp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_LLCP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5,p6);}
+#define L2CAP_TRACE_ERROR(...)                   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_ERROR, ##__VA_ARGS__);}
+#define L2CAP_TRACE_WARNING(...)                 {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_WARNING, ##__VA_ARGS__);}
+#define L2CAP_TRACE_API(...)                     {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_API, ##__VA_ARGS__);}
+#define L2CAP_TRACE_EVENT(...)                   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_EVENT, ##__VA_ARGS__);}
+#define L2CAP_TRACE_DEBUG(...)                   {if (l2cb.l2cap_trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_L2CAP, TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
 
 /* Define tracing for the SDP unit
 */
-#define SDP_TRACE_ERROR0(m)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m);}
-#define SDP_TRACE_ERROR1(m,p1)                  {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1);}
-#define SDP_TRACE_ERROR2(m,p1,p2)               {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1,p2);}
-#define SDP_TRACE_ERROR3(m,p1,p2,p3)            {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1,p2,p3);}
-#define SDP_TRACE_ERROR4(m,p1,p2,p3,p4)         {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4);}
-#define SDP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)      {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5);}
-#define SDP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)   {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, m,p1,p2,p3,p4,p5,p6);}
-
-#define SDP_TRACE_WARNING0(m)                   {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m);}
-#define SDP_TRACE_WARNING1(m,p1)                {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1);}
-#define SDP_TRACE_WARNING2(m,p1,p2)             {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1,p2);}
-#define SDP_TRACE_WARNING3(m,p1,p2,p3)          {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1,p2,p3);}
-#define SDP_TRACE_WARNING4(m,p1,p2,p3,p4)       {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4);}
-#define SDP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)    {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5);}
-#define SDP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6) {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, m,p1,p2,p3,p4,p5,p6);}
-
-#define SDP_TRACE_API0(m)                       {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m);}
-#define SDP_TRACE_API1(m,p1)                    {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1);}
-#define SDP_TRACE_API2(m,p1,p2)                 {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1,p2);}
-#define SDP_TRACE_API3(m,p1,p2,p3)              {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1,p2,p3);}
-#define SDP_TRACE_API4(m,p1,p2,p3,p4)           {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1,p2,p3,p4);}
-#define SDP_TRACE_API5(m,p1,p2,p3,p4,p5)        {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5);}
-#define SDP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, m,p1,p2,p3,p4,p5,p6);}
-
-#define SDP_TRACE_EVENT0(m)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m);}
-#define SDP_TRACE_EVENT1(m,p1)                  {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m, p1);}
-#define SDP_TRACE_EVENT2(m,p1,p2)               {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m,p1,p2);}
-#define SDP_TRACE_EVENT3(m,p1,p2,p3)            {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m,p1,p2,p3);}
-#define SDP_TRACE_EVENT4(m,p1,p2,p3,p4)         {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4);}
-#define SDP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)      {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5);}
-#define SDP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)   {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, m,p1,p2,p3,p4,p5,p6);}
-
-#define SDP_TRACE_DEBUG0(m)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m);}
-#define SDP_TRACE_DEBUG1(m,p1)                  {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1);}
-#define SDP_TRACE_DEBUG2(m,p1,p2)               {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1,p2);}
-#define SDP_TRACE_DEBUG3(m,p1,p2,p3)            {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1,p2,p3);}
-#define SDP_TRACE_DEBUG4(m,p1,p2,p3,p4)         {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4);}
-#define SDP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)      {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5);}
-#define SDP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)   {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, m,p1,p2,p3,p4,p5,p6);}
+#define SDP_TRACE_ERROR(...)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_ERROR) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_ERROR, ##__VA_ARGS__);}
+#define SDP_TRACE_WARNING(...)                   {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_WARNING) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_WARNING, ##__VA_ARGS__);}
+#define SDP_TRACE_API(...)                       {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_API) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_API, ##__VA_ARGS__);}
+#define SDP_TRACE_EVENT(...)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_EVENT) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_EVENT, ##__VA_ARGS__);}
+#define SDP_TRACE_DEBUG(...)                     {if (sdp_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) BT_TRACE(TRACE_LAYER_SDP, TRACE_TYPE_DEBUG, ##__VA_ARGS__);}
 
 /* Define tracing for the RFCOMM unit
 */
@@ -2492,129 +2382,19 @@ EXPORT_API extern void BTTRC_StackTrace6(tBTTRC_LAYER_ID layer_id,
 
 /* Define tracing for the L2CAP unit
 */
-#define L2CAP_TRACE_ERROR0(m)
-#define L2CAP_TRACE_ERROR1(m,p1)
-#define L2CAP_TRACE_ERROR2(m,p1,p2)
-#define L2CAP_TRACE_ERROR3(m,p1,p2,p3)
-#define L2CAP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_WARNING0(m)
-#define L2CAP_TRACE_WARNING1(m,p1)
-#define L2CAP_TRACE_WARNING2(m,p1,p2)
-#define L2CAP_TRACE_WARNING3(m,p1,p2,p3)
-#define L2CAP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_API0(m)
-#define L2CAP_TRACE_API1(m,p1)
-#define L2CAP_TRACE_API2(m,p1,p2)
-#define L2CAP_TRACE_API3(m,p1,p2,p3)
-#define L2CAP_TRACE_API4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_EVENT0(m)
-#define L2CAP_TRACE_EVENT1(m,p1)
-#define L2CAP_TRACE_EVENT2(m,p1,p2)
-#define L2CAP_TRACE_EVENT3(m,p1,p2,p3)
-#define L2CAP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define L2CAP_TRACE_DEBUG0(m)
-#define L2CAP_TRACE_DEBUG1(m,p1)
-#define L2CAP_TRACE_DEBUG2(m,p1,p2)
-#define L2CAP_TRACE_DEBUG3(m,p1,p2,p3)
-#define L2CAP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define L2CAP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define L2CAP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
-
-/* Define tracing for the LLCP unit
-*/
-#define LLCP_TRACE_ERROR0(m)
-#define LLCP_TRACE_ERROR1(m,p1)
-#define LLCP_TRACE_ERROR2(m,p1,p2)
-#define LLCP_TRACE_ERROR3(m,p1,p2,p3)
-#define LLCP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_WARNING0(m)
-#define LLCP_TRACE_WARNING1(m,p1)
-#define LLCP_TRACE_WARNING2(m,p1,p2)
-#define LLCP_TRACE_WARNING3(m,p1,p2,p3)
-#define LLCP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_API0(m)
-#define LLCP_TRACE_API1(m,p1)
-#define LLCP_TRACE_API2(m,p1,p2)
-#define LLCP_TRACE_API3(m,p1,p2,p3)
-#define LLCP_TRACE_API4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_EVENT0(m)
-#define LLCP_TRACE_EVENT1(m,p1)
-#define LLCP_TRACE_EVENT2(m,p1,p2)
-#define LLCP_TRACE_EVENT3(m,p1,p2,p3)
-#define LLCP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define LLCP_TRACE_DEBUG0(m)
-#define LLCP_TRACE_DEBUG1(m,p1)
-#define LLCP_TRACE_DEBUG2(m,p1,p2)
-#define LLCP_TRACE_DEBUG3(m,p1,p2,p3)
-#define LLCP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define LLCP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define LLCP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define L2CAP_TRACE_ERROR(...)
+#define L2CAP_TRACE_WARNING(...)
+#define L2CAP_TRACE_API(...)
+#define L2CAP_TRACE_EVENT(...)
+#define L2CAP_TRACE_DEBUG(...)
 
 /* Define tracing for the SDP unit
 */
-#define SDP_TRACE_ERROR0(m)
-#define SDP_TRACE_ERROR1(m,p1)
-#define SDP_TRACE_ERROR2(m,p1,p2)
-#define SDP_TRACE_ERROR3(m,p1,p2,p3)
-#define SDP_TRACE_ERROR4(m,p1,p2,p3,p4)
-#define SDP_TRACE_ERROR5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_ERROR6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_WARNING0(m)
-#define SDP_TRACE_WARNING1(m,p1)
-#define SDP_TRACE_WARNING2(m,p1,p2)
-#define SDP_TRACE_WARNING3(m,p1,p2,p3)
-#define SDP_TRACE_WARNING4(m,p1,p2,p3,p4)
-#define SDP_TRACE_WARNING5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_WARNING6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_API0(m)
-#define SDP_TRACE_API1(m,p1)
-#define SDP_TRACE_API2(m,p1,p2)
-#define SDP_TRACE_API3(m,p1,p2,p3)
-#define SDP_TRACE_API4(m,p1,p2,p3,p4)
-#define SDP_TRACE_API5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_API6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_EVENT0(m)
-#define SDP_TRACE_EVENT1(m,p1)
-#define SDP_TRACE_EVENT2(m,p1,p2)
-#define SDP_TRACE_EVENT3(m,p1,p2,p3)
-#define SDP_TRACE_EVENT4(m,p1,p2,p3,p4)
-#define SDP_TRACE_EVENT5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_EVENT6(m,p1,p2,p3,p4,p5,p6)
-
-#define SDP_TRACE_DEBUG0(m)
-#define SDP_TRACE_DEBUG1(m,p1)
-#define SDP_TRACE_DEBUG2(m,p1,p2)
-#define SDP_TRACE_DEBUG3(m,p1,p2,p3)
-#define SDP_TRACE_DEBUG4(m,p1,p2,p3,p4)
-#define SDP_TRACE_DEBUG5(m,p1,p2,p3,p4,p5)
-#define SDP_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6)
+#define SDP_TRACE_ERROR(...)
+#define SDP_TRACE_WARNING(...)
+#define SDP_TRACE_API(...)
+#define SDP_TRACE_EVENT(...)
+#define SDP_TRACE_DEBUG(...)
 
 /* Define tracing for the RFCOMM unit
 */
index 338a7cd..c542a0d 100644 (file)
@@ -54,7 +54,7 @@ UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
     tL2C_RCB    *p_rcb;
     UINT16      vpsm = psm;
 
-    L2CAP_TRACE_API1 ("L2CAP - L2CA_Register() called for PSM: 0x%04x", psm);
+    L2CAP_TRACE_API ("L2CAP - L2CA_Register() called for PSM: 0x%04x", psm);
 
     /* Verify that the required callback info has been filled in
     **      Note:  Connection callbacks are required but not checked
@@ -66,14 +66,14 @@ UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
      || (!p_cb_info->pL2CA_DataInd_Cb)
      || (!p_cb_info->pL2CA_DisconnectInd_Cb))
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - no cb registering PSM: 0x%04x", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - no cb registering PSM: 0x%04x", psm);
         return (0);
     }
 
     /* Verify PSM is valid */
     if (L2C_INVALID_PSM(psm))
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - invalid PSM value, PSM: 0x%04x", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - invalid PSM value, PSM: 0x%04x", psm);
         return (0);
     }
 
@@ -87,7 +87,7 @@ UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
                 break;
         }
 
-        L2CAP_TRACE_API2 ("L2CA_Register - Real PSM: 0x%04x  Virtual PSM: 0x%04x", psm, vpsm);
+        L2CAP_TRACE_API ("L2CA_Register - Real PSM: 0x%04x  Virtual PSM: 0x%04x", psm, vpsm);
     }
 
     /* If registration block already there, just overwrite it */
@@ -95,7 +95,7 @@ UINT16 L2CA_Register (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info)
     {
         if ((p_rcb = l2cu_allocate_rcb (vpsm)) == NULL)
         {
-            L2CAP_TRACE_WARNING2 ("L2CAP - no RCB available, PSM: 0x%04x  vPSM: 0x%04x", psm, vpsm);
+            L2CAP_TRACE_WARNING ("L2CAP - no RCB available, PSM: 0x%04x  vPSM: 0x%04x", psm, vpsm);
             return (0);
         }
     }
@@ -125,7 +125,7 @@ void L2CA_Deregister (UINT16 psm)
     tL2C_LCB    *p_lcb;
     int         ii;
 
-    L2CAP_TRACE_API1 ("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm);
+    L2CAP_TRACE_API ("L2CAP - L2CA_Deregister() called for PSM: 0x%04x", psm);
 
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) != NULL)
     {
@@ -151,7 +151,7 @@ void L2CA_Deregister (UINT16 psm)
     }
     else
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - PSM: 0x%04x not found for deregistration", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - PSM: 0x%04x not found for deregistration", psm);
     }
 }
 
@@ -170,7 +170,7 @@ UINT16 L2CA_AllocatePSM(void)
     BOOLEAN done = FALSE;
     UINT16 psm = l2cb.dyn_psm;
 
-    L2CAP_TRACE_API0( "L2CA_AllocatePSM");
+    L2CAP_TRACE_API( "L2CA_AllocatePSM");
     while (!done)
     {
         psm += 2;
@@ -236,8 +236,7 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
     tL2C_CCB        *p_ccb;
     tL2C_RCB        *p_rcb;
 
-    L2CAP_TRACE_API6 ("L2CA_ErtmConnectReq()  PSM: 0x%04x  BDA: %08x%04x  p_ertm_info"
-                      ": 0x%08x allowed:0x%x preferred:%d", psm,
+    L2CAP_TRACE_API ("L2CA_ErtmConnectReq()  PSM: 0x%04x  BDA: %08x%04x  p_ertm_info: 0x%08x allowed:0x%x preferred:%d", psm,
                       (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
                       (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info,
                       (p_ertm_info) ? p_ertm_info->allowed_modes : 0,
@@ -246,13 +245,13 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
     /* Fail if we have not established communications with the controller */
     if (!BTM_IsDeviceUp())
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP connect req - BTU not ready");
+        L2CAP_TRACE_WARNING ("L2CAP connect req - BTU not ready");
         return (0);
     }
     /* Fail if the PSM is not registered */
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no RCB for L2CA_conn_req, PSM: 0x%04x", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_conn_req, PSM: 0x%04x", psm);
         return (0);
     }
 
@@ -265,8 +264,7 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
              /* currently use BR/EDR for ERTM mode l2cap connection */
          ||  (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE) )
         {
-            L2CAP_TRACE_WARNING2 ("L2CAP - conn not started for PSM: 0x%04x  p_lcb: 0x%08x",
-                                psm, p_lcb);
+            L2CAP_TRACE_WARNING ("L2CAP - conn not started for PSM: 0x%04x  p_lcb: 0x%08x", psm, p_lcb);
             return (0);
         }
     }
@@ -274,7 +272,7 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
     /* Allocate a channel control block */
     if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_conn_req, PSM: 0x%04x", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_conn_req, PSM: 0x%04x", psm);
         return (0);
     }
 
@@ -316,14 +314,13 @@ UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_e
      */
     else if (p_lcb->link_state == LST_DISCONNECTING)
     {
-        L2CAP_TRACE_DEBUG0 ("L2CAP API - link disconnecting: RETRY LATER");
+        L2CAP_TRACE_DEBUG ("L2CAP API - link disconnecting: RETRY LATER");
 
         /* Save ccb so it can be started after disconnect is finished */
         p_lcb->p_pending_ccb = p_ccb;
     }
 
-    L2CAP_TRACE_API2 ("L2CAP - L2CA_conn_req(psm: 0x%04x) returned CID: 0x%04x",
-        psm, p_ccb->local_cid);
+    L2CAP_TRACE_API ("L2CAP - L2CA_conn_req(psm: 0x%04x) returned CID: 0x%04x", psm, p_ccb->local_cid);
 
     /* Return the local CID as our handle */
     return (p_ccb->local_cid);
@@ -365,8 +362,7 @@ BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 re
     tL2C_LCB        *p_lcb;
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API6 ("L2CA_ErtmConnectRsp()  CID: 0x%04x  Result: %d  Status: %d  BDA: %08x%04x"
-                       " p_ertm_info:0x%08x",
+    L2CAP_TRACE_API ("L2CA_ErtmConnectRsp()  CID: 0x%04x  Result: %d  Status: %d  BDA: %08x%04x  p_ertm_info:0x%08x",
                       lcid, result, status,
                       (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
                       (p_bd_addr[4]<<8)+p_bd_addr[5], p_ertm_info);
@@ -375,21 +371,21 @@ BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 re
     if ((p_lcb = l2cu_find_lcb_by_bd_addr (p_bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
     {
         /* No link. Get an LCB and start link establishment */
-        L2CAP_TRACE_WARNING0 ("L2CAP - no LCB for L2CA_conn_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no LCB for L2CA_conn_rsp");
         return (FALSE);
     }
 
     /* Now, find the channel control block */
     if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, lcid)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no CCB for L2CA_conn_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_conn_rsp");
         return (FALSE);
     }
 
     /* The IDs must match */
     if (p_ccb->remote_id != id)
     {
-        L2CAP_TRACE_WARNING2 ("L2CAP - bad id in L2CA_conn_rsp. Exp: %d  Got: %d", p_ccb->remote_id, id);
+        L2CAP_TRACE_WARNING ("L2CAP - bad id in L2CA_conn_rsp. Exp: %d  Got: %d", p_ccb->remote_id, id);
         return (FALSE);
     }
 
@@ -449,13 +445,13 @@ BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API5 ("L2CA_ConfigReq()  CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
+    L2CAP_TRACE_API ("L2CA_ConfigReq()  CID 0x%04x: fcr_present:%d (mode %d) mtu_present:%d (%d)",
         cid, p_cfg->fcr_present, p_cfg->fcr.mode, p_cfg->mtu_present, p_cfg->mtu);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_cfg_req, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_cfg_req, CID: %d", cid);
         return (FALSE);
     }
 
@@ -472,7 +468,7 @@ BOOLEAN L2CA_ConfigReq (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
 
         if ( (p_cfg->mtu_present) && (p_cfg->mtu > L2CAP_MTU_SIZE) )
         {
-            L2CAP_TRACE_WARNING1 ("L2CAP - adjust MTU: %u too large", p_cfg->mtu);
+            L2CAP_TRACE_WARNING ("L2CAP - adjust MTU: %u too large", p_cfg->mtu);
             p_cfg->mtu = L2CAP_MTU_SIZE;
         }
     }
@@ -500,13 +496,13 @@ BOOLEAN L2CA_ConfigRsp (UINT16 cid, tL2CAP_CFG_INFO *p_cfg)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API6 ("L2CA_ConfigRsp()  CID: 0x%04x  Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
+    L2CAP_TRACE_API ("L2CA_ConfigRsp()  CID: 0x%04x  Result: %d MTU present:%d Flush TO:%d FCR:%d FCS:%d",
         cid, p_cfg->result, p_cfg->mtu_present, p_cfg->flush_to_present, p_cfg->fcr_present, p_cfg->fcs_present);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_cfg_rsp, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_cfg_rsp, CID: %d", cid);
         return (FALSE);
     }
 
@@ -544,12 +540,12 @@ BOOLEAN L2CA_DisconnectReq (UINT16 cid)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API1 ("L2CA_DisconnectReq()  CID: 0x%04x", cid);
+    L2CAP_TRACE_API ("L2CA_DisconnectReq()  CID: 0x%04x", cid);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_disc_req, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_disc_req, CID: %d", cid);
         return (FALSE);
     }
 
@@ -572,12 +568,12 @@ BOOLEAN L2CA_DisconnectRsp (UINT16 cid)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API1 ("L2CA_DisconnectRsp()  CID: 0x%04x", cid);
+    L2CAP_TRACE_API ("L2CA_DisconnectRsp()  CID: 0x%04x", cid);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_disc_rsp, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_disc_rsp, CID: %d", cid);
         return (FALSE);
     }
 
@@ -599,7 +595,7 @@ BOOLEAN  L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_callback)
 {
     tL2C_LCB        *p_lcb;
 
-    L2CAP_TRACE_API6 ("L2CA_Ping()  BDA: %02x-%02x-%02x-%02x-%02x-%02x",
+    L2CAP_TRACE_API ("L2CA_Ping()  BDA: %02x-%02x-%02x-%02x-%02x-%02x",
                       p_bd_addr[0], p_bd_addr[1], p_bd_addr[2], p_bd_addr[3], p_bd_addr[4], p_bd_addr[5]);
 
     /* Fail if we have not established communications with the controller */
@@ -612,7 +608,7 @@ BOOLEAN  L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_callback)
         /* No link. Get an LCB and start link establishment */
         if ((p_lcb = l2cu_allocate_lcb (p_bd_addr, FALSE, BT_TRANSPORT_BR_EDR)) == NULL)
         {
-            L2CAP_TRACE_WARNING0 ("L2CAP - no LCB for L2CA_ping");
+            L2CAP_TRACE_WARNING ("L2CAP - no LCB for L2CA_ping");
             return (FALSE);
         }
         if (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE)
@@ -628,14 +624,14 @@ BOOLEAN  L2CA_Ping (BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_callback)
     /* We only allow 1 ping outstanding at a time */
     if (p_lcb->p_echo_rsp_cb != NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - rejected second L2CA_ping");
+        L2CAP_TRACE_WARNING ("L2CAP - rejected second L2CA_ping");
         return (FALSE);
     }
 
     /* Have a link control block. If link is disconnecting, tell user to retry later */
     if (p_lcb->link_state == LST_DISCONNECTING)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - L2CA_ping rejected - link disconnecting");
+        L2CAP_TRACE_WARNING ("L2CAP - L2CA_ping rejected - link disconnecting");
         return (FALSE);
     }
 
@@ -667,7 +663,7 @@ BOOLEAN  L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
     tL2C_LCB    *p_lcb;
     UINT8       *pp;
 
-    L2CAP_TRACE_API2 ("L2CA_Echo() BDA: %08X%04X",
+    L2CAP_TRACE_API ("L2CA_Echo() BDA: %08X%04X",
             ((p_bd_addr[0] << 24) + (p_bd_addr[1] << 16) + (p_bd_addr[2] <<  8) + (p_bd_addr[3])),
             ((p_bd_addr[4] <<  8) + (p_bd_addr[5])));
 
@@ -685,13 +681,13 @@ BOOLEAN  L2CA_Echo (BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_cal
     /* We assume the upper layer will call this function only when the link is established. */
     if ((p_lcb = l2cu_find_lcb_by_bd_addr (p_bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
     {
-        L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link not established");
+        L2CAP_TRACE_ERROR ("L2CA_Echo ERROR : link not established");
         return FALSE;
     }
 
     if (p_lcb->link_state != LST_CONNECTED)
     {
-        L2CAP_TRACE_ERROR0 ("L2CA_Echo ERROR : link is not connected");
+        L2CAP_TRACE_ERROR ("L2CA_Echo ERROR : link is not connected");
         return FALSE;
     }
 
@@ -740,7 +736,7 @@ BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global)
         /* Find the channel control block. We don't know the link it is on. */
         if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
         {
-            L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_SetIdleTimeout, CID: %d", cid);
+            L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_SetIdleTimeout, CID: %d", cid);
             return (FALSE);
         }
 
@@ -840,7 +836,7 @@ UINT8 L2CA_SetTraceLevel (UINT8 new_level)
 *******************************************************************************/
 UINT8 L2CA_SetDesireRole (UINT8 new_role)
 {
-    L2CAP_TRACE_API2 ("L2CA_SetDesireRole() new:x%x, disallow_switch:%d",
+    L2CAP_TRACE_API ("L2CA_SetDesireRole() new:x%x, disallow_switch:%d",
         new_role, l2cb.disallow_switch);
 
     if (L2CAP_ROLE_CHECK_SWITCH != (L2CAP_ROLE_CHECK_SWITCH & new_role))
@@ -877,25 +873,25 @@ UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
     tL2C_CCB        *p_ccb;
     tL2C_RCB        *p_rcb;
 
-    L2CAP_TRACE_API2 ("L2CA_LocalLoopbackReq()  PSM: %d  Handle: 0x%04x", psm, handle);
+    L2CAP_TRACE_API ("L2CA_LocalLoopbackReq()  PSM: %d  Handle: 0x%04x", psm, handle);
 
     /* Fail if we have not established communications with the controller */
     if (!BTM_IsDeviceUp())
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP loop req - BTU not ready");
+        L2CAP_TRACE_WARNING ("L2CAP loop req - BTU not ready");
         return (0);
     }
 
     /* Fail if the PSM is not registered */
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no RCB for L2CA_conn_req, PSM: %d", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_conn_req, PSM: %d", psm);
         return (0);
     }
 
     if ((p_lcb = l2cu_allocate_lcb (p_bd_addr, FALSE, BT_TRANSPORT_BR_EDR)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no LCB for L2CA_conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no LCB for L2CA_conn_req");
         return (0);
     }
 
@@ -905,7 +901,7 @@ UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
     /* Allocate a channel control block */
     if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no CCB for L2CA_conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_conn_req");
         return (0);
     }
 
@@ -932,7 +928,7 @@ UINT16 L2CA_LocalLoopbackReq (UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr)
 *******************************************************************************/
 BOOLEAN L2CA_SetAclPriority (BD_ADDR bd_addr, UINT8 priority)
 {
-    L2CAP_TRACE_API6 ("L2CA_SetAclPriority()  bdaddr: %02x%02x%02x%02x%04x, priority:%d",
+    L2CAP_TRACE_API ("L2CA_SetAclPriority()  bdaddr: %02x%02x%02x%02x%04x, priority:%d",
                     bd_addr[0], bd_addr[1], bd_addr[2],
                     bd_addr[3], (bd_addr[4] << 8) + bd_addr[5], priority);
 
@@ -955,18 +951,18 @@ BOOLEAN L2CA_FlowControl (UINT16 cid, BOOLEAN data_enabled)
     tL2C_CCB  *p_ccb;
     BOOLEAN   on_off = !data_enabled;
 
-    L2CAP_TRACE_API2 ("L2CA_FlowControl(%d)  CID: 0x%04x", on_off, cid);
+    L2CAP_TRACE_API ("L2CA_FlowControl(%d)  CID: 0x%04x", on_off, cid);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING2 ("L2CAP - no CCB for L2CA_FlowControl, CID: 0x%04x  data_enabled: %d", cid, data_enabled);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_FlowControl, CID: 0x%04x  data_enabled: %d", cid, data_enabled);
         return (FALSE);
     }
 
     if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_ERTM_MODE)
     {
-        L2CAP_TRACE_EVENT1 ("L2CA_FlowControl()  invalid mode:%d", p_ccb->peer_cfg.fcr.mode);
+        L2CAP_TRACE_EVENT ("L2CA_FlowControl()  invalid mode:%d", p_ccb->peer_cfg.fcr.mode);
         return (FALSE);
     }
     if (p_ccb->fcrb.local_busy != on_off)
@@ -998,12 +994,12 @@ BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type, UINT8 back_track)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API3 ("L2CA_SendTestSFrame()  CID: 0x%04x  Type: 0x%02x  back_track: %u", cid, sup_type, back_track);
+    L2CAP_TRACE_API ("L2CA_SendTestSFrame()  CID: 0x%04x  Type: 0x%02x  back_track: %u", cid, sup_type, back_track);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_SendTestSFrame, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_SendTestSFrame, CID: %d", cid);
         return (FALSE);
     }
 
@@ -1031,12 +1027,12 @@ BOOLEAN L2CA_SetTxPriority (UINT16 cid, tL2CAP_CHNL_PRIORITY priority)
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API2 ("L2CA_SetTxPriority()  CID: 0x%04x, priority:%d", cid, priority);
+    L2CAP_TRACE_API ("L2CA_SetTxPriority()  CID: 0x%04x, priority:%d", cid, priority);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_SetTxPriority, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_SetTxPriority, CID: %d", cid);
         return (FALSE);
     }
 
@@ -1059,12 +1055,12 @@ BOOLEAN L2CA_SetChnlDataRate (UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_
 {
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API3 ("L2CA_SetChnlDataRate()  CID: 0x%04x, tx:%d, rx:%d", cid, tx, rx);
+    L2CAP_TRACE_API ("L2CA_SetChnlDataRate()  CID: 0x%04x, tx:%d, rx:%d", cid, tx, rx);
 
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_SetChnlDataRate, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_SetChnlDataRate, CID: %d", cid);
         return (FALSE);
     }
 
@@ -1131,7 +1127,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
         /* if L2CAP flush_to within range of HCI, set HCI flush timeout */
         if (temp > HCI_MAX_AUTO_FLUSH_TOUT)
         {
-            L2CAP_TRACE_WARNING1("WARNING L2CA_SetFlushTimeout timeout(0x%x) is out of range", flush_tout);
+            L2CAP_TRACE_WARNING("WARNING L2CA_SetFlushTimeout timeout(0x%x) is out of range", flush_tout);
             return FALSE;
         }
         else
@@ -1150,7 +1146,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
             {
                 p_lcb->link_flush_tout = flush_tout;
 
-                L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+                L2CAP_TRACE_API ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
                                   flush_tout, bd_addr[3], bd_addr[4], bd_addr[5]);
 
                 if (!btsnd_hcic_write_auto_flush_tout (p_lcb->handle, hci_flush_to))
@@ -1159,7 +1155,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
         }
         else
         {
-            L2CAP_TRACE_WARNING3 ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
+            L2CAP_TRACE_WARNING ("WARNING L2CA_SetFlushTimeout No lcb for bd_addr [...;%02x%02x%02x]",
                                   bd_addr[3], bd_addr[4], bd_addr[5]);
             return (FALSE);
         }
@@ -1177,7 +1173,7 @@ BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout)
                 {
                     p_lcb->link_flush_tout = flush_tout;
 
-                    L2CAP_TRACE_API4 ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
+                    L2CAP_TRACE_API ("L2CA_SetFlushTimeout 0x%04x ms for bd_addr [...;%02x%02x%02x]",
                                       flush_tout, p_lcb->remote_bd_addr[3],
                                       p_lcb->remote_bd_addr[4], p_lcb->remote_bd_addr[5]);
 
@@ -1210,13 +1206,13 @@ BOOLEAN L2CA_GetPeerFeatures (BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl
     /* We must already have a link to the remote */
     if ((p_lcb = l2cu_find_lcb_by_bd_addr (bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
     {
-        L2CAP_TRACE_WARNING2 ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
+        L2CAP_TRACE_WARNING ("L2CA_GetPeerFeatures() No BDA: %08x%04x",
                               (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
                               (bd_addr[4]<<8)+bd_addr[5]);
         return (FALSE);
     }
 
-    L2CAP_TRACE_API4 ("L2CA_GetPeerFeatures() BDA: %08x%04x  ExtFea: 0x%08x  Chnl_Mask[0]: 0x%02x",
+    L2CAP_TRACE_API ("L2CA_GetPeerFeatures() BDA: %08x%04x  ExtFea: 0x%08x  Chnl_Mask[0]: 0x%02x",
                       (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
                       (bd_addr[4]<<8)+bd_addr[5], p_lcb->peer_ext_fea, p_lcb->peer_chnl_mask[0]);
 
@@ -1271,11 +1267,11 @@ UINT8 L2CA_GetChnlFcrMode (UINT16 lcid)
 
     if (p_ccb)
     {
-        L2CAP_TRACE_API1 ("L2CA_GetChnlFcrMode() returns mode %d", p_ccb->peer_cfg.fcr.mode);
+        L2CAP_TRACE_API ("L2CA_GetChnlFcrMode() returns mode %d", p_ccb->peer_cfg.fcr.mode);
         return (p_ccb->peer_cfg.fcr.mode);
     }
 
-    L2CAP_TRACE_API0 ("L2CA_GetChnlFcrMode() returns mode L2CAP_FCR_BASIC_MODE");
+    L2CAP_TRACE_API ("L2CA_GetChnlFcrMode() returns mode L2CAP_FCR_BASIC_MODE");
     return (L2CAP_FCR_BASIC_MODE);
 }
 
@@ -1296,7 +1292,7 @@ BOOLEAN  L2CA_RegisterFixedChannel (UINT16 fixed_cid, tL2CAP_FIXED_CHNL_REG *p_f
 {
     if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL) )
     {
-        L2CAP_TRACE_ERROR1 ("L2CA_RegisterFixedChannel()  Invalid CID: 0x%04x", fixed_cid);
+        L2CAP_TRACE_ERROR ("L2CA_RegisterFixedChannel()  Invalid CID: 0x%04x", fixed_cid);
 
         return (FALSE);
     }
@@ -1323,21 +1319,21 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
     tBT_TRANSPORT   transport = BT_TRANSPORT_BR_EDR;
     UINT16          reason;
 
-    L2CAP_TRACE_API3  ("L2CA_ConnectFixedChnl()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
+    L2CAP_TRACE_API  ("L2CA_ConnectFixedChnl()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
                     (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
 
     /* Check CID is valid and registered */
     if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL)
      ||  (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == NULL) )
     {
-        L2CAP_TRACE_ERROR1 ("L2CA_ConnectFixedChnl()  Invalid CID: 0x%04x", fixed_cid);
+        L2CAP_TRACE_ERROR ("L2CA_ConnectFixedChnl()  Invalid CID: 0x%04x", fixed_cid);
         return (FALSE);
     }
 
     /* Fail if BT is not yet up */
     if (!BTM_IsDeviceUp())
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_ConnectFixedChnl(0x%04x) - BTU not ready", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_ConnectFixedChnl(0x%04x) - BTU not ready", fixed_cid);
         return (FALSE);
     }
 
@@ -1351,7 +1347,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
     {
         if (!(p_lcb->peer_chnl_mask[0] & (1 << fixed_cid)))
         {
-            L2CAP_TRACE_EVENT3  ("L2CA_ConnectFixedChnl() CID:0x%04x  BDA: %08x%04x not supported",
+            L2CAP_TRACE_EVENT  ("L2CA_ConnectFixedChnl() CID:0x%04x  BDA: %08x%04x not supported",
                 fixed_cid,(rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                 (rem_bda[4]<<8)+rem_bda[5]);
             return (FALSE);
@@ -1360,14 +1356,14 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
         if (!l2cu_initialize_fixed_ccb (p_lcb, fixed_cid,
             &l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].fixed_chnl_opts))
         {
-            L2CAP_TRACE_WARNING1 ("L2CA_ConnectFixedChnl(0x%04x) - LCB but no CCB", fixed_cid);
+            L2CAP_TRACE_WARNING ("L2CA_ConnectFixedChnl(0x%04x) - LCB but no CCB", fixed_cid);
             return (FALSE);
         }
 
         /* racing with disconnecting, queue the connection request */
         if (p_lcb->link_state == LST_DISCONNECTING)
         {
-            L2CAP_TRACE_DEBUG0 ("L2CAP API - link disconnecting: RETRY LATER");
+            L2CAP_TRACE_DEBUG ("L2CAP API - link disconnecting: RETRY LATER");
             /* Save ccb so it can be started after disconnect is finished */
             p_lcb->p_pending_ccb = p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL];
             return (TRUE);
@@ -1386,7 +1382,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
     /* No link. Get an LCB and start link establishment */
     if ((p_lcb = l2cu_allocate_lcb (rem_bda, FALSE, transport)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_ConnectFixedChnl(0x%04x) - no LCB", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_ConnectFixedChnl(0x%04x) - no LCB", fixed_cid);
         return (FALSE);
     }
 
@@ -1395,7 +1391,7 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
         &l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].fixed_chnl_opts))
     {
         p_lcb->disc_reason = L2CAP_CONN_NO_RESOURCES;
-        L2CAP_TRACE_WARNING1 ("L2CA_ConnectFixedChnl(0x%04x) - no CCB", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_ConnectFixedChnl(0x%04x) - no CCB", fixed_cid);
         l2cu_release_lcb (p_lcb);
         return (FALSE);
     }
@@ -1422,7 +1418,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
     tL2C_LCB        *p_lcb;
     tBT_TRANSPORT   transport = BT_TRANSPORT_BR_EDR;
 
-    L2CAP_TRACE_API3 ("L2CA_SendFixedChnlData()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
+    L2CAP_TRACE_API ("L2CA_SendFixedChnlData()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
                      (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
 
 #if BLE_INCLUDED == TRUE
@@ -1434,14 +1430,14 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
     if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL)
      ||  (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == NULL) )
     {
-        L2CAP_TRACE_ERROR1 ("L2CA_SendFixedChnlData()  Invalid CID: 0x%04x", fixed_cid);
+        L2CAP_TRACE_ERROR ("L2CA_SendFixedChnlData()  Invalid CID: 0x%04x", fixed_cid);
         return (L2CAP_DW_FAILED);
     }
 
     /* Fail if BT is not yet up */
     if (!BTM_IsDeviceUp())
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_SendFixedChnlData(0x%04x) - BTU not ready", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_SendFixedChnlData(0x%04x) - BTU not ready", fixed_cid);
         return (L2CAP_DW_FAILED);
     }
 
@@ -1450,13 +1446,13 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
         /* if link is disconnecting, also report data sending failure */
         p_lcb->link_state == LST_DISCONNECTING)
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_SendFixedChnlData(0x%04x) - no LCB", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_SendFixedChnlData(0x%04x) - no LCB", fixed_cid);
         return (L2CAP_DW_FAILED);
     }
 
     if ((p_lcb->peer_chnl_mask[0] & (1 << fixed_cid)) == 0)
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_SendFixedChnlData() - peer does not support fixed chnl: 0x%04x", fixed_cid);
+        L2CAP_TRACE_WARNING ("L2CA_SendFixedChnlData() - peer does not support fixed chnl: 0x%04x", fixed_cid);
         return (L2CAP_DW_FAILED);
     }
 
@@ -1467,7 +1463,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
     {
         if (!l2cu_initialize_fixed_ccb (p_lcb, fixed_cid, &l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].fixed_chnl_opts))
         {
-            L2CAP_TRACE_WARNING1 ("L2CA_SendFixedChnlData() - no CCB for chnl: 0x%4x", fixed_cid);
+            L2CAP_TRACE_WARNING ("L2CA_SendFixedChnlData() - no CCB for chnl: 0x%4x", fixed_cid);
             return (L2CAP_DW_FAILED);
         }
     }
@@ -1508,7 +1504,7 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
     if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL)
      ||  (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == NULL) )
     {
-        L2CAP_TRACE_ERROR1 ("L2CA_RemoveFixedChnl()  Invalid CID: 0x%04x", fixed_cid);
+        L2CAP_TRACE_ERROR ("L2CA_RemoveFixedChnl()  Invalid CID: 0x%04x", fixed_cid);
         return (FALSE);
     }
 
@@ -1522,12 +1518,12 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
 
     if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
     {
-        L2CAP_TRACE_WARNING3 ("L2CA_RemoveFixedChnl()  CID: 0x%04x  BDA: %08x%04x not connected", fixed_cid,
+        L2CAP_TRACE_WARNING ("L2CA_RemoveFixedChnl()  CID: 0x%04x  BDA: %08x%04x not connected", fixed_cid,
                              (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
         return (FALSE);
     }
 
-    L2CAP_TRACE_API3 ("L2CA_RemoveFixedChnl()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
+    L2CAP_TRACE_API ("L2CA_RemoveFixedChnl()  CID: 0x%04x  BDA: %08x%04x", fixed_cid,
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
 
     /* Release the CCB, starting an inactivity timeout on the LCB if no other CCBs exist */
@@ -1584,7 +1580,7 @@ BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_cid, UINT16 idle
     p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, transport);
     if ( ((p_lcb) == NULL) || (!p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]) )
     {
-        L2CAP_TRACE_WARNING3 ("L2CA_SetFixedChannelTout()  CID: 0x%04x  BDA: %08x%04x not connected", fixed_cid,
+        L2CAP_TRACE_WARNING ("L2CA_SetFixedChannelTout()  CID: 0x%04x  BDA: %08x%04x not connected", fixed_cid,
                              (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
         return (FALSE);
     }
@@ -1621,7 +1617,7 @@ BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
 {
     tL2C_CCB    *p_ccb;
 
-    L2CAP_TRACE_API1 ("L2CA_GetCurrentConfig()  CID: 0x%04x", lcid);
+    L2CAP_TRACE_API ("L2CA_GetCurrentConfig()  CID: 0x%04x", lcid);
 
     p_ccb = l2cu_find_ccb_by_cid(NULL, lcid);
 
@@ -1651,7 +1647,7 @@ BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid,
     }
     else
     {
-        L2CAP_TRACE_ERROR1 ("No CCB for CID:0x%04x", lcid);
+        L2CAP_TRACE_ERROR ("No CCB for CID:0x%04x", lcid);
         return FALSE;
     }
 }
@@ -1697,7 +1693,7 @@ BOOLEAN L2CA_RegForNoCPEvt(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda)
 *******************************************************************************/
 UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data)
 {
-    L2CAP_TRACE_API2 ("L2CA_DataWrite()  CID: 0x%04x  Len: %d", cid, p_data->len);
+    L2CAP_TRACE_API ("L2CA_DataWrite()  CID: 0x%04x  Len: %d", cid, p_data->len);
     return l2c_data_write (cid, p_data, L2CAP_FLUSHABLE_CH_BASED);
 }
 
@@ -1720,13 +1716,13 @@ BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable)
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_SetChnlFlushability, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_SetChnlFlushability, CID: %d", cid);
         return (FALSE);
     }
 
     p_ccb->is_flushable = is_flushable;
 
-    L2CAP_TRACE_API2 ("L2CA_SetChnlFlushability()  CID: 0x%04x  is_flushable: %d", cid, is_flushable);
+    L2CAP_TRACE_API ("L2CA_SetChnlFlushability()  CID: 0x%04x  is_flushable: %d", cid, is_flushable);
 
 #endif
 
@@ -1750,7 +1746,7 @@ BOOLEAN L2CA_SetChnlFlushability (UINT16 cid, BOOLEAN is_flushable)
 *******************************************************************************/
 UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags)
 {
-    L2CAP_TRACE_API3 ("L2CA_DataWriteEx()  CID: 0x%04x  Len: %d Flags:0x%04X",
+    L2CAP_TRACE_API ("L2CA_DataWriteEx()  CID: 0x%04x  Len: %d Flags:0x%04X",
                        cid, p_data->len, flags);
     return l2c_data_write (cid, p_data, flags);
 }
@@ -1782,18 +1778,18 @@ UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush)
 
     if ( !p_ccb || ((p_lcb = p_ccb->p_lcb) == NULL) )
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_FlushChannel()  abnormally returning 0  CID: 0x%04x", lcid);
+        L2CAP_TRACE_WARNING ("L2CA_FlushChannel()  abnormally returning 0  CID: 0x%04x", lcid);
         return (0);
     }
 
     if (num_to_flush != L2CAP_FLUSH_CHANS_GET)
     {
-        L2CAP_TRACE_API4 ("L2CA_FlushChannel (FLUSH)  CID: 0x%04x  NumToFlush: %d  QC: %u  pFirst: 0x%08x",
+        L2CAP_TRACE_API ("L2CA_FlushChannel (FLUSH)  CID: 0x%04x  NumToFlush: %d  QC: %u  pFirst: 0x%08x",
                            lcid, num_to_flush, p_ccb->xmit_hold_q.count, p_ccb->xmit_hold_q.p_first);
     }
     else
     {
-        L2CAP_TRACE_API1 ("L2CA_FlushChannel (QUERY)  CID: 0x%04x", lcid);
+        L2CAP_TRACE_API ("L2CA_FlushChannel (QUERY)  CID: 0x%04x", lcid);
     }
 
     /* Cannot flush eRTM buffers once they have a sequence number */
@@ -1867,7 +1863,7 @@ UINT16 L2CA_FlushChannel (UINT16 lcid, UINT16 num_to_flush)
     num_left += p_ccb->xmit_hold_q.count;
 
     /* Return the local number of buffers left for the CID */
-    L2CAP_TRACE_DEBUG3 ("L2CA_FlushChannel()  flushed: %u + %u,  num_left: %u", num_flushed1, num_flushed2, num_left);
+    L2CAP_TRACE_DEBUG ("L2CA_FlushChannel()  flushed: %u + %u,  num_left: %u", num_flushed1, num_flushed2, num_left);
 
     /* If we were congested, and now we are not, tell the app */
     l2cu_check_channel_congestion (p_ccb);
index 59a597a..fe827e3 100644 (file)
@@ -57,13 +57,13 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
     /* There can be only one BLE connection request outstanding at a time */
     if (btm_ble_get_conn_st() == BLE_CONN_IDLE)
     {
-        L2CAP_TRACE_WARNING0 ("L2CA_CancelBleConnectReq - no connection pending");
+        L2CAP_TRACE_WARNING ("L2CA_CancelBleConnectReq - no connection pending");
         return(FALSE);
     }
 
     if (memcmp (rem_bda, l2cb.ble_connecting_bda, BD_ADDR_LEN))
     {
-        L2CAP_TRACE_WARNING4 ("L2CA_CancelBleConnectReq - different  BDA Connecting: %08x%04x  Cancel: %08x%04x",
+        L2CAP_TRACE_WARNING ("L2CA_CancelBleConnectReq - different  BDA Connecting: %08x%04x  Cancel: %08x%04x",
                               (l2cb.ble_connecting_bda[0]<<24)+(l2cb.ble_connecting_bda[1]<<16)+(l2cb.ble_connecting_bda[2]<<8)+l2cb.ble_connecting_bda[3],
                               (l2cb.ble_connecting_bda[4]<<8)+l2cb.ble_connecting_bda[5],
                               (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3], (rem_bda[4]<<8)+rem_bda[5]);
@@ -111,7 +111,7 @@ BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bda, UINT16 min_int, UINT16 max_in
         /* If we don't have one, create one and accept the connection. */
         if (!p_lcb || !p_acl_cb)
         {
-            L2CAP_TRACE_WARNING2 ("L2CA_UpdateBleConnParams - unknown BD_ADDR %08x%04x",
+            L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - unknown BD_ADDR %08x%04x",
                                   (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                                   (rem_bda[4]<<8)+rem_bda[5]);
             return(FALSE);
@@ -119,7 +119,7 @@ BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bda, UINT16 min_int, UINT16 max_in
 
         if (p_lcb->transport != BT_TRANSPORT_LE)
         {
-            L2CAP_TRACE_WARNING2 ("L2CA_UpdateBleConnParams - BD_ADDR %08x%04x not LE",
+            L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - BD_ADDR %08x%04x not LE",
                                   (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                                   (rem_bda[4]<<8)+rem_bda[5]);
             return(FALSE);
@@ -170,19 +170,19 @@ BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable)
 
     if (!p_lcb)
     {
-        L2CAP_TRACE_WARNING2 ("L2CA_EnableUpdateBleConnParams - unknown BD_ADDR %08x%04x",
+        L2CAP_TRACE_WARNING ("L2CA_EnableUpdateBleConnParams - unknown BD_ADDR %08x%04x",
             (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
             (rem_bda[4]<<8)+rem_bda[5]);
         return (FALSE);
     }
 
-    L2CAP_TRACE_API5 ("%s - BD_ADDR %08x%04x enable %d current upd state 0x%02x",__FUNCTION__,
+    L2CAP_TRACE_API ("%s - BD_ADDR %08x%04x enable %d current upd state 0x%02x",__FUNCTION__,
         (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
         (rem_bda[4]<<8)+rem_bda[5], enable, p_lcb->conn_update_mask);
 
     if (p_lcb->transport != BT_TRANSPORT_LE || (p_lcb->link_role != HCI_ROLE_MASTER))
     {
-        L2CAP_TRACE_WARNING4 ("%s - BD_ADDR %08x%04x not LE or not master %d", __FUNCTION__,
+        L2CAP_TRACE_WARNING ("%s - BD_ADDR %08x%04x not LE or not master %d", __FUNCTION__,
                               (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                               (rem_bda[4]<<8)+rem_bda[5], p_lcb->link_role);
         return (FALSE);
@@ -266,7 +266,7 @@ UINT16 L2CA_GetDisconnectReason (BD_ADDR remote_bda, tBT_TRANSPORT transport)
     if ((p_lcb = l2cu_find_lcb_by_bd_addr (remote_bda, transport)) != NULL)
         reason = p_lcb->disc_reason;
 
-    L2CAP_TRACE_DEBUG1 ("L2CA_GetDisconnectReason=%d ",reason);
+    L2CAP_TRACE_DEBUG ("L2CA_GetDisconnectReason=%d ",reason);
 
     return reason;
 }
@@ -287,7 +287,7 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
     tL2C_LCB            *p_lcb;
     tBTM_SEC_DEV_REC    *p_dev_rec = btm_find_or_alloc_dev (bda);
 
-    L2CAP_TRACE_DEBUG5 ("l2cble_scanner_conn_comp: HANDLE=%d addr_type=%d conn_interval=%d slave_latency=%d supervision_tout=%d",
+    L2CAP_TRACE_DEBUG ("l2cble_scanner_conn_comp: HANDLE=%d addr_type=%d conn_interval=%d slave_latency=%d supervision_tout=%d",
                         handle,  type, conn_interval, conn_latency, conn_timeout);
 
     l2cb.is_ble_connecting = FALSE;
@@ -302,7 +302,7 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
         if (!p_lcb)
         {
             btm_sec_disconnect (handle, HCI_ERR_NO_CONNECTION);
-            L2CAP_TRACE_ERROR0 ("l2cble_scanner_conn_comp - failed to allocate LCB");
+            L2CAP_TRACE_ERROR ("l2cble_scanner_conn_comp - failed to allocate LCB");
             return;
         }
         else
@@ -310,14 +310,14 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
             if (!l2cu_initialize_fixed_ccb (p_lcb, L2CAP_ATT_CID, &l2cb.fixed_reg[L2CAP_ATT_CID - L2CAP_FIRST_FIXED_CHNL].fixed_chnl_opts))
             {
                 btm_sec_disconnect (handle, HCI_ERR_NO_CONNECTION);
-                L2CAP_TRACE_WARNING0 ("l2cble_scanner_conn_comp - LCB but no CCB");
+                L2CAP_TRACE_WARNING ("l2cble_scanner_conn_comp - LCB but no CCB");
                 return ;
             }
         }
     }
     else if (p_lcb->link_state != LST_CONNECTING)
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP got BLE scanner conn_comp in bad state: %d", p_lcb->link_state);
+        L2CAP_TRACE_ERROR ("L2CAP got BLE scanner conn_comp in bad state: %d", p_lcb->link_state);
         return;
     }
     btu_stop_timer(&p_lcb->timer_entry);
@@ -344,7 +344,7 @@ void l2cble_scanner_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE type,
           (conn_latency > p_dev_rec->conn_params.slave_latency) ||
           (conn_timeout > p_dev_rec->conn_params.supervision_tout)))
     {
-        L2CAP_TRACE_ERROR5 ("upd_ll_conn_params: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d supervision_tout=%d",
+        L2CAP_TRACE_ERROR ("upd_ll_conn_params: HANDLE=%d min_conn_int=%d max_conn_int=%d slave_latency=%d supervision_tout=%d",
                             handle, p_dev_rec->conn_params.min_conn_int, p_dev_rec->conn_params.max_conn_int,
                             p_dev_rec->conn_params.slave_latency, p_dev_rec->conn_params.supervision_tout);
 
@@ -397,7 +397,7 @@ void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE typ
         if (!p_lcb)
         {
             btm_sec_disconnect (handle, HCI_ERR_NO_CONNECTION);
-            L2CAP_TRACE_ERROR0 ("l2cble_advertiser_conn_comp - failed to allocate LCB");
+            L2CAP_TRACE_ERROR ("l2cble_advertiser_conn_comp - failed to allocate LCB");
             return;
         }
         else
@@ -405,7 +405,7 @@ void l2cble_advertiser_conn_comp (UINT16 handle, BD_ADDR bda, tBLE_ADDR_TYPE typ
             if (!l2cu_initialize_fixed_ccb (p_lcb, L2CAP_ATT_CID, &l2cb.fixed_reg[L2CAP_ATT_CID - L2CAP_FIRST_FIXED_CHNL].fixed_chnl_opts))
             {
                 btm_sec_disconnect (handle, HCI_ERR_NO_CONNECTION);
-                L2CAP_TRACE_WARNING0 ("l2cble_scanner_conn_comp - LCB but no CCB");
+                L2CAP_TRACE_WARNING ("l2cble_scanner_conn_comp - LCB but no CCB");
                 return ;
             }
         }
@@ -484,7 +484,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
     /* Check command length does not exceed packet length */
     if ((p + cmd_len) > p_pkt_end)
     {
-        L2CAP_TRACE_WARNING3 ("L2CAP - LE - format error, pkt_len: %d  cmd_len: %d  code: %d", pkt_len, cmd_len, cmd_code);
+        L2CAP_TRACE_WARNING ("L2CAP - LE - format error, pkt_len: %d  cmd_len: %d  code: %d", pkt_len, cmd_len, cmd_code);
         return;
     }
 
@@ -535,7 +535,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
                      }
                      else
                      {
-                         L2CAP_TRACE_EVENT0 ("L2CAP - LE - update currently disabled");
+                         L2CAP_TRACE_EVENT ("L2CAP - LE - update currently disabled");
                      }
 
                 }
@@ -549,7 +549,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             break;
 
         default:
-            L2CAP_TRACE_WARNING1 ("L2CAP - LE - unknown cmd code: %d", cmd_code);
+            L2CAP_TRACE_WARNING ("L2CAP - LE - unknown cmd code: %d", cmd_code);
             l2cu_send_peer_cmd_reject (p_lcb, L2CAP_CMD_REJ_NOT_UNDERSTOOD, id, 0, 0);
             return;
     }
@@ -616,7 +616,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
     /* There can be only one BLE connection request outstanding at a time */
     if (p_dev_rec == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("unknown device, can not initate connection");
+        L2CAP_TRACE_WARNING ("unknown device, can not initate connection");
         return(FALSE);
     }
 
@@ -640,7 +640,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
     if (!btm_ble_topology_check(BTM_BLE_STATE_INIT))
     {
         l2cu_release_lcb (p_lcb);
-        L2CAP_TRACE_ERROR0("initate direct connection fail, topology limitation");
+        L2CAP_TRACE_ERROR("initate direct connection fail, topology limitation");
         return FALSE;
     }
 #if BLE_PRIVACY_SPT == TRUE
@@ -670,7 +670,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
                                         0))                      /* UINT16 max_len       */
     {
         l2cu_release_lcb (p_lcb);
-        L2CAP_TRACE_ERROR0("initate direct connection fail, no resources");
+        L2CAP_TRACE_ERROR("initate direct connection fail, no resources");
         return (FALSE);
     }
     else
@@ -706,7 +706,7 @@ BOOLEAN l2cble_create_conn (tL2C_LCB *p_lcb)
     }
     else
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - LE - cannot start new connection at conn st: %d", conn_st);
+        L2CAP_TRACE_WARNING ("L2CAP - LE - cannot start new connection at conn st: %d", conn_st);
 
         btm_ble_enqueue_direct_conn_req(p_lcb);
 
@@ -770,14 +770,14 @@ void l2cble_process_rc_param_request_evt(UINT16 handle, UINT16 int_min, UINT16 i
         }
         else
         {
-            L2CAP_TRACE_EVENT0 ("L2CAP - LE - update currently disabled");
+            L2CAP_TRACE_EVENT ("L2CAP - LE - update currently disabled");
             btsnd_hcic_ble_rc_param_req_neg_reply (handle,HCI_ERR_UNACCEPT_CONN_INTERVAL);
         }
 
     }
     else
     {
-        L2CAP_TRACE_WARNING0("No link to update connection parameter")
+        L2CAP_TRACE_WARNING("No link to update connection parameter")
     }
 }
 #endif
index 4e24c23..baad624 100644 (file)
@@ -128,9 +128,9 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     if (p_ccb->p_rcb == NULL)
     {
 #if (BT_TRACE_VERBOSE == TRUE)
-        L2CAP_TRACE_ERROR2 ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: %s p_rcb == NULL", p_ccb->local_cid, l2c_csm_get_event_name (event));
+        L2CAP_TRACE_ERROR ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: %s p_rcb == NULL", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-        L2CAP_TRACE_ERROR2 ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: 0x%04x p_rcb == NULL", p_ccb->local_cid, event);
+        L2CAP_TRACE_ERROR ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: 0x%04x p_rcb == NULL", p_ccb->local_cid, event);
 #endif
         return;
     }
@@ -151,15 +151,15 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     connect_cfm    = p_ccb->p_rcb->api.pL2CA_ConnectCfm_Cb;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: CLOSED  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: CLOSED evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: CLOSED evt: %d", event);
 #endif
 
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                  /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -175,7 +175,7 @@ static void l2c_csm_closed (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
         if (p_ci->status != HCI_ERR_CONNECTION_EXISTS
             || !btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr))
         {
-            L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, p_ci->status);
+            L2CAP_TRACE_API ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, p_ci->status);
             l2cu_release_ccb (p_ccb);
             (*connect_cfm)(local_cid, p_ci->status);
         }
@@ -230,7 +230,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
         break;
 
     case L2CEVT_SEC_COMP_NEG:                           /* something is really bad with security */
-        L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, L2CAP_CONN_TIMEOUT);
+        L2CAP_TRACE_API ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, L2CAP_CONN_TIMEOUT);
         l2cu_release_ccb (p_ccb);
         (*connect_cfm)(local_cid, L2CAP_CONN_SECURITY_BLOCK);
         break;
@@ -270,7 +270,7 @@ Event uninit_use_in_call: Using uninitialized value "settings.min" in call to fu
         break;
 
     case L2CEVT_TIMEOUT:
-        L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, L2CAP_CONN_TIMEOUT);
+        L2CAP_TRACE_API ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, L2CAP_CONN_TIMEOUT);
         l2cu_release_ccb (p_ccb);
         (*connect_cfm)(local_cid, L2CAP_CONN_TIMEOUT);
         break;
@@ -304,9 +304,9 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
     UINT16                  local_cid = p_ccb->local_cid;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: ORIG_W4_SEC_COMP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: ORIG_W4_SEC_COMP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: ORIG_W4_SEC_COMP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: ORIG_W4_SEC_COMP evt: %d", event);
 #endif
 
 #if (L2CAP_UCD_INCLUDED == TRUE)
@@ -324,7 +324,7 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                   /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -355,7 +355,7 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
         break;
 
     case L2CEVT_SEC_COMP_NEG:
-        L2CAP_TRACE_API2 ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, HCI_ERR_AUTH_FAILURE);
+        L2CAP_TRACE_API ("L2CAP - Calling ConnectCfm_Cb(), CID: 0x%04x  Status: %d", p_ccb->local_cid, HCI_ERR_AUTH_FAILURE);
 
         /* If last channel immediately disconnect the ACL for better security.
            Also prevents a race condition between BTM and L2CAP */
@@ -396,9 +396,9 @@ static void l2c_csm_orig_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
 static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
 {
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: TERM_W4_SEC_COMP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: TERM_W4_SEC_COMP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: TERM_W4_SEC_COMP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: TERM_W4_SEC_COMP evt: %d", event);
 #endif
 
 #if (L2CAP_UCD_INCLUDED == TRUE)
@@ -430,7 +430,7 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
         {
             /* Don't need to get info from peer or already retrieved so continue */
             btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CONNECT_TOUT);
-            L2CAP_TRACE_API1 ("L2CAP - Calling Connect_Ind_Cb(), CID: 0x%04x", p_ccb->local_cid);
+            L2CAP_TRACE_API ("L2CAP - Calling Connect_Ind_Cb(), CID: 0x%04x", p_ccb->local_cid);
 
             (*p_ccb->p_rcb->api.pL2CA_ConnectInd_Cb) (p_ccb->p_lcb->remote_bd_addr, p_ccb->local_cid,
                                                       p_ccb->p_rcb->psm, p_ccb->remote_id);
@@ -486,7 +486,7 @@ static void l2c_csm_term_w4_sec_comp (tL2C_CCB *p_ccb, UINT16 event, void *p_dat
         /* SM4 related. */
         if (!btsnd_hcic_disconnect (p_ccb->p_lcb->handle, HCI_ERR_AUTH_FAILURE))
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling btsnd_hcic_disconnect for handle %i failed", p_ccb->p_lcb->handle);
+            L2CAP_TRACE_API ("L2CAP - Calling btsnd_hcic_disconnect for handle %i failed", p_ccb->p_lcb->handle);
             btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, 1);
         }
         break;
@@ -517,9 +517,9 @@ static void l2c_csm_w4_l2cap_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p
     UINT16                  local_cid = p_ccb->local_cid;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: W4_L2CAP_CON_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: W4_L2CAP_CON_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: W4_L2CAP_CON_RSP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: W4_L2CAP_CON_RSP evt: %d", event);
 #endif
 
     switch (event)
@@ -530,7 +530,7 @@ static void l2c_csm_w4_l2cap_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p
         p_ccb->chnl_state = CST_CLOSED;
         if ((p_ccb->flags & CCB_FLAG_NO_RETRY) || !p_data || (*((UINT8 *)p_data) != HCI_ERR_PEER_USER))
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed",
+            L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed",
                               p_ccb->local_cid);
             l2cu_release_ccb (p_ccb);
             (*disconnect_ind)(local_cid, FALSE);
@@ -542,7 +542,7 @@ static void l2c_csm_w4_l2cap_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p
         p_ccb->remote_cid = p_ci->remote_cid;
         p_ccb->chnl_state = CST_CONFIG;
         btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CFG_TIMEOUT);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Success", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Success", p_ccb->local_cid);
 
         (*p_ccb->p_rcb->api.pL2CA_ConnectCfm_Cb)(local_cid, L2CAP_CONN_OK);
         break;
@@ -552,19 +552,19 @@ static void l2c_csm_w4_l2cap_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p
         btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CONNECT_TOUT_EXT);
         if (p_ccb->p_rcb->api.pL2CA_ConnectPnd_Cb)
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling Connect_Pnd_Cb(), CID: 0x%04x", p_ccb->local_cid);
+            L2CAP_TRACE_API ("L2CAP - Calling Connect_Pnd_Cb(), CID: 0x%04x", p_ccb->local_cid);
             (*p_ccb->p_rcb->api.pL2CA_ConnectPnd_Cb)(p_ccb->local_cid);
         }
         break;
 
     case L2CEVT_L2CAP_CONNECT_RSP_NEG:              /* Peer rejected connection */
-        L2CAP_TRACE_API2 ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Failure Code: %d", p_ccb->local_cid, p_ci->l2cap_result);
+        L2CAP_TRACE_API ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Failure Code: %d", p_ccb->local_cid, p_ci->l2cap_result);
         l2cu_release_ccb (p_ccb);
         (*connect_cfm)(local_cid, p_ci->l2cap_result);
         break;
 
     case L2CEVT_TIMEOUT:
-        L2CAP_TRACE_API1 ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Timeout", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Connect_Cfm_Cb(), CID: 0x%04x, Timeout", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*connect_cfm)(local_cid, L2CAP_CONN_TIMEOUT);
         break;
@@ -621,15 +621,15 @@ static void l2c_csm_w4_l2ca_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p_
     UINT16                  local_cid = p_ccb->local_cid;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: W4_L2CA_CON_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: W4_L2CA_CON_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: W4_L2CA_CON_RSP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: W4_L2CA_CON_RSP evt: %d", event);
 #endif
 
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                  /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -660,7 +660,7 @@ static void l2c_csm_w4_l2ca_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p_
 
     case L2CEVT_TIMEOUT:
         l2cu_send_peer_connect_rsp (p_ccb, L2CAP_CONN_NO_PSM, 0);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -679,7 +679,7 @@ static void l2c_csm_w4_l2ca_connect_rsp (tL2C_CCB *p_ccb, UINT16 event, void *p_
     case L2CEVT_L2CAP_INFO_RSP:
         /* We have feature info, so now give the upper layer connect IND */
         btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_CONNECT_TOUT);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Connect_Ind_Cb(), CID: 0x%04x", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Connect_Ind_Cb(), CID: 0x%04x", p_ccb->local_cid);
 
         (*p_ccb->p_rcb->api.pL2CA_ConnectInd_Cb) (p_ccb->p_lcb->remote_bd_addr,
                                                   p_ccb->local_cid,
@@ -708,15 +708,15 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     UINT8                   cfg_result;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: CONFIG  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: CONFIG  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: CONFIG evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: CONFIG evt: %d", event);
 #endif
 
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                  /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -725,19 +725,19 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
 
         if ((cfg_result = l2cu_process_peer_cfg_req (p_ccb, p_cfg)) == L2CAP_PEER_CFG_OK)
         {
-            L2CAP_TRACE_EVENT2 ("L2CAP - Calling Config_Req_Cb(), CID: 0x%04x, C-bit %d",
+            L2CAP_TRACE_EVENT ("L2CAP - Calling Config_Req_Cb(), CID: 0x%04x, C-bit %d",
                                 p_ccb->local_cid, (p_cfg->flags & L2CAP_CFG_FLAGS_MASK_CONT));
             (*p_ccb->p_rcb->api.pL2CA_ConfigInd_Cb)(p_ccb->local_cid, p_cfg);
         }
         else if (cfg_result == L2CAP_PEER_CFG_DISCONNECT)
         {
             /* Disconnect if channels are incompatible */
-            L2CAP_TRACE_EVENT0 ("L2CAP - incompatible configurations disconnect");
+            L2CAP_TRACE_EVENT ("L2CAP - incompatible configurations disconnect");
             l2cu_disconnect_chnl (p_ccb);
         }
         else /* Return error to peer so he can renegotiate if possible */
         {
-            L2CAP_TRACE_EVENT0 ("L2CAP - incompatible configurations trying reconfig");
+            L2CAP_TRACE_EVENT ("L2CAP - incompatible configurations trying reconfig");
             l2cu_send_peer_config_rsp (p_ccb, p_cfg);
         }
         break;
@@ -760,7 +760,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
                 if (p_ccb->our_cfg.fcr.mode != p_ccb->peer_cfg.fcr.mode)
                 {
                     l2cu_send_peer_disc_req (p_ccb);
-                    L2CAP_TRACE_WARNING1 ("L2CAP - Calling Disconnect_Ind_Cb(Incompatible CFG), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+                    L2CAP_TRACE_WARNING ("L2CAP - Calling Disconnect_Ind_Cb(Incompatible CFG), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
                     l2cu_release_ccb (p_ccb);
                     (*disconnect_ind)(local_cid, FALSE);
                     break;
@@ -796,7 +796,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
             }
         }
 
-        L2CAP_TRACE_API1 ("L2CAP - Calling Config_Rsp_Cb(), CID: 0x%04x", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Config_Rsp_Cb(), CID: 0x%04x", p_ccb->local_cid);
         (*p_ccb->p_rcb->api.pL2CA_ConfigCfm_Cb)(p_ccb->local_cid, p_cfg);
         break;
 
@@ -807,7 +807,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
         /* If failure was channel mode try to renegotiate */
         if (l2c_fcr_renegotiate_chan(p_ccb, p_cfg) == FALSE)
         {
-            L2CAP_TRACE_API2 ("L2CAP - Calling Config_Rsp_Cb(), CID: 0x%04x, Failure: %d", p_ccb->local_cid, p_cfg->result);
+            L2CAP_TRACE_API ("L2CAP - Calling Config_Rsp_Cb(), CID: 0x%04x, Failure: %d", p_ccb->local_cid, p_cfg->result);
             (*p_ccb->p_rcb->api.pL2CA_ConfigCfm_Cb)(p_ccb->local_cid, p_cfg);
         }
         break;
@@ -815,7 +815,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     case L2CEVT_L2CAP_DISCONNECT_REQ:                  /* Peer disconnected request */
         btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_DISCONNECT_TOUT);
         p_ccb->chnl_state = CST_W4_L2CA_DISCONNECT_RSP;
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  Conf Needed", p_ccb->local_cid);
         (*p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb)(p_ccb->local_cid, TRUE);
         break;
 
@@ -849,7 +849,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
             if (p_ccb->our_cfg.fcr.mode != p_ccb->peer_cfg.fcr.mode)
             {
                 l2cu_send_peer_disc_req (p_ccb);
-                L2CAP_TRACE_WARNING1 ("L2CAP - Calling Disconnect_Ind_Cb(Incompatible CFG), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+                L2CAP_TRACE_WARNING ("L2CAP - Calling Disconnect_Ind_Cb(Incompatible CFG), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
                 l2cu_release_ccb (p_ccb);
                 (*disconnect_ind)(local_cid, FALSE);
                 break;
@@ -890,7 +890,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
         break;
 
     case L2CEVT_L2CAP_DATA:                        /* Peer data packet rcvd    */
-        L2CAP_TRACE_API1 ("L2CAP - Calling DataInd_Cb(), CID: 0x%04x", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling DataInd_Cb(), CID: 0x%04x", p_ccb->local_cid);
 #if (L2CAP_NUM_FIXED_CHNLS > 0)
         if (p_ccb->local_cid >= L2CAP_FIRST_FIXED_CHNL &&
                 p_ccb->local_cid <= L2CAP_LAST_FIXED_CHNL)
@@ -917,7 +917,7 @@ static void l2c_csm_config (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
 
     case L2CEVT_TIMEOUT:
         l2cu_send_peer_disc_req (p_ccb);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
@@ -944,9 +944,9 @@ static void l2c_csm_open (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     UINT8                   cfg_result;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: OPEN  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: OPEN  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: OPEN evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: OPEN evt: %d", event);
 #endif
 
 #if (L2CAP_UCD_INCLUDED == TRUE)
@@ -964,7 +964,7 @@ static void l2c_csm_open (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                  /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         if (p_ccb->p_rcb)
             (*p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb)(local_cid, FALSE);
@@ -1025,7 +1025,7 @@ static void l2c_csm_open (tL2C_CCB *p_ccb, UINT16 event, void *p_data)
 
         p_ccb->chnl_state = CST_W4_L2CA_DISCONNECT_RSP;
         btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_L2CAP_CHNL, L2CAP_CHNL_DISCONNECT_TOUT);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  Conf Needed", p_ccb->local_cid);
         (*p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb)(p_ccb->local_cid, TRUE);
         break;
 
@@ -1092,9 +1092,9 @@ static void l2c_csm_w4_l2cap_disconnect_rsp (tL2C_CCB *p_ccb, UINT16 event, void
     UINT16                  local_cid = p_ccb->local_cid;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: W4_L2CAP_DISC_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: W4_L2CAP_DISC_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: W4_L2CAP_DISC_RSP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: W4_L2CAP_DISC_RSP evt: %d", event);
 #endif
 
     switch (event)
@@ -1103,7 +1103,7 @@ static void l2c_csm_w4_l2cap_disconnect_rsp (tL2C_CCB *p_ccb, UINT16 event, void
         l2cu_release_ccb (p_ccb);
         if (disconnect_cfm)
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
+            L2CAP_TRACE_API ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
             (*disconnect_cfm)(local_cid, L2CAP_DISC_OK);
         }
         break;
@@ -1113,7 +1113,7 @@ static void l2c_csm_w4_l2cap_disconnect_rsp (tL2C_CCB *p_ccb, UINT16 event, void
         l2cu_release_ccb (p_ccb);
         if (disconnect_cfm)
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
+            L2CAP_TRACE_API ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
             (*disconnect_cfm)(local_cid, L2CAP_DISC_OK);
         }
        break;
@@ -1123,7 +1123,7 @@ static void l2c_csm_w4_l2cap_disconnect_rsp (tL2C_CCB *p_ccb, UINT16 event, void
         l2cu_release_ccb (p_ccb);
         if (disconnect_cfm)
         {
-            L2CAP_TRACE_API1 ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
+            L2CAP_TRACE_API ("L2CAP - Calling DisconnectCfm_Cb(), CID: 0x%04x", local_cid);
             (*disconnect_cfm)(local_cid, L2CAP_DISC_TIMEOUT);
         }
         break;
@@ -1152,22 +1152,22 @@ static void l2c_csm_w4_l2ca_disconnect_rsp (tL2C_CCB *p_ccb, UINT16 event, void
     UINT16                  local_cid = p_ccb->local_cid;
 
 #if (BT_TRACE_VERBOSE == TRUE)
-    L2CAP_TRACE_EVENT2 ("L2CAP - LCID: 0x%04x  st: W4_L2CA_DISC_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
+    L2CAP_TRACE_EVENT ("L2CAP - LCID: 0x%04x  st: W4_L2CA_DISC_RSP  evt: %s", p_ccb->local_cid, l2c_csm_get_event_name (event));
 #else
-    L2CAP_TRACE_EVENT1 ("L2CAP - st: W4_L2CA_DISC_RSP evt: %d", event);
+    L2CAP_TRACE_EVENT ("L2CAP - st: W4_L2CA_DISC_RSP evt: %d", event);
 #endif
 
     switch (event)
     {
     case L2CEVT_LP_DISCONNECT_IND:                  /* Link was disconnected */
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
 
     case L2CEVT_TIMEOUT:
         l2cu_send_peer_disc_rsp (p_ccb->p_lcb, p_ccb->remote_id, p_ccb->local_cid, p_ccb->remote_cid);
-        L2CAP_TRACE_API1 ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
+        L2CAP_TRACE_API ("L2CAP - Calling Disconnect_Ind_Cb(), CID: 0x%04x  No Conf Needed", p_ccb->local_cid);
         l2cu_release_ccb (p_ccb);
         (*disconnect_ind)(local_cid, FALSE);
         break;
index 4447b5b..6e12607 100644 (file)
@@ -186,7 +186,7 @@ void l2c_fcr_start_timer (tL2C_CCB *p_ccb)
         tout = (UINT32)p_ccb->our_cfg.fcr.rtrans_tout;
     }
 /*
-    L2CAP_TRACE_DEBUG4 ("l2c_fcr_start_timer Tout: %u  Already Running: %u  wait_ack: %u  ack_q_count: %u",
+    L2CAP_TRACE_DEBUG ("l2c_fcr_start_timer Tout: %u  Already Running: %u  wait_ack: %u  ack_q_count: %u",
                         tout, p_ccb->timer_entry.in_use, p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
 */
     /* Only start a timer that was not started */
@@ -208,7 +208,7 @@ void l2c_fcr_stop_timer (tL2C_CCB *p_ccb)
     if (p_ccb->fcrb.mon_retrans_timer.in_use)
     {
 /*
-        L2CAP_TRACE_DEBUG2 ("l2c_fcr_stop_timer wait_ack: %u  ack_q_count: %u",
+        L2CAP_TRACE_DEBUG ("l2c_fcr_stop_timer wait_ack: %u  ack_q_count: %u",
                             p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
 */
         btu_stop_quick_timer (&p_ccb->fcrb.mon_retrans_timer);
@@ -340,7 +340,7 @@ BT_HDR *l2c_fcr_clone_buf (BT_HDR *p_buf, UINT16 new_offset, UINT16 no_of_bytes,
     /* If using the common pool, should be at least 10% free. */
     if ( (pool == HCI_ACL_POOL_ID) && (GKI_poolutilization (pool) > 90) )
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - failed to clone buffer on HCI_ACL_POOL_ID Utilization: %u", GKI_poolutilization(pool));
+        L2CAP_TRACE_ERROR ("L2CAP - failed to clone buffer on HCI_ACL_POOL_ID Utilization: %u", GKI_poolutilization(pool));
         return (NULL);
     }
 
@@ -351,7 +351,7 @@ BT_HDR *l2c_fcr_clone_buf (BT_HDR *p_buf, UINT16 new_offset, UINT16 no_of_bytes,
         /* Make sure buffer fits into buffer pool */
         if ((no_of_bytes + sizeof(BT_HDR) + new_offset) > pool_buf_size)
         {
-            L2CAP_TRACE_ERROR5("##### l2c_fcr_clone_buf (NumBytes %d) -> Exceeds poolsize %d [bytes %d + BT_HDR %d + offset %d]",
+            L2CAP_TRACE_ERROR("##### l2c_fcr_clone_buf (NumBytes %d) -> Exceeds poolsize %d [bytes %d + BT_HDR %d + offset %d]",
                                (no_of_bytes + sizeof(BT_HDR) + new_offset),
                                pool_buf_size, no_of_bytes, sizeof(BT_HDR),
                                new_offset);
@@ -369,7 +369,7 @@ BT_HDR *l2c_fcr_clone_buf (BT_HDR *p_buf, UINT16 new_offset, UINT16 no_of_bytes,
     }
     else
     {
-        L2CAP_TRACE_ERROR2 ("L2CAP - failed to clone buffer, Pool: %u  Count: %u", pool,  GKI_poolfreecount(pool));
+        L2CAP_TRACE_ERROR ("L2CAP - failed to clone buffer, Pool: %u  Count: %u", pool,  GKI_poolfreecount(pool));
     }
 
     return (p_buf2);
@@ -485,7 +485,7 @@ static void prepare_I_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, BOOLEAN is_retransm
 #if BT_TRACE_VERBOSE == TRUE
     if (is_retransmission)
     {
-        L2CAP_TRACE_EVENT6 ("L2CAP eRTM ReTx I-frame  CID: 0x%04x  Len: %u  SAR: %s  TxSeq: %u  ReqSeq: %u  F: %u",
+        L2CAP_TRACE_EVENT ("L2CAP eRTM ReTx I-frame  CID: 0x%04x  Len: %u  SAR: %s  TxSeq: %u  ReqSeq: %u  F: %u",
                             p_ccb->local_cid, p_buf->len,
                             SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT],
                             (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT,
@@ -494,7 +494,7 @@ static void prepare_I_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, BOOLEAN is_retransm
     }
     else
     {
-        L2CAP_TRACE_EVENT6 ("L2CAP eRTM Tx I-frame CID: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
+        L2CAP_TRACE_EVENT ("L2CAP eRTM Tx I-frame CID: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
                             p_ccb->local_cid, p_buf->len,
                             SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT],
                             (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT,
@@ -590,23 +590,23 @@ void l2c_fcr_send_S_frame (tL2C_CCB *p_ccb, UINT16 function_code, UINT16 pf_bit)
         if ((((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 1)
          || (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3))
         {
-            L2CAP_TRACE_WARNING6 ("L2CAP eRTM Tx S-frame  CID: 0x%04x  ctrlword: 0x%04x  Type: %s  ReqSeq: %u  P: %u  F: %u",
+            L2CAP_TRACE_WARNING ("L2CAP eRTM Tx S-frame  CID: 0x%04x  ctrlword: 0x%04x  Type: %s  ReqSeq: %u  P: %u  F: %u",
                             p_ccb->local_cid, ctrl_word,
                             SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT],
                             (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT,
                             (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT,
                             (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT);
-            L2CAP_TRACE_WARNING1 ("                  Buf Len: %u", p_buf->len);
+            L2CAP_TRACE_WARNING ("                  Buf Len: %u", p_buf->len);
         }
         else
         {
-            L2CAP_TRACE_EVENT6 ("L2CAP eRTM Tx S-frame  CID: 0x%04x  ctrlword: 0x%04x  Type: %s  ReqSeq: %u  P: %u  F: %u",
+            L2CAP_TRACE_EVENT ("L2CAP eRTM Tx S-frame  CID: 0x%04x  ctrlword: 0x%04x  Type: %s  ReqSeq: %u  P: %u  F: %u",
                             p_ccb->local_cid, ctrl_word,
                             SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT],
                             (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT,
                             (ctrl_word & L2CAP_FCR_P_BIT) >> L2CAP_FCR_P_BIT_SHIFT,
                             (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT);
-            L2CAP_TRACE_EVENT1 ("                  Buf Len: %u", p_buf->len);
+            L2CAP_TRACE_EVENT ("                  Buf Len: %u", p_buf->len);
         }
 #endif  /* BT_TRACE_VERBOSE */
 
@@ -619,7 +619,7 @@ void l2c_fcr_send_S_frame (tL2C_CCB *p_ccb, UINT16 function_code, UINT16 pf_bit)
     }
     else
     {
-        L2CAP_TRACE_ERROR2 ("l2c_fcr_send_S_frame(No Resources) cid 0x%04x, Type: 0x%4x",
+        L2CAP_TRACE_ERROR ("l2c_fcr_send_S_frame(No Resources) cid 0x%04x, Type: 0x%4x",
                              p_ccb->local_cid, function_code);
     }
 }
@@ -648,7 +648,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
 
     if (p_buf->len < min_pdu_len)
     {
-        L2CAP_TRACE_WARNING2 ("Rx L2CAP PDU: CID: 0x%04x  Len too short: %u", p_ccb->local_cid, p_buf->len);
+        L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x  Len too short: %u", p_ccb->local_cid, p_buf->len);
         GKI_freebuf (p_buf);
         return;
     }
@@ -670,7 +670,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
          || (((ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT) == 3))
         {
             /* REJ or SREJ */
-            L2CAP_TRACE_WARNING6 ("L2CAP eRTM Rx S-frame: cid: 0x%04x  Len: %u  Type: %s  ReqSeq: %u  P: %u  F: %u",
+            L2CAP_TRACE_WARNING ("L2CAP eRTM Rx S-frame: cid: 0x%04x  Len: %u  Type: %s  ReqSeq: %u  P: %u  F: %u",
                             p_ccb->local_cid, p_buf->len,
                             SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT],
                             (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT,
@@ -679,7 +679,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
         }
         else
         {
-            L2CAP_TRACE_EVENT6 ("L2CAP eRTM Rx S-frame: cid: 0x%04x  Len: %u  Type: %s  ReqSeq: %u  P: %u  F: %u",
+            L2CAP_TRACE_EVENT ("L2CAP eRTM Rx S-frame: cid: 0x%04x  Len: %u  Type: %s  ReqSeq: %u  P: %u  F: %u",
                             p_ccb->local_cid, p_buf->len,
                             SUP_types[(ctrl_word & L2CAP_FCR_SUP_BITS) >> L2CAP_FCR_SUP_SHIFT],
                             (ctrl_word & L2CAP_FCR_REQ_SEQ_BITS) >> L2CAP_FCR_REQ_SEQ_BITS_SHIFT,
@@ -689,7 +689,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
     }
     else
     {
-        L2CAP_TRACE_EVENT6 ("L2CAP eRTM Rx I-frame: cid: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
+        L2CAP_TRACE_EVENT ("L2CAP eRTM Rx I-frame: cid: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
                             p_ccb->local_cid, p_buf->len,
                             SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT],
                             (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT,
@@ -697,7 +697,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
                             (ctrl_word & L2CAP_FCR_F_BIT) >> L2CAP_FCR_F_BIT_SHIFT);
     }
 
-    L2CAP_TRACE_EVENT6 ("      eRTM Rx Nxt_tx_seq %u, Lst_rx_ack %u, Nxt_seq_exp %u, Lst_ack_snt %u, wt_q.cnt %u, tries %u",
+    L2CAP_TRACE_EVENT ("      eRTM Rx Nxt_tx_seq %u, Lst_rx_ack %u, Nxt_seq_exp %u, Lst_ack_snt %u, wt_q.cnt %u, tries %u",
                         p_ccb->fcrb.next_tx_seq, p_ccb->fcrb.last_rx_ack, p_ccb->fcrb.next_seq_expected,
                         p_ccb->fcrb.last_ack_sent, p_ccb->fcrb.waiting_for_ack_q.count, p_ccb->fcrb.num_tries);
 
@@ -723,7 +723,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
 
         if (l2c_fcr_rx_get_fcs(p_buf) != fcs)
         {
-            L2CAP_TRACE_WARNING1 ("Rx L2CAP PDU: CID: 0x%04x  BAD FCS", p_ccb->local_cid);
+            L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x  BAD FCS", p_ccb->local_cid);
             GKI_freebuf(p_buf);
             return;
         }
@@ -812,7 +812,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
 
                 STREAM_TO_UINT16 (ctrl_word, p);
 
-                L2CAP_TRACE_DEBUG3 ("l2c_fcr_proc_pdu() CID: 0x%04x  Process Buffer from SREJ_Hold_Q   TxSeq: %u  Expected_Seq: %u",
+                L2CAP_TRACE_DEBUG ("l2c_fcr_proc_pdu() CID: 0x%04x  Process Buffer from SREJ_Hold_Q   TxSeq: %u  Expected_Seq: %u",
                                     p_ccb->local_cid, (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT,
                                     p_ccb->fcrb.next_seq_expected);
 
@@ -838,7 +838,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
             l2c_fcr_send_S_frame (p_ccb, L2CAP_FCR_SUP_RR, 0);
         else
         {
-            L2CAP_TRACE_DEBUG6 ("l2c_fcr_proc_pdu() not sending RR CID: 0x%04x  local_busy:%d rej_sent:%d srej_sent:%d Expected_Seq:%u Last_Ack:%u",
+            L2CAP_TRACE_DEBUG ("l2c_fcr_proc_pdu() not sending RR CID: 0x%04x  local_busy:%d rej_sent:%d srej_sent:%d Expected_Seq:%u Last_Ack:%u",
                                 p_ccb->local_cid, p_ccb->fcrb.local_busy, p_ccb->fcrb.rej_sent, p_ccb->fcrb.srej_sent, p_ccb->fcrb.next_seq_expected,
                                 p_ccb->fcrb.last_ack_sent);
         }
@@ -864,7 +864,7 @@ void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb, BT_HDR *p_buf)
 *******************************************************************************/
 void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
 {
-    L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_tout:  CID: 0x%04x  num_tries: %u (max: %u)  wait_ack: %u  ack_q_count: %u",
+    L2CAP_TRACE_DEBUG ("l2c_fcr_proc_tout:  CID: 0x%04x  num_tries: %u (max: %u)  wait_ack: %u  ack_q_count: %u",
                         p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
                         p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
 
@@ -900,7 +900,7 @@ void l2c_fcr_proc_tout (tL2C_CCB *p_ccb)
 *******************************************************************************/
 void l2c_fcr_proc_ack_tout (tL2C_CCB *p_ccb)
 {
-    L2CAP_TRACE_DEBUG5 ("l2c_fcr_proc_ack_tout:  CID: 0x%04x State: %u  Wack:%u  Rq:%d  Acked:%d", p_ccb->local_cid,
+    L2CAP_TRACE_DEBUG ("l2c_fcr_proc_ack_tout:  CID: 0x%04x State: %u  Wack:%u  Rq:%d  Acked:%d", p_ccb->local_cid,
                         p_ccb->chnl_state, p_ccb->fcrb.wait_ack, p_ccb->fcrb.next_seq_expected, p_ccb->fcrb.last_ack_sent);
 
     if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack)
@@ -954,7 +954,7 @@ static BOOLEAN process_reqseq (tL2C_CCB *p_ccb, UINT16 ctrl_word)
     if (num_bufs_acked > p_fcrb->waiting_for_ack_q.count)
     {
         /* The channel is closed if ReqSeq is not in range */
-        L2CAP_TRACE_WARNING4 ("L2CAP eRTM Frame BAD Req_Seq - ctrl_word: 0x%04x  req_seq 0x%02x  last_rx_ack: 0x%02x  QCount: %u",
+        L2CAP_TRACE_WARNING ("L2CAP eRTM Frame BAD Req_Seq - ctrl_word: 0x%04x  req_seq 0x%02x  last_rx_ack: 0x%02x  QCount: %u",
                                ctrl_word, req_seq, p_fcrb->last_rx_ack, p_fcrb->waiting_for_ack_q.count);
 
         l2cu_disconnect_chnl (p_ccb);
@@ -962,7 +962,7 @@ static BOOLEAN process_reqseq (tL2C_CCB *p_ccb, UINT16 ctrl_word)
     }
 
 /*
-    L2CAP_TRACE_DEBUG3 ("L2CAP process_reqseq 0x%02x  last_rx_ack: 0x%02x  QCount: %u",
+    L2CAP_TRACE_DEBUG ("L2CAP process_reqseq 0x%02x  last_rx_ack: 0x%02x  QCount: %u",
                            req_seq, p_fcrb->last_rx_ack, p_fcrb->waiting_for_ack_q.count);
 */
     p_fcrb->last_rx_ack = req_seq;
@@ -1028,10 +1028,10 @@ static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word)
 
     if (p_buf->len != 0)
     {
-        L2CAP_TRACE_WARNING1 ("Incorrect S-frame Length (%d)", p_buf->len);
+        L2CAP_TRACE_WARNING ("Incorrect S-frame Length (%d)", p_buf->len);
     }
 
-    L2CAP_TRACE_DEBUG2 ("process_s_frame ctrl_word 0x%04x fcrb_remote_busy:%d", ctrl_word, p_fcrb->remote_busy);
+    L2CAP_TRACE_DEBUG ("process_s_frame ctrl_word 0x%04x fcrb_remote_busy:%d", ctrl_word, p_fcrb->remote_busy);
 
 #if (L2CAP_ERTM_STATS == TRUE)
     p_ccb->fcrb.s_frames_rcvd[s_frame_type]++;
@@ -1086,7 +1086,7 @@ static void process_s_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word)
     }
     else
     {
-        L2CAP_TRACE_DEBUG0 ("process_s_frame hit_max_retries");
+        L2CAP_TRACE_DEBUG ("process_s_frame hit_max_retries");
     }
 
     GKI_freebuf (p_buf);
@@ -1128,7 +1128,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
     /* If we have flow controlled the peer, ignore any bad I-frames from him */
     if ( (tx_seq != p_fcrb->next_seq_expected) && (p_fcrb->local_busy) )
     {
-        L2CAP_TRACE_WARNING1 ("Dropping bad I-Frame since we flowed off, tx_seq:%u", tx_seq);
+        L2CAP_TRACE_WARNING ("Dropping bad I-Frame since we flowed off, tx_seq:%u", tx_seq);
         l2c_fcr_send_S_frame (p_ccb, L2CAP_FCR_SUP_RNR, 0);
         GKI_freebuf(p_buf);
         return;
@@ -1138,7 +1138,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
     /* received buffer now before we update any sequence numbers    */
     if (GKI_poolfreecount (p_ccb->ertm_info.user_rx_pool_id) == 0)
     {
-        L2CAP_TRACE_WARNING4 ("L2CAP CID: 0x%04x  Dropping I-Frame seq: %u  User RX Pool: %u  (Size: %u)  has no free buffers!!",
+        L2CAP_TRACE_WARNING ("L2CAP CID: 0x%04x  Dropping I-Frame seq: %u  User RX Pool: %u  (Size: %u)  has no free buffers!!",
                               p_ccb->local_cid, tx_seq, p_ccb->ertm_info.user_rx_pool_id,
                               GKI_poolcount (p_ccb->ertm_info.user_rx_pool_id));
         GKI_freebuf(p_buf);
@@ -1154,12 +1154,12 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
         if (num_lost >= p_ccb->our_cfg.fcr.tx_win_sz)
         {
             /* Duplicate - simply drop it */
-            L2CAP_TRACE_WARNING2 ("process_i_frame() Dropping Duplicate Frame tx_seq:%u  ExpectedTxSeq %u", tx_seq, p_fcrb->next_seq_expected);
+            L2CAP_TRACE_WARNING ("process_i_frame() Dropping Duplicate Frame tx_seq:%u  ExpectedTxSeq %u", tx_seq, p_fcrb->next_seq_expected);
             GKI_freebuf(p_buf);
         }
         else
         {
-            L2CAP_TRACE_WARNING6 ("process_i_frame() CID: 0x%04x  Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: %u  SRej: %u",
+            L2CAP_TRACE_WARNING ("process_i_frame() CID: 0x%04x  Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: %u  SRej: %u",
                                  p_ccb->local_cid, num_lost, tx_seq, p_fcrb->next_seq_expected, p_fcrb->rej_sent, p_fcrb->srej_sent);
 
             if (p_fcrb->srej_sent)
@@ -1188,7 +1188,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
                         p_buf->offset += L2CAP_FCR_OVERHEAD;
                         p_buf->len -= L2CAP_FCR_OVERHEAD;
                     }
-                    L2CAP_TRACE_DEBUG4 ("process_i_frame() Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: %u  SRej1",
+                    L2CAP_TRACE_DEBUG ("process_i_frame() Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: %u  SRej1",
                                          num_lost, tx_seq, p_fcrb->next_seq_expected, p_fcrb->rej_sent);
 
                     p_buf->layer_specific = tx_seq;
@@ -1196,7 +1196,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
                 }
                 else
                 {
-                    L2CAP_TRACE_WARNING4 ("process_i_frame() CID: 0x%04x  frame dropped in Srej Sent next_srej:%u  hold_q.count:%u  win_sz:%u",
+                    L2CAP_TRACE_WARNING ("process_i_frame() CID: 0x%04x  frame dropped in Srej Sent next_srej:%u  hold_q.count:%u  win_sz:%u",
                                          p_ccb->local_cid, next_srej, p_fcrb->srej_rcv_hold_q.count, p_ccb->our_cfg.fcr.tx_win_sz);
 
                     p_fcrb->rej_after_srej = TRUE;
@@ -1205,7 +1205,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
             }
             else if (p_fcrb->rej_sent)
             {
-                L2CAP_TRACE_WARNING5 ("process_i_frame() CID: 0x%04x  Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: 1  SRej: %u",
+                L2CAP_TRACE_WARNING ("process_i_frame() CID: 0x%04x  Lost: %u  tx_seq:%u  ExpTxSeq %u  Rej: 1  SRej: %u",
                                      p_ccb->local_cid, num_lost, tx_seq, p_fcrb->next_seq_expected, p_fcrb->srej_sent);
 
                 /* If REJ sent, just drop the frame */
@@ -1213,7 +1213,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
             }
             else
             {
-                L2CAP_TRACE_DEBUG4 ("process_i_frame() CID: 0x%04x  tx_seq:%u  ExpTxSeq %u  Rej: %u",
+                L2CAP_TRACE_DEBUG ("process_i_frame() CID: 0x%04x  tx_seq:%u  ExpTxSeq %u  Rej: %u",
                                      p_ccb->local_cid, tx_seq, p_fcrb->next_seq_expected, p_fcrb->rej_sent);
 
                 /* If only one lost, we will send SREJ, otherwise we will send REJ */
@@ -1227,7 +1227,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
                 {
                     if (p_fcrb->srej_rcv_hold_q.count != 0)
                     {
-                        L2CAP_TRACE_ERROR3 ("process_i_frame() CID: 0x%04x  sending SREJ tx_seq:%d hold_q.count:%u",
+                        L2CAP_TRACE_ERROR ("process_i_frame() CID: 0x%04x  sending SREJ tx_seq:%d hold_q.count:%u",
                                              p_ccb->local_cid, tx_seq, p_fcrb->srej_rcv_hold_q.count);
                     }
                     p_buf->layer_specific = tx_seq;
@@ -1251,7 +1251,7 @@ static void process_i_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_word, B
     /* If any SAR problem in eRTM mode, spec says disconnect. */
     if (!do_sar_reassembly (p_ccb, p_buf, ctrl_word))
     {
-        L2CAP_TRACE_WARNING1 ("process_i_frame() CID: 0x%04x  reassembly failed", p_ccb->local_cid);
+        L2CAP_TRACE_WARNING ("process_i_frame() CID: 0x%04x  reassembly failed", p_ccb->local_cid);
         l2cu_disconnect_chnl (p_ccb);
         return;
     }
@@ -1314,7 +1314,7 @@ static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf)
 
         if (l2c_fcr_rx_get_fcs(p_buf) != fcs)
         {
-            L2CAP_TRACE_WARNING1 ("Rx L2CAP PDU: CID: 0x%04x  BAD FCS", p_ccb->local_cid);
+            L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x  BAD FCS", p_ccb->local_cid);
             GKI_freebuf(p_buf);
             return;
         }
@@ -1331,13 +1331,13 @@ static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf)
     /* Make sure it is an I-frame */
     if (ctrl_word & L2CAP_FCR_S_FRAME_BIT)
     {
-        L2CAP_TRACE_WARNING2 ("Rx L2CAP PDU: CID: 0x%04x  BAD S-frame in streaming mode  ctrl_word: 0x%04x", p_ccb->local_cid, ctrl_word);
+        L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x  BAD S-frame in streaming mode  ctrl_word: 0x%04x", p_ccb->local_cid, ctrl_word);
         GKI_freebuf (p_buf);
         return;
     }
 
 #if BT_TRACE_VERBOSE == TRUE
-    L2CAP_TRACE_EVENT6 ("L2CAP eRTM Rx I-frame: cid: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
+    L2CAP_TRACE_EVENT ("L2CAP eRTM Rx I-frame: cid: 0x%04x  Len: %u  SAR: %-12s  TxSeq: %u  ReqSeq: %u  F: %u",
                         p_ccb->local_cid, p_buf->len,
                         SAR_types[(ctrl_word & L2CAP_FCR_SAR_BITS) >> L2CAP_FCR_SAR_BITS_SHIFT],
                         (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT,
@@ -1351,7 +1351,7 @@ static void process_stream_frame (tL2C_CCB *p_ccb, BT_HDR *p_buf)
     /* Check if tx-sequence is the expected one */
     if (tx_seq != p_ccb->fcrb.next_seq_expected)
     {
-        L2CAP_TRACE_WARNING4 ("Rx L2CAP PDU: CID: 0x%04x  Lost frames Exp: %u  Got: %u  p_rx_sdu: 0x%08x",
+        L2CAP_TRACE_WARNING ("Rx L2CAP PDU: CID: 0x%04x  Lost frames Exp: %u  Got: %u  p_rx_sdu: 0x%08x",
                                 p_ccb->local_cid, p_ccb->fcrb.next_seq_expected, tx_seq, p_ccb->fcrb.p_rx_sdu);
 
         /* Lost one or more packets, so flush the SAR queue */
@@ -1397,7 +1397,7 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
     {
         if (p_fcrb->p_rx_sdu != NULL)
         {
-            L2CAP_TRACE_WARNING2 ("SAR - got unexpected unsegmented or start SDU  Expected len: %u  Got so far: %u",
+            L2CAP_TRACE_WARNING ("SAR - got unexpected unsegmented or start SDU  Expected len: %u  Got so far: %u",
                                   p_fcrb->rx_sdu_len, p_fcrb->p_rx_sdu->len);
 
             packet_ok = FALSE;
@@ -1405,7 +1405,7 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
         /* Check the length of the packet */
         if ( (sar_type == L2CAP_FCR_START_SDU) && (p_buf->len < L2CAP_SDU_LEN_OVERHEAD) )
         {
-            L2CAP_TRACE_WARNING1 ("SAR start packet too short: %u", p_buf->len);
+            L2CAP_TRACE_WARNING ("SAR start packet too short: %u", p_buf->len);
             packet_ok = FALSE;
         }
     }
@@ -1413,7 +1413,7 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
     {
         if (p_fcrb->p_rx_sdu == NULL)
         {
-            L2CAP_TRACE_WARNING0 ("SAR - got unexpected cont or end SDU");
+            L2CAP_TRACE_WARNING ("SAR - got unexpected cont or end SDU");
             packet_ok = FALSE;
         }
     }
@@ -1432,12 +1432,12 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
 
             if (p_fcrb->rx_sdu_len > p_ccb->max_rx_mtu)
             {
-                L2CAP_TRACE_WARNING2 ("SAR - SDU len: %u  larger than MTU: %u", p_fcrb->rx_sdu_len, p_fcrb->rx_sdu_len);
+                L2CAP_TRACE_WARNING ("SAR - SDU len: %u  larger than MTU: %u", p_fcrb->rx_sdu_len, p_fcrb->rx_sdu_len);
                 packet_ok = FALSE;
             }
             else if ((p_fcrb->p_rx_sdu = (BT_HDR *)GKI_getpoolbuf (p_ccb->ertm_info.user_rx_pool_id)) == NULL)
             {
-                L2CAP_TRACE_ERROR1 ("SAR - no buffer for SDU start user_rx_pool_id:%d", p_ccb->ertm_info.user_rx_pool_id);
+                L2CAP_TRACE_ERROR ("SAR - no buffer for SDU start user_rx_pool_id:%d", p_ccb->ertm_info.user_rx_pool_id);
                 packet_ok = FALSE;
             }
             else
@@ -1451,13 +1451,13 @@ static BOOLEAN do_sar_reassembly (tL2C_CCB *p_ccb, BT_HDR *p_buf, UINT16 ctrl_wo
         {
             if ((p_fcrb->p_rx_sdu->len + p_buf->len) > p_fcrb->rx_sdu_len)
             {
-                L2CAP_TRACE_ERROR4 ("SAR - SDU len exceeded  Type: %u   Lengths: %u %u %u",
+                L2CAP_TRACE_ERROR ("SAR - SDU len exceeded  Type: %u   Lengths: %u %u %u",
                                     sar_type, p_fcrb->p_rx_sdu->len, p_buf->len, p_fcrb->rx_sdu_len);
                 packet_ok = FALSE;
             }
             else if ( (sar_type == L2CAP_FCR_END_SDU) && ((p_fcrb->p_rx_sdu->len + p_buf->len) != p_fcrb->rx_sdu_len) )
             {
-                L2CAP_TRACE_WARNING3 ("SAR - SDU end rcvd but SDU incomplete: %u %u %u",
+                L2CAP_TRACE_WARNING ("SAR - SDU end rcvd but SDU incomplete: %u %u %u",
                                       p_fcrb->p_rx_sdu->len, p_buf->len, p_fcrb->rx_sdu_len);
                 packet_ok = FALSE;
             }
@@ -1521,7 +1521,7 @@ static BOOLEAN retransmit_i_frames (tL2C_CCB *p_ccb, UINT8 tx_seq)
      &&  (p_ccb->peer_cfg.fcr.max_transmit != 0)
      &&  (p_ccb->fcrb.num_tries >= p_ccb->peer_cfg.fcr.max_transmit) )
     {
-        L2CAP_TRACE_EVENT5 ("Max Tries Exceeded:  (last_acq: %d  CID: 0x%04x  num_tries: %u (max: %u) ack_q_count: %u",
+        L2CAP_TRACE_EVENT ("Max Tries Exceeded:  (last_acq: %d  CID: 0x%04x  num_tries: %u (max: %u) ack_q_count: %u",
                 p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
                 p_ccb->fcrb.waiting_for_ack_q.count);
 
@@ -1543,7 +1543,7 @@ static BOOLEAN retransmit_i_frames (tL2C_CCB *p_ccb, UINT8 tx_seq)
 
             buf_seq = (ctrl_word & L2CAP_FCR_TX_SEQ_BITS) >> L2CAP_FCR_TX_SEQ_BITS_SHIFT;
 
-            L2CAP_TRACE_DEBUG2 ("retransmit_i_frames()   cur seq: %u  looking for: %u", buf_seq, tx_seq);
+            L2CAP_TRACE_DEBUG ("retransmit_i_frames()   cur seq: %u  looking for: %u", buf_seq, tx_seq);
 
             if (tx_seq == buf_seq)
                 break;
@@ -1551,7 +1551,7 @@ static BOOLEAN retransmit_i_frames (tL2C_CCB *p_ccb, UINT8 tx_seq)
 
         if (!p_buf)
         {
-            L2CAP_TRACE_ERROR2 ("retransmit_i_frames() UNKNOWN seq: %u  q_count: %u", tx_seq, p_ccb->fcrb.waiting_for_ack_q.count);
+            L2CAP_TRACE_ERROR ("retransmit_i_frames() UNKNOWN seq: %u  q_count: %u", tx_seq, p_ccb->fcrb.waiting_for_ack_q.count);
             return (TRUE);
         }
     }
@@ -1699,7 +1699,7 @@ BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, UINT16 max_packet_length
         }
         else /* Should never happen if the application has configured buffers correctly */
         {
-            L2CAP_TRACE_ERROR1 ("L2CAP - cannot get buffer, for segmentation, pool: %u", p_ccb->ertm_info.fcr_tx_pool_id);
+            L2CAP_TRACE_ERROR ("L2CAP - cannot get buffer, for segmentation, pool: %u", p_ccb->ertm_info.fcr_tx_pool_id);
             return (NULL);
         }
     }
@@ -1760,7 +1760,7 @@ BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, UINT16 max_packet_length
 
         if (!p_wack)
         {
-            L2CAP_TRACE_ERROR3 ("L2CAP - no buffer for xmit cloning, CID: 0x%04x  Pool: %u  Count: %u",
+            L2CAP_TRACE_ERROR ("L2CAP - no buffer for xmit cloning, CID: 0x%04x  Pool: %u  Count: %u",
                                 p_ccb->local_cid, p_ccb->ertm_info.fcr_tx_pool_id,  GKI_poolfreecount(p_ccb->ertm_info.fcr_tx_pool_id));
 
             /* We will not save the FCS in case we reconfigure and change options */
@@ -1840,7 +1840,7 @@ UINT8 l2c_fcr_chk_chan_modes (tL2C_CCB *p_ccb)
     /* At least one type needs to be set (Basic, ERTM, STM) to continue */
     if (!p_ccb->ertm_info.allowed_modes)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - Peer does not support our desired channel types");
+        L2CAP_TRACE_WARNING ("L2CAP - Peer does not support our desired channel types");
     }
 
     return (p_ccb->ertm_info.allowed_modes);
@@ -1862,7 +1862,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
 
     if (p_fcr->mode != p_ccb->ertm_info.preferred_mode)
     {
-        L2CAP_TRACE_WARNING2 ("l2c_fcr_adj_our_req_options - preferred_mode (%d), does not match mode (%d)",
+        L2CAP_TRACE_WARNING ("l2c_fcr_adj_our_req_options - preferred_mode (%d), does not match mode (%d)",
                             p_ccb->ertm_info.preferred_mode, p_fcr->mode);
 
         /* The preferred mode is passed in through tL2CAP_ERTM_INFO, so override this one */
@@ -1874,7 +1874,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
     {
         if (p_cfg->fcr_present && p_fcr->mode != L2CAP_FCR_BASIC_MODE)
         {
-            L2CAP_TRACE_WARNING1 ("l2c_fcr_adj_our_req_options (mode %d): ERROR: No FCR options set using BASIC mode", p_fcr->mode);
+            L2CAP_TRACE_WARNING ("l2c_fcr_adj_our_req_options (mode %d): ERROR: No FCR options set using BASIC mode", p_fcr->mode);
         }
         p_fcr->mode = L2CAP_FCR_BASIC_MODE;
     }
@@ -1909,14 +1909,14 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
             /* If peer does not support STREAMING, try ERTM */
             if (p_fcr->mode == L2CAP_FCR_STREAM_MODE && !(p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_STREAM))
             {
-                L2CAP_TRACE_DEBUG0 ("L2C CFG: mode is STREAM, but peer does not support; Try ERTM");
+                L2CAP_TRACE_DEBUG ("L2C CFG: mode is STREAM, but peer does not support; Try ERTM");
                 p_fcr->mode = L2CAP_FCR_ERTM_MODE;
             }
 
             /* If peer does not support ERTM, try BASIC (will support this if made it here in the code) */
             if (p_fcr->mode == L2CAP_FCR_ERTM_MODE && !(p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_ERTM))
             {
-                L2CAP_TRACE_DEBUG0 ("L2C CFG: mode is ERTM, but peer does not support; Try BASIC");
+                L2CAP_TRACE_DEBUG ("L2C CFG: mode is ERTM, but peer does not support; Try BASIC");
                 p_fcr->mode = L2CAP_FCR_BASIC_MODE;
             }
         }
@@ -1926,7 +1926,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
             /* MTU must be smaller than buffer size */
             if ( (p_cfg->mtu_present) && (p_cfg->mtu > p_ccb->max_rx_mtu) )
             {
-                L2CAP_TRACE_WARNING2 ("L2CAP - MTU: %u  larger than buf size: %u", p_cfg->mtu, p_ccb->max_rx_mtu);
+                L2CAP_TRACE_WARNING ("L2CAP - MTU: %u  larger than buf size: %u", p_cfg->mtu, p_ccb->max_rx_mtu);
                 return (FALSE);
             }
 
@@ -1938,7 +1938,7 @@ BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
             /* MPS must be less than MTU */
             else if (p_fcr->mps > p_ccb->max_rx_mtu)
             {
-                L2CAP_TRACE_WARNING2 ("L2CAP - MPS  %u  invalid  MTU: %u", p_fcr->mps, p_ccb->max_rx_mtu);
+                L2CAP_TRACE_WARNING ("L2CAP - MPS  %u  invalid  MTU: %u", p_fcr->mps, p_ccb->max_rx_mtu);
                 return (FALSE);
             }
 
@@ -1994,7 +1994,7 @@ void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb)
             p_ccb->our_cfg.fcr.rtrans_tout = 0;
         }
 
-        L2CAP_TRACE_DEBUG2 ("l2c_fcr_adj_monitor_retran_timeout: mon_tout:%d, rtrans_tout:%d",
+        L2CAP_TRACE_DEBUG ("l2c_fcr_adj_monitor_retran_timeout: mon_tout:%d, rtrans_tout:%d",
                              p_ccb->our_cfg.fcr.mon_tout, p_ccb->our_cfg.fcr.rtrans_tout);
     }
 }
@@ -2024,7 +2024,7 @@ void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
         /* Note: peer is not guaranteed to obey our adjustment */
         if (p_ccb->peer_cfg.fcr.tx_win_sz > p_ccb->our_cfg.fcr.tx_win_sz)
         {
-            L2CAP_TRACE_DEBUG3 ("%s: adjusting requested tx_win_sz from %i to %i", __FUNCTION__, p_ccb->peer_cfg.fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz);
+            L2CAP_TRACE_DEBUG ("%s: adjusting requested tx_win_sz from %i to %i", __FUNCTION__, p_ccb->peer_cfg.fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz);
             p_ccb->peer_cfg.fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz;
         }
 // btla-specific --
@@ -2070,7 +2070,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
             if ((--p_ccb->fcr_cfg_tries) == 0)
             {
                 p_cfg->result = L2CAP_CFG_FAILED_NO_REASON;
-                L2CAP_TRACE_WARNING0 ("l2c_fcr_renegotiate_chan (Max retries exceeded)");
+                L2CAP_TRACE_WARNING ("l2c_fcr_renegotiate_chan (Max retries exceeded)");
             }
 
             can_renegotiate = FALSE;
@@ -2083,7 +2083,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
                 /* Peer wants ERTM and we support it */
                 if ( (peer_mode == L2CAP_FCR_ERTM_MODE) && (p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_ERTM) )
                 {
-                    L2CAP_TRACE_DEBUG0 ("l2c_fcr_renegotiate_chan(Trying ERTM)");
+                    L2CAP_TRACE_DEBUG ("l2c_fcr_renegotiate_chan(Trying ERTM)");
                     p_ccb->our_cfg.fcr.mode = L2CAP_FCR_ERTM_MODE;
                     can_renegotiate = TRUE;
                 }
@@ -2094,7 +2094,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
                     /* We can try basic for any other peer mode if we support it */
                     if (p_ccb->ertm_info.allowed_modes & L2CAP_FCR_CHAN_OPT_BASIC)
                     {
-                        L2CAP_TRACE_DEBUG0 ("l2c_fcr_renegotiate_chan(Trying Basic)");
+                        L2CAP_TRACE_DEBUG ("l2c_fcr_renegotiate_chan(Trying Basic)");
                         can_renegotiate = TRUE;
                         p_ccb->our_cfg.fcr.mode = L2CAP_FCR_BASIC_MODE;
                     }
@@ -2118,7 +2118,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
                     /* Basic Mode uses ACL Data Pool, make sure the MTU fits */
                     if ( (p_cfg->mtu_present) && (p_cfg->mtu > L2CAP_MTU_SIZE) )
                     {
-                        L2CAP_TRACE_WARNING1 ("L2CAP - adjust MTU: %u too large", p_cfg->mtu);
+                        L2CAP_TRACE_WARNING ("L2CAP - adjust MTU: %u too large", p_cfg->mtu);
                         p_cfg->mtu = L2CAP_MTU_SIZE;
                     }
                 }
@@ -2134,7 +2134,7 @@ BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
     /* Disconnect if the channels do not match */
     if (p_ccb->our_cfg.fcr.mode != peer_mode)
     {
-        L2CAP_TRACE_WARNING2 ("L2C CFG:  Channels incompatible (local %d, peer %d)",
+        L2CAP_TRACE_WARNING ("L2C CFG:  Channels incompatible (local %d, peer %d)",
                               p_ccb->our_cfg.fcr.mode, peer_mode);
         l2cu_disconnect_chnl (p_ccb);
     }
@@ -2161,7 +2161,7 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
 
     p_ccb->p_lcb->w4_info_rsp = FALSE;      /* Handles T61x SonyEricsson Bug in Info Request */
 
-    L2CAP_TRACE_EVENT5 ("l2c_fcr_process_peer_cfg_req() CFG fcr_present:%d fcr.mode:%d CCB FCR mode:%d preferred: %u allowed:%u",
+    L2CAP_TRACE_EVENT ("l2c_fcr_process_peer_cfg_req() CFG fcr_present:%d fcr.mode:%d CCB FCR mode:%d preferred: %u allowed:%u",
                         p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, p_ccb->ertm_info.preferred_mode,
                         p_ccb->ertm_info.allowed_modes);
 
@@ -2240,7 +2240,7 @@ UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
             /* Ensure the MPS is not bigger than our retransmission buffer */
             if (p_cfg->fcr.mps > max_retrans_size)
             {
-                L2CAP_TRACE_DEBUG2("CFG: Overriding MPS to %d (orig %d)", max_retrans_size, p_cfg->fcr.mps);
+                L2CAP_TRACE_DEBUG("CFG: Overriding MPS to %d (orig %d)", max_retrans_size, p_cfg->fcr.mps);
 
                 p_cfg->fcr.mps = max_retrans_size;
                 p_ccb->out_cfg_fcr_present = TRUE;
@@ -2314,7 +2314,7 @@ static BOOLEAN l2c_corrupt_the_fcr_packet (tL2C_CCB *p_ccb, BT_HDR *p_buf,
 
     p_cfg = &p_ccb->fcrb.test_cb.cfg;
 #if 0
-    L2CAP_TRACE_DEBUG4 ("testcfg: type: %d, freq: %d (NRM-0, RDM-1), is_rx: %d, count: %d",
+    L2CAP_TRACE_DEBUG ("testcfg: type: %d, freq: %d (NRM-0, RDM-1), is_rx: %d, count: %d",
         p_cfg->type, p_cfg->freq, p_cfg->is_rx, p_cfg->count);
 #endif
     /* If not time to corrupt get out */
@@ -2382,14 +2382,14 @@ static BOOLEAN l2c_corrupt_the_fcr_packet (tL2C_CCB *p_ccb, BT_HDR *p_buf,
     /* Lastly, just drop packet if FCS is not being used or if Tx */
     if (!is_rx || p_ccb->bypass_fcs == L2CAP_BYPASS_FCS)
     {
-        L2CAP_TRACE_ERROR6 ("-=-=-=-=-=-=-=-   Dropping %s packet (0x%04x) tc: %u  Buf Len: %u  xx: %u  count: %d",
+        L2CAP_TRACE_ERROR ("-=-=-=-=-=-=-=-   Dropping %s packet (0x%04x) tc: %u  Buf Len: %u  xx: %u  count: %d",
                         buf, (UINT32)p_buf, tc, p_buf->len, xx, p_cfg->count);
         GKI_freebuf(p_buf);
         return TRUE;
     }
     else
     {
-        L2CAP_TRACE_ERROR6 ("-=-=-=-=-=-=-=-   Corrupting %s packet (0x%04x) tc: %u  Buf Len: %u  xx: %u  count: %d",
+        L2CAP_TRACE_ERROR ("-=-=-=-=-=-=-=-   Corrupting %s packet (0x%04x) tc: %u  Buf Len: %u  xx: %u  count: %d",
                         buf, (UINT32)p_buf, tc, p_buf->len, xx, p_cfg->count);
     }
 
@@ -2451,7 +2451,7 @@ UINT16 L2CA_SetupErtmTest (UINT16 cid, UINT8 type, BOOLEAN is_rx, UINT8 freq, UI
     {
         if (type == L2CAP_FCR_TTYPE_GET_CID)
         {
-            L2CAP_TRACE_API1 ("L2CA_SetupErtmTest (GET_CID): cid = 0x%04x", cid);
+            L2CAP_TRACE_API ("L2CA_SetupErtmTest (GET_CID): cid = 0x%04x", cid);
         }
         return (cid);
     }
@@ -2463,7 +2463,7 @@ UINT16 L2CA_SetupErtmTest (UINT16 cid, UINT8 type, BOOLEAN is_rx, UINT8 freq, UI
     {
         if (p_test_cb->cfg.in_use)
         {
-            L2CAP_TRACE_ERROR1 ("L2CA_SetupErtmTest (OFF): cid 0x%04x", cid);
+            L2CAP_TRACE_ERROR ("L2CA_SetupErtmTest (OFF): cid 0x%04x", cid);
         }
         p_test_cb->cfg.in_use = FALSE;
         p_test_cb->cfg.count = 0;
@@ -2475,11 +2475,11 @@ UINT16 L2CA_SetupErtmTest (UINT16 cid, UINT8 type, BOOLEAN is_rx, UINT8 freq, UI
         /* count must be positive unless random is used */
         if (!count && freq != L2CAP_FCR_FREQ_RANDOM)
         {
-            L2CAP_TRACE_ERROR1 ("L2CA_SetupErtmTest (FAIL): Count = 0, freq = %d", freq);
+            L2CAP_TRACE_ERROR ("L2CA_SetupErtmTest (FAIL): Count = 0, freq = %d", freq);
             return (cid);
         }
 
-        L2CAP_TRACE_ERROR5 ("L2CA_SetupErtmTest (START): cid 0x%04x, type %d, is_rx %d, freq %d, count %d",
+        L2CAP_TRACE_ERROR ("L2CA_SetupErtmTest (START): cid 0x%04x, type %d, is_rx %d, freq %d, count %d",
                             cid, type, is_rx, freq, count);
 
         p_test_cb->cfg.in_use = TRUE;
@@ -2490,7 +2490,7 @@ UINT16 L2CA_SetupErtmTest (UINT16 cid, UINT8 type, BOOLEAN is_rx, UINT8 freq, UI
     }
     else /* Test already in progress so ignore */
     {
-        L2CAP_TRACE_ERROR5 ("L2CA_SetupErtmTest (ignoring): cid 0x%04x, type %d, is_rx %d, freq %d, count %d",
+        L2CAP_TRACE_ERROR ("L2CA_SetupErtmTest (ignoring): cid 0x%04x, type %d, is_rx %d, freq %d, count %d",
                             cid, type, is_rx, freq, count);
     }
 
@@ -2527,7 +2527,7 @@ void L2CA_SendPolledSFrame (UINT16 cid, UINT16 sup_type)
     }
     else
     {
-        L2CAP_TRACE_ERROR2 ("L2CA_SendPolledSFrame(ERROR): sup_type %u, p_ccb 0x%07x",
+        L2CAP_TRACE_ERROR ("L2CA_SendPolledSFrame(ERROR): sup_type %u, p_ccb 0x%07x",
                             sup_type, (UINT32)p_ccb);
     }
 }
@@ -2548,7 +2548,7 @@ static BOOLEAN l2c_bypass_sframe_packet (tL2C_CCB *p_ccb)
     {
         if (p_ccb->fcrb.test_cb.cfm.skip_sframe_count > 0)
         {
-            L2CAP_TRACE_ERROR1 ("l2c_bypass_sframe_packet (count %d)",
+            L2CAP_TRACE_ERROR ("l2c_bypass_sframe_packet (count %d)",
                                 p_ccb->fcrb.test_cb.cfm.skip_sframe_count);
 
             if (--p_ccb->fcrb.test_cb.cfm.skip_sframe_count == 0)
@@ -2586,7 +2586,7 @@ void L2CA_BypassSFrame (UINT16 cid, UINT8 count)
 
     if (!p_ccb)
     {
-        L2CAP_TRACE_WARNING1 ("L2CA_BypassSFrame(ERROR): no p_ccb (0x%07x)", (UINT32)p_ccb);
+        L2CAP_TRACE_WARNING ("L2CA_BypassSFrame(ERROR): no p_ccb (0x%07x)", (UINT32)p_ccb);
         return;
     }
 
@@ -2600,7 +2600,7 @@ void L2CA_BypassSFrame (UINT16 cid, UINT8 count)
     }
     else
     {
-        L2CAP_TRACE_WARNING0 ("L2CA_BypassSFrame(ERROR): already in use (ignoring...)");
+        L2CAP_TRACE_WARNING ("L2CA_BypassSFrame(ERROR): already in use (ignoring...)");
     }
 }
 
index f5e8294..0ff79df 100644 (file)
@@ -74,7 +74,7 @@ BOOLEAN l2c_link_hci_conn_req (BD_ADDR bd_addr)
         if (!p_lcb)
         {
             btsnd_hcic_reject_conn (bd_addr, HCI_ERR_HOST_REJECT_RESOURCES);
-            L2CAP_TRACE_ERROR0 ("L2CAP failed to allocate LCB");
+            L2CAP_TRACE_ERROR ("L2CAP failed to allocate LCB");
             return FALSE;
         }
 
@@ -134,7 +134,7 @@ BOOLEAN l2c_link_hci_conn_req (BD_ADDR bd_addr)
     }
     else
     {
-        L2CAP_TRACE_ERROR1("L2CAP got conn_req while connected (state:%d). Reject it",
+        L2CAP_TRACE_ERROR("L2CAP got conn_req while connected (state:%d). Reject it",
                 p_lcb->link_state);
         /* Reject the connection with ACL Connection Already exist reason */
         btsnd_hcic_reject_conn (bd_addr, HCI_ERR_CONNECTION_EXISTS);
@@ -173,13 +173,13 @@ BOOLEAN l2c_link_hci_conn_comp (UINT8 status, UINT16 handle, BD_ADDR p_bda)
     /* If we don't have one, this is an error */
     if (!p_lcb)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP got conn_comp for unknown BD_ADDR");
+        L2CAP_TRACE_WARNING ("L2CAP got conn_comp for unknown BD_ADDR");
         return (FALSE);
     }
 
     if (p_lcb->link_state != LST_CONNECTING)
     {
-        L2CAP_TRACE_ERROR2 ("L2CAP got conn_comp in bad state: %d  status: 0x%d", p_lcb->link_state, status);
+        L2CAP_TRACE_ERROR ("L2CAP got conn_comp in bad state: %d  status: 0x%d", p_lcb->link_state, status);
 
         if (status != HCI_SUCCESS)
             l2c_link_hci_disc_comp (p_lcb->handle, status);
@@ -300,7 +300,7 @@ void l2c_link_sec_comp (BD_ADDR p_bda, tBT_TRANSPORT transport, void *p_ref_data
 
     UNUSED(transport);
 
-    L2CAP_TRACE_DEBUG2 ("l2c_link_sec_comp: %d, 0x%x", status, p_ref_data);
+    L2CAP_TRACE_DEBUG ("l2c_link_sec_comp: %d, 0x%x", status, p_ref_data);
 
     if (status == BTM_SUCCESS_NO_SECURITY)
         status = BTM_SUCCESS;
@@ -314,7 +314,7 @@ void l2c_link_sec_comp (BD_ADDR p_bda, tBT_TRANSPORT transport, void *p_ref_data
     /* If we don't have one, this is an error */
     if (!p_lcb)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP got sec_comp for unknown BD_ADDR");
+        L2CAP_TRACE_WARNING ("L2CAP got sec_comp for unknown BD_ADDR");
         return;
     }
 
@@ -328,7 +328,7 @@ void l2c_link_sec_comp (BD_ADDR p_bda, tBT_TRANSPORT transport, void *p_ref_data
             switch(status)
             {
             case BTM_SUCCESS:
-                L2CAP_TRACE_DEBUG1 ("ccb timer ticks: %u", p_ccb->timer_entry.ticks);
+                L2CAP_TRACE_DEBUG ("ccb timer ticks: %u", p_ccb->timer_entry.ticks);
                 event = L2CEVT_SEC_COMP;
                 break;
 
@@ -448,7 +448,7 @@ BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason)
 
             }
 #endif
-            L2CAP_TRACE_DEBUG0("l2c_link_hci_disc_comp: Restarting pending ACL request");
+            L2CAP_TRACE_DEBUG("l2c_link_hci_disc_comp: Restarting pending ACL request");
 
             if (l2cu_create_conn(p_lcb, transport))
                 lcb_is_free = FALSE; /* still using this lcb */
@@ -521,7 +521,7 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
     UINT16      timeout;
     tBTM_STATUS rc;
 
-     L2CAP_TRACE_EVENT3 ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
+     L2CAP_TRACE_EVENT ("L2CAP - l2c_link_timeout() link state %d first CCB %p is_bonding:%d",
          p_lcb->link_state, p_lcb->ccb_queue.p_first_ccb, p_lcb->is_bonding);
 
     /* If link was connecting or disconnecting, clear all channels and drop the LCB */
@@ -566,7 +566,7 @@ void l2c_link_timeout (tL2C_LCB *p_lcb)
 
             (*p_cb) (L2CAP_PING_RESULT_NO_RESP);
 
-             L2CAP_TRACE_WARNING0 ("L2CAP - ping timeout");
+             L2CAP_TRACE_WARNING ("L2CAP - ping timeout");
 
             /* For all channels, send a disconnect indication event through */
             /* their FSMs. The CCBs should remove themselves from the LCB   */
@@ -759,7 +759,7 @@ void l2c_link_adjust_allocation (void)
         qq = qq_remainder = 0;
     }
 
-    L2CAP_TRACE_EVENT5 ("l2c_link_adjust_allocation  num_hipri: %u  num_lowpri: %u  low_quota: %u  round_robin_quota: %u  qq: %u",
+    L2CAP_TRACE_EVENT ("l2c_link_adjust_allocation  num_hipri: %u  num_lowpri: %u  low_quota: %u  round_robin_quota: %u  qq: %u",
                         num_hipri_links, num_lowpri_links, low_quota,
                         l2cb.round_robin_quota, qq);
 
@@ -791,10 +791,10 @@ void l2c_link_adjust_allocation (void)
 #if L2CAP_HOST_FLOW_CTRL
             p_lcb->link_ack_thresh = L2CAP_HOST_FC_ACL_BUFS / l2cb.num_links_active;
 #endif
-            L2CAP_TRACE_EVENT3 ("l2c_link_adjust_allocation LCB %d   Priority: %d  XmitQuota: %d",
+            L2CAP_TRACE_EVENT ("l2c_link_adjust_allocation LCB %d   Priority: %d  XmitQuota: %d",
                                 yy, p_lcb->acl_priority, p_lcb->link_xmit_quota);
 
-            L2CAP_TRACE_EVENT2 ("        SentNotAcked: %d  RRUnacked: %d",
+            L2CAP_TRACE_EVENT ("        SentNotAcked: %d  RRUnacked: %d",
                                 p_lcb->sent_not_acked, l2cb.round_robin_unacked);
 
             /* There is a special case where we have readjusted the link quotas and  */
@@ -832,7 +832,7 @@ void l2c_link_adjust_chnl_allocation (void)
     UINT16      quota_per_weighted_chnls[GKI_NUM_TOTAL_BUF_POOLS];
     UINT16      reserved_buff[GKI_NUM_TOTAL_BUF_POOLS];
 
-    L2CAP_TRACE_DEBUG0 ("l2c_link_adjust_chnl_allocation");
+    L2CAP_TRACE_DEBUG ("l2c_link_adjust_chnl_allocation");
 
     /* initialize variables */
     for (xx = 0; xx < GKI_NUM_TOTAL_BUF_POOLS; xx++ )
@@ -886,7 +886,7 @@ void l2c_link_adjust_chnl_allocation (void)
             else
                 quota_per_weighted_chnls[xx] = 1;
 
-            L2CAP_TRACE_DEBUG5 ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
+            L2CAP_TRACE_DEBUG ("POOL ID:%d, GKI_poolcount = %d, reserved_buff = %d, weighted_chnls = %d, quota_per_weighted_chnls = %d",
                                  xx, GKI_poolcount(xx), reserved_buff[xx], weighted_chnls[xx], quota_per_weighted_chnls[xx] );
         }
         else
@@ -906,7 +906,7 @@ void l2c_link_adjust_chnl_allocation (void)
         {
             p_ccb->buff_quota = quota_per_weighted_chnls[p_ccb->ertm_info.user_tx_pool_id] * p_ccb->tx_data_rate;
 
-            L2CAP_TRACE_EVENT6 ("CID:0x%04x FCR Mode:%u UserTxPool:%u Priority:%u TxDataRate:%u Quota:%u",
+            L2CAP_TRACE_EVENT ("CID:0x%04x FCR Mode:%u UserTxPool:%u Priority:%u TxDataRate:%u Quota:%u",
                                 p_ccb->local_cid, p_ccb->peer_cfg.fcr.mode, p_ccb->ertm_info.user_tx_pool_id,
                                 p_ccb->ccb_priority, p_ccb->tx_data_rate, p_ccb->buff_quota);
 
@@ -915,7 +915,7 @@ void l2c_link_adjust_chnl_allocation (void)
         {
             p_ccb->buff_quota = quota_per_weighted_chnls[HCI_ACL_POOL_ID] * p_ccb->tx_data_rate;
 
-            L2CAP_TRACE_EVENT4 ("CID:0x%04x Priority:%u TxDataRate:%u Quota:%u",
+            L2CAP_TRACE_EVENT ("CID:0x%04x Priority:%u TxDataRate:%u Quota:%u",
                                 p_ccb->local_cid,
                                 p_ccb->ccb_priority, p_ccb->tx_data_rate, p_ccb->buff_quota);
         }
@@ -1086,7 +1086,7 @@ BOOLEAN l2c_link_check_power_mode (tL2C_LCB *p_lcb)
         {
             if ( mode == BTM_PM_STS_PENDING )
             {
-                L2CAP_TRACE_DEBUG1 ("LCB(0x%x) is in PM pending state", p_lcb->handle);
+                L2CAP_TRACE_DEBUG ("LCB(0x%x) is in PM pending state", p_lcb->handle);
 
                 return TRUE;
             }
@@ -1367,7 +1367,7 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
 #if (BLE_INCLUDED == TRUE)
     if (p_lcb->transport == BT_TRANSPORT_LE)
     {
-        L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
+        L2CAP_TRACE_DEBUG ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
                 l2cb.controller_le_xmit_window,
                 p_lcb->handle,
                 p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
@@ -1376,7 +1376,7 @@ static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf)
     else
 #endif
     {
-        L2CAP_TRACE_DEBUG6 ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
+        L2CAP_TRACE_DEBUG ("TotalWin=%d,Hndl=0x%x,Quota=%d,Unack=%d,RRQuota=%d,RRUnack=%d",
                 l2cb.controller_xmit_window,
                 p_lcb->handle,
                 p_lcb->link_xmit_quota, p_lcb->sent_not_acked,
@@ -1418,7 +1418,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
         /* Originally designed for [3DSG]                   */
         if((p_lcb != NULL) && (p_lcb->p_nocp_cb))
         {
-            L2CAP_TRACE_DEBUG0 ("L2CAP - calling NoCP callback");
+            L2CAP_TRACE_DEBUG ("L2CAP - calling NoCP callback");
             (*p_lcb->p_nocp_cb)(p_lcb->remote_bd_addr);
         }
 
@@ -1466,7 +1466,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
 #if (BLE_INCLUDED == TRUE)
             if (p_lcb->transport == BT_TRANSPORT_LE)
             {
-                L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
+                L2CAP_TRACE_DEBUG ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
                     l2cb.controller_le_xmit_window,
                     p_lcb->handle, p_lcb->sent_not_acked,
                     l2cb.check_round_robin, l2cb.round_robin_unacked);
@@ -1474,7 +1474,7 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
             else
 #endif
             {
-                L2CAP_TRACE_DEBUG5 ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
+                L2CAP_TRACE_DEBUG ("TotalWin=%d,LinkUnack(0x%x)=%d,RRCheck=%d,RRUnack=%d",
                     l2cb.controller_xmit_window,
                     p_lcb->handle, p_lcb->sent_not_acked,
                     l2cb.check_round_robin, l2cb.round_robin_unacked);
@@ -1484,13 +1484,13 @@ void l2c_link_process_num_completed_pkts (UINT8 *p)
         else
         {
 #if (BLE_INCLUDED == TRUE)
-            L2CAP_TRACE_DEBUG5 ("TotalWin=%d  LE_Win: %d, Handle=0x%x, RRCheck=%d, RRUnack=%d",
+            L2CAP_TRACE_DEBUG ("TotalWin=%d  LE_Win: %d, Handle=0x%x, RRCheck=%d, RRUnack=%d",
                 l2cb.controller_xmit_window,
                 l2cb.controller_le_xmit_window,
                 handle,
                 l2cb.check_round_robin, l2cb.round_robin_unacked);
 #else
-            L2CAP_TRACE_DEBUG4 ("TotalWin=%d  Handle=0x%x  RRCheck=%d  RRUnack=%d",
+            L2CAP_TRACE_DEBUG ("TotalWin=%d  Handle=0x%x  RRCheck=%d  RRUnack=%d",
                 l2cb.controller_xmit_window,
                 handle,
                 l2cb.check_round_robin, l2cb.round_robin_unacked);
@@ -1566,7 +1566,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
         /* a packet, it is incomplete. Drop it.                   */
         if (p_lcb->p_hcit_rcv_acl)
         {
-            L2CAP_TRACE_WARNING0 ("L2CAP - dropping incomplete pkt");
+            L2CAP_TRACE_WARNING ("L2CAP - dropping incomplete pkt");
             GKI_freebuf (p_lcb->p_hcit_rcv_acl);
             p_lcb->p_hcit_rcv_acl = NULL;
         }
@@ -1623,7 +1623,7 @@ BT_HDR *l2cap_link_chk_pkt_start (BT_HDR *p_cur_buf)
             else
             {
                 /* Packet too long. Drop the base packet */
-                L2CAP_TRACE_WARNING3 ("L2CAP - dropping too long pkt BufLen: %d  total_len: %d  hci_len: %d",
+                L2CAP_TRACE_WARNING ("L2CAP - dropping too long pkt BufLen: %d  total_len: %d  hci_len: %d",
                                       p_lcb->p_hcit_rcv_acl->len, total_len, hci_len);
 
                 GKI_freebuf (p_lcb->p_hcit_rcv_acl);
@@ -1710,7 +1710,7 @@ void l2c_link_segments_xmitted (BT_HDR *p_msg)
     /* Find the LCB based on the handle */
     if ((p_lcb = l2cu_find_lcb_by_handle (handle)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - rcvd segment complete, unknown handle: %d", handle);
+        L2CAP_TRACE_WARNING ("L2CAP - rcvd segment complete, unknown handle: %d", handle);
         GKI_freebuf (p_msg);
         return;
     }
index 2795d8c..96ff2d5 100644 (file)
@@ -67,7 +67,7 @@ void l2c_bcst_msg( BT_HDR *p_buf, UINT16 psm )
     /* Ensure we have enough space in the buffer for the L2CAP and HCI headers */
     if (p_buf->offset < L2CAP_BCST_MIN_OFFSET)
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - cannot send buffer, offset: %d", p_buf->offset);
+        L2CAP_TRACE_ERROR ("L2CAP - cannot send buffer, offset: %d", p_buf->offset);
         GKI_freebuf (p_buf);
         return;
     }
@@ -150,7 +150,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
             if ((p_msg->layer_specific == 0) && (rcv_cid == L2CAP_SIGNALLING_CID)
                 && (cmd_code == L2CAP_CMD_INFO_REQ || cmd_code == L2CAP_CMD_CONN_REQ))
             {
-                L2CAP_TRACE_WARNING5 ("L2CAP - holding ACL for unknown handle:%d ls:%d cid:%d opcode:%d cur count:%d",
+                L2CAP_TRACE_WARNING ("L2CAP - holding ACL for unknown handle:%d ls:%d cid:%d opcode:%d cur count:%d",
                                     handle, p_msg->layer_specific, rcv_cid, cmd_code,
                                     l2cb.rcv_hold_q.count);
                 p_msg->layer_specific = 2;
@@ -163,7 +163,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
             }
             else
             {
-                L2CAP_TRACE_ERROR5 ("L2CAP - rcvd ACL for unknown handle:%d ls:%d cid:%d opcode:%d cur count:%d",
+                L2CAP_TRACE_ERROR ("L2CAP - rcvd ACL for unknown handle:%d ls:%d cid:%d opcode:%d cur count:%d",
                                     handle, p_msg->layer_specific, rcv_cid, cmd_code, l2cb.rcv_hold_q.count);
             }
             GKI_freebuf (p_msg);
@@ -172,7 +172,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
     }
     else
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - expected pkt start or complete, got: %d", pkt_type);
+        L2CAP_TRACE_WARNING ("L2CAP - expected pkt start or complete, got: %d", pkt_type);
         GKI_freebuf (p_msg);
         return;
     }
@@ -196,7 +196,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
     {
         if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, rcv_cid)) == NULL)
         {
-            L2CAP_TRACE_WARNING1 ("L2CAP - unknown CID: 0x%04x", rcv_cid);
+            L2CAP_TRACE_WARNING ("L2CAP - unknown CID: 0x%04x", rcv_cid);
             GKI_freebuf (p_msg);
             return;
         }
@@ -209,14 +209,14 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
     }
     else
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - got incorrect hci header" );
+        L2CAP_TRACE_WARNING ("L2CAP - got incorrect hci header" );
         GKI_freebuf (p_msg);
         return;
     }
 
     if (l2cap_len != p_msg->len)
     {
-        L2CAP_TRACE_WARNING2 ("L2CAP - bad length in pkt. Exp: %d  Act: %d",
+        L2CAP_TRACE_WARNING ("L2CAP - bad length in pkt. Exp: %d  Act: %d",
                               l2cap_len, p_msg->len);
 
         GKI_freebuf (p_msg);
@@ -233,7 +233,7 @@ void l2c_rcv_acl_data (BT_HDR *p_msg)
     {
         /* process_connectionless_data (p_lcb); */
         STREAM_TO_UINT16 (psm, p);
-        L2CAP_TRACE_DEBUG1( "GOT CONNECTIONLESS DATA PSM:%d", psm ) ;
+        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)
         {
@@ -340,7 +340,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
         ** Here we simply mark the bad packet and decide which cmd ID to reject later
         */
         pkt_size_rej = TRUE;
-        L2CAP_TRACE_ERROR1 ("L2CAP SIG MTU Pkt Len Exceeded (672) -> pkt_len: %d", pkt_len);
+        L2CAP_TRACE_ERROR ("L2CAP SIG MTU Pkt Len Exceeded (672) -> pkt_len: %d", pkt_len);
     }
 
     p_next_cmd = p;
@@ -362,12 +362,12 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
         /* Check command length does not exceed packet length */
         if ((p_next_cmd = p + cmd_len) > p_pkt_end)
         {
-            L2CAP_TRACE_WARNING3 ("Command len bad  pkt_len: %d  cmd_len: %d  code: %d",
+            L2CAP_TRACE_WARNING ("Command len bad  pkt_len: %d  cmd_len: %d  code: %d",
                                   pkt_len, cmd_len, cmd_code);
             break;
         }
 
-        L2CAP_TRACE_DEBUG3 ("cmd_code: %d, id:%d, cmd_len:%d", cmd_code, id, cmd_len);
+        L2CAP_TRACE_DEBUG ("cmd_code: %d, id:%d, cmd_len:%d", cmd_code, id, cmd_len);
 
         /* Bad L2CAP packet length, look or cmd to reject */
         if (pkt_size_rej)
@@ -389,14 +389,14 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
                 /* What to do with the MTU reject ? We have negotiated an MTU. For now */
                 /* we will ignore it and let a higher protocol timeout take care of it */
 
-                L2CAP_TRACE_WARNING2 ("L2CAP - MTU rej Handle: %d MTU: %d", p_lcb->handle, rej_mtu);
+                L2CAP_TRACE_WARNING ("L2CAP - MTU rej Handle: %d MTU: %d", p_lcb->handle, rej_mtu);
             }
             if (rej_reason == L2CAP_CMD_REJ_INVALID_CID)
             {
                 STREAM_TO_UINT16 (rcid, p);
                 STREAM_TO_UINT16 (lcid, p);
 
-                L2CAP_TRACE_WARNING2 ("L2CAP - rej with CID invalid, LCID: 0x%04x RCID: 0x%04x", lcid, rcid);
+                L2CAP_TRACE_WARNING ("L2CAP - rej with CID invalid, LCID: 0x%04x RCID: 0x%04x", lcid, rcid);
 
                 /* Remote CID invalid. Treat as a disconnect */
                 if (((p_ccb = l2cu_find_ccb_by_cid (p_lcb, lcid)) != NULL)
@@ -429,7 +429,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             STREAM_TO_UINT16 (rcid, p);
             if ((p_rcb = l2cu_find_rcb_by_psm (con_info.psm)) == NULL)
             {
-                L2CAP_TRACE_WARNING1 ("L2CAP - rcvd conn req for unknown PSM: %d", con_info.psm);
+                L2CAP_TRACE_WARNING ("L2CAP - rcvd conn req for unknown PSM: %d", con_info.psm);
                 l2cu_reject_connection (p_lcb, rcid, id, L2CAP_CONN_NO_PSM);
                 break;
             }
@@ -437,14 +437,14 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             {
                 if (!p_rcb->api.pL2CA_ConnectInd_Cb)
                 {
-                    L2CAP_TRACE_WARNING1 ("L2CAP - rcvd conn req for outgoing-only connection PSM: %d", con_info.psm);
+                    L2CAP_TRACE_WARNING ("L2CAP - rcvd conn req for outgoing-only connection PSM: %d", con_info.psm);
                     l2cu_reject_connection (p_lcb, rcid, id, L2CAP_CONN_NO_PSM);
                     break;
                 }
             }
             if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL)
             {
-                L2CAP_TRACE_ERROR0 ("L2CAP - unable to allocate CCB");
+                L2CAP_TRACE_ERROR ("L2CAP - unable to allocate CCB");
                 l2cu_reject_connection (p_lcb, rcid, id, L2CAP_CONN_NO_RESOURCES);
                 break;
             }
@@ -463,13 +463,13 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
 
             if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, lcid)) == NULL)
             {
-                L2CAP_TRACE_WARNING2 ("L2CAP - no CCB for conn rsp, LCID: %d RCID: %d",
+                L2CAP_TRACE_WARNING ("L2CAP - no CCB for conn rsp, LCID: %d RCID: %d",
                                       lcid, con_info.remote_cid);
                 break;
             }
             if (p_ccb->local_id != id)
             {
-                L2CAP_TRACE_WARNING2 ("L2CAP - con rsp - bad ID. Exp: %d Got: %d",
+                L2CAP_TRACE_WARNING ("L2CAP - con rsp - bad ID. Exp: %d Got: %d",
                                       p_ccb->local_id, id);
                 break;
             }
@@ -657,7 +657,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             {
                 if (p_ccb->local_id != id)
                 {
-                    L2CAP_TRACE_WARNING2 ("L2CAP - cfg rsp - bad ID. Exp: %d Got: %d",
+                    L2CAP_TRACE_WARNING ("L2CAP - cfg rsp - bad ID. Exp: %d Got: %d",
                                           p_ccb->local_id, id);
                     break;
                 }
@@ -668,7 +668,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             }
             else
             {
-                L2CAP_TRACE_WARNING1 ("L2CAP - rcvd cfg rsp for unknown CID: 0x%04x", lcid);
+                L2CAP_TRACE_WARNING ("L2CAP - rcvd cfg rsp for unknown CID: 0x%04x", lcid);
             }
             break;
 
@@ -786,7 +786,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
             break;
 
         default:
-            L2CAP_TRACE_WARNING1 ("L2CAP - bad cmd code: %d", cmd_code);
+            L2CAP_TRACE_WARNING ("L2CAP - bad cmd code: %d", cmd_code);
             l2cu_send_peer_cmd_reject (p_lcb, L2CAP_CMD_REJ_NOT_UNDERSTOOD, id, 0, 0);
             return;
         }
@@ -815,11 +815,11 @@ void l2c_process_held_packets (BOOLEAN timed_out)
     if (!timed_out)
     {
         btu_stop_timer(&l2cb.rcv_hold_tle);
-        L2CAP_TRACE_WARNING0("L2CAP HOLD CONTINUE");
+        L2CAP_TRACE_WARNING("L2CAP HOLD CONTINUE");
     }
     else
     {
-        L2CAP_TRACE_WARNING0("L2CAP HOLD TIMEOUT");
+        L2CAP_TRACE_WARNING("L2CAP HOLD TIMEOUT");
     }
 
     /* Update the timeouts in the hold queue */
@@ -961,7 +961,7 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
     /* Find the channel control block. We don't know the link it is on. */
     if ((p_ccb = l2cu_find_ccb_by_cid (NULL, cid)) == NULL)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no CCB for L2CA_DataWrite, CID: %d", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_DataWrite, CID: %d", cid);
         GKI_freebuf (p_data);
         return (L2CAP_DW_FAILED);
     }
@@ -970,7 +970,7 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
                   bigger than mtu size of peer is a violation of protocol */
     if (p_data->len > p_ccb->peer_cfg.mtu)
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - CID: 0x%04x  cannot send message bigger than peer's mtu size", cid);
+        L2CAP_TRACE_WARNING ("L2CAP - CID: 0x%04x  cannot send message bigger than peer's mtu size", cid);
         GKI_freebuf (p_data);
         return (L2CAP_DW_FAILED);
     }
@@ -982,7 +982,7 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
     /* If already congested, do not accept any more packets */
     if (p_ccb->cong_sent)
     {
-        L2CAP_TRACE_ERROR3 ("L2CAP - CID: 0x%04x cannot send, already congested  xmit_hold_q.count: %u  buff_quota: %u",
+        L2CAP_TRACE_ERROR ("L2CAP - CID: 0x%04x cannot send, already congested  xmit_hold_q.count: %u  buff_quota: %u",
                             p_ccb->local_cid, p_ccb->xmit_hold_q.count, p_ccb->buff_quota);
 
         GKI_freebuf (p_data);
index 4f907ad..2e5f00e 100644 (file)
@@ -53,7 +53,7 @@ static void l2c_ucd_discover_cback (BD_ADDR rem_bda, UINT8 info_type, UINT32 dat
     tL2C_RCB    *p_rcb = &l2cb.rcb_pool[0];
     UINT16      xx;
 
-    L2CAP_TRACE_DEBUG0 ("L2CAP - l2c_ucd_discover_cback");
+    L2CAP_TRACE_DEBUG ("L2CAP - l2c_ucd_discover_cback");
 
     for (xx = 0; xx < MAX_L2CAP_CLIENTS; xx++, p_rcb++)
     {
@@ -93,7 +93,7 @@ static void l2c_ucd_data_ind_cback (BD_ADDR rem_bda, BT_HDR *p_buf)
     UINT16 psm;
     tL2C_RCB    *p_rcb;
 
-    L2CAP_TRACE_DEBUG0 ("L2CAP - l2c_ucd_data_ind_cback");
+    L2CAP_TRACE_DEBUG ("L2CAP - l2c_ucd_data_ind_cback");
 
     p = (UINT8 *)(p_buf + 1) + p_buf->offset;
     STREAM_TO_UINT16(psm, p)
@@ -103,7 +103,7 @@ static void l2c_ucd_data_ind_cback (BD_ADDR rem_bda, BT_HDR *p_buf)
 
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - no RCB for l2c_ucd_data_ind_cback, PSM: 0x%04x", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - no RCB for l2c_ucd_data_ind_cback, PSM: 0x%04x", psm);
         GKI_freebuf (p_buf);
     }
     else
@@ -126,7 +126,7 @@ static void l2c_ucd_congestion_status_cback (BD_ADDR rem_bda, BOOLEAN is_congest
     tL2C_RCB    *p_rcb = &l2cb.rcb_pool[0];
     UINT16      xx;
 
-    L2CAP_TRACE_DEBUG0 ("L2CAP - l2c_ucd_congestion_status_cback");
+    L2CAP_TRACE_DEBUG ("L2CAP - l2c_ucd_congestion_status_cback");
 
     for (xx = 0; xx < MAX_L2CAP_CLIENTS; xx++, p_rcb++)
     {
@@ -135,7 +135,7 @@ static void l2c_ucd_congestion_status_cback (BD_ADDR rem_bda, BOOLEAN is_congest
         {
             if ( p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb )
             {
-                L2CAP_TRACE_DEBUG4 ("L2CAP - Calling UCDCongestionStatus_Cb (%d), PSM=0x%04x, BDA: %08x%04x,",
+                L2CAP_TRACE_DEBUG ("L2CAP - Calling UCDCongestionStatus_Cb (%d), PSM=0x%04x, BDA: %08x%04x,",
                                     is_congested, p_rcb->psm,
                                     (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                                     (rem_bda[4]<<8)+rem_bda[5]);
@@ -203,18 +203,18 @@ BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info )
 {
     tL2C_RCB             *p_rcb;
 
-    L2CAP_TRACE_API1  ("L2CA_UcdRegister()  PSM: 0x%04x", psm);
+    L2CAP_TRACE_API  ("L2CA_UcdRegister()  PSM: 0x%04x", psm);
 
     if ((!p_cb_info->pL2CA_UCD_Discover_Cb)
      || (!p_cb_info->pL2CA_UCD_Data_Cb))
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - no callback registering PSM(0x%04x) on UCD", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - no callback registering PSM(0x%04x) on UCD", psm);
         return (FALSE);
     }
 
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - no RCB for L2CA_UcdRegister, PSM: 0x%04x", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - no RCB for L2CA_UcdRegister, PSM: 0x%04x", psm);
         return (FALSE);
     }
 
@@ -226,7 +226,7 @@ BOOLEAN L2CA_UcdRegister ( UINT16 psm, tL2CAP_UCD_CB_INFO *p_cb_info )
     {
         if ((p_rcb = l2cu_allocate_rcb (L2C_UCD_RCB_ID)) == NULL)
         {
-            L2CAP_TRACE_ERROR0 ("L2CAP - no RCB available for L2CA_UcdRegister");
+            L2CAP_TRACE_ERROR ("L2CAP - no RCB available for L2CA_UcdRegister");
             return (FALSE);
         }
         else
@@ -268,11 +268,11 @@ BOOLEAN L2CA_UcdDeregister ( UINT16 psm )
     tL2C_RCB    *p_rcb;
     UINT16      xx;
 
-    L2CAP_TRACE_API1  ("L2CA_UcdDeregister()  PSM: 0x%04x", psm);
+    L2CAP_TRACE_API  ("L2CA_UcdDeregister()  PSM: 0x%04x", psm);
 
     if ((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
     {
-        L2CAP_TRACE_ERROR1 ("L2CAP - no RCB for L2CA_UcdDeregister, PSM: 0x%04x", psm);
+        L2CAP_TRACE_ERROR ("L2CAP - no RCB for L2CA_UcdDeregister, PSM: 0x%04x", psm);
         return (FALSE);
     }
 
@@ -329,7 +329,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
     tL2C_CCB        *p_ccb;
     tL2C_RCB        *p_rcb;
 
-    L2CAP_TRACE_API4 ("L2CA_UcdDiscover()  PSM: 0x%04x  BDA: %08x%04x, InfoType=0x%02x", psm,
+    L2CAP_TRACE_API ("L2CA_UcdDiscover()  PSM: 0x%04x  BDA: %08x%04x, InfoType=0x%02x", psm,
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                       (rem_bda[4]<<8)+rem_bda[5], info_type);
 
@@ -337,7 +337,7 @@ BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 info_type )
     if (((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
         ||( p_rcb->ucd.state == L2C_UCD_STATE_UNUSED ))
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no RCB for L2CA_UcdDiscover, PSM: 0x%04x", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_UcdDiscover, PSM: 0x%04x", psm);
         return (FALSE);
     }
 
@@ -396,7 +396,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
     tL2C_RCB        *p_rcb;
     UINT8           *p;
 
-    L2CAP_TRACE_API3 ("L2CA_UcdDataWrite()  PSM: 0x%04x  BDA: %08x%04x", psm,
+    L2CAP_TRACE_API ("L2CA_UcdDataWrite()  PSM: 0x%04x  BDA: %08x%04x", psm,
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                       (rem_bda[4]<<8)+rem_bda[5]);
 
@@ -404,7 +404,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
     if (((p_rcb = l2cu_find_rcb_by_psm (psm)) == NULL)
         ||( p_rcb->ucd.state == L2C_UCD_STATE_UNUSED ))
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - no RCB for L2CA_UcdDataWrite, PSM: 0x%04x", psm);
+        L2CAP_TRACE_WARNING ("L2CAP - no RCB for L2CA_UcdDataWrite, PSM: 0x%04x", psm);
         GKI_freebuf (p_buf);
         return (L2CAP_DW_FAILED);
     }
@@ -439,7 +439,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
     /* UCD MTU check */
     if ((p_lcb->ucd_mtu) && (p_buf->len > p_lcb->ucd_mtu))
     {
-        L2CAP_TRACE_WARNING1 ("L2CAP - Handle: 0x%04x  UCD bigger than peer's UCD mtu size cannot be sent", p_lcb->handle);
+        L2CAP_TRACE_WARNING ("L2CAP - Handle: 0x%04x  UCD bigger than peer's UCD mtu size cannot be sent", p_lcb->handle);
         GKI_freebuf (p_buf);
         return (L2CAP_DW_FAILED);
     }
@@ -447,7 +447,7 @@ UINT16 L2CA_UcdDataWrite (UINT16 psm, BD_ADDR rem_bda, BT_HDR *p_buf, UINT16 fla
     /* If already congested, do not accept any more packets */
     if (p_ccb->cong_sent)
     {
-        L2CAP_TRACE_ERROR3 ("L2CAP - Handle: 0x%04x UCD cannot be sent, already congested count: %u  buff_quota: %u",
+        L2CAP_TRACE_ERROR ("L2CAP - Handle: 0x%04x UCD cannot be sent, already congested count: %u  buff_quota: %u",
                             p_lcb->handle,
                             (p_ccb->xmit_hold_q.count + p_lcb->ucd_out_sec_pending_q.count),
                             p_ccb->buff_quota);
@@ -484,7 +484,7 @@ BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout )
     tL2C_LCB        *p_lcb;
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API3 ("L2CA_UcdSetIdleTimeout()  Timeout: 0x%04x  BDA: %08x%04x", timeout,
+    L2CAP_TRACE_API ("L2CA_UcdSetIdleTimeout()  Timeout: 0x%04x  BDA: %08x%04x", timeout,
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                       (rem_bda[4]<<8)+rem_bda[5]);
 
@@ -493,7 +493,7 @@ BOOLEAN L2CA_UcdSetIdleTimeout ( BD_ADDR rem_bda, UINT16 timeout )
     if (((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_BR_EDR)) == NULL)
       ||((p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID)) == NULL))
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no UCD channel");
+        L2CAP_TRACE_WARNING ("L2CAP - no UCD channel");
         return (FALSE);
     }
     else
@@ -517,20 +517,20 @@ BOOLEAN L2CA_UCDSetTxPriority ( BD_ADDR rem_bda, tL2CAP_CHNL_PRIORITY priority )
     tL2C_LCB        *p_lcb;
     tL2C_CCB        *p_ccb;
 
-    L2CAP_TRACE_API3 ("L2CA_UCDSetTxPriority()  priority: 0x%02x  BDA: %08x%04x", priority,
+    L2CAP_TRACE_API ("L2CA_UCDSetTxPriority()  priority: 0x%02x  BDA: %08x%04x", priority,
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                       (rem_bda[4]<<8)+rem_bda[5]);
 
     if ((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_BR_EDR)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no LCB for L2CA_UCDSetTxPriority");
+        L2CAP_TRACE_WARNING ("L2CAP - no LCB for L2CA_UCDSetTxPriority");
         return (FALSE);
     }
 
     /* Find the channel control block */
     if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no CCB for L2CA_UCDSetTxPriority");
+        L2CAP_TRACE_WARNING ("L2CAP - no CCB for L2CA_UCDSetTxPriority");
         return (FALSE);
     }
 
@@ -557,14 +557,14 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
     tL2C_CCB        *p_ccb;
     tL2C_RCB        *p_rcb;
 
-    L2CAP_TRACE_DEBUG2 ("l2c_ucd_connect()  BDA: %08x%04x",
+    L2CAP_TRACE_DEBUG ("l2c_ucd_connect()  BDA: %08x%04x",
                       (rem_bda[0]<<24)+(rem_bda[1]<<16)+(rem_bda[2]<<8)+rem_bda[3],
                       (rem_bda[4]<<8)+rem_bda[5]);
 
     /* Fail if we have not established communications with the controller */
     if (!BTM_IsDeviceUp())
     {
-        L2CAP_TRACE_WARNING0 ("l2c_ucd_connect - BTU not ready");
+        L2CAP_TRACE_WARNING ("l2c_ucd_connect - BTU not ready");
         return (FALSE);
     }
 
@@ -575,7 +575,7 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
         if ( ((p_lcb = l2cu_allocate_lcb (rem_bda, FALSE, BT_TRANSPORT_BR_EDR)) == NULL)
          ||  (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE) )
         {
-            L2CAP_TRACE_WARNING0 ("L2CAP - conn not started l2c_ucd_connect");
+            L2CAP_TRACE_WARNING ("L2CAP - conn not started l2c_ucd_connect");
             return (FALSE);
         }
     }
@@ -583,7 +583,7 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
     {
         if (!(p_lcb->peer_ext_fea & L2CAP_EXTFEA_UCD_RECEPTION))
         {
-            L2CAP_TRACE_WARNING0 ("L2CAP - UCD is not supported by peer, l2c_ucd_connect");
+            L2CAP_TRACE_WARNING ("L2CAP - UCD is not supported by peer, l2c_ucd_connect");
             return (FALSE);
         }
     }
@@ -594,7 +594,7 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
         /* Allocate a channel control block */
         if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL)
         {
-            L2CAP_TRACE_WARNING0 ("L2CAP - no CCB for l2c_ucd_connect");
+            L2CAP_TRACE_WARNING ("L2CAP - no CCB for l2c_ucd_connect");
             return (FALSE);
         }
         else
@@ -611,7 +611,7 @@ static BOOLEAN l2c_ucd_connect ( BD_ADDR rem_bda )
 
             if ((p_rcb = l2cu_find_rcb_by_psm (L2C_UCD_RCB_ID)) == NULL)
             {
-                L2CAP_TRACE_WARNING0 ("L2CAP - no UCD registered, l2c_ucd_connect");
+                L2CAP_TRACE_WARNING ("L2CAP - no UCD registered, l2c_ucd_connect");
                 return (FALSE);
             }
             /* Save UCD registration info */
@@ -664,7 +664,7 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB  *p_ccb)
 
     if (p_ccb == NULL)
     {
-        L2CAP_TRACE_ERROR0 ("L2CAP - NULL p_ccb in l2c_ucd_check_pending_info_req");
+        L2CAP_TRACE_ERROR ("L2CAP - NULL p_ccb in l2c_ucd_check_pending_info_req");
         return (FALSE);
     }
 
@@ -680,7 +680,7 @@ BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB  *p_ccb)
                 {
                     if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_UCD_RECEPTION))
                     {
-                        L2CAP_TRACE_WARNING0 ("L2CAP - UCD is not supported by peer, l2c_ucd_check_pending_info_req");
+                        L2CAP_TRACE_WARNING ("L2CAP - UCD is not supported by peer, l2c_ucd_check_pending_info_req");
 
                         l2c_ucd_delete_sec_pending_q(p_ccb->p_lcb);
                         l2cu_release_ccb (p_ccb);
@@ -914,7 +914,7 @@ BOOLEAN l2c_ucd_check_rx_pkts(tL2C_LCB  *p_lcb, BT_HDR *p_msg)
             /* Allocate a channel control block */
             if ((p_ccb = l2cu_allocate_ccb (p_lcb, 0)) == NULL)
             {
-                L2CAP_TRACE_WARNING0 ("L2CAP - no CCB for UCD reception");
+                L2CAP_TRACE_WARNING ("L2CAP - no CCB for UCD reception");
                 GKI_freebuf (p_msg);
                 return TRUE;
             }
index 23b7584..bbcb3ea 100644 (file)
@@ -100,7 +100,7 @@ void l2cu_update_lcb_4_bonding (BD_ADDR p_bd_addr, BOOLEAN is_bonding)
 
     if (p_lcb)
     {
-        L2CAP_TRACE_DEBUG3 ("l2cu_update_lcb_4_bonding  BDA: %08x%04x is_bonding: %d",
+        L2CAP_TRACE_DEBUG ("l2cu_update_lcb_4_bonding  BDA: %08x%04x is_bonding: %d",
                           (p_bd_addr[0]<<24)+(p_bd_addr[1]<<16)+(p_bd_addr[2]<<8)+p_bd_addr[3],
                           (p_bd_addr[4]<<8)+p_bd_addr[5], is_bonding);
         p_lcb->is_bonding = is_bonding;
@@ -278,7 +278,7 @@ UINT8 l2cu_get_conn_role (tL2C_LCB *p_this_lcb)
     for (i = 0; i < BTM_ROLE_DEVICE_NUM; i++) {
         if ((btm_cb.previous_connected_role[i] != BTM_ROLE_UNDEFINED) &&
             (!bdcmp(p_this_lcb->remote_bd_addr, btm_cb.previous_connected_remote_addr[i]))) {
-            L2CAP_TRACE_WARNING1 ("l2cu_get_conn_role %d",
+            L2CAP_TRACE_WARNING ("l2cu_get_conn_role %d",
                                   btm_cb.previous_connected_role[i]);
             return btm_cb.previous_connected_role[i];
         }
@@ -311,7 +311,7 @@ BOOLEAN l2c_is_cmd_rejected (UINT8 cmd_code, UINT8 id, tL2C_LCB *p_lcb)
     case L2CAP_CMD_AMP_MOVE_REQ:
     case L2CAP_CMD_BLE_UPDATE_REQ:
         l2cu_send_peer_cmd_reject (p_lcb, L2CAP_CMD_REJ_MTU_EXCEEDED, id, L2CAP_DEFAULT_MTU, 0);
-        L2CAP_TRACE_WARNING1 ("Dumping first Command (%d)", cmd_code);
+        L2CAP_TRACE_WARNING ("Dumping first Command (%d)", cmd_code);
         return TRUE;
 
     default:    /* Otherwise a response */
@@ -335,7 +335,7 @@ BT_HDR *l2cu_build_header (tL2C_LCB *p_lcb, UINT16 len, UINT8 cmd, UINT8 id)
 
     if (!p_buf)
     {
-        L2CAP_TRACE_ERROR0 ("l2cu_build_header - no buffer");
+        L2CAP_TRACE_ERROR ("l2cu_build_header - no buffer");
         return (NULL);
     }
 
@@ -417,7 +417,7 @@ void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id,
 
     if ((p_buf = l2cu_build_header (p_lcb, (UINT16) (L2CAP_CMD_REJECT_LEN + param_len), L2CAP_CMD_REJECT, rem_id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer cmd_rej");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer cmd_rej");
         return;
     }
 
@@ -460,7 +460,7 @@ void l2cu_send_peer_connect_req (tL2C_CCB *p_ccb)
     if ((p_buf = l2cu_build_header (p_ccb->p_lcb, L2CAP_CONN_REQ_LEN, L2CAP_CMD_CONN_REQ,
                                     p_ccb->local_id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for conn_req");
         return;
     }
 
@@ -500,7 +500,7 @@ void l2cu_send_peer_connect_rsp (tL2C_CCB *p_ccb, UINT16 result, UINT16 status)
 
     if ((p_buf=l2cu_build_header(p_ccb->p_lcb, L2CAP_CONN_RSP_LEN, L2CAP_CMD_CONN_RSP, p_ccb->remote_id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for conn_rsp");
         return;
     }
 
@@ -534,7 +534,7 @@ void l2cu_reject_connection (tL2C_LCB *p_lcb, UINT16 remote_cid, UINT8 rem_id, U
 
     if ((p_buf = l2cu_build_header(p_lcb, L2CAP_CONN_RSP_LEN, L2CAP_CMD_CONN_RSP, rem_id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for conn_req");
         return;
     }
 
@@ -586,7 +586,7 @@ void l2cu_send_peer_config_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
     if ((p_buf = l2cu_build_header (p_ccb->p_lcb, (UINT16) (L2CAP_CONFIG_REQ_LEN + cfg_len),
         L2CAP_CMD_CONFIG_REQ, p_ccb->local_id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for conn_req");
         return;
     }
 
@@ -686,7 +686,7 @@ void l2cu_send_peer_config_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
     if ((p_buf = l2cu_build_header (p_ccb->p_lcb, (UINT16)(L2CAP_CONFIG_RSP_LEN + cfg_len),
                                     L2CAP_CMD_CONFIG_RSP, p_ccb->remote_id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for conn_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for conn_req");
         return;
     }
 
@@ -765,14 +765,14 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
     UINT8   *p, *p_hci_len, *p_data_end;
     UINT8   cfg_code;
 
-    L2CAP_TRACE_DEBUG2("l2cu_send_peer_config_rej: data_len=%d, rej_len=%d", data_len, rej_len);
+    L2CAP_TRACE_DEBUG("l2cu_send_peer_config_rej: data_len=%d, rej_len=%d", data_len, rej_len);
 
 
     len = BT_HDR_SIZE + HCI_DATA_PREAMBLE_SIZE + L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD + L2CAP_CONFIG_RSP_LEN;
     len1 = 0xFFFF - len;
     if (rej_len > len1)
     {
-        L2CAP_TRACE_ERROR0 ("L2CAP - cfg_rej pkt size exceeds buffer design max limit.");
+        L2CAP_TRACE_ERROR ("L2CAP - cfg_rej pkt size exceeds buffer design max limit.");
         return;
     }
 
@@ -780,7 +780,7 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
 
     if (!p_buf)
     {
-        L2CAP_TRACE_ERROR0 ("L2CAP - no buffer for cfg_rej");
+        L2CAP_TRACE_ERROR ("L2CAP - no buffer for cfg_rej");
         return;
     }
 
@@ -850,7 +850,7 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
                         }
                         else
                         {
-                            L2CAP_TRACE_WARNING0("L2CAP - cfg_rej exceeds allocated buffer");
+                            L2CAP_TRACE_WARNING("L2CAP - cfg_rej exceeds allocated buffer");
                             p_data = p_data_end; /* force loop exit */
                             break;
                         }
@@ -871,7 +871,7 @@ void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len,
 
     p_buf->len = len + 4;
 
-    L2CAP_TRACE_DEBUG2 ("L2CAP - cfg_rej pkt hci_len=%d, l2cap_len=%d",
+    L2CAP_TRACE_DEBUG ("L2CAP - cfg_rej pkt hci_len=%d, l2cap_len=%d",
                         len, (L2CAP_CMD_OVERHEAD+L2CAP_CONFIG_RSP_LEN+rej_len));
 
     l2c_link_check_send_pkts (p_ccb->p_lcb, NULL, p_buf);
@@ -900,7 +900,7 @@ void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb)
 
     if ((p_buf = l2cu_build_header(p_ccb->p_lcb, L2CAP_DISC_REQ_LEN, L2CAP_CMD_DISC_REQ, p_ccb->local_id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for disc_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for disc_req");
         return;
     }
 
@@ -948,7 +948,7 @@ void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid
 
     if ((p_buf=l2cu_build_header(p_lcb, L2CAP_DISC_RSP_LEN, L2CAP_CMD_DISC_RSP, remote_id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for disc_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for disc_rsp");
         return;
     }
 
@@ -982,7 +982,7 @@ void l2cu_send_peer_echo_req (tL2C_LCB *p_lcb, UINT8 *p_data, UINT16 data_len)
 
     if ((p_buf = l2cu_build_header(p_lcb, (UINT16) (L2CAP_ECHO_REQ_LEN + data_len), L2CAP_CMD_ECHO_REQ, p_lcb->id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for echo_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for echo_req");
         return;
     }
 
@@ -1016,7 +1016,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
     if (!id || id == p_lcb->cur_echo_id)
     {
         /* Dump this request since it is illegal */
-        L2CAP_TRACE_WARNING1 ("L2CAP ignoring duplicate echo request (%d)", id);
+        L2CAP_TRACE_WARNING ("L2CAP ignoring duplicate echo request (%d)", id);
         return;
     }
     else
@@ -1024,7 +1024,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
      /* Don't respond if we more than 10% of our buffers are used */
     if (GKI_poolutilization (L2CAP_CMD_POOL_ID) > 10)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP gki pool used up to more than 10%%, ignore echo response");
+        L2CAP_TRACE_WARNING ("L2CAP gki pool used up to more than 10%%, ignore echo response");
         return;
     }
 
@@ -1039,7 +1039,7 @@ void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8 id, UINT8 *p_data, UINT16 d
 
     if ((p_buf = l2cu_build_header (p_lcb, (UINT16)(L2CAP_ECHO_RSP_LEN + data_len), L2CAP_CMD_ECHO_RSP, id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for echo_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for echo_rsp");
         return;
     }
 
@@ -1074,11 +1074,11 @@ void l2cu_send_peer_info_req (tL2C_LCB *p_lcb, UINT16 info_type)
 
     if ((p_buf = l2cu_build_header(p_lcb, 2, L2CAP_CMD_INFO_REQ, p_lcb->id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for info_req");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for info_req");
         return;
     }
 
-    L2CAP_TRACE_EVENT1 ("l2cu_send_peer_info_req: type 0x%04x", info_type);
+    L2CAP_TRACE_EVENT ("l2cu_send_peer_info_req: type 0x%04x", info_type);
 
     p = (UINT8 *)(p_buf + 1) + L2CAP_SEND_CMD_OFFSET+HCI_DATA_PREAMBLE_SIZE +
         L2CAP_PKT_OVERHEAD + L2CAP_CMD_OVERHEAD;
@@ -1134,7 +1134,7 @@ void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 info_type
 
     if ((p_buf = l2cu_build_header(p_lcb, len, L2CAP_CMD_INFO_RSP, remote_id)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no buffer for info_rsp");
+        L2CAP_TRACE_WARNING ("L2CAP - no buffer for info_rsp");
         return;
     }
 
@@ -1229,12 +1229,12 @@ void l2cu_enqueue_ccb (tL2C_CCB *p_ccb)
 
     if ( (!p_ccb->in_use) || (p_q == NULL) )
     {
-        L2CAP_TRACE_ERROR3 ("l2cu_enqueue_ccb  CID: 0x%04x ERROR in_use: %u  p_lcb: 0x%08x",
+        L2CAP_TRACE_ERROR ("l2cu_enqueue_ccb  CID: 0x%04x ERROR in_use: %u  p_lcb: 0x%08x",
                             p_ccb->local_cid, p_ccb->in_use, p_ccb->p_lcb);
         return;
     }
 
-    L2CAP_TRACE_DEBUG2 ("l2cu_enqueue_ccb CID: 0x%04x  priority: %d",
+    L2CAP_TRACE_DEBUG ("l2cu_enqueue_ccb CID: 0x%04x  priority: %d",
                         p_ccb->local_cid, p_ccb->ccb_priority);
 
     /* If the queue is empty, we go at the front */
@@ -1313,7 +1313,7 @@ void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
 {
     tL2C_CCB_Q      *p_q = NULL;
 
-    L2CAP_TRACE_DEBUG1 ("l2cu_dequeue_ccb  CID: 0x%04x", p_ccb->local_cid);
+    L2CAP_TRACE_DEBUG ("l2cu_dequeue_ccb  CID: 0x%04x", p_ccb->local_cid);
 
     /* Find out which queue the channel is on
     */
@@ -1322,7 +1322,7 @@ void l2cu_dequeue_ccb (tL2C_CCB *p_ccb)
 
     if ( (!p_ccb->in_use) || (p_q == NULL) || (p_q->p_first_ccb == NULL) )
     {
-        L2CAP_TRACE_ERROR5 ("l2cu_dequeue_ccb  CID: 0x%04x ERROR in_use: %u  p_lcb: 0x%08x  p_q: 0x%08x  p_q->p_first_ccb: 0x%08x",
+        L2CAP_TRACE_ERROR ("l2cu_dequeue_ccb  CID: 0x%04x ERROR in_use: %u  p_lcb: 0x%08x  p_q: 0x%08x  p_q->p_first_ccb: 0x%08x",
                             p_ccb->local_cid, p_ccb->in_use, p_ccb->p_lcb, p_q, p_q ? p_q->p_first_ccb : 0);
         return;
     }
@@ -1400,7 +1400,7 @@ void l2cu_change_pri_ccb (tL2C_CCB *p_ccb, tL2CAP_CHNL_PRIORITY priority)
         /* If CCB is not the only guy on the queue */
         if ( (p_ccb->p_next_ccb != NULL) || (p_ccb->p_prev_ccb != NULL) )
         {
-            L2CAP_TRACE_DEBUG0 ("Update CCB list in logical link");
+            L2CAP_TRACE_DEBUG ("Update CCB list in logical link");
 
             /* Remove CCB from queue and re-queue it at new priority */
             l2cu_dequeue_ccb (p_ccb);
@@ -1444,7 +1444,7 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid)
     tL2C_CCB    *p_ccb;
     tL2C_CCB    *p_prev;
 
-    L2CAP_TRACE_DEBUG1 ("l2cu_allocate_ccb: cid 0x%04x", cid);
+    L2CAP_TRACE_DEBUG ("l2cu_allocate_ccb: cid 0x%04x", cid);
 
     if (!l2cb.p_free_ccb_first)
         return (NULL);
@@ -1479,7 +1479,7 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid)
             }
             if (p_prev == NULL)
             {
-                L2CAP_TRACE_ERROR1 ("l2cu_allocate_ccb: could not find CCB for CID 0x%04x in the free list", cid);
+                L2CAP_TRACE_ERROR ("l2cu_allocate_ccb: could not find CCB for CID 0x%04x in the free list", cid);
                 return NULL;
             }
         }
@@ -1559,7 +1559,7 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid)
         p_ccb->config_done  = 0;
     else
     {
-        L2CAP_TRACE_DEBUG2 ("l2cu_allocate_ccb: cid 0x%04x config_done:0x%x", cid, p_ccb->config_done);
+        L2CAP_TRACE_DEBUG ("l2cu_allocate_ccb: cid 0x%04x config_done:0x%x", cid, p_ccb->config_done);
     }
 
     p_ccb->chnl_state   = CST_CLOSED;
@@ -1649,7 +1649,7 @@ void l2cu_release_ccb (tL2C_CCB *p_ccb)
     tL2C_LCB    *p_lcb = p_ccb->p_lcb;
     tL2C_RCB    *p_rcb = p_ccb->p_rcb;
 
-    L2CAP_TRACE_DEBUG2 ("l2cu_release_ccb: cid 0x%04x  in_use: %u", p_ccb->local_cid, p_ccb->in_use);
+    L2CAP_TRACE_DEBUG ("l2cu_release_ccb: cid 0x%04x  in_use: %u", p_ccb->local_cid, p_ccb->in_use);
 
     /* If already released, could be race condition */
     if (!p_ccb->in_use)
@@ -1814,7 +1814,7 @@ void l2cu_disconnect_chnl (tL2C_CCB *p_ccb)
     {
         tL2CA_DISCONNECT_IND_CB   *p_disc_cb = p_ccb->p_rcb->api.pL2CA_DisconnectInd_Cb;
 
-        L2CAP_TRACE_WARNING1 ("L2CAP - disconnect_chnl CID: 0x%04x", local_cid);
+        L2CAP_TRACE_WARNING ("L2CAP - disconnect_chnl CID: 0x%04x", local_cid);
 
         l2cu_send_peer_disc_req (p_ccb);
 
@@ -1825,7 +1825,7 @@ void l2cu_disconnect_chnl (tL2C_CCB *p_ccb)
     else
     {
         /* failure on the AMP channel, probably need to disconnect ACL */
-        L2CAP_TRACE_ERROR1 ("L2CAP - disconnect_chnl CID: 0x%04x Ignored", local_cid);
+        L2CAP_TRACE_ERROR ("L2CAP - disconnect_chnl CID: 0x%04x Ignored", local_cid);
     }
 }
 
@@ -2029,7 +2029,7 @@ void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg)
         else
             p_ccb->fcrb.max_held_acks = p_ccb->our_cfg.fcr.tx_win_sz / 3;
 
-        L2CAP_TRACE_DEBUG3 ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
+        L2CAP_TRACE_DEBUG ("l2cu_process_peer_cfg_rsp(): peer tx_win_sz: %d, our tx_win_sz: %d, max_held_acks: %d",
                              p_cfg->fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz, p_ccb->fcrb.max_held_acks);
     }
 }
@@ -2235,7 +2235,7 @@ BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb, tBT_TRANSPORT transport)
             /* Check if there is any SCO Active on this BD Address */
             is_sco_active = btm_is_sco_active_by_bdaddr(p_lcb_cur->remote_bd_addr);
 
-            L2CAP_TRACE_API1 ("l2cu_create_conn - btm_is_sco_active_by_bdaddr() is_sco_active = %s", \
+            L2CAP_TRACE_API ("l2cu_create_conn - btm_is_sco_active_by_bdaddr() is_sco_active = %s", \
                 (is_sco_active == TRUE) ? "TRUE":"FALSE");
 
             if (is_sco_active == TRUE)
@@ -2314,7 +2314,7 @@ BOOLEAN l2cu_create_conn_after_switch (tL2C_LCB *p_lcb)
 
     p_features = BTM_ReadLocalFeatures();
 
-    L2CAP_TRACE_DEBUG4 ("l2cu_create_conn_after_switch :%d num_acl:%d no_hi: %d is_bonding:%d",
+    L2CAP_TRACE_DEBUG ("l2cu_create_conn_after_switch :%d num_acl:%d no_hi: %d is_bonding:%d",
         l2cb.disallow_switch, num_acl, no_hi_prio_chs, p_lcb->is_bonding);
     /* FW team says that we can participant in 4 piconets
      * typically 3 piconet + 1 for scanning.
@@ -2365,7 +2365,7 @@ BOOLEAN l2cu_create_conn_after_switch (tL2C_LCB *p_lcb)
                                  allow_switch))
 
     {
-        L2CAP_TRACE_ERROR0 ("L2CAP - no buffer for l2cu_create_conn");
+        L2CAP_TRACE_ERROR ("L2CAP - no buffer for l2cu_create_conn");
         l2cu_release_lcb (p_lcb);
         return (FALSE);
     }
@@ -2483,7 +2483,7 @@ BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_af
     /* Find the link control block for the acl channel */
     if ((p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
     {
-        L2CAP_TRACE_WARNING0 ("L2CAP - no LCB for L2CA_SetAclPriority");
+        L2CAP_TRACE_WARNING ("L2CAP - no LCB for L2CA_SetAclPriority");
         return (FALSE);
     }
 
@@ -2550,7 +2550,7 @@ void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
     tL2C_CCB        *p_next_ccb;
     int             xx;
 
-    L2CAP_TRACE_DEBUG1 ("l2cu_resubmit_pending_sec_req  p_bda: 0x%08x", p_bda);
+    L2CAP_TRACE_DEBUG ("l2cu_resubmit_pending_sec_req  p_bda: 0x%08x", p_bda);
 
     /* If we are called with a BDA, only resubmit for that BDA */
     if (p_bda)
@@ -2569,7 +2569,7 @@ void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda)
         }
         else
         {
-            L2CAP_TRACE_WARNING0 ("l2cu_resubmit_pending_sec_req - unknown BD_ADDR");
+            L2CAP_TRACE_WARNING ("l2cu_resubmit_pending_sec_req - unknown BD_ADDR");
         }
     }
     else
@@ -2626,7 +2626,7 @@ void l2cu_adjust_out_mps (tL2C_CCB *p_ccb)
     if (packet_size <= (L2CAP_PKT_OVERHEAD + L2CAP_FCR_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN))
     {
         /* something is very wrong */
-        L2CAP_TRACE_ERROR2 ("l2cu_adjust_out_mps bad packet size: %u  will use MPS: %u", packet_size, p_ccb->peer_cfg.fcr.mps);
+        L2CAP_TRACE_ERROR ("l2cu_adjust_out_mps bad packet size: %u  will use MPS: %u", packet_size, p_ccb->peer_cfg.fcr.mps);
         p_ccb->tx_mps = p_ccb->peer_cfg.fcr.mps;
     }
     else
@@ -2646,7 +2646,7 @@ void l2cu_adjust_out_mps (tL2C_CCB *p_ccb)
         else
             p_ccb->tx_mps = p_ccb->peer_cfg.fcr.mps;
 
-        L2CAP_TRACE_DEBUG3 ("l2cu_adjust_out_mps use %d   Based on peer_cfg.fcr.mps: %u  packet_size: %u",
+        L2CAP_TRACE_DEBUG ("l2cu_adjust_out_mps use %d   Based on peer_cfg.fcr.mps: %u  packet_size: %u",
                             p_ccb->tx_mps, p_ccb->peer_cfg.fcr.mps, packet_size);
     }
 }
@@ -2745,7 +2745,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
 
     if (timeout == 0)
     {
-        L2CAP_TRACE_DEBUG0 ("l2cu_no_dynamic_ccbs() IDLE timer 0, disconnecting link");
+        L2CAP_TRACE_DEBUG ("l2cu_no_dynamic_ccbs() IDLE timer 0, disconnecting link");
 
         rc = btm_sec_disconnect (p_lcb->handle, HCI_ERR_PEER_USER);
         if (rc == BTM_CMD_STARTED)
@@ -2777,7 +2777,7 @@ void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb)
 
     if (timeout != 0xFFFF)
     {
-        L2CAP_TRACE_DEBUG1 ("l2cu_no_dynamic_ccbs() starting IDLE timeout: %d", timeout);
+        L2CAP_TRACE_DEBUG ("l2cu_no_dynamic_ccbs() starting IDLE timeout: %d", timeout);
         btu_start_timer (&p_lcb->timer_entry, BTU_TTYPE_L2CAP_LINK, timeout);
     }
     else
@@ -2909,7 +2909,7 @@ void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int
 
     if ((p_buf = l2cu_build_header (p_lcb, L2CAP_CMD_BLE_UPD_REQ_LEN, L2CAP_CMD_BLE_UPDATE_REQ, p_lcb->id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("l2cu_send_peer_ble_par_req - no buffer");
+        L2CAP_TRACE_WARNING ("l2cu_send_peer_ble_par_req - no buffer");
         return;
     }
 
@@ -2941,7 +2941,7 @@ void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id)
 
     if ((p_buf = l2cu_build_header (p_lcb, L2CAP_CMD_BLE_UPD_RSP_LEN, L2CAP_CMD_BLE_UPDATE_RSP, rem_id)) == NULL )
     {
-        L2CAP_TRACE_WARNING0 ("l2cu_send_peer_ble_par_rsp - no buffer");
+        L2CAP_TRACE_WARNING ("l2cu_send_peer_ble_par_rsp - no buffer");
         return;
     }
 
@@ -3078,11 +3078,11 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
 
             if (!p_ccb)
             {
-                L2CAP_TRACE_ERROR1("p_serve_ccb is NULL, rr_pri=%d", p_lcb->rr_pri);
+                L2CAP_TRACE_ERROR("p_serve_ccb is NULL, rr_pri=%d", p_lcb->rr_pri);
                 return NULL;
             }
 
-            L2CAP_TRACE_DEBUG3("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
+            L2CAP_TRACE_DEBUG("RR scan pri=%d, lcid=0x%04x, q_cout=%d",
                                 p_ccb->ccb_priority, p_ccb->local_cid, p_ccb->xmit_hold_q.count );
 
             /* store the next serving channel */
@@ -3146,7 +3146,7 @@ static tL2C_CCB *l2cu_get_next_channel_in_rr(tL2C_LCB *p_lcb)
 
     if (p_serve_ccb)
     {
-        L2CAP_TRACE_DEBUG3("RR service pri=%d, quota=%d, lcid=0x%04x",
+        L2CAP_TRACE_DEBUG("RR service pri=%d, quota=%d, lcid=0x%04x",
                             p_serve_ccb->ccb_priority,
                             p_lcb->rr_serv[p_serve_ccb->ccb_priority].quota,
                             p_serve_ccb->local_cid );
@@ -3261,7 +3261,7 @@ BT_HDR *l2cu_get_next_buffer_to_send (tL2C_LCB *p_lcb)
                 p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->xmit_hold_q);
                 if(NULL == p_buf)
                 {
-                    L2CAP_TRACE_ERROR0("l2cu_get_buffer_to_send: No data to be sent");
+                    L2CAP_TRACE_ERROR("l2cu_get_buffer_to_send: No data to be sent");
                     return (NULL);
                 }
                 l2cu_set_acl_hci_header (p_buf, p_ccb);
@@ -3292,7 +3292,7 @@ BT_HDR *l2cu_get_next_buffer_to_send (tL2C_LCB *p_lcb)
         p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->xmit_hold_q);
         if(NULL == p_buf)
         {
-            L2CAP_TRACE_ERROR0("l2cu_get_buffer_to_send() #2: No data to be sent");
+            L2CAP_TRACE_ERROR("l2cu_get_buffer_to_send() #2: No data to be sent");
             return (NULL);
         }
     }
@@ -3402,7 +3402,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
                 p_ccb->cong_sent = FALSE;
                 if (p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb)
                 {
-                    L2CAP_TRACE_DEBUG3 ("L2CAP - Calling CongestionStatus_Cb (FALSE), CID: 0x%04x  xmit_hold_q.count: %u  buff_quota: %u",
+                    L2CAP_TRACE_DEBUG ("L2CAP - Calling CongestionStatus_Cb (FALSE), CID: 0x%04x  xmit_hold_q.count: %u  buff_quota: %u",
                                       p_ccb->local_cid, q_count, p_ccb->buff_quota);
 
                     /* Prevent recursive calling */
@@ -3415,7 +3415,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
                 {
                     if ( p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb )
                     {
-                        L2CAP_TRACE_DEBUG3 ("L2CAP - Calling UCD CongestionStatus_Cb (FALSE), SecPendingQ:%u,XmitQ:%u,Quota:%u",
+                        L2CAP_TRACE_DEBUG ("L2CAP - Calling UCD CongestionStatus_Cb (FALSE), SecPendingQ:%u,XmitQ:%u,Quota:%u",
                                              p_ccb->p_lcb->ucd_out_sec_pending_q.count,
                                              p_ccb->xmit_hold_q.count, p_ccb->buff_quota);
                         p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb( p_ccb->p_lcb->remote_bd_addr, FALSE );
@@ -3432,7 +3432,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
                 p_ccb->cong_sent = TRUE;
                 if (p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb)
                 {
-                    L2CAP_TRACE_DEBUG3 ("L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u",
+                    L2CAP_TRACE_DEBUG ("L2CAP - Calling CongestionStatus_Cb (TRUE),CID:0x%04x,XmitQ:%u,Quota:%u",
                         p_ccb->local_cid, q_count, p_ccb->buff_quota);
 
                     (*p_ccb->p_rcb->api.pL2CA_CongestionStatus_Cb)(p_ccb->local_cid, TRUE);
@@ -3442,7 +3442,7 @@ void l2cu_check_channel_congestion (tL2C_CCB *p_ccb)
                 {
                     if ( p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb )
                     {
-                        L2CAP_TRACE_DEBUG3 ("L2CAP - Calling UCD CongestionStatus_Cb (TRUE), SecPendingQ:%u,XmitQ:%u,Quota:%u",
+                        L2CAP_TRACE_DEBUG ("L2CAP - Calling UCD CongestionStatus_Cb (TRUE), SecPendingQ:%u,XmitQ:%u,Quota:%u",
                                              p_ccb->p_lcb->ucd_out_sec_pending_q.count,
                                              p_ccb->xmit_hold_q.count, p_ccb->buff_quota);
                         p_ccb->p_rcb->ucd.cb_info.pL2CA_UCD_Congestion_Status_Cb( p_ccb->p_lcb->remote_bd_addr, TRUE );
index 1471664..d72e1b2 100644 (file)
@@ -79,7 +79,7 @@ BOOLEAN SDP_InitDiscoveryDb (tSDP_DISCOVERY_DB *p_db, UINT32 len, UINT16 num_uui
     if (p_db == NULL || (sizeof (tSDP_DISCOVERY_DB) > len) ||
         num_attr > SDP_MAX_ATTR_FILTERS || num_uuid > SDP_MAX_UUID_FILTERS)
     {
-        SDP_TRACE_ERROR4("SDP_InitDiscoveryDb Illegal param: p_db 0x%x, len %d, num_uuid %d, num_attr %d",
+        SDP_TRACE_ERROR("SDP_InitDiscoveryDb Illegal param: p_db 0x%x, len %d, num_uuid %d, num_attr %d",
                          (UINT32)p_db, len, num_uuid, num_attr);
 
         return(FALSE);
@@ -747,7 +747,7 @@ static BOOLEAN sdp_fill_proto_elem( tSDP_DISC_ATTR  *p_attr, UINT16 layer_uuid,
         /* Now, see if the entry contains the layer we are interested in */
         for (p_sattr = p_attr->attr_value.v.p_sub_attr; p_sattr; p_sattr = p_sattr->p_next_attr)
         {
-            /* SDP_TRACE_DEBUG3 ("SDP - p_sattr 0x%x, layer_uuid:0x%x, u16:0x%x####",
+            /* SDP_TRACE_DEBUG ("SDP - p_sattr 0x%x, layer_uuid:0x%x, u16:0x%x####",
                 p_sattr, layer_uuid, p_sattr->attr_value.v.u16); */
 
             if ((SDP_DISC_ATTR_TYPE(p_sattr->attr_len_type) == UUID_DESC_TYPE)
index 318a8cc..322e27d 100644 (file)
@@ -300,7 +300,7 @@ UINT32 SDP_CreateRecord (void)
         p_db->record[p_db->num_records].record_handle = handle;
 
         p_db->num_records++;
-        SDP_TRACE_DEBUG1("SDP_CreateRecord ok, num_records:%d", p_db->num_records);
+        SDP_TRACE_DEBUG("SDP_CreateRecord ok, num_records:%d", p_db->num_records);
         /* Add the first attribute (the handle) automatically */
         UINT32_TO_BE_FIELD (buf, handle);
         SDP_AddAttribute (handle, ATTR_ID_SERVICE_RECORD_HDL, UINT_DESC_TYPE,
@@ -308,7 +308,7 @@ UINT32 SDP_CreateRecord (void)
 
         return (p_db->record[p_db->num_records - 1].record_handle);
     }
-    else SDP_TRACE_ERROR1("SDP_CreateRecord fail, exceed maximum records:%d", SDP_MAX_RECORDS);
+    else SDP_TRACE_ERROR("SDP_CreateRecord fail, exceed maximum records:%d", SDP_MAX_RECORDS);
 #endif
         return (0);
 }
@@ -363,7 +363,7 @@ BOOLEAN SDP_DeleteRecord (UINT32 handle)
 
                 sdp_cb.server_db.num_records--;
 
-                SDP_TRACE_DEBUG1("SDP_DeleteRecord ok, num_records:%d", sdp_cb.server_db.num_records);
+                SDP_TRACE_DEBUG("SDP_DeleteRecord ok, num_records:%d", sdp_cb.server_db.num_records);
                 /* if we're deleting the primary DI record, clear the */
                 /* value in the control block */
                 if( sdp_cb.server_db.di_primary_handle == handle )
@@ -420,17 +420,17 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
             {
                 sprintf((char *)&num_array[i*2],"%02X",(UINT8)(p_val[i]));
             }
-            SDP_TRACE_DEBUG6("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
+            SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
                             handle,attr_id,attr_type,attr_len,p_val,num_array);
         }
         else if (attr_type == BOOLEAN_DESC_TYPE)
         {
-            SDP_TRACE_DEBUG6("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%d",
+            SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%d",
                              handle,attr_id,attr_type,attr_len,p_val,*p_val);
         }
         else
         {
-            SDP_TRACE_DEBUG6("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
+            SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
                 handle,attr_id,attr_type,attr_len,p_val,p_val);
         }
     }
@@ -478,7 +478,7 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
                 /* do truncate only for text string type descriptor */
                 if (attr_type == TEXT_STR_DESC_TYPE)
                 {
-                    SDP_TRACE_WARNING2("SDP_AddAttribute: attr_len:%d too long. truncate to (%d)",
+                    SDP_TRACE_WARNING("SDP_AddAttribute: attr_len:%d too long. truncate to (%d)",
                         attr_len, SDP_MAX_PAD_LEN - p_rec->free_pad_ptr );
 
                     attr_len = SDP_MAX_PAD_LEN - p_rec->free_pad_ptr;
@@ -499,7 +499,7 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
             else if ((attr_len == 0 && p_attr->len != 0) || /* if truncate to 0 length, simply don't add */
                       p_val == 0)
             {
-                SDP_TRACE_ERROR2("SDP_AddAttribute fail, length exceed maximum: ID %d: attr_len:%d ",
+                SDP_TRACE_ERROR("SDP_AddAttribute fail, length exceed maximum: ID %d: attr_len:%d ",
                     attr_id, attr_len );
                 p_attr->id   = p_attr->type = p_attr->len  = 0;
                 return (FALSE);
@@ -545,7 +545,7 @@ BOOLEAN SDP_AddSequence (UINT32 handle,  UINT16 attr_id, UINT16 num_elem,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddSequence cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddSequence cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff;
@@ -586,12 +586,12 @@ BOOLEAN SDP_AddSequence (UINT32 handle,  UINT16 attr_id, UINT16 num_elem,
             if(p_head == p_buff)
             {
                 /* the first element exceed the max length */
-                SDP_TRACE_ERROR0 ("SDP_AddSequence - too long(attribute is not added)!!");
+                SDP_TRACE_ERROR ("SDP_AddSequence - too long(attribute is not added)!!");
                 GKI_freebuf(p_buff);
                 return FALSE;
             }
             else
-                SDP_TRACE_ERROR2 ("SDP_AddSequence - too long, add %d elements of %d", xx, num_elem);
+                SDP_TRACE_ERROR ("SDP_AddSequence - too long, add %d elements of %d", xx, num_elem);
             break;
         }
     }
@@ -628,7 +628,7 @@ BOOLEAN SDP_AddUuidSequence (UINT32 handle,  UINT16 attr_id, UINT16 num_uuids,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddUuidSequence cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddUuidSequence cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff;
@@ -641,7 +641,7 @@ BOOLEAN SDP_AddUuidSequence (UINT32 handle,  UINT16 attr_id, UINT16 num_uuids,
 
         if((p - p_buff) > max_len)
         {
-            SDP_TRACE_WARNING2 ("SDP_AddUuidSequence - too long, add %d uuids of %d", xx, num_uuids);
+            SDP_TRACE_WARNING ("SDP_AddUuidSequence - too long, add %d uuids of %d", xx, num_uuids);
             break;
         }
     }
@@ -676,7 +676,7 @@ BOOLEAN SDP_AddProtocolList (UINT32 handle, UINT16 num_elem,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddProtocolList cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddProtocolList cannot get a buffer!");
         return (FALSE);
     }
 
@@ -715,7 +715,7 @@ BOOLEAN SDP_AddAdditionProtoLists (UINT32 handle, UINT16 num_elem,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddAdditionProtoLists cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddAdditionProtoLists cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff;
@@ -764,7 +764,7 @@ BOOLEAN SDP_AddProfileDescriptorList (UINT32 handle, UINT16 profile_uuid,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddProfileDescriptorList cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddProfileDescriptorList cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff+2;
@@ -813,7 +813,7 @@ BOOLEAN SDP_AddLanguageBaseAttrIDList (UINT32 handle, UINT16 lang,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddLanguageBaseAttrIDList cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddLanguageBaseAttrIDList cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff;
@@ -862,7 +862,7 @@ BOOLEAN SDP_AddServiceClassIdList (UINT32 handle, UINT16 num_services,
 
     if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
     {
-        SDP_TRACE_ERROR0("SDP_AddServiceClassIdList cannot get a buffer!");
+        SDP_TRACE_ERROR("SDP_AddServiceClassIdList cannot get a buffer!");
         return (FALSE);
     }
     p = p_buff;
@@ -908,7 +908,7 @@ BOOLEAN SDP_DeleteAttribute (UINT32 handle, UINT16 attr_id)
         {
             tSDP_ATTRIBUTE  *p_attr = &p_rec->attribute[0];
 
-            SDP_TRACE_API2("Deleting attr_id 0x%04x for handle 0x%x", attr_id, handle);
+            SDP_TRACE_API("Deleting attr_id 0x%04x for handle 0x%x", attr_id, handle);
             /* Found it. Now, find the attribute */
             for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++)
             {
index 4f1db1b..3fca831 100644 (file)
@@ -171,7 +171,7 @@ static void sdp_snd_service_search_req(tCONN_CB *p_ccb, UINT8 cont_len, UINT8 *
     p_cmd->len = (UINT16)(p - p_start);
 
 #if (SDP_DEBUG_RAW == TRUE)
-    SDP_TRACE_WARNING2("sdp_snd_service_search_req cont_len :%d disc_state:%d",cont_len, p_ccb->disc_state);
+    SDP_TRACE_WARNING("sdp_snd_service_search_req cont_len :%d disc_state:%d",cont_len, p_ccb->disc_state);
 #endif
 
 
@@ -245,7 +245,7 @@ void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg)
     BOOLEAN         invalid_pdu = TRUE;
 
 #if (SDP_DEBUG_RAW == TRUE)
-    SDP_TRACE_WARNING1("sdp_disc_server_rsp disc_state:%d", p_ccb->disc_state);
+    SDP_TRACE_WARNING("sdp_disc_server_rsp disc_state:%d", p_ccb->disc_state);
 #endif
 
     /* stop inactivity timer when we receive a response */
@@ -302,7 +302,7 @@ void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg)
 
     if (invalid_pdu)
     {
-        SDP_TRACE_WARNING2 ("SDP - Unexp. PDU: %d in state: %d", rsp_pdu, p_ccb->disc_state);
+        SDP_TRACE_WARNING ("SDP - Unexp. PDU: %d in state: %d", rsp_pdu, p_ccb->disc_state);
         sdp_disconnect (p_ccb, SDP_GENERIC_ERROR);
     }
 }
@@ -332,7 +332,7 @@ static void process_service_search_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
     p_ccb->num_handles += cur_handles;
     if (p_ccb->num_handles == 0)
     {
-        SDP_TRACE_WARNING0 ("SDP - Rcvd ServiceSearchRsp, no matches");
+        SDP_TRACE_WARNING ("SDP - Rcvd ServiceSearchRsp, no matches");
         sdp_disconnect (p_ccb, SDP_NO_RECS_MATCH);
         return;
     }
@@ -395,7 +395,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
     {
         sprintf((char *)&num_array[i*2],"%02X",(UINT8)(p_ccb->rsp_list[i]));
     }
-    SDP_TRACE_WARNING1("result :%s",num_array);
+    SDP_TRACE_WARNING("result :%s",num_array);
 #endif
 
     if(p_ccb->p_db->raw_data)
@@ -414,7 +414,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
             cpy_len = list_len;
         }
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING4("list_len :%d cpy_len:%d raw_size:%d raw_used:%d",
+        SDP_TRACE_WARNING("list_len :%d cpy_len:%d raw_size:%d raw_used:%d",
             list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used);
 #endif
         memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len);
@@ -440,14 +440,14 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
     BOOLEAN         cont_request_needed = FALSE;
 
 #if (SDP_DEBUG_RAW == TRUE)
-    SDP_TRACE_WARNING2("process_service_attr_rsp raw inc:%d",
+    SDP_TRACE_WARNING("process_service_attr_rsp raw inc:%d",
         SDP_RAW_DATA_INCLUDED);
 #endif
     /* If p_reply is NULL, we were called after the records handles were read */
     if (p_reply)
     {
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING4("ID & len: 0x%02x-%02x-%02x-%02x",
+        SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x",
             p_reply[0], p_reply[1], p_reply[2], p_reply[3]);
 #endif
         /* Skip transaction ID and length */
@@ -455,7 +455,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
 
         BE_STREAM_TO_UINT16 (list_byte_count, p_reply);
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING1("list_byte_count:%d", list_byte_count);
+        SDP_TRACE_WARNING("list_byte_count:%d", list_byte_count);
 #endif
 
         /* Copy the response to the scratchpad. First, a safety check on the length */
@@ -466,7 +466,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
         }
 
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING2("list_len: %d, list_byte_count: %d",
+        SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d",
             p_ccb->list_len, list_byte_count);
 #endif
         if (p_ccb->rsp_list == NULL)
@@ -474,7 +474,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
             p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT);
             if (p_ccb->rsp_list == NULL)
             {
-                SDP_TRACE_ERROR0 ("SDP - no gki buf to save rsp");
+                SDP_TRACE_ERROR ("SDP - no gki buf to save rsp");
                 sdp_disconnect (p_ccb, SDP_NO_RESOURCES);
                 return;
             }
@@ -483,10 +483,10 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
         p_ccb->list_len += list_byte_count;
         p_reply         += list_byte_count;
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING1("list_len: %d(attr_rsp)", p_ccb->list_len);
+        SDP_TRACE_WARNING("list_len: %d(attr_rsp)", p_ccb->list_len);
 
         /* Check if we need to request a continuation */
-        SDP_TRACE_WARNING2("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
+        SDP_TRACE_WARNING("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
 #endif
         if (*p_reply)
         {
@@ -501,7 +501,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
         {
 
 #if (SDP_RAW_DATA_INCLUDED == TRUE)
-            SDP_TRACE_WARNING0("process_service_attr_rsp");
+            SDP_TRACE_WARNING("process_service_attr_rsp");
             sdp_copy_raw_data (p_ccb, FALSE);
 #endif
 
@@ -600,13 +600,13 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
     BOOLEAN         cont_request_needed = FALSE;
 
 #if (SDP_DEBUG_RAW == TRUE)
-    SDP_TRACE_WARNING1("process_service_search_attr_rsp");
+    SDP_TRACE_WARNING("process_service_search_attr_rsp");
 #endif
     /* If p_reply is NULL, we were called for the initial read */
     if (p_reply)
     {
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING4("ID & len: 0x%02x-%02x-%02x-%02x",
+        SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x",
             p_reply[0], p_reply[1], p_reply[2], p_reply[3]);
 #endif
         /* Skip transaction ID and length */
@@ -614,7 +614,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
 
         BE_STREAM_TO_UINT16 (lists_byte_count, p_reply);
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING1("lists_byte_count:%d", lists_byte_count);
+        SDP_TRACE_WARNING("lists_byte_count:%d", lists_byte_count);
 #endif
 
         /* Copy the response to the scratchpad. First, a safety check on the length */
@@ -625,7 +625,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
         }
 
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING2("list_len: %d, list_byte_count: %d",
+        SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d",
             p_ccb->list_len, lists_byte_count);
 #endif
         if (p_ccb->rsp_list == NULL)
@@ -633,7 +633,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
             p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT);
             if (p_ccb->rsp_list == NULL)
             {
-                SDP_TRACE_ERROR0 ("SDP - no gki buf to save rsp");
+                SDP_TRACE_ERROR ("SDP - no gki buf to save rsp");
                 sdp_disconnect (p_ccb, SDP_NO_RESOURCES);
                 return;
             }
@@ -642,10 +642,10 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
         p_ccb->list_len += lists_byte_count;
         p_reply         += lists_byte_count;
 #if (SDP_DEBUG_RAW == TRUE)
-        SDP_TRACE_WARNING1("list_len: %d(search_attr_rsp)", p_ccb->list_len);
+        SDP_TRACE_WARNING("list_len: %d(search_attr_rsp)", p_ccb->list_len);
 
         /* Check if we need to request a continuation */
-        SDP_TRACE_WARNING2("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
+        SDP_TRACE_WARNING("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
 #endif
         if (*p_reply)
         {
@@ -660,7 +660,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
     }
 
 #if (SDP_DEBUG_RAW == TRUE)
-    SDP_TRACE_WARNING1("cont_request_needed:%d", cont_request_needed);
+    SDP_TRACE_WARNING("cont_request_needed:%d", cont_request_needed);
 #endif
     /* If continuation request (or first time request) */
     if ((cont_request_needed) || (!p_reply))
@@ -733,7 +733,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
     /*******************************************************************/
 
 #if (SDP_RAW_DATA_INCLUDED == TRUE)
-    SDP_TRACE_WARNING0("process_service_search_attr_rsp");
+    SDP_TRACE_WARNING("process_service_search_attr_rsp");
     sdp_copy_raw_data (p_ccb, TRUE);
 #endif
 
@@ -744,7 +744,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
 
     if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE)
     {
-        SDP_TRACE_WARNING1 ("SDP - Wrong type: 0x%02x in attr_rsp", type);
+        SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp", type);
         return;
     }
     p = sdpu_get_len_from_type (p, type, &seq_len);
@@ -792,14 +792,14 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
 
     if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE)
     {
-        SDP_TRACE_WARNING1 ("SDP - Wrong type: 0x%02x in attr_rsp", type);
+        SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp", type);
         return (NULL);
     }
 
     p = sdpu_get_len_from_type (p, type, &seq_len);
     if ((p + seq_len) > p_msg_end)
     {
-        SDP_TRACE_WARNING1 ("SDP - Bad len in attr_rsp %d", seq_len);
+        SDP_TRACE_WARNING ("SDP - Bad len in attr_rsp %d", seq_len);
         return (NULL);
     }
 
@@ -807,7 +807,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
     p_rec = add_record (p_ccb->p_db, p_ccb->device_address);
     if (!p_rec)
     {
-        SDP_TRACE_WARNING0 ("SDP - DB full add_record");
+        SDP_TRACE_WARNING ("SDP - DB full add_record");
         return (NULL);
     }
 
@@ -820,7 +820,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
         p = sdpu_get_len_from_type (p, type, &attr_len);
         if (((type >> 3) != UINT_DESC_TYPE) || (attr_len != 2))
         {
-            SDP_TRACE_WARNING2 ("SDP - Bad type: 0x%02x or len: %d in attr_rsp", type, attr_len);
+            SDP_TRACE_WARNING ("SDP - Bad type: 0x%02x or len: %d in attr_rsp", type, attr_len);
             return (NULL);
         }
         BE_STREAM_TO_UINT16 (attr_id, p);
@@ -830,7 +830,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
 
         if (!p)
         {
-            SDP_TRACE_WARNING0 ("SDP - DB full add_attr");
+            SDP_TRACE_WARNING ("SDP - DB full add_attr");
             return (NULL);
         }
     }
@@ -947,10 +947,10 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
                 p_end             = p + attr_len;
                 total_len         = 0;
 
-                /* SDP_TRACE_DEBUG1 ("SDP - attr nest level:%d(list)", nest_level); */
+                /* SDP_TRACE_DEBUG ("SDP - attr nest level:%d(list)", nest_level); */
                 if (nest_level >= MAX_NEST_LEVELS)
                 {
-                    SDP_TRACE_ERROR0 ("SDP - attr nesting too deep");
+                    SDP_TRACE_ERROR ("SDP - attr nesting too deep");
                     return (p_end);
                 }
 
@@ -1027,7 +1027,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
             }
             break;
         default:
-            SDP_TRACE_WARNING1 ("SDP - bad len in UUID attr: %d", attr_len);
+            SDP_TRACE_WARNING ("SDP - bad len in UUID attr: %d", attr_len);
             return (p + attr_len);
         }
         break;
@@ -1040,15 +1040,15 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
         p_end             = p + attr_len;
         total_len         = 0;
 
-        /* SDP_TRACE_DEBUG1 ("SDP - attr nest level:%d", nest_level); */
+        /* SDP_TRACE_DEBUG ("SDP - attr nest level:%d", nest_level); */
         if (nest_level >= MAX_NEST_LEVELS)
         {
-            SDP_TRACE_ERROR0 ("SDP - attr nesting too deep");
+            SDP_TRACE_ERROR ("SDP - attr nesting too deep");
             return (p_end);
         }
         if(is_additional_list != 0 || attr_id == ATTR_ID_ADDITION_PROTO_DESC_LISTS)
             nest_level |= SDP_ADDITIONAL_LIST_MASK;
-        /* SDP_TRACE_DEBUG1 ("SDP - attr nest level:0x%x(finish)", nest_level); */
+        /* SDP_TRACE_DEBUG ("SDP - attr nest level:0x%x(finish)", nest_level); */
 
         while (p < p_end)
         {
@@ -1072,7 +1072,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
             p_attr->attr_value.v.u8 = *p++;
             break;
         default:
-            SDP_TRACE_WARNING1 ("SDP - bad len in boolean attr: %d", attr_len);
+            SDP_TRACE_WARNING ("SDP - bad len in boolean attr: %d", attr_len);
             return (p + attr_len);
         }
         break;
@@ -1104,20 +1104,20 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
         if (!p_parent_attr->attr_value.v.p_sub_attr)
         {
             p_parent_attr->attr_value.v.p_sub_attr = p_attr;
-            /* SDP_TRACE_DEBUG4 ("parent:0x%x(id:%d), ch:0x%x(id:%d)",
+            /* SDP_TRACE_DEBUG ("parent:0x%x(id:%d), ch:0x%x(id:%d)",
                 p_parent_attr, p_parent_attr->attr_id, p_attr, p_attr->attr_id); */
         }
         else
         {
             tSDP_DISC_ATTR  *p_attr1 = p_parent_attr->attr_value.v.p_sub_attr;
-            /* SDP_TRACE_DEBUG4 ("parent:0x%x(id:%d), ch1:0x%x(id:%d)",
+            /* SDP_TRACE_DEBUG ("parent:0x%x(id:%d), ch1:0x%x(id:%d)",
                 p_parent_attr, p_parent_attr->attr_id, p_attr1, p_attr1->attr_id); */
 
             while (p_attr1->p_next_attr)
                 p_attr1 = p_attr1->p_next_attr;
 
             p_attr1->p_next_attr = p_attr;
-            /* SDP_TRACE_DEBUG2 ("new ch:0x%x(id:%d)", p_attr, p_attr->attr_id); */
+            /* SDP_TRACE_DEBUG ("new ch:0x%x(id:%d)", p_attr, p_attr->attr_id); */
         }
     }
 
index d43c634..1e0c22a 100644 (file)
@@ -97,7 +97,7 @@ void sdp_init (void)
     if (!BTM_SetSecurityLevel (FALSE, SDP_SERVICE_NAME, BTM_SEC_SERVICE_SDP_SERVER,
                                SDP_SECURITY_LEVEL, SDP_PSM, 0, 0))
     {
-        SDP_TRACE_ERROR0 ("Security Registration Server failed");
+        SDP_TRACE_ERROR ("Security Registration Server failed");
         return;
     }
 #endif
@@ -107,7 +107,7 @@ void sdp_init (void)
     if (!BTM_SetSecurityLevel (TRUE, SDP_SERVICE_NAME, BTM_SEC_SERVICE_SDP_SERVER,
                                SDP_SECURITY_LEVEL, SDP_PSM, 0, 0))
     {
-        SDP_TRACE_ERROR0 ("Security Registration for Client failed");
+        SDP_TRACE_ERROR ("Security Registration for Client failed");
         return;
     }
 #endif
@@ -133,7 +133,7 @@ void sdp_init (void)
     /* Now, register with L2CAP */
     if (!L2CA_Register (SDP_PSM, &sdp_cb.reg_info))
     {
-        SDP_TRACE_ERROR0 ("SDP Registration failed");
+        SDP_TRACE_ERROR ("SDP Registration failed");
     }
 }
 
@@ -193,7 +193,7 @@ static void sdp_connect_ind (BD_ADDR  bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
 
         if (cfg.fcr_present)
         {
-            SDP_TRACE_DEBUG6("sdp_connect_ind:  mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
+            SDP_TRACE_DEBUG("sdp_connect_ind:  mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
                         cfg.fcr.mode, cfg.fcr.tx_win_sz, cfg.fcr.max_transmit,
                         cfg.fcr.rtrans_tout,cfg.fcr.mon_tout, cfg.fcr.mps);
         }
@@ -208,7 +208,7 @@ static void sdp_connect_ind (BD_ADDR  bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
         }
     }
 
-    SDP_TRACE_EVENT1 ("SDP - Rcvd L2CAP conn ind, sent config req, CID 0x%x", p_ccb->connection_id);
+    SDP_TRACE_EVENT ("SDP - Rcvd L2CAP conn ind, sent config req, CID 0x%x", p_ccb->connection_id);
 #else   /* No server */
     /* Reject the connection */
     L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
@@ -235,7 +235,7 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
     /* Find CCB based on CID */
     if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd conn cnf for unknown CID 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd conn cnf for unknown CID 0x%x", l2cap_cid);
         return;
     }
 
@@ -249,7 +249,7 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
 
         if (cfg.fcr_present)
         {
-            SDP_TRACE_DEBUG6("sdp_connect_cfm:  mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
+            SDP_TRACE_DEBUG("sdp_connect_cfm:  mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
                         cfg.fcr.mode, cfg.fcr.tx_win_sz, cfg.fcr.max_transmit,
                         cfg.fcr.rtrans_tout,cfg.fcr.mon_tout, cfg.fcr.mps);
         }
@@ -263,11 +263,11 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
             L2CA_ConfigReq (l2cap_cid, &cfg);
         }
 
-        SDP_TRACE_EVENT1 ("SDP - got conn cnf, sent cfg req, CID: 0x%x", p_ccb->connection_id);
+        SDP_TRACE_EVENT ("SDP - got conn cnf, sent cfg req, CID: 0x%x", p_ccb->connection_id);
     }
     else
     {
-        SDP_TRACE_WARNING2 ("SDP - Rcvd conn cnf with error: 0x%x  CID 0x%x", result, p_ccb->connection_id);
+        SDP_TRACE_WARNING ("SDP - Rcvd conn cnf with error: 0x%x  CID 0x%x", result, p_ccb->connection_id);
 
         /* Tell the user if he has a callback */
         if (p_ccb->p_cb || p_ccb->p_cb2)
@@ -312,7 +312,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
     /* Find CCB based on CID */
     if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
         return;
     }
 
@@ -346,7 +346,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
             {
                 p_cfg->fcr.tx_win_sz = sdp_cb.l2cap_my_cfg.fcr.tx_win_sz;
                 p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
-                SDP_TRACE_DEBUG0("sdp_config_ind(CONFIG) -> Please try again with SMALLER TX WINDOW");
+                SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with SMALLER TX WINDOW");
             }
 
             /* Reject if locally we want basic and they don't */
@@ -355,12 +355,12 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
                 /* Ask for a new setup */
                 p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
                 p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
-                SDP_TRACE_DEBUG0("sdp_config_ind(CONFIG) -> Please try again with BASIC mode");
+                SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with BASIC mode");
             }
             /* Remain in configure state and give the peer our desired configuration */
             if (p_cfg->result != L2CAP_CFG_OK)
             {
-                SDP_TRACE_WARNING1 ("SDP - Rcvd cfg ind, Unacceptable Parameters sent cfg cfm, CID: 0x%x", l2cap_cid);
+                SDP_TRACE_WARNING ("SDP - Rcvd cfg ind, Unacceptable Parameters sent cfg cfm, CID: 0x%x", l2cap_cid);
                 L2CA_ConfigRsp (l2cap_cid, p_cfg);
                 return;
             }
@@ -371,7 +371,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
 
     L2CA_ConfigRsp (l2cap_cid, p_cfg);
 
-    SDP_TRACE_EVENT1 ("SDP - Rcvd cfg ind, sent cfg cfm, CID: 0x%x", l2cap_cid);
+    SDP_TRACE_EVENT ("SDP - Rcvd cfg ind, sent cfg cfm, CID: 0x%x", l2cap_cid);
 
     p_ccb->con_flags |= SDP_FLAGS_HIS_CFG_DONE;
 
@@ -403,12 +403,12 @@ static void sdp_config_cfm (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
 {
     tCONN_CB    *p_ccb;
 
-    SDP_TRACE_EVENT2 ("SDP - Rcvd cfg cfm, CID: 0x%x  Result: %d", l2cap_cid, p_cfg->result);
+    SDP_TRACE_EVENT ("SDP - Rcvd cfg cfm, CID: 0x%x  Result: %d", l2cap_cid, p_cfg->result);
 
     /* Find CCB based on CID */
     if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
         return;
     }
 
@@ -464,14 +464,14 @@ static void sdp_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
     /* Find CCB based on CID */
     if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd L2CAP disc, unknown CID: 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc, unknown CID: 0x%x", l2cap_cid);
         return;
     }
 
     if (ack_needed)
         L2CA_DisconnectRsp (l2cap_cid);
 
-    SDP_TRACE_EVENT1 ("SDP - Rcvd L2CAP disc, CID: 0x%x", l2cap_cid);
+    SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc, CID: 0x%x", l2cap_cid);
 #if SDP_CLIENT_ENABLED == TRUE
     /* Tell the user if he has a callback */
     if (p_ccb->p_cb)
@@ -516,13 +516,13 @@ static void sdp_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
         }
         else
         {
-            SDP_TRACE_WARNING2 ("SDP - Ignored L2CAP data while in state: %d, CID: 0x%x",
+            SDP_TRACE_WARNING ("SDP - Ignored L2CAP data while in state: %d, CID: 0x%x",
                                 p_ccb->con_state, l2cap_cid);
         }
     }
     else
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd L2CAP data, unknown CID: 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd L2CAP data, unknown CID: 0x%x", l2cap_cid);
     }
 
     GKI_freebuf (p_msg);
@@ -548,11 +548,11 @@ tCONN_CB* sdp_conn_originate (UINT8 *p_bd_addr)
     /* Allocate a new CCB. Return if none available. */
     if ((p_ccb = sdpu_allocate_ccb()) == NULL)
     {
-        SDP_TRACE_WARNING0 ("SDP - no spare CCB for orig");
+        SDP_TRACE_WARNING ("SDP - no spare CCB for orig");
         return (NULL);
     }
 
-    SDP_TRACE_EVENT0 ("SDP - Originate started");
+    SDP_TRACE_EVENT ("SDP - Originate started");
 
     /* We are the originator of this connection */
     p_ccb->con_flags |= SDP_FLAGS_IS_ORIG;
@@ -580,7 +580,7 @@ tCONN_CB* sdp_conn_originate (UINT8 *p_bd_addr)
     }
     else
     {
-        SDP_TRACE_WARNING0 ("SDP - Originate failed");
+        SDP_TRACE_WARNING ("SDP - Originate failed");
         sdpu_release_ccb (p_ccb);
         return (NULL);
     }
@@ -624,7 +624,7 @@ void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
 
             p_ccb->cur_handle = 0;
 
-            SDP_TRACE_EVENT1 ("SDP - looking for for more,  CID: 0x%x",
+            SDP_TRACE_EVENT ("SDP - looking for for more,  CID: 0x%x",
                               p_ccb->connection_id);
 
             sdp_disc_connected (p_ccb);
@@ -637,7 +637,7 @@ void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
 
 #endif
 
-    SDP_TRACE_EVENT1 ("SDP - disconnect  CID: 0x%x", p_ccb->connection_id);
+    SDP_TRACE_EVENT ("SDP - disconnect  CID: 0x%x", p_ccb->connection_id);
 
     /* Check if we have a connection ID */
     if (p_ccb->connection_id != 0)
@@ -678,11 +678,11 @@ static void sdp_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
     /* Find CCB based on CID */
     if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
     {
-        SDP_TRACE_WARNING1 ("SDP - Rcvd L2CAP disc cfm, unknown CID: 0x%x", l2cap_cid);
+        SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc cfm, unknown CID: 0x%x", l2cap_cid);
         return;
     }
 
-    SDP_TRACE_EVENT1 ("SDP - Rcvd L2CAP disc cfm, CID: 0x%x", l2cap_cid);
+    SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc cfm, CID: 0x%x", l2cap_cid);
 
     /* Tell the user if he has a callback */
     if (p_ccb->p_cb)
@@ -708,7 +708,7 @@ static void sdp_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
 *******************************************************************************/
 void sdp_conn_timeout (tCONN_CB*p_ccb)
 {
-    SDP_TRACE_EVENT2 ("SDP - CCB timeout in state: %d  CID: 0x%x",
+    SDP_TRACE_EVENT ("SDP - CCB timeout in state: %d  CID: 0x%x",
                       p_ccb->con_state, p_ccb->connection_id);
 
     L2CA_DisconnectReq (p_ccb->connection_id);
index 84dd957..3d2167b 100644 (file)
@@ -148,7 +148,7 @@ void sdp_server_handle_client_req (tCONN_CB *p_ccb, BT_HDR *p_msg)
 
     default:
         sdpu_build_n_send_error (p_ccb, trans_num, SDP_INVALID_REQ_SYNTAX, SDP_TEXT_BAD_PDU);
-        SDP_TRACE_WARNING1 ("SDP - server got unknown PDU: 0x%x", pdu_id);
+        SDP_TRACE_WARNING ("SDP - server got unknown PDU: 0x%x", pdu_id);
         break;
     }
 }
@@ -245,7 +245,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
     /* Get a buffer to use to build the response */
     if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
     {
-        SDP_TRACE_ERROR0 ("SDP - no buf for search rsp");
+        SDP_TRACE_ERROR ("SDP - no buf for search rsp");
         return;
     }
     p_buf->offset = L2CAP_MIN_OFFSET;
@@ -263,7 +263,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
     UINT16_TO_BE_STREAM (p_rsp, num_rsp_handles);
     UINT16_TO_BE_STREAM (p_rsp, cur_handles);
 
-/*    SDP_TRACE_DEBUG5("SDP Service Rsp: tothdl %d, curhdlr %d, start %d, end %d, cont %d",
+/*    SDP_TRACE_DEBUG("SDP Service Rsp: tothdl %d, curhdlr %d, start %d, end %d, cont %d",
                      num_rsp_handles, cur_handles, cont_offset,
                      cont_offset + cur_handles-1, is_cont); */
     for (xx = cont_offset; xx < cont_offset + cur_handles; xx++)
@@ -391,7 +391,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
             p_ccb->rsp_list = (UINT8 *)GKI_getbuf (max_list_len);
             if (p_ccb->rsp_list == NULL)
             {
-                SDP_TRACE_ERROR0 ("SDP - no scratch buf for search rsp");
+                SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp");
                 return;
             }
         }
@@ -440,7 +440,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
             {
                 if (attr_len >= SDP_MAX_ATTR_LEN)
                 {
-                    SDP_TRACE_ERROR2("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
+                    SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
                     sdpu_build_n_send_error (p_ccb, trans_num, SDP_NO_RESOURCES, NULL);
                     return;
                 }
@@ -499,7 +499,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
     /* Get a buffer to use to build the response */
     if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
     {
-        SDP_TRACE_ERROR0 ("SDP - no buf for search rsp");
+        SDP_TRACE_ERROR ("SDP - no buf for search rsp");
         return;
     }
     p_buf->offset = L2CAP_MIN_OFFSET;
@@ -641,7 +641,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
             p_ccb->rsp_list = (UINT8 *)GKI_getbuf (max_list_len);
             if (p_ccb->rsp_list == NULL)
             {
-                SDP_TRACE_ERROR0 ("SDP - no scratch buf for search rsp");
+                SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp");
                 return;
             }
         }
@@ -714,7 +714,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
                 {
                     if (attr_len >= SDP_MAX_ATTR_LEN)
                     {
-                        SDP_TRACE_ERROR2("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
+                        SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
                         sdpu_build_n_send_error (p_ccb, trans_num, SDP_NO_RESOURCES, NULL);
                         return;
                     }
@@ -801,7 +801,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
     /* Get a buffer to use to build the response */
     if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
     {
-        SDP_TRACE_ERROR0 ("SDP - no buf for search rsp");
+        SDP_TRACE_ERROR ("SDP - no buf for search rsp");
         return;
     }
     p_buf->offset = L2CAP_MIN_OFFSET;
index 842e757..7cc9404 100644 (file)
@@ -156,7 +156,7 @@ void sdpu_release_ccb (tCONN_CB *p_ccb)
     /* Free the response buffer */
     if (p_ccb->rsp_list)
     {
-       SDP_TRACE_DEBUG0("releasing SDP rsp_list");
+       SDP_TRACE_DEBUG("releasing SDP rsp_list");
 
         GKI_freebuf(p_ccb->rsp_list);
         p_ccb->rsp_list = NULL;
@@ -317,13 +317,13 @@ void sdpu_build_n_send_error (tCONN_CB *p_ccb, UINT16 trans_num, UINT16 error_co
     BT_HDR          *p_buf;
 
 
-    SDP_TRACE_WARNING2 ("SDP - sdpu_build_n_send_error  code: 0x%x  CID: 0x%x",
+    SDP_TRACE_WARNING ("SDP - sdpu_build_n_send_error  code: 0x%x  CID: 0x%x",
                         error_code, p_ccb->connection_id);
 
     /* Get a buffer to use to build and send the packet to L2CAP */
     if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
     {
-        SDP_TRACE_ERROR0 ("SDP - no buf for err msg");
+        SDP_TRACE_ERROR ("SDP - no buf for err msg");
         return;
     }
     p_buf->offset = L2CAP_MIN_OFFSET;
@@ -1006,7 +1006,7 @@ UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UI
 
     if ((p_attr_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN )) == NULL)
     {
-        SDP_TRACE_ERROR0("sdpu_build_partial_attrib_entry cannot get a buffer!");
+        SDP_TRACE_ERROR("sdpu_build_partial_attrib_entry cannot get a buffer!");
         return NULL;
     }
     p_tmp_attr = p_attr_buff;