20524d393e8b3bea4c573f7980cd843500b0e6a4 |
|
03-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Refactor usage of osi_free() and osi_freebuf() * Allow to call osi_freebuf(ptr) on NULL pointers. This simplifies the code: a notable number of "if (foo != NULL)" checks are removed. * Add new function osi_free_and_reset(p_ptr) that frees the buffer, and explicitly resets the pointer to NULL. This prevents unintended usage of free memory. * Add corresponding function osi_freebuf_and_reset(p_ptr) * Minor cleanup around usages of osi_free() and osi_freebuf() Also: * Removed unused function btif_gattc_cleanup() * Replaced usage of the following functions with osi_freebuf_and_reset() - mca_free_buf() - utl_freebuf() - btif_hl_free_buf() * Replaced usage of rc_supported_event_free() with osi_freebuf() * Replaced usage of btif_hl_get_buf() with osi_getbuf() * Eliminate some of the osi_get_buf_size() calls Bug: 22948224 Change-Id: Ife860658b26274da6f228d7353cb0f1531587337
/system/bt/btif/include/btif_hl.h
|
78bcff79e1b1f0efce436b33bdd6da88745bfc8a |
|
05-Dec-2015 |
Pavlin Radoslavov <pavlin@google.com> |
Refactor the Bluetooth timers * Updated the alarm API: - Existing API alarm_new() is modified to take an alarm name as an argument. - New API alarm_new_periodic() is used to create a periodic alarm. - Added new API alarm_is_scheduled() to test whether an alarm is scheduled. - Existing API alarm_set_periodic() is removed: a periodic alarm is created by alarm_new_periodic(). - Added new API alarm_set_on_queue() to set an alarm whose callback is executed on a specific queue. - Added new API alarm_register_processing_queue() and alarm_unregister_processing_queue() to register/unregister a queue and the corresponding thread for alarm processing. - Added corresponding unit tests. * Updated the alarm internals: - Added alarm_info_t for collecting alarm-related information and statistics. - Collect and store alarm-related statistics into alarm_info_t per alarm. - Include the alarm-related statistics and info into the native dumpsys output for Bluetooth. - Once an alarm expires, the alarm execution is scheduled for processing on another internal alarm-specific thread, not on the thread that is maintaining the alarms. - Implemented callback execution ordering guarantee among timers on the same thread with exactly same timeout values. * Refactor some of the usage of alarm_set() and simplify the code by using alarm_set_on_queue() instead. * Removed the non_repeating timers wrapper, and use directly the alarm mechanism / API. * Refactored all timer_entry_t timers and replaced them with alarm_t timers: - Replaced the btu_start_timer() / btu_stop_timer() / btu_start_quick_timer() / btu_stop_quick_timer() / btu_oneshot_alarm() mechanism with alarm_set_on_queue() and alarm_cancel() - Removed the whole mechanism around the BTU_TTYPE_* timers. * Fixed a bug when processing the GATT indication confirmation timer expiration (timer tGATT_TCB.conf_timer: b/26610829). * Renamed and/or split misc. timeout functions, fields, and timers * Renamed time-related constants and changed the values from seconds to milliseconds * Replaced timer tAVDT_CCB.timer_entry with three mutually exclusive timers: idle_ccb_timer, ret_ccb_timer, rsp_ccb_timer The reason we are using three timers, is because in the original code function avdt_ccb_chk_timer() used the timer type in its logic: it would stop the timer only if the type is "idle". * Removed btm_ble_timeout() and replaced it with multiple timeout callback functions (per timer) * Fix the actual value of the global constant BT_1SEC_TIMEOUT and rename it to BT_1SEC_TIMEOUT_MS * Removed btu_cb and associated timers and events, because they are never used. * Removed unused timers, functions, struct and declarations that are not used / needed. Bug: 26611369 Bug: 26610829 Change-Id: I812c8c31710a5daefc58b01fcf35c353768f390f
/system/bt/btif/include/btif_hl.h
|
dd339ab075d913334c84fe4c817c8ab09f5eda47 |
|
20-Nov-2015 |
Scott James Remnant <keybuk@google.com> |
Allow Bluetooth to build on systems with no LE support Bug: 25387258 Change-Id: Ie82dae7a1a6807b398c067d4e1984a098793c589
/system/bt/btif/include/btif_hl.h
|
258c2538e3b62a8cdb403f2730c45d721e5292b4 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - moved GKI buffer allocation wrappers to OSI * Moved the following GKI buffer allocation functions to OSI: - GKI_getbuf() -> osi_getbuf() - GKI_freebuf() -> osi_freebuf() - GKI_get_buf_size() -> osi_get_buf_size() For now we need the osi_getbuf() / osi_freebuf() allocation wrapper, because we need to be able to call osi_get_buf_size() on the allocated buffer. In the future those should be replaced with osi_malloc() / osi_free(). Currently, the osi_malloc() buffer size internal allocation tracker does not always track the size, hence we need the osi_getbuf() wrapper. * Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE * Added new file include/bt_common.h that can be usee to include few files that should be included alost everywhere (e.g. bt_target.h" NOTE: This file might be removed in the future and we should include everywhere the right set of header files. * Removed some of the GKI-related references * Removed file include/gki_target.h Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/btif/include/btif_hl.h
|
9f1c9ad85759c7663e3bbc494f8e75b2f107da67 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Moved struct TIMER_LIST_ENT to OSI * Moved struct TIMER_LIST_ENT to file osi/include/non_repeating_timer.h and renamed it to timer_entry_t NOTE: This is a short-term solution. timer_entry_t should be removed, and its usage everywhere should be replaced by struct non_repeating_timer_t . * Renamed TIMER_CBACK to timer_callback_t * Renamed TIMER_PARAM_TYPE to timer_param_t Change-Id: I9ca830718bf900195f9c0a513a97f6995322693b
/system/bt/btif/include/btif_hl.h
|
8f247258317bfd015806badce0cc41df901fa6e7 |
|
07-Aug-2015 |
Marie Janssen <jamuraa@google.com> |
build: fixes for breakages on tilapia Only include advertising when we can actually advertise on LE. Change-Id: I380c67db4391650591b94611c4d522bf49fac750
/system/bt/btif/include/btif_hl.h
|
49a86709488e5cfd5e23759da18bf9613e15b04d |
|
08-Jul-2015 |
Marie Janssen <jamuraa@google.com> |
build: LOG_TAG consistency, include order, build fixes Fix the order of includes across a bunch of files, and declare LOG_TAG at the top of every file in which it is used. Consistently use bt_ as a LOG_TAG prefix. Fix issues with LOG macro usage. Remove unused includes and double-includes (when in related .h) Add includes as necessary to compile cleanly (problems surfaced by reordering includes) Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6
/system/bt/btif/include/btif_hl.h
|
c8a9f438cd994a7e69aa7fa957e0b9139bfdb912 |
|
22-May-2013 |
Priti Aghera <paghera@broadcom.com> |
Incremented buffer size to accomodate default MTU L2CAP Config request was not sent from Bluedroid as the MTU size was higher than the max buffer size for default apdu tx/rx sizes. Incremented the buffer size to accomodate this default MTU size. Also included new datatypes and corresponding tx/rx apdus. This will set the MTU size to that defined in datatype config rather than selecting default value. b/10565872 Change-Id: Id469c836581fb3d020bcb88c381421e0ef965073
/system/bt/btif/include/btif_hl.h
|
f8f30c2cecf221b2c3983b72d5a849d799c39dd7 |
|
03-Apr-2013 |
Priti Aghera <paghera@broadcom.com> |
HDP fix for Single SDP record Modified stack code to support single SDP record for each register app call. bug 8656462 Change-Id: I92570243306d5c1ca8339042eba5733e43fdb72c
/system/bt/btif/include/btif_hl.h
|
5738f83aeb59361a0a2eda2460113f6dc9194271 |
|
13-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/btif/include/btif_hl.h
|