History log of /system/bt/stack/l2cap/l2c_utils.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ba64c39c8caa2f04f3d78765b48d661b7e9d19ee 17-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Add missing NULL pointers assignments

Each pointer that was freed by one of the following functions should
be reset to NULL:
- config_free()
- data_dispatcher_free()
- fixed_queue_free()
- list_free()

Bug: 29421693
Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85
(cherry picked from commit 8cbc291080730cd7d04990a8fc0e11249b06aa08)
/system/bt/stack/l2cap/l2c_utils.c
be3f7f9d244ca39a9a5a27afd3b117f83b69e0e4 17-Mar-2016 Navin Kochar <navin.kochar@intel.com> Fix for issue introduced due to rebase of LE L2CAP COC

During 6721232 patch, some code got missed while doing manual rebase.
This patch is adding that missing code.

Bug: 27852645
Change-Id: I2525908c29e3288e0ace1ee26c5f2aa6cfd59d68
Signed-off-by: Navin Kochar <navin.kochar@intel.com>
/system/bt/stack/l2cap/l2c_utils.c
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_utils.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_utils.c
94145fae3cebe35a4b48a519e0ddee82d0bbc3c7 26-Nov-2015 venkata Jagadeesh <vjagad@codeaurora.org> GATT: Initiate L2CAP disconnect only when the channel is open

Use case:
Crash found during L2CAP disconnect from faulty BLE APP.

Steps:
Run SNS testing.

Failure:
Crash during L2CAP disc.

Root cause:
Faulty BLE application triggering GATT disconnection
which internally triggering L2CAP disconnection without checking
proper state of channel.

Fix:
- Initiate L2CAP disconnect only when the channel is open
- Validate LCB during disconnection from upper layers

Bug: 27852645
Change-Id: Ic9d065f095feba659c861828732647e968c20db8
/system/bt/stack/l2cap/l2c_utils.c
c83ad356a65f7d639d628e2feec927619b07683e 04-Mar-2016 Jakub Pawlowski <jpawlowski@google.com> Remove btla-specific comments

Change-Id: I91a19b2cfbc96d7567e0e0914058619ea364c1d4
/system/bt/stack/l2cap/l2c_utils.c
9ccca2b5937ec42409d8b6354884f1f4b6d524f7 18-Mar-2016 Andre Eisenbach <eisenbach@google.com> Do not leak eventfd's for RFCOMM/AVDT/L2CAP

Various users of fixed_queue's do not free the lists properly after
using them. As a result two event fd's leak for each fixed_queue that
is not free'd, as fixed_queue contains two semaphores.

This can lead to run-away file descriptor allocation and an eventual
hard limit leading to various undefined behaviours.

Bug: 27731859
Change-Id: If9ce64b711083bf474d217aa537220065722ad3a
/system/bt/stack/l2cap/l2c_utils.c
62778f6eb0f75cd4a31ab7d5b9fdf553ceed561b 01-Mar-2016 Pavlin Radoslavov <pavlin@google.com> Fix l2cu_initialize_fixed_ccb() to return only initialized entries

Update the l2cu_initialize_fixed_ccb() implementation so
it returns only entries that are properly initialized.
In some complex scenarios, the p_lcb->p_fixed_ccbs[] array
might contain an entry that has been released by l2cu_release_ccb(),
and such entry cannot be reused as-is.

Bug: 26927945
Change-Id: I42d42926cc6da6b8be662781545753c36b75968e
/system/bt/stack/l2cap/l2c_utils.c
01658a74147f64f85a38f75a8f7b557996571636 23-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Get rid of counter

This patch removes counter. We were never using those values,
except for increasing them.

Bug: 27324326
Change-Id: I3122a36fa0435a36a8401792267cb5ebff5ab269
/system/bt/stack/l2cap/l2c_utils.c
e6afe84e742b92fde05bd6f53824e3ca15122b58 19-Feb-2016 Andre Eisenbach <eisenbach@google.com> Revert "Pick proper addres type for unknown devices"

