summaryrefslogtreecommitdiffstats
path: root/vendor/libvendor/src/hci_h4.c
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libvendor/src/hci_h4.c')
-rw-r--r--vendor/libvendor/src/hci_h4.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/vendor/libvendor/src/hci_h4.c b/vendor/libvendor/src/hci_h4.c
index e17c57a..f958951 100644
--- a/vendor/libvendor/src/hci_h4.c
+++ b/vendor/libvendor/src/hci_h4.c
@@ -71,9 +71,11 @@
#endif
#if (HCIH4_DBG == TRUE)
-#define HCIH4DBG LOGD
+#define HCIH4DBG(param, ...) {if (dbg_mode & traces & (1 << TRACE_HCI)) \
+ LOGD(param, ## __VA_ARGS__);\
+ }
#else
-#define HCIH4DBG
+#define HCIH4DBG(param, ...) {}
#endif
/* Preamble length for HCI Commands:
@@ -209,30 +211,6 @@ static tHCI_H4_CB h4_cb;
/*******************************************************************************
**
-** Function is_snoop_enabled
-**
-** Description Enable bt snoop
-**
-** Returns TRUE(enabled)/FALSE
-**
-*******************************************************************************/
-static uint8_t is_snoop_enabled()
-{
- char buf[8];
- int flag = 0;
- int fd = open(SNOOP_CONFIG_PATH, O_RDONLY, 0644);
-
- if (fd < 0) {
- LOGE("file failed to open %s ", SNOOP_CONFIG_PATH);
- return FALSE;
- }
- read(fd, buf, sizeof(buf));
- flag = atoi(buf);
- return (flag == 1) ? TRUE : FALSE;
-}
-
-/*******************************************************************************
-**
** Function get_acl_data_length_cback
**
** Description Callback function for HCI_READ_BUFFER_SIZE and
@@ -600,10 +578,7 @@ void hci_h4_init(void)
h4_cb.hc_ble_acl_data_size = 27;
btsnoop_init();
- if (is_snoop_enabled() == TRUE)
- {
- btsnoop_open();
- }
+ btsnoop_open();
}
/*******************************************************************************