OSDN Git Service

DO NOT MERGE ANYWHERE Create backup for bt_config.conf am: 4d5f21452e -s ours
[android-x86/system-bt.git] / main / bte_main.c
index 9bb6307..da36056 100644 (file)
 #include "bt_hci_bdroid.h"
 #include "bt_utils.h"
 #include "bta_api.h"
-#include "btcore/include/counter.h"
 #include "btcore/include/module.h"
 #include "bte.h"
 #include "btif_common.h"
 #include "btsnoop.h"
 #include "btu.h"
 #include "bt_common.h"
+#include "device/include/interop.h"
 #include "hci_layer.h"
 #include "osi/include/alarm.h"
 #include "osi/include/fixed_queue.h"
@@ -86,7 +86,6 @@ static const hci_t *hci;
 /*******************************************************************************
 **  Externs
 *******************************************************************************/
-extern void bte_load_ble_conf(const char *p_path);
 fixed_queue_t *btu_hci_msg_queue;
 
 /******************************************************************************
@@ -100,7 +99,7 @@ fixed_queue_t *btu_hci_msg_queue;
 ******************************************************************************/
 void bte_main_boot_entry(void)
 {
-    module_init(get_module(COUNTER_MODULE));
+    module_init(get_module(INTEROP_MODULE));
 
     hci = hci_layer_get_interface();
     if (!hci)
@@ -115,22 +114,19 @@ void bte_main_boot_entry(void)
     data_dispatcher_register_default(hci->event_dispatcher, btu_hci_msg_queue);
     hci->set_data_queue(btu_hci_msg_queue);
 
-#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
-    bte_load_ble_conf(BTE_BLE_STACK_CONF_FILE);
-#endif
     module_init(get_module(STACK_CONFIG_MODULE));
 }
 
 /******************************************************************************
 **
-** Function         bte_main_shutdown
+** Function         bte_main_cleanup
 **
-** Description      BTE MAIN API - Shutdown code for BTE chip/stack
+** Description      BTE MAIN API - Cleanup code for BTE chip/stack
 **
 ** Returns          None
 **
 ******************************************************************************/
-void bte_main_shutdown()
+void bte_main_cleanup()
 {
     data_dispatcher_register_default(hci_layer_get_interface()->event_dispatcher, NULL);
     hci->set_data_queue(NULL);
@@ -140,7 +136,7 @@ void bte_main_shutdown()
 
     module_clean_up(get_module(STACK_CONFIG_MODULE));
 
-    module_clean_up(get_module(COUNTER_MODULE));
+    module_clean_up(get_module(INTEROP_MODULE));
 }
 
 /******************************************************************************
@@ -259,8 +255,6 @@ void bte_main_hci_send (BT_HDR *p_msg, UINT16 event)
 
     p_msg->event = event;
 
-    counter_add("main.tx.packets", 1);
-    counter_add("main.tx.bytes", p_msg->len);
 
     if((sub_event == LOCAL_BR_EDR_CONTROLLER_ID) || \
        (sub_event == LOCAL_BLE_CONTROLLER_ID))
@@ -270,6 +264,6 @@ void bte_main_hci_send (BT_HDR *p_msg, UINT16 event)
     else
     {
         APPL_TRACE_ERROR("Invalid Controller ID. Discarding message.");
-        osi_freebuf(p_msg);
+        osi_free(p_msg);
     }
 }