This reverts commit 0ec558b58d55eb05f2b42bc29a6c1c93786ac090.
/system/bt/stack/l2cap/l2c_utils.c
302bae5e924ec33768a21bc92dcb6930df50659b 16-Feb-2016 Andre Eisenbach <eisenbach@google.com> Remove the need for -Wno-constant-logical-operand

Change-Id: Iea44eeed487df3236d9b482b7e5bbc92f7f46797
/system/bt/stack/l2cap/l2c_utils.c
0ec558b58d55eb05f2b42bc29a6c1c93786ac090 13-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Pick proper addres type for unknown devices

Change-Id: I46641d0fe065b5e5a6620dc34c770429ac8dbe11
/system/bt/stack/l2cap/l2c_utils.c
5fe6f0cf6b223e3ed6be4912d55b3ed5b41ce0cd 06-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Removed checks for NULL returns after osi_calloc() / osi_malloc()

Removed explicit checks for NULL pointer returns after calls
to osi_calloc() and osi_malloc(), because those are not needed.
If the memory allocation fails, osi_calloc() and osi_malloc()
will trigger an assert.

Bug: 27048759
Change-Id: I2791eb2f69c08f991f8fcdef10e101a41568cd95
/system/bt/stack/l2cap/l2c_utils.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_utils.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_utils.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_utils.c
693eee7bffb843ed8b0b0fa6cca4dfc9848f28bd 11-Nov-2015 yanlaijun <yan.laijun@gmail.com> Set bits 4-6 to 0 in L2CAP fixed channel supported bit mask.

The L2CAP fixed channels supported bit mask is defined by BT
core spec v4.2 Vol 3, Part A, section 4.13. As this section
describes, bits 4-6 shall be set to 0.

Change-Id: I5fa626b45e3876f8128aae8946fbce3df77532bf
Signed-off-by: yanlaijun <yan.laijun@gmail.com>
/system/bt/stack/l2cap/l2c_utils.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_utils.c
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/stack/l2cap/l2c_utils.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_utils.c
1d5b85924df3a114efe6588e857d0de3eb47b1d2 23-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Eliminate function GKI_get_pool_bufsize()

Change-Id: I87168157b9bb3e9d315c03b98a10d18b38cce3e1
/system/bt/stack/l2cap/l2c_utils.c
2e3d006b96eafb0651fe7f78d28250faf89405de 18-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Eliminate usage of pool buffers

* Replace usage of function GKI_getpoolbuf() with GKI_getbuf()
* Remove usage of function GKI_poolutilization()
* Remove usage of function GKI_poolfreecount()

Change-Id: Ide938192b878bbfb4912642c903fce548f2b5368
/system/bt/stack/l2cap/l2c_utils.c
636d6714a4c08dd99d2147dcce05dc3892e804b4 18-Dec-2014 Priti Aghera <paghera@broadcom.com> LE Data Packet Extension support

Included support for LE data packet extension feature according
to BT 4.2 spec. This patch checks if the controller supports LE
packet extension and provides functions to set the PDU length.

Bug: 20013956
Change-Id: I6a92970fede2f793ad48c9fa2e0247ad00297533
/system/bt/stack/l2cap/l2c_utils.c
444a8da807abaf5f9e813ce70c56a79160495fb3 06-Mar-2015 Satya Calloji <satyac@broadcom.com> LE Privacy 1.2 and LE secure connections

Bug: 19816438
Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: I5951f4d4e038f8348a62aa6d19b2111bae0b3ecc
/system/bt/stack/l2cap/l2c_utils.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_utils.c
0b47e0a35c16f5b7d77c30ec1c095ed92ff4fd74 17-Mar-2015 Satya Calloji <satyac@broadcom.com> Avoid duplicate disconnection callbacks for fixed channel connections

