History log of /system/bt/btif/include/btif_common.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a44a7a4f6b2dec169097152739d7fdd38482b72 26-Apr-2016 Pavlin Radoslavov <pavlin@google.com> Fix issues during cleanup stage of the Bluetooth stack

* Moved free-ing of bta_av_cb timers from the init function
to the cleanup stage.
* Changed the usage of btif_jni_disassociate() so it is called
synchronously. Its previous usage was complicated -
the function was called asynchronously on a different thread,
and we had to wait on a future for its completion.
* Renamed function btif_shutdown_bluetooth() to
btif_cleanup_bluetooth() to represent better its purpose.
Similarly, bte_main_shutdown() is renamed to bte_main_cleanup()

Also:
* Removed function btif_init_fail(), because it is not used.
* Updated an error log message inside function
btif_in_execute_service_request() so the log information
is accurate and more useful.
* Updated the log messages related to the lifecycle of a module
in btcore/src/module.c

Bug: 26982349
Change-Id: Icd6f159d993bdb9c8ef09bfb5b1386b3d6ea4ff2
/system/bt/btif/include/btif_common.h
3f06e14fddc0e674347ae28ea4a25218d4ce1d2a 10-Nov-2015 Pavlin Radoslavov <pavlin@google.com> Fix SIGBUS crash when copying data

We have the following memory alignment-related issue, that seems
to be architecture/compiler/memcpy(3) specific.

Within struct tBTIF_CONTEXT_SWITCH_CBACK, the beginning of the
zero-length array "char p_param[]" is not aligned (because of the
struct internals).
However, this p_param pointer is casted within function
btif_gattc_deep_copy() to the struct pointer (btif_adv_data_t *).
By definition, the memory pointed to by such pointer is suppose
to be aligned:

btif_adv_data_t *dst = (btif_adv_data_t*) p_dest;

It seems that on some architectures/compilers the executed memcpy()
instructions are optimized for such memory alignment.
If the memory was not aligned, we get SIGBUS.

Apparently, just using (void *) casting for the memcpy() destination,
avoids using the optimized memory aligned instructions:
memcpy((void *)dst, src, ...);

The solutions are twofold:
* Make sure that "char p_param[]" within struct
tBTIF_CONTEXT_SWITCH_CBACK is aligned. Otherwise, the casting
to "(btif_adv_data_t*)" can be problematic.
* Add (void *) casting to all memcpy() calls which might be
referring to such mis-aligned memory.
This is done by using the new macro maybe_non_aligned_memcpy()
in all places that such casting might be needed.

Either solution is sufficient to prevent the crash as identified in
this particular case. We need to apply both solutions, to reduce the
chance of running again into a similar issue.

Bug: 25601669
Change-Id: I6c49645c00f10c594a5d1e53a9fac202c506657c
/system/bt/btif/include/btif_common.h
c196f214c5ae349ec2022f8d3cbaf56910b3b9f8 24-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Moved GKI_get_os_tick_count() to OSI

* Renamed function GKI_get_os_tick_count() to time_get_os_boottime_ms()
and moved it to the OSI module: to the new file osi/src/time.c .
The corresponding header file is osi/include/time.h

* Added unit tests for function time_get_os_boottime_ms() in file
osi/test/time_test.cpp

* Removed "osi/include" from the list of paths to search for include
files. This is needed, because file name collision of "time.h"
in osi/include and the system <time.h>

Change-Id: I934be0c8f392150a352947326546bcf8aa070f97
/system/bt/btif/include/btif_common.h
28f294b94f6e05f4572672671535f66bb60f0c0a 04-Aug-2015 Ajay Panicker <apanicke@google.com> Load factory Bluetooth address from system property

Implemented a check to grab the ro.boot.btmacaddr property in case the
device fails to receive an address beforehand.

Bug: 22618015
Change-Id: Ie322888e114a732f8e85c81793e3e5e5eacffc7a
/system/bt/btif/include/btif_common.h
db554581079863974af8e1289646f5deea6fc044 26-Jun-2015 Marie Janssen <jamuraa@google.com> build: Update osi log functions, use consistently

Update the LOG_* functions to take a tag argument which makes them more
consistent with the Android Log.*(TAG, s) common syntax and removes
some #define-dependency with osi/include/log.h.

Also update to never use Android log functions directly.

Also contains minor cleanup of some header includes.

Bug: 21569831
Change-Id: If07385cafbea062232ecdbc7c673f908d5ef8921
/system/bt/btif/include/btif_common.h
f54df6b47616eeae11001b1d2e977548fe316227 15-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix build issues after the merge

Change-Id: Ia856311187a0b2168cb859bd8b2300ff59df6569
/system/bt/btif/include/btif_common.h
44802768c447ab480d4227b3a852a97d923b816d 24-Dec-2014 Sharvil Nanavati <sharvil@google.com> Add platform-independent logging macros to OSI.

These macros should replace ALOG* and the various trace macros
used throughout bluedroid. This change eliminates all uses of the
ALOG* macros in favor of the new ones.
/system/bt/btif/include/btif_common.h
83e2c342e8b40009f3509425722d309c0b8189b9 30-Sep-2014 Chris Manton <cmanton@google.com> Remove data_types.h
/system/bt/btif/include/btif_common.h
39110ec88460421618330863807804e03594ef67 06-Oct-2014 Zach Johnson <zachoverflow@google.com> Remove duplicate local bdaddr management functions
/system/bt/btif/include/btif_common.h
0eefef0f35dbf400f295e4be8c4c1ee295042d88 09-Sep-2014 Chris Manton <cmanton@google.com> btif task removal and reactor insertion
/system/bt/btif/include/btif_common.h
e8c3d75b75493911ebf0f99c83676359657178f7 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: BTIF and APPL.

Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
/system/bt/btif/include/btif_common.h
1025687c6679608fe9df918f37011414ffc72b62 19-Aug-2013 Hemant Gupta <hemantg@codeaurora.org> [2/4] Bluetooth: Add support for HFP Client role.

Implementation changes in BTA and BTIF layer to support
HFP Client role.

Change-Id: I9f939c18e8f989a50f298d0b313c5a0959c030a7
/system/bt/btif/include/btif_common.h
ead3cde4bac0c3e32cd31f149093f004eef8ceeb 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
/system/bt/btif/include/btif_common.h
689d66b6559dcb3a0ad7f6cc33b6129e50910253 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot 9fd57cbacd95e89602f430244c35bbc67f08b6d2

Change-Id: Ibc3a4bf4161d286c7cfab89a19c676eb5cc9224f
/system/bt/btif/include/btif_common.h
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/btif/include/btif_common.h