diff options
| author | Dmitry Grinberg <dmitrygr@gmail.com> | 2015-10-10 10:10:11 +0000 |
|---|---|---|
| committer | Scott Warner <Tortel1210@gmail.com> | 2015-10-22 08:33:00 -0400 |
| commit | d58c13fb25e3ca93dcda915460600bdee6740751 (patch) | |
| tree | 4ce71e1f919cfd236d7f063d6dbee5690e26c9b1 | |
| parent | 05573c7e251ee1dca3ade34ee44989e276ed1e35 (diff) | |
| download | android_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.tar.gz android_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.tar.bz2 android_hardware_broadcom_libbt-d58c13fb25e3ca93dcda915460600bdee6740751.zip | |
Avoid an annoying bug that only hits BCM chips running at less than 3MBps
Change-Id: If31e05cd4789660780b4f34288c0d4023554afe6
| -rw-r--r-- | Android.mk | 4 | ||||
| -rwxr-xr-x | src/hardware.c | 7 |
2 files changed, 11 insertions, 0 deletions
@@ -31,6 +31,10 @@ ifeq ($(BOARD_HAVE_SAMSUNG_BLUETOOTH),true) LOCAL_CFLAGS += -DSAMSUNG_BLUETOOTH endif +ifeq ($(BCM_BLUETOOTH_MANTA_BUG), true) + LOCAL_CFLAGS += -DMANTA_BUG +endif + include $(LOCAL_PATH)/vnd_buildcfg.mk include $(BUILD_SHARED_LIBRARY) diff --git a/src/hardware.c b/src/hardware.c index 651e666..8ea1c61 100755 --- a/src/hardware.c +++ b/src/hardware.c @@ -1045,8 +1045,15 @@ void hw_config_cback(void *p_mem) } // if (p_buf != NULL) /* Free the RX event buffer */ + +// On manta this causes a crash due to an overrun elsewhere. +// Sad as it is, if we just do not do the free here we'll just leak less than 4K each time BT is turned on. +// And since when it is turned off, the process dies, this realy only costs us 4K total. +// I'm willing to part with 4K to avoid debugging bluedroid +#ifndef MANTA_BUG if (bt_vendor_cbacks) bt_vendor_cbacks->dealloc(p_evt_buf); +#endif if (is_proceeding == FALSE) { |
