summaryrefslogtreecommitdiffstats
path: root/btif
diff options
context:
space:
mode:
authorKausik Sinnaswamy <kausik@broadcom.com>2012-04-09 20:09:44 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:15 -0700
commitb5dc70a1f69f8607f28956cf4bbe94e6183e982f (patch)
tree7815fa8e719025afb025885e18a68c9d56a6c6c4 /btif
parentee20641263a5f34fe6c8dab176d95e07243657b1 (diff)
downloadexternal_bluetooth_bluedroid-b5dc70a1f69f8607f28956cf4bbe94e6183e982f.zip
external_bluetooth_bluedroid-b5dc70a1f69f8607f28956cf4bbe94e6183e982f.tar.gz
external_bluetooth_bluedroid-b5dc70a1f69f8607f28956cf4bbe94e6183e982f.tar.bz2
To improve enable/disable stability, ensure that GKI buffer pool gets
reset/reclaimed after every enable/disable cycle Change-Id: Ifc84b9bdaefa91096fe3da369d31884bbac8eaa0
Diffstat (limited to 'btif')
-rwxr-xr-xbtif/src/btif_core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 19f26aa..47d09f2 100755
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -281,12 +281,12 @@ static void btif_task(UINT32 params)
GKI_task_self_cleanup(BTIF_TASK);
+ bte_main_shutdown();
+
if (btif_shutdown_pending)
{
btif_shutdown_pending = 0;
- bte_main_shutdown();
-
/* shutdown complete, all events notified and we reset HAL callbacks */
bt_hal_cbacks = NULL;
}
@@ -369,6 +369,9 @@ bt_status_t btif_enable_bluetooth(void)
LOGI("btif_enable_bluetooth");
+ /* initialize OS */
+ GKI_init();
+
if (btif_enabled == 1)
{
LOGD("already enabled\n");
@@ -447,7 +450,6 @@ void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd)
** Returns void
**
*******************************************************************************/
-
bt_status_t btif_disable_bluetooth(void)
{
tBTA_STATUS status;
@@ -459,7 +461,6 @@ bt_status_t btif_disable_bluetooth(void)
}
BTIF_TRACE_DEBUG1("%s", __FUNCTION__);
-
//cleanup rfcomm & l2cap api
btif_sock_cleanup();
status = BTA_DisableBluetooth();