#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
/* 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
*/
/* 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
*/
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
|| (!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);
}
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 */
{
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);
}
}
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)
{
}
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);
}
}
BOOLEAN done = FALSE;
UINT16 psm = l2cb.dyn_psm;
- L2CAP_TRACE_API0( "L2CA_AllocatePSM");
+ L2CAP_TRACE_API( "L2CA_AllocatePSM");
while (!done)
{
psm += 2;
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,
/* 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);
}
/* 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);
}
}
/* 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);
}
*/
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);
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);
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);
}
{
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);
}
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;
}
}
{
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);
}
{
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);
}
{
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);
}
{
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 */
/* 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)
/* 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);
}
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])));
/* 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;
}
/* 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);
}
*******************************************************************************/
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))
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);
}
/* 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);
}
*******************************************************************************/
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);
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)
{
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);
}
{
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);
}
{
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);
}
/* 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
{
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))
}
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);
}
{
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]);
/* 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]);
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);
}
{
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);
}
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);
}
{
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);
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);
/* 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);
}
&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);
}
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
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);
}
/* 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);
}
{
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);
}
}
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);
}
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 */
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);
}
{
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);
}
else
{
- L2CAP_TRACE_ERROR1 ("No CCB for CID:0x%04x", lcid);
+ L2CAP_TRACE_ERROR ("No CCB for CID:0x%04x", lcid);
return FALSE;
}
}
*******************************************************************************/
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);
}
/* 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
*******************************************************************************/
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);
}
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 */
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);
/* 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]);
/* 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);
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);
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);
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;
}
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;
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
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);
(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);
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
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 ;
}
}
/* 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;
}
}
else
{
- L2CAP_TRACE_EVENT0 ("L2CAP - LE - update currently disabled");
+ L2CAP_TRACE_EVENT ("L2CAP - LE - update currently disabled");
}
}
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;
}
/* 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);
}
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
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
}
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);
}
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
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;
}
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;
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);
}
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;
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;
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)
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;
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 */
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)
{
/* 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);
/* 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;
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)
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);
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;
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;
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;
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;
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,
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;
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;
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;
}
}
- 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;
/* 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;
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;
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;
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)
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;
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)
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);
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;
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)
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;
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;
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;
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;
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 */
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);
/* 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);
}
/* 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);
}
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);
#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,
}
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,
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 */
}
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);
}
}
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;
}
|| (((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,
}
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,
}
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,
(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);
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;
}
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);
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);
}
*******************************************************************************/
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);
*******************************************************************************/
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)
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);
}
/*
- 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;
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]++;
}
else
{
- L2CAP_TRACE_DEBUG0 ("process_s_frame hit_max_retries");
+ L2CAP_TRACE_DEBUG ("process_s_frame hit_max_retries");
}
GKI_freebuf (p_buf);
/* 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;
/* 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);
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)
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;
}
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;
}
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 */
}
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 */
{
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;
/* 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;
}
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;
}
/* 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,
/* 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 */
{
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;
/* 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;
}
}
{
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;
}
}
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
{
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;
}
&& (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);
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;
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);
}
}
}
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);
}
}
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 */
/* 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);
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 */
{
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;
}
/* 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;
}
}
/* 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);
}
/* 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);
}
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);
}
}
/* 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 --
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;
/* 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;
}
/* 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;
}
/* 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;
}
}
/* 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);
}
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);
/* 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;
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 */
/* 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);
}
{
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);
}
{
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;
/* 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;
}
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);
}
}
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);
}
}
{
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)
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;
}
}
else
{
- L2CAP_TRACE_WARNING0 ("L2CA_BypassSFrame(ERROR): already in use (ignoring...)");
+ L2CAP_TRACE_WARNING ("L2CA_BypassSFrame(ERROR): already in use (ignoring...)");
}
}
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;
}
}
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);
/* 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);
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;
/* 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;
}
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;
}
#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 */
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 */
(*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 */
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);
#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 */
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++ )
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
{
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);
{
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);
}
{
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;
}
#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,
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,
/* 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);
}
#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);
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);
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);
/* 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;
}
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);
/* 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;
}
/* 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;
}
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;
}
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);
}
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;
}
{
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;
}
}
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);
{
/* 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)
{
** 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;
/* 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)
/* 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)
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;
}
{
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;
}
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;
}
{
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;
}
}
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;
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;
}
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 */
/* 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);
}
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);
}
/* 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);
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++)
{
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)
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
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++)
{
{
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]);
{
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);
}
{
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
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);
}
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);
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);
}
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]);
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);
}
/* 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);
}
/* 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);
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]);
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
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);
}
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);
}
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);
}
}
{
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);
}
}
/* 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
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 */
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);
}
{
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);
/* 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;
}
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;
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];
}
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 */
if (!p_buf)
{
- L2CAP_TRACE_ERROR0 ("l2cu_build_header - no buffer");
+ L2CAP_TRACE_ERROR ("l2cu_build_header - no buffer");
return (NULL);
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
if (!p_buf)
{
- L2CAP_TRACE_ERROR0 ("L2CAP - no buffer for cfg_rej");
+ L2CAP_TRACE_ERROR ("L2CAP - no buffer for cfg_rej");
return;
}
}
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;
}
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);
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;
}
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;
}
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;
}
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
/* 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;
}
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;
}
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;
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;
}
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 */
{
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
*/
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;
}
/* 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);
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);
}
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;
}
}
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;
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)
{
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);
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);
}
}
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);
}
}
/* 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)
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.
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);
}
/* 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);
}
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)
}
else
{
- L2CAP_TRACE_WARNING0 ("l2cu_resubmit_pending_sec_req - unknown BD_ADDR");
+ L2CAP_TRACE_WARNING ("l2cu_resubmit_pending_sec_req - unknown BD_ADDR");
}
}
else
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
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);
}
}
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)
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
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;
}
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;
}
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 */
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 );
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);
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);
}
}
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 */
{
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 );
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);
{
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 );
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);
/* 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)
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,
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);
}
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 )
{
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);
}
}
/* 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;
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);
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;
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;
}
}
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;
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;
}
}
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);
}
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;
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;
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;
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;
{
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++)
{
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
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 */
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);
}
}
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;
}
{
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)
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);
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 */
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 */
}
#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)
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;
}
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)
{
{
#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
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 */
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 */
}
#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)
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;
}
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)
{
}
#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))
/*******************************************************************/
#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
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);
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);
}
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);
}
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);
if (!p)
{
- SDP_TRACE_WARNING0 ("SDP - DB full add_attr");
+ SDP_TRACE_WARNING ("SDP - DB full add_attr");
return (NULL);
}
}
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);
}
}
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;
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)
{
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;
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); */
}
}
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
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
/* 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");
}
}
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);
}
}
}
- 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);
/* 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;
}
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);
}
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)
/* 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;
}
{
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 */
/* 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;
}
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;
{
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;
}
/* 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)
}
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);
/* 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;
}
else
{
- SDP_TRACE_WARNING0 ("SDP - Originate failed");
+ SDP_TRACE_WARNING ("SDP - Originate failed");
sdpu_release_ccb (p_ccb);
return (NULL);
}
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);
#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)
/* 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)
*******************************************************************************/
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);
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;
}
}
/* 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;
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++)
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;
}
}
{
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;
}
/* 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;
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;
}
}
{
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;
}
/* 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;
/* 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;
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;
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;