Fixed channel connections are getting a disconnect callback when the
HCI command is issued and when the HCI disconnect completes. This
causes problems if the upper layer trying to reconnect at link
disconnecting state.
Triggering the disconnect callback only once solves this problem.

Original author: Chaojing Sun <cjsun@broadcom.com>

Bug: 19816438
Change-Id: Ib661c968e586975a7fc7244e2d0745f71d52e3e9
/system/bt/stack/l2cap/l2c_utils.c
ef92b534112a5df57de11ef45f5174f75d44b355 08-Apr-2015 Andre Eisenbach <eisenbach@google.com> Avoid null-pointer dereference in l2c_release_lcb()

Change-Id: Id46d678e45797c4d3d3c8e024f42cfd06b1d2da2
/system/bt/stack/l2cap/l2c_utils.c
b2386cb6e196487f2cc703d84bb1815eb1c5fc62 07-Jun-2014 Nitin Arora <niarora@codeaurora.org> Reset LE connecting flag on disconnect only if BDA matches

This change will make sure that the flag representing that BLE device
is connecting is made false only if a disconnection of the same
LE device is received, whose connection is in progress. This is ensured
by matching the bda of the disconnecting device and the LE device which
is in connecting state. This is to prevent a BR/EDR disconnection from
cancelling the connection timeout of an LE device

Change-Id: Ia5b47681479dc0be217cdfc3e15af9ca5323575c
/system/bt/stack/l2cap/l2c_utils.c
95b74f252f534ec757aab1fc08e086e02b2cfe8d 12-Mar-2015 Sharvil Nanavati <sharvil@google.com> Use fully qualified path for btcore includes.
/system/bt/stack/l2cap/l2c_utils.c
a3dd6f9607654a50195215deeb388919581752c7 18-Jan-2015 Sharvil Nanavati <sharvil@google.com> Add connection-specific function L2CA_SetConnectionCallbacks.

This function allows a client to specify callback routines per-
connection instead of per-PSM.
/system/bt/stack/l2cap/l2c_utils.c
79ecab5d0418fde77e9afcdd451bd713af73e180 31-Oct-2014 Chris Manton <cmanton@google.com> Move controller module to device directory
/system/bt/stack/l2cap/l2c_utils.c
cccf02fadb2dd4dceb22f2d58ed5840b0ef1860e 21-Oct-2014 Chris Manton <cmanton@google.com> Instrument data flow a bit

Use counters to grab some select data metrics.
/system/bt/stack/l2cap/l2c_utils.c
584846a2109f8b34b3794683b61c8322ad6eb11a 15-Oct-2014 Chris Manton <cmanton@google.com> Remove always true BTM_BUSY_LEVEL_CHANGE_INCLUDED
/system/bt/stack/l2cap/l2c_utils.c
794f3b5f126fffc3dd1129a710187591348bbf23 01-Oct-2014 Chris Manton <cmanton@google.com> Removal of bd.[c|h]

Consolidate legacy types into bt_types.h
/system/bt/stack/l2cap/l2c_utils.c
86a56d303fdbed734549b181622ed74140113d2d 20-Oct-2014 Zach Johnson <zachoverflow@google.com> Remove always false TCS_INCLUDED macro & friends

Referenced non existent headers, so would not compile if set to true.
/system/bt/stack/l2cap/l2c_utils.c
30e58068c1adaac7c5ccb3aa9cfb045d41d2a10e 27-Sep-2014 Zach Johnson <zachoverflow@google.com> Refactor btm_devctl reset sequence

* Controller bring up on blockable thread now
* Removed some duplicate and commands during controller bring up
* The code to make commands for controller bring up is smaller and better
/system/bt/stack/l2cap/l2c_utils.c
dab50595561abc42078a31bcee113097707cff82 03-Sep-2014 Sharvil Nanavati <sharvil@google.com> Fix memory leak in L2CAP utils

