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_gatt_multi_adv_util.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_gatt_multi_adv_util.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_gatt_multi_adv_util.h
|
d4c103624b3d7672110abeb753ed79113ee48989 |
|
08-Aug-2015 |
Ian Coolidge <icoolidge@google.com> |
Improve adv_data transfer between contexts. - Drops some unused members from btgatt_multi_adv_inst_cb. - Flatten tBTA_BLE_ADV_DATA to only require one allocation. - Copy all of tBTA_BLE_ADV_DATA contents to bt_workqueue_thread. Bug: 23042223 Change-Id: I5f4d25d5cdd39731a2dfe64394928b7fb77c7c7c
/system/bt/btif/include/btif_gatt_multi_adv_util.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_gatt_multi_adv_util.h
|
cf8fb474b12660ee799ded5b60e4654c8f3ffe13 |
|
02-Jun-2015 |
Sunny Kapdi <sunnyk@codeaurora.org> |
Fix memory corruption due to BLE multi-adv macro INST_ID_IDX_MAX macro was not protected with parenthesis, resulting in incorrect calculation of the size needed to allocate memory for the client_if map. Change-Id: Ib3591f4f9ac7288f2191e9078a71aab431ca7130
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
484dc303627eb82e7c5edf4f03e542fec2d3f4ea |
|
21-May-2015 |
Ian Coolidge <icoolidge@google.com> |
Fix use-after-free while setting advertisement data. Producer context was freeing data buffers without performing a deep copy on the passed structure. Also added some const correctness so we can reason about the state of btif_adv_data_t as its data gets associated with the advertising instance. Bug: 21343750 Change-Id: Ifea0209e8426b61d8456c299c836ba640bd30f31
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
3770c47387d3dfc6d2e2d32f4409a82119e726e3 |
|
20-Oct-2014 |
Satya Calloji <satyac@broadcom.com> |
Clean up SetADV and ScanResp data memory leak. Bug:18045480 Change-Id: Ic433f4aa26bd08e84c53c447be9d5278e16ebd55
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
b407515ffa145b1a2cab01467da03c92aeb0e8eb |
|
10-Oct-2014 |
Satya Calloji <satyac@broadcom.com> |
Fix "no instances found for adv" when stop BLE scanning. Bug:17703806 Change-Id: I103d3637ad38d33b4370850a300b0d72bdaeb562
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
962f1d1f9dc22d939bea4e9fb34a67028ff185fd |
|
17-Aug-2014 |
Andre Eisenbach <eisenbach@google.com> |
LE: Remove general/limited discoverability bits for non-connectable adv According to the Bluetooth spec, section 9.1.1.2, "A device in the broadcast mode shall not set the ‘LE General Discoverable Mode’ flag or the ‘LE Limited Discoverable Mode’ flag in the Flags AD Type. This patch masks out the specific bits for non-connectable advertisements. Bug: 16924631 Change-Id: Ia2c0011fb31de3e4166a8bd2c2732e50aad3a610
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
cf32e8d4e0cabac8432a3c6c6d8ece27d6067770 |
|
13-Aug-2014 |
Andre Eisenbach <eisenbach@google.com> |
LE: Fix limited advertising not stopping after timeout When starting to advertise with a given timeout, the alarm did not fire and thus not stop the advertising. This patch switchs from the new alarm system to use BTU timers. Also fixes a bug in the oneshot timer handling where adding a new timer with a short timeout value would not actually restart the timer to pull in the deadline. Bug: 16988160 Change-Id: Ia556562675636be440ddca7682ac7d092bc0b48b
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
9dd5a9c11f2022fa9709f0c34f04560c21105152 |
|
08-Aug-2014 |
Andre Eisenbach <eisenbach@google.com> |
LE: Add limited advertising duration capability (2/3) Change-Id: Id2ebc353f1bcd94978c5c8dc55a235c92ebc7658
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30 |
|
07-Aug-2014 |
Prerepa Viswanadham <dham@google.com> |
Use run time parameters to control LE features Use values read from controller to enable and control LE features such as multi advertising, RPA offload, maximum irk size etc bug 15393216 Change-Id: I193e2b9a0dc61b86f667e986803571440e390160
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
a6ce7751d84218c193eb90d390aef23217b1737e |
|
20-May-2014 |
Wei Wang <weiwa@google.com> |
Revert "Revert "LE Multi ADV feature"" This reverts commit ea85048a8e86b1e1b6b725649f6bb0834ba17301. Change-Id: I9a9305db4fabff07b4309a38f65361dca3f5f37c
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
ea85048a8e86b1e1b6b725649f6bb0834ba17301 |
|
20-May-2014 |
Wei Wang <weiwa@google.com> |
Revert "LE Multi ADV feature" This reverts commit 87776cf5e201b18646cbc16f11a7110d5ffe510c. Change-Id: I5b544a5c965999096b665b1bd2edb021e3054be8
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|
87776cf5e201b18646cbc16f11a7110d5ffe510c |
|
01-May-2014 |
Satya Calloji <satyac@broadcom.com> |
LE Multi ADV feature BTIF and stack changes for LE multi ADV feature Change-Id: I5e009ff8cbac5fc6f92ca943c61c4faf98e4e2ce
/system/bt/btif/include/btif_gatt_multi_adv_util.h
|