summaryrefslogtreecommitdiffstats
path: root/stack/l2cap/l2c_link.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'LA.BF.1.1.3_rb1.12' of git://codeaurora.org/platform/system/bt ↵Steve Kondik2016-04-071-0/+7
|\ | | | | | | into cm-13.0
| * BT: ACL and l2c out if sync after connection collisionGurpreet Ghai2016-03-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Remote device can't be removed from paired list. Cause: After connection collision, lcb is removed after connection request is rejected by soc but acl entry is not removed. So, for upper layer, acl connection always remains up. Fix: Removed acl connection and acl entry when connection complete is received and lcb is not present. CRs-Fixed: 987968 Change-Id: Ie2049217e436704262f06d0c0dc51611697cc29a
| * Bluetooth: Dynamic ACL buffer allocation based on ACL Prioritypramod kotreshappa2015-10-271-0/+9
| | | | | | | | | | | | | | | | 1. A2dp acl link priority is set to high once streaming starts 2. Allocation min 2 ACL bufferswq to high priority link CRs-fixed: 647447 Change-Id: I8f7742ae193998643ff2a12bf87f9874844ee0f7
* | l2cap: ifdef checks for BLE_INCLUDEDShantur Rathore2016-02-221-1/+5
| | | | | | | | | | | | Transport is checked in code even when BLE_INCLUDED = FALSE. Change-Id: I6eaaad1242e943835b6e040687562801451cfc2a
* | Prevent BR/EDR conn/disconnection from changing LE link's Xmit quotaSubramanian Srinivasan2015-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | BR/EDR connection and disconnection is currently adjusting the amount of packets each link(including LE) may send to the HCI without an ack coming back usign the function l2c_link_adjust_allocation. This change prevents the adjustment of LE link's link transmit quota when a BR/EDR connection or disconnection is done. Change-Id: I8ac78603de61c423447cd200e31ffc339bffe132
* | Bluetooth: Dynamic ACL buffer allocation based on ACL Prioritypramod kotreshappa2015-10-261-0/+9
|/ | | | | | | | 1. A2dp acl link priority is set to high once streaming starts 2. Allocation min 2 ACL bufferswq to high priority link CRs-fixed: 647447 Change-Id: I8f7742ae193998643ff2a12bf87f9874844ee0f7
* GAP: Accept incoming connection with slave rolevenkata Jagadeesh2015-10-061-0/+42
| | | | | | | | | | -Define DUT Default desired role as master -Accept incoming connection with DUT role as slave for list of carkits and headsets which are blacklisted. Change-Id: Ie6af63b50debd417ce2d54b28b83d95ef4f695a6 CRs-Fixed: 892194
* SDP: Restricted invalid attr len in sdp deletevenkata Jagadeesh2015-10-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restricted invalid attr len in SDP_DeleteAttribute as pointer is trying to access invalid memory when attr_len is invalid Registering PNP record before PAN profile as PNP record should be registered before profiles.In some cases PAN and PNP SDP registration colliding and leading to memory corruption in SDP DB. Change-Id: Ib6d2120c7ef1d10633fa905d6b853281efaf0ecd Bluetooth: Cleanup ACL link during restarting pending ACL connection This fix removes the previously held ACL link with the BR_EDR device before trying to create a new pending connection with the same device. Change-Id: Iac941794e2fc86c48781edc86492146ab5c21eae Bluetooth: Cleanup the lcb variables properly on reuse - Cleanup all relevant link control block variables like send_not_acked, partial_segment_being_sent and stop the info response timer to reuse the same LCB. - L2cap layer will reuse the same lcb if the link is disconnected and wants to re-establish the link. Change-Id: I822b0ee350574bbeb5b3c86a349d1471fa45761a CRs-Fixed: 885782 Change-Id: I15f83b5c1a88d248d29080123ebbf4652f2cb340
* Bluetooth: LE-L2CAP-COC on M.Balraj Selvaraj2015-10-061-2/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LE L2CAP Connection Oriented Channel implementation for credit based flow control on LE L2CAP. - This feature is enabled only when BLE feature is enabled. - Handled signalling commands on channel id 5 to establish the connection of LE COC. - Implemented the SM for LE L2CAP channel to handle events from App layer and hci layer. - Introduced security levels for LE L2CAP channels. - Introduced tranport variable for major functions where BREDR and LE shares common data structures. - Implemented segmentation and reassembly of LE L2CAP SDU. - Introduced congestion mechanism for LE L2CAP channel - As the new LE L2CAP callbacks not required for existing BREDR services, made it as null for newly introduced LE L2CAP callbacks. - New APIs introduced for LE L2CAP connection establishment. - New APIs provided for LE L2CAP security procedure. - Relevent L2cap APIs from Test app interface exposed to the test tool. - New macros, definitions, structures introduced for LE L2CAP channel establishment/data tranfer. CRs-Fixed: 776657 Change-Id: I50a24374659f9802cbc92421db139f75f2790f2e
* DO NOT MERGE Fix compilation on platforms with BLE_INCLUDED == FALSEAndre Eisenbach2015-05-141-1/+3
| | | | | | | | This is not a comprehensive fix. More work is necessary to ensure the correct separation of BLE_INCLUDED TRUE/FALSE as well as removing many of the hacked-up if() statements resulting from this patch. Change-Id: I1812594feba0bf43369096e472a8b18cde305255
* Cross transport key mapping fixesChaojing Sun2015-04-271-6/+11
| | | | Change-Id: I22d97303054eccc876c4a9c7c0a50e369ff4fa62
* LE Privacy 1.2 and LE secure connectionsSatya Calloji2015-04-131-12/+14
| | | | | | Bug: 19816438 Original author: Chaojing Sun <cjsun@broadcom.com> Change-Id: I5951f4d4e038f8348a62aa6d19b2111bae0b3ecc
* L2CAP and SDP Search API for BT profiles (2/2)Kim Schulz2015-04-101-4/+4
| | | | | | | | | | | | | | 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
* Avoid duplicate disconnection callbacks for fixed channel connectionsSatya Calloji2015-04-081-1/+4
| | | | | | | | | | | | | 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
* Simultanious LE Central/Peripheral operation not possibleKim Schulz2015-03-251-7/+11
| | | | | Bug: 18925497 Change-Id: I5a20e38ffebce4b251e4728944fce73db50e18f8
* Use fully qualified path for btcore includes.Sharvil Nanavati2015-03-161-1/+1
|
* Move controller module to device directoryChris Manton2015-03-161-1/+1
|
* Instrument data flow a bitChris Manton2015-03-161-0/+7
| | | | Use counters to grab some select data metrics.
* Remove always true BTM_PWR_MGR_INCLUDEDChris Manton2015-03-161-2/+2
| | | | | | 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.
* Remove always true BTM_BUSY_LEVEL_CHANGE_INCLUDEDChris Manton2015-03-161-2/+0
|
* Refactor btm_devctl reset sequenceZach Johnson2015-03-161-4/+6
| | | | | | * 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
* Remove HCI access macrosChris Manton2015-03-161-10/+4
| | | | And some other minor bt_target cleanup.
* Replace BUFFER_Q with list_tChris Manton2015-03-161-8/+11
|
* Remove always false macro L2CAP_HOST_FLOW_CTRLZach Johnson2015-03-161-20/+0
|
* Enforce GKI API buffer usageChris Manton2015-03-161-4/+4
| | | | Also add another API GKI_queue_length(BUFFER_Q *)
* Remove some unused code in L2CAPZach Johnson2015-03-161-182/+0
|
* Don't starve a BT ACL link with 0 xmit quotaPrerepa Viswanadham2014-10-231-2/+2
| | | | | | | | | | | | | | With new link management of controller buffers between different ACL connections, it is possible that a ACL conn would get 0 buffers - thus no profile can run. This affects classic and LE ACL connections. This work around allows a floor of 1 buffer as the floor for all connection, irrespective of controller capability. Bug: 17976311 Change-Id: I7cd0d34af47c441c5ea7f2b836b591a4fec62ad1
* Avoid premature LE connection notifaction to appPrerepa Viswanadham2014-09-121-24/+26
| | | | | | | | | | | | | | | | 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
* LE link_xmit_quota is not correctly allocatedMudumba Ananth2014-09-091-21/+63
| | | | | | | | | | | | | | 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
* Logging cleanup: L2CAP and SDP.Sharvil Nanavati2014-06-191-28/+28
| | | | Change-Id: I62b5d4f330312dc466a758cb554952017f899696
* Merge BT 4.1 featuresGanesh Ganapathi Batta2014-04-301-43/+66
| | | | | | | | | | | | | | | | 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
* Major warnings cleanupMike J. Chen2014-02-111-1/+4
| | | | | | | | | | | | Mostly fixing unused parameter warnings. A few other warnings also fixed like possible use of unitialized variables (no real issue found, just compiler couldn't follow the path), signed vs unsigned warning. Also fixed some typos, indent issues, removal of dead code, etc. Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01 Signed-off-by: Mike J. Chen <mjchen@google.com>
* Unable to connect to a Motorola s705 until Bluetooth was toggled of and back onZhihai Xu2013-10-101-2/+2
| | | | | | | | 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
* Proper management of controller ACL buffers.Ganesh Ganapathi Batta2013-04-171-11/+11
| | | | | | | | Reclaim all the unacknowledged controller ACL buffers associated with a L2CAP link when L2CAP control block is released. Bug:8589069 Change-Id: Icef1646041e73280a13dedc7a45564d032c59712
* Initial version of BLE support for BluedroidGanesh Ganapathi Batta2013-02-271-22/+7
| | | | Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
* Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879bafThe Android Open Source Project2012-12-121-0/+1719
Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d