A list was not freed (just its contents was).
/system/bt/stack/l2cap/l2c_utils.c
6c303aeca25783453333172d0b29e5472f1b1c93 05-Aug-2014 Chris Manton <cmanton@google.com> Replace BUFFER_Q with list_t
/system/bt/stack/l2cap/l2c_utils.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_utils.c
97e75b73a57602b7d9771f28216630ba32fd702a 08-Oct-2014 Chaojing Sun <cjsun@broadcom.com> LE: Serialize multiple connection parameter update requests

Bluetooth controllers do not allow multiple connection parameter
updates where there is one outstanding. This requires serializing
all connection parameter update requests and send the latest
request when the pending one is finished.

Bug: 17979666
Change-Id: Ic49bd89a4ded28014d74b40e67f2a3ea490b9ef7
/system/bt/stack/l2cap/l2c_utils.c
1fbddc8faacde61190df31a8e6ea9142feb4bc88 10-Oct-2014 Andre Eisenbach <eisenbach@google.com> Revert "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on"

This reverts commit a934f018b6c6a7eda4662a60f2f04828afc3ab77.

This patch caused various headset audio break issues and slow
reconnections on headsets like the Bose AE2W.

Based on the original bug under which this patch was merged
(b/10648781) it is unlikely that this bug even fixed the
issue it was meant to address.

Bug: 17520043
Change-Id: I39bb9abbf5735abff25b5257425c34972287dc27
/system/bt/stack/l2cap/l2c_utils.c
7ae25156f4250af9d0e8cd8d559d916cfb847feb 11-Sep-2014 Prerepa Viswanadham <dham@google.com> Avoid premature LE connection notifaction to app

To avoid premature connection notification to app, always wait for
LE read remote feature complete with success before the connection
event is sent to application.

This patch also deprecates the BTA_SKIP_BLE_READ_REMOTE_FEAT flag.
Since the remote feature request is now serialized and start encryption
won't be called until the connection is up, this flag is no longer
necessary and interferes with the new behaviour.

This is an extension of previous CL

Bug: 17326529
Change-Id: Icfd4c5dfdd9f89d1318ef429e132eb005abb1f64
/system/bt/stack/l2cap/l2c_utils.c
92ac2d8919f8e38a091903270eb5500073d67d4b 11-Jul-2014 Mudumba Ananth <ananthm@broadcom.com> LE link_xmit_quota is not correctly allocated

LE link transmit quota should be calculated based on the total LE
buffer available and number of LE link that shares the buffer. Currently
it's been calculated based on the ACL buffer number and total physical
links(BR and LE), that cause the LE link transmit quota not being
done right.
Modify the link transmit quota allocation, and keep track of LE link
seperately, also keep track of round robin scheme for LE links
solving the problem.

Bug: 16560957
Change-Id: I70f91827b96f2c10421e91311ea34cc81a5ef4b8
/system/bt/stack/l2cap/l2c_utils.c
eb29aed689d70decec163e41c68200bf8fb3d9af 26-Jun-2014 Richie Hsieh <richie.hsieh@mediatek.com> LE: Fix HOGP connection issues caused by incorrect HCI packet flags

Do not set the automatically-flushable packet flag for LE bound HCI
packets (Packet_Boundary_Flag 0b10).

Reported-by: Richie Hsieh <richie.hsieh@mediatek.com>
Change-Id: Id71a096acee70582923e652cfef1f4141b721fed
/system/bt/stack/l2cap/l2c_utils.c
79f454dc544280cc1a3ca3acc643f7dddfe91cd9 30-Jul-2013 Hemant Gupta <hemantg@codeaurora.org> L2CAP: Send HCI connect with all packet types supported

HCI create connect function is now supporting only single slot packet
during HCI connection initiation. Added support for all basic rate
packet types.

