cd7d542a562381d95907104cd5232672e7135658 |
|
01-Apr-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Add a log message to capture empty queue in l2c_enqueue_peer_data() Add a log message in l2c_enqueue_peer_data() to help capture an empty queue p_ccb->xmit_hold_q that is triggering an assert. Also: * Fix a memory leak inside l2cu_initialize_fixed_ccb() p_ccb queues have been allocated again even though they have been allocated previously within l2cu_allocate_ccb() * Fix a typo in a comment: clodes -> closed * Removed repeated function declarations in file l2c_int.h Bug: 27821847 Change-Id: I2df2843710310acf5a46c6fa5b302cf7390bc1b4
/system/bt/stack/l2cap/l2c_csm.c
|
ab99638f9a05ae7ed04ab0a75d48cbd1d78b36e8 |
|
09-Mar-2016 |
Navin Kochar <navin.kochar@intel.com> |
Add LE L2CAP Connection Oriented Channel This implementation for LE L2CAP Connection Oriented Channel (a Bluetooth Core Spec 4.1 feature) has been tested on the following formal and informal IOP events conducted by BT SIG Sport and Fitness Working Group. * Informal IOP – Tokyo 2014 * UPF 49 – Berlin 2014 * Formal IOP – Tokyo 2014 * Formal IOP – Santa Clara 2015 Bug: 27852645 Change-Id: Ia6de62f9321a78b98930629f65078884157a9c0d Signed-off-by: Navin Kochar <navin.kochar@intel.com>
/system/bt/stack/l2cap/l2c_csm.c
|
c83ad356a65f7d639d628e2feec927619b07683e |
|
04-Mar-2016 |
Jakub Pawlowski <jpawlowski@google.com> |
Remove btla-specific comments Change-Id: I91a19b2cfbc96d7567e0e0914058619ea364c1d4
/system/bt/stack/l2cap/l2c_csm.c
|
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 |
|
05-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free() Removed the alternative buffer allocation osi_getbuf() / osi_freebuf() and use instead osi_malloc() / osi_free(). Correspondingly, replaced usage of osi_freebuf_and_reset() with osi_free_and_reset(). Bug: 24914560 Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/stack/l2cap/l2c_csm.c
|
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/stack/l2cap/l2c_csm.c
|
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/stack/l2cap/l2c_csm.c
|
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/stack/l2cap/l2c_csm.c
|
1a3844f933bd63c8a381371dabfb35c6a0249e3e |
|
25-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue * Added new functions to OSI: - fixed_queue_init() - fixed_queue_length() - fixed_queue_try_remove_from_queue() - fixed_queue_try_peek_last() * Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first() * Replaced usage of GKI queue functions with OSI fixed_queue functions: - GKI_init_q() -> fixed_queue_new(SIZE_MAX) NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory / state that needs to be released by calling fixed_queue_free() - GKI_enqueue() -> fixed_queue_enqueue() - GKI_dequeue() -> fixed_queue_try_dequeue() NOTE: fixed_queue_try_dequeue() is non-blocking - GKI_queue_length() -> fixed_queue_length() - GKI_queue_is_empty() -> fixed_queue_is_empty() - GKI_getfirst() -> fixed_queue_try_peek_first() - GKI_getlast() -> fixed_queue_try_peek_last() - GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue() - Queue elements iteration. In the fixed_queue implementation we have to use the underlying list_t mechanism to iterate over the elements. OLD: p = GKI_getfirst(queue); ... while ((p = GKI_getnext(p) != NULL) { ... } NEW: list_t *list = fixed_queue_get_list(queue); for (const list_node_t *node = list_begin(list); node != list_end(list); node = list_next(node)) { p = list_node(node); } * Remove initialization of the GKI module, because it is not needed anymore * Removed unused files in GKI: gki/common/gki_common.h gki/ulinux/gki_int.h gki/ulinux/gki_ulinux.c Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
/system/bt/stack/l2cap/l2c_csm.c
|
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/stack/l2cap/l2c_csm.c
|
780afa366705dfe53b9c69e8deb075e0bcbf31c4 |
|
30-May-2014 |
Srinu Jella <sjella@codeaurora.org> |
Avoid null pointer exception for invalid L2CAP channels Change-Id: I8ac40e9cfe6dd015f40c6f493727e123a0d247e6
/system/bt/stack/l2cap/l2c_csm.c
|
8372aa5fa535ee4f09c09981b6125b54ace31fe2 |
|
25-Mar-2015 |
Kim Schulz <k.schulz@samsung.com> |
L2CAP and SDP Search API for BT profiles (2/2) Added support for exposing L2CAP to Java such that OBEX over L2CAP is made possible. Added support to create SDP records as a seperate step.(as opposed to creating a SDP record when a BluetoothSocket is created). This allows both a RFCOMM channel and a L2CAP PSM to be included in a SDP record. (Additionally the content of the SDP record is set by the profile in Java, in stead of beeing hardcoded in the socket layer.) This completes the L2CAP channel exposure to Java. Change-Id: Iaf68a07d910145cdd33e940d73cd680f79164100
/system/bt/stack/l2cap/l2c_csm.c
|
e7ef465c37298c2b64b7e9794659b1b1b50ab877 |
|
16-Oct-2014 |
Chris Manton <cmanton@google.com> |
Remove always true BTM_PWR_MGR_INCLUDED There are two code paths to set the chip into the power modes. The power manager aggregates access to the power modes. Does not compile when set to false.
/system/bt/stack/l2cap/l2c_csm.c
|
fe7216ca12f91baae733e7c93063db73121af308 |
|
06-May-2014 |
Chris Manton <cmanton@google.com> |
Enforce GKI API buffer usage Also add another API GKI_queue_length(BUFFER_Q *)
/system/bt/stack/l2cap/l2c_csm.c
|
847b706a9cfba9dc749240b33276a7e02df30f29 |
|
28-Jun-2014 |
Matthew Xie <mattx@google.com> |
resolved conflicts for merge of a51c9d9d to master Change-Id: I50eec2efe06017bddac291846fa098c26dc10da1
|
a51c9d9d225e41fe36a0133f1c17fd981ea59c1d |
|
04-May-2014 |
Sharvil Nanavati <sharvil@google.com> |
Logging cleanup: L2CAP and SDP. Change-Id: I62b5d4f330312dc466a758cb554952017f899696
/system/bt/stack/l2cap/l2c_csm.c
|
f6418a11dd4bb80ad871dde90445b878b58e4134 |
|
17-May-2014 |
Adam Hampson <ahampson@google.com> |
fix uninitialized fields in tBTM_PM_PWR_MD structs This could potentially cause BTM_SetPowerMode() to take an incorrect code path. Change-Id: Ibca83129fffb5fbb64372e991cc433de144d333d Signed-off-by: Adam Hampson <ahampson@google.com>
/system/bt/stack/l2cap/l2c_csm.c
|
2a2701cdddac0859a95e58aec542742c450145b9 |
|
16-Sep-2013 |
Kim Schulz <k.schulz@samsung.com> |
Fixes for problems found with coverity analyzer - fixed UNINITIALIZED variable (hdl) in bta_hh_act.c :220 - fixed possible RESOURCE LEAK in btif_config_util.cpp in relation to open_file_map() if file is fd size=0 - fixed possible RESOURCE LEAK in create_socket_server() in uipc:196 (s not closed) - fixed possible OVERRUN in l2c_csm.c, (l2c_csm_config), array "l2cb.fixed_reg" of 4 20-byte elements at element index 60 (byte offset 1200) using index "p_ccb->local_cid - 3" (which evaluates to 60) - fixed possible OVERRUN in btm_pm.c, (btm_pm_reset) array "btm_cb.acl_db" of 7 288-byte elements at element index 7 (byte offset 2016) using index "btm_cb.pm_pend_link" (which evaluates to 7). - fixed possible OVERRUN in btif_storage.c, (btif_storage_add_device_to_autopair_blacklist) array "input_value" of 20 bytes by passing it to a function which accesses it at byte offset 20 using argument "20U". patch set 2: - fixed {} Patch set 3: - fixed review commment in stack/btm/btm_pm.c:379 bug: 10777562 Change-Id: I2a6d57f93acaaf9b25c49a6a29cb60d0e1e3c5d8
/system/bt/stack/l2cap/l2c_csm.c
|
5738f83aeb59361a0a2eda2460113f6dc9194271 |
|
13-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/stack/l2cap/l2c_csm.c
|