Change-Id: Ieeb892ea43dc9bb801a8f97a644a0f8c06b8184a
/system/bt/stack/l2cap/l2c_utils.c
493a98a8de29a35808db28470736819af5fd22d2 28-Mar-2014 Andre Eisenbach <eisenbach@google.com> LE: Add notification sent and congestion callbacks (2/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Also fixes a memory leak issue that can trigger GKI exception for
certain GATT operations.

Change-Id: I7112bdfc1fedec2e390bd0ea52655d238683917f
/system/bt/stack/l2cap/l2c_utils.c
e8c3d75b75493911ebf0f99c83676359657178f7 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: BTIF and APPL.

Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286
/system/bt/stack/l2cap/l2c_utils.c
a51c9d9d225e41fe36a0133f1c17fd981ea59c1d 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: L2CAP and SDP.

Change-Id: I62b5d4f330312dc466a758cb554952017f899696
/system/bt/stack/l2cap/l2c_utils.c
8fe58875ce67c6e1099e7ba2339dcd2b979491b0 17-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Merge BT 4.1 features

The features include:
- LE Peripheral Mode
- Link Layer topology (LE Central & Peripheral Concurrency)
- Dual Mode Topology (Ability to choose LE transport when connecting with
other Dual Mode devices)
- Fast advertising Interval
- Limited Discovery Time Changes
- GAP Authentication and Lost Bond
- Dual Mode Addressing
- Common Profile and Service Error Code
- 32 bit UUIDs

Change-Id: Ic6701da4cf6aaa390ff2c8816b43157f36b7fb42
/system/bt/stack/l2cap/l2c_utils.c
63471e74f8e56d7daa8a5b2fda8ddbe95df33696 01-Feb-2014 Mike J. Chen <mjchen@google.com> Fix warning "implicit declaration of function 'bdcmp'"

Change-Id: Ifc13cfa4b88d8483c58dd955ea69f482b06ec79a
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/stack/l2cap/l2c_utils.c
a934f018b6c6a7eda4662a60f2f04828afc3ab77 08-Oct-2013 Zhihai Xu <zhihaixu@google.com> Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on

we should use the same role as the previous connection, if phone walk out of range,
and reconnect back from remote device.
bug:10648781

Change-Id: I6abd77067d26769067ba2fbd45d9e8f75cf7c764
/system/bt/stack/l2cap/l2c_utils.c
98657a365c7230b84a005c63ce5bcf036d69f6eb 26-Jun-2013 Andre Eisenbach <andre@broadcom.com> LE: Release transmit buffer credits

When an ACL link goes down, some controllers do not send a "number of
completed packets" update for the last ACL packets sent from the host to
the controller. This could result in incorrect L2CAP transmit window
calculations and no transmit credit to be available to send data to the
controller.
This patch restores transmit buffer creedits regardless of the
controller behaviour.
bug 9474159

Change-Id: I2540131034271a0269fa50698f370bceb7747e2d
/system/bt/stack/l2cap/l2c_utils.c
c9053e64bd3383ea971582b4395fab9d5d614503 16-Apr-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Proper management of controller ACL buffers.

Reclaim all the unacknowledged controller ACL buffers associated
with a L2CAP link when L2CAP control block is released.
Bug:8589069

Change-Id: Icef1646041e73280a13dedc7a45564d032c59712
/system/bt/stack/l2cap/l2c_utils.c
3aa60544585b5fb0f35c1165539a4a859fc0f25c 23-Mar-2013 Andre Eisenbach <andre@broadcom.com> Parse LMP features to enable LE support

Only send LE commands if the local Bluetooth radio supports LE.
Improved remote feature parsing by reading extended features. Before
this change, only the first page of the features was parsed.
bug 8332905

Change-Id: I0b90771dcfc453efea157f463b9df006e0178609
/system/bt/stack/l2cap/l2c_utils.c
ead3cde4bac0c3e32cd31f149093f004eef8ceeb 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
/system/bt/stack/l2cap/l2c_utils.c
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/stack/l2cap/l2c_utils.c