summaryrefslogtreecommitdiffstats
path: root/hci
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r61' into HEADreplicant-6.0-0001stable/cm-13.0-ZNH5YJessica Wagantall2016-08-027-22/+23
|\ | | | | | | | | | | Android 6.0.1 Release 61 (MOB30Z) Change-Id: Icda48d6c36e74365e608d80f0054fc58d8febc26
| * DO NOT MERGE Fix potential DoS caused by delivering signal to BT processSharvil Nanavati2016-06-227-21/+22
| | | | | | | | | | | | | | | | | | | | | | Bug: 28885210 Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360 Conflicts: btif/co/bta_hh_co.c btif/src/btif_core.c Merge conflict resolution of ag/1161415 (referencing ag/1164670) - Directly into mnc-mr2-release
* | bt-vendor: Check for vendor SSR function before attempting to call itEthan Chen2016-06-211-2/+3
| | | | | | | | | | | | | | * Non-Qualcomm vendors may not have actually implemented this method, even though they may have allocated the proper structure size. Change-Id: I6094f0307ae2453fa53412a160a0c3e65e2f39cd
* | bt: Unify usage of clock_gettimeChristopher R. Palmer2016-06-111-6/+0
| | | | | | | | | | | | | | This moves all clocks to CLOCK_BOOTTIME and puts this define into a common shared location rather than a smear all over the code. Change-Id: I11dbf557f35f75b3030dc0b6829dbaec70e20a19
* | bt-vendor: Fix sporadic crashes on shutdownRicardo Cerqueira2016-04-151-1/+5
| | | | | | | | | | | | | | The core was unconditionally calling a vendor method that few implementations have. Don't do that, it's evil. Change-Id: I96df83760fd07805de37832f7ee315ee1f721948
* | Bluetooth: Allow REMOVE_EAGER_THREADS to be unsetIvan Grinko2016-04-051-0/+6
| | | | | | | | | | | | | | REMOVE_EAGER_THREADS is set to true by default, so let device maintainers disable it locally in bdroid_buildcfg.h if needed. Change-Id: I199c509de6c2f1506eda9bda732aa2ce4176d186
* | Merge branch 'LA.BF.1.1.3_rb1.11' of git://codeaurora.org/platform/system/bt ↵Steve Kondik2016-03-305-9/+296
|\ \ | | | | | | | | | | | | | | | into cm-13.0 Change-Id: Ib0f8f87bd5655ce85227bfc016044b1daa09ebe7
| * | Bluetooth: Disable eager reader threads in RX pathSrinu Jella2016-02-234-6/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disabled eager reader threads in RX path for both ROME and PRONTO targets. - Exising machamisn is to poll for incoming data (event, ACL data) using dedicated thread called eager reader thread. - Now the responsibility of polling for data moved to existing HCI worker thread. - Enhanced the read mechanism from hci hal interface. CRs-Fixed: 934414 Change-Id: Icfd27b7b93f83033b2230e61a23df69aa3c33bdf
| * | btsnoop: Remove the ext snoop dependency on snoop socketMallikarjuna GB2016-01-181-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snoop socket cannot be enabled by default to be CTS compliant. External snoop dump uses same thread, external dump related functionality is moved out of TCP socket enabling condition check CRs-Fixed: 951828 Change-Id: Icf51b27531a42ce257704d2c00b6e6b394cad3af
* | | Merge branch 'LA.BF.1.1.3_rb1.7' of git://codeaurora.org/platform/system/bt ↵Steve Kondik2016-01-082-19/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | into cm-13.0 Change-Id: Ic7851f38b6ca4b82ab9a0b96e7e494849944e5c6
| * | | btsnoop: Remove the ext snoop dependency on snoop socketMallikarjuna GB2015-12-281-23/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Snoop socket cannot be enabled by default to be CTS compliant. External snoop dump uses same thread, external dump related functionality is moved out of TCP socket enabling condition check. CRs-Fixed: 951828 Change-Id: Icf51b27531a42ce257704d2c00b6e6b394cad3af
| * | git merge android-6.0.1_r3 on to remote branchSudharma Damgatla2015-12-105-2/+81
| |\| | | | | | | | | | Change-Id: I501838b5f3f9d8bf60ab8df59a322a6f1e9199b9
| * | Merge "Revert "Fixed the problem that HCI command times out even without ↵Linux Build Service Account2015-11-071-4/+2
| |\ \ | | | | | | | | | | | | pending command.""
| | * | Revert "Fixed the problem that HCI command times out even without pending ↵Srinu Jella2015-11-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command." This reverts commit aafbaf8e5fac2f1dad163049e14f91302b525a9f Change-Id: I5b8d784ea82887d2092d1672e6d7712de68671ff
| * | | Bluetooth: Reset bluetooth status to download NVM tagsSrinu Jella2015-10-301-0/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reset bluetooth status to download the NVM tags once the SSR is detected. - NVM tags downloaded only once for the first BT on and downloaded again in case of SSR or command timeout. - Without this change, there would be diffrence in BD addr which would lead to pair/connection issues. CRs-Fixed: 932195 Change-Id: I75a44e7ae7d301ff1c9be8349c1b51d4c80cbf36
| * | Fixed the problem that HCI command times out even without pendingLuke Zhang2015-10-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command. Start the hci timer before sending out the HCI command, and protect the pending command queue with mutex. Also we set the length of the list as volatile. In this way, we can prevent the intervention between hci TX and RX threads. Change-Id: I8d2bcdb636b503344f173d3f8255f5a29b30aadb CRs-fixed: 926763
* | | bt: Kill some logspamChristopher R. Palmer2015-12-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Note: The "Warning" was introduced in a CAF commit where they must have taken a warning from the existing code (the warning was that the packet was too short after reassembly) and then reworded it into a debugging message (the packet was correctly reassembled). Change-Id: I315c3b80664df2991c0b9ad3de86d3dcf9f75196
* | | btsnoop: Enable snoop logging by default only on eng buildsArne Coucheron2015-12-221-1/+1
| | | | | | | | | | | | | | | | | | * It can be enabled otherwise in developer settings if needed. Change-Id: Ib504d912114991eae96704329237356b53486d2d
* | | Bluetooth: Don't use command TX idle timer on BroadcomsEthan Chen2015-12-082-0/+12
| | | | | | | | | | | | | | | | | | | | | * Bluesleep already takes care of this, doing this here results in TX timeouts on Broadcom devices using bluesleep. Change-Id: I586ecb86c74636d903a67f9da47745f9f38540bc
* | | Merge branch 'LA.BF64.1.2.2_rb4.9' of ↵Steve Kondik2015-12-073-10/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | git://codeaurora.org/platform/system/bt into cm-13.0 Change-Id: I34c62c30c1655c2789c09deb2cfdedee2274e24f
| * | | Fix the command timeout issue with TX idle timerLuke Zhang2015-11-113-10/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | Start the idle timer after sending out each command to prevent power collapse. CRs-fixed:926763 Change-Id: I98e649fa40a4622e3c6bce4ea5c53d51e25413b3
* | | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-072-0/+50
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/bt into HEAD Android 6.0.1 release 3 Change-Id: I2af2b180c6d1779b7a34d1370cb9c759dd2c3506
| * | Workaround for H4 HCI stream corruption during LE scansAndre Eisenbach2015-10-202-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, during result-heavy LE scans, the UART byte stream can become corrupted, leading to assertions caused by mis-interpreting the bytes following the corruption. This workaround looks for tell-tale signs of a BLE event and attempts to skip the correct amount of bytes in the stream to re-synchronize onto a packet boundary. Bug: 23934838 Change-Id: Ifadaecf8077cb1defc7134c59c97302fca660f81
* | | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-054-2/+31
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | Android 6.0.0 release 26 Conflicts: audio_a2dp_hw/audio_a2dp_hw.c btif/co/bta_hh_co.c btif/src/btif_core.c btif/src/btif_dm.c hci/src/btsnoop_net.c Change-Id: Idc868e4339246f35bc9ac5974c87460bbc6ee3b2
| * Raise BTU and HCI thread prioritiesAndre Eisenbach2015-10-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | The audio sub-system and audio related tasks run at elevated thread priorities in order to ensure timely handling of audio packets. This patch raises the thread priority of lower layer Bluetooth tasks involved in delivering audio packets to avoid thread pre-emption and subsequent audio skipping. Bug: 24570959 Change-Id: I5e19ee4590207df753f7b8bfc22174959722ec2d
| * Disable opening network debug ports for security reasonsPavlin Radoslavov2015-09-252-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, we open up to three TCP ports that are used for debugging purpose: * TCP port 8872 - used for forwarding btsnoop logs at real time Note: the port is open only if "Bluetooth HCI snoop log" is enabled in the Developer options * TCP port 8873 - used for HCI debugging * TCP port 8879 - used for debugging the Bluetooth counters Those ports are disabled by default. To enable, the following #define should be added at the top of the corresponding file(s): btcore/src/counter.c hci/src/btsnoop_net.c hci/src/hci_inject.c #define BT_NET_DEBUG TRUE Bug: 24371736 Change-Id: I5cb43af1a5d29c331eb5ef61a24dccbe95df6f40
| * Fix issue where bluesleep idle timer is not startedwang ping2015-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | Sometimes allow_device_sleep() is called before wake_assert, this result in transmit_done does not start idle timer. This is because the "wake_state" does not match while allow_device_sleep() is called before wake_assert() is called. So start idle timer anyway when transmit_done is called. Bug: 23754156 Change-Id: I5437aea0abc4b7f5cf847701e2d0a889c6823fcb
| * Fix btwrite timer timeout for Angler (2/2)tturney2015-08-311-1/+2
| | | | | | | | | | | | | | | | | | When calculating the appropriate LPM's idle timeout, the local chip name was NULL. This is fixed by calculating LMP's idle timeout when the chip is enabling. Bug: 23248798 Change-Id: I8ee2b28fb4363359e035e242fdcff8a736ee448c
* | Closing the sockets in case of errorAjay Kumar2015-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use case : Stress tests : BT on\off with different concurrent scenarios Failure : Crash in btsnoop_net_listen thread Root cause : while starting and shutting down the module we are calling same function update_logging().While at the start it is creating listen thread and throwing error and exiting without closing the listen thread. While shutdown of module it "should_log" matches with "is_logging" and it considers cleanup is not required and returns, leaving Behind the listen thread open.In the next BT ON, another listen thread is created and causes the crash. Fix : Closing the socket in case of error. CRs-Fixed: 916898 Change-Id: I92ef293d9b061d0ea65a0c41b506870152114bb0
* | Bluetooth: Handle uart hal open error cases properlySrinu Jella2015-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Handle uart hal open error cases properly to avoid unnessary cleanup of eager reader due to non null value. - And it is not required to close eager reader incase if there is failure in getting uart fds. CRs-Fixed: 904819 Change-Id: I07df1010a1a619cb67b306d64e274d450234a002
* | Bluetooth: Add support to send h/w error eventSrinu Jella2015-10-065-0/+79
| | | | | | | | | | | | | | | | | | | | | | - Bluedroid stack needs to be reset whenever H/w chip restarts like Subsytem restart. - Emulates the hardware error event on detecting SSR event from PR controller. CRs-Fixed: 914079 Change-Id: I9248a4e6ad689fc590fd4fd0f7a067cd33bf314f
* | Bluetooth: Added null check for startup_futurevenkata Jagadeesh2015-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | startup_timer_expired triggered and makes startup_future null before firmware_config_callback as transport initialization took more time. Added safety check for startup_future to handle such cases Change-Id: I9dc52843b6eadf68411755e34af6709d60352776 CRs-Fixed: 912032
* | L2cap: Handle invalid HCI packets from Test toolvenkata Jagadeesh2015-10-061-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Handled Buffer over flow for UINT16 - Handled full packet size more than gki buffer case. - Discard invalid HCI packets from Codenomican test tool as data length and actual data not matching during reassembly Use case: Execute L2cap test suit from Defensics Codenomican STR: 1. Pair and connect DUT to Codenomican tool 2. Execute L2cap test suit from Defensics Codenomican Failure: Crash observed on DUT and Codenomican tool stuck in execution. Root cause: Codenomican tool sending invalid HCI packets to DUT and there are no checks to handle buffer over flow and other invalid data from Codenomican tool Change-Id: I6f93c80244fc39d607ad285185136bbbca83d7ae CRs-Fixed: 903510
* | Bluetooth: Add parameter to indicate reason for ssr_cleanuppramod kotreshappa2015-10-065-9/+9
| | | | | | | | | | | | Add parameter to distinguish the reason for ssr_cleanup. Change-Id: If8dbc8bbeef430c7cea3d8c300285c9aef1222ec
* | Bluedroid BT: Fixed Static Analysis IssuesMatadeen Mishra2015-10-061-0/+2
| | | | | | | | | | | | | | | | | | - This fix avoids NULL pointer dereferences and Array Index Out of Bounds Exceptions in the bluedroid stack code space of Bluetooth. Change-Id: I063b41b003d11f24b0b8473f08a20e05b3303e5c CRs-Fixed: 890309
* | Bluetooth: Read BLE vendor capability to proceed on Secure connSrinu Jella2015-10-065-2/+42
| | | | | | | | | | | | | | | | | | | | | | - Read BLE vendor capability to proceed on enablement of secure connection support from Host. - If BLE vendor capability is supported from the controller then secure connection is enabled from Host. CRs-Fixed: 900778 Change-Id: I64e79d4e6fff7d9f1b0ea7272250e8155f5888e2
* | btsnoop: btsnoop write from external processMallikarjuna GB2015-10-063-25/+228
| | | | | | | | | | | | | | | | | | | | | | | | - write btsnoop from external process - adjust the gmt offset to match with logcat logs - avoid btsnoop file write if btsnoop client is connected - limit the block of snoop write to 10 ms and drop the packet - memcpy and issue single write to eliminate multiple I/O - enable snoop by default on userdebug build - option to override snoop config for userdebug build Change-Id: I13749dc348baf88af57e3ebec1ec7acd5e999c04
* | Bluetooth: Reseting BTSOC Status in case of SSR at hostAjay Kumar2015-10-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use case : SSR due to software/hardware error Failure : Hciattach is not started due to enhancement in BT on/off path where it is accessed only once after bootup Root cause : SSR may happen due to hardware/software and to prepare/bootstrap the SOC after SSR hciattach needs to be started. Fix : Need to reset the property while every SSR. Upper layer will anyway take care of the BT status through persistent keeping. Change-Id: I0bb767c3298e2b5027aa657c555fb29e08b5607c CRs-Fixed: 835568
* | Bluetooth: Handle Vendor Specific cmd complete event properlySrinu Jella2015-10-061-2/+9
| | | | | | | | | | | | | | | | | | As the Host look for proper opcode in the commad complete case, and incase of Vendor specific commands SOC doesn't respond with proper opcode, this has been taken care to avoid time out. CRs-Fixed: 846052 Change-Id: I65e5b5a9dfeb7a641239c4931faeb2f1da3a20da
* | Bluetooth: Enable SSR.Kiran Kelageri2015-10-065-1/+41
| | | | | | | | | | | | Enabling SSR feature. Change-Id: I26eab5b3a10ac7823ff5e9f2adc3bc187939c87e
* | Bluetooth: Read local supported codecs part of boot sequenceSrinu Jella2015-10-064-2/+30
|/ | | | | | | | | | | - Read local supported codecs as part of controller boot up sequence. - API provided from controller interface to get the local supported codecs. CRs-Fixed: 878963 Change-Id: I37a4ab9e6a20ed057ca794dbdd4f99c2a8c65a6e
* Check the return value when reading HCI type bytePavlin Radoslavov2015-08-231-2/+5
| | | | | | | | | | | Add missing return value check when reading the HCI type byte. This check is needed as a safeguard. For example, function event_uart_has_bytes() could be called (indirectly) within the run_reactor() loop not only when there are bytes to read, but also if there is an error (e.g., EPOLLHUP | EPOLLRDHUP | EPOLLERR). Bug: 23105107 Change-Id: Ic3b6e4d656406949e384c8106b0c607f7c221759
* Save all snoop logs when BtSnoopSaveLog=trueTucker Sylvestro2015-07-071-12/+12
| | | | | | | | | Previously, only the last snoop log was saved, which was often not enough if the bluetooth stack was in a crash loop or an app was resetting it frequently. Bug: 22202788 Change-Id: I74622ceabe9ce12d5ba03c640c37f697d5a5bb01
* Use the correct memory free function within HCI layer shutdownPavlin Radoslavov2015-06-301-1/+1
| | | | | | | | The entries on the "command_queue" are allocated by osi_calloc() hence they should be deallocated by osi_free() Bug: 21784321 Change-Id: Ic6e13dbafef2c6ac79ce74ebfc4db702c9ef04c5
* Fix insufficient buffer size allocation in hci_injectMudumba Ananth2015-06-151-1/+1
| | | | | | | | A bug in the hci_inject when requesting a buffer to carry the injected HCI packet. The allocated size should include the BT_HDR header size. Change-Id: Ic1fd41264249103140ce50dff843a99a6bd7dbd8
* Bluetooth native dumpsys logging support (2/5)Andre Eisenbach2015-05-114-1/+102
| | | | | | | Includes support for BTSnoop logging in memory. Bug: 18508263 Change-Id: I175da528cbcdc00d40622647d518a74210cfe6fd
* Work around clang/llvm compilation problems.Chih-Hung Hsieh2015-05-061-4/+1
| | | | | | | | | | | | | These patches will allow us to compile the whole AOSP with clang/llvm before all the following problems are fixed. * Suppress warnings on unused variables. * Remove unused static variables. * Use only gcc to compile code that requires gcc atomic functions. They should be converted to standard atomic functions later. * Suppress warnings on redefined typedefs. BUG: 20765701 Change-Id: I19bc0a256c19502fabcabd1ca158637a8b5741a2
* LE Data Packet Extension supportPriti Aghera2015-04-154-1/+22
| | | | | | | | | 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
* am f29a2fb..e07ad10 from mirror-m-wireless-internal-releaseVinit Deshpande2015-04-144-1/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e07ad10 merge in m-wireless-internal-release history after reset to d232721ae5e5b6949a5249f0d116408b8a3c5f1d d232721 L2CAP socket - fix merge errors 899b771 BR/EDR secure connections support 7fb0da6 Support numeric comparison in SMP aa351f2 merge in m-wireless-internal-release history after reset to 399e89150b3df87172bdf92d54712b379324b149 399e891 Fix for AVRCP CTRL stops sending pass through command daddea9 Free Avrcp Controller callbacks on Cleanup 764babe Protect reset of out stream with mutex 444a8da LE Privacy 1.2 and LE secure connections 8372aa5 L2CAP and SDP Search API for BT profiles (2/2) fd422a7 Update Service Availability. 2a0652a merge in m-wireless-internal-release history after reset to 0b47e0a35c16f5b7d77c30ec1c095ed92ff4fd74 78d0f4c merge in m-wireless-internal-release history after reset to m-wireless-internal-dev 0b47e0a Avoid duplicate disconnection callbacks for fixed channel connections 5646973 Add a section on assertions to the style guide. d768767 Merge "Avoid null-pointer dereference in l2c_release_lcb()" into m-wireless-dev ef92b53 Avoid null-pointer dereference in l2c_release_lcb() 4bf68bf merge in m-wireless-internal-release history after reset to f538707fe64c62b1dbb8e4210e4a1bfa0bab2b56 de6ac86 Add a 'Bluedroid conventions' section to the style guide. 1b80439 Add a section to the style guide on variable declarations. 485f19e merge in m-wireless-internal-release history after reset to 4540f59bc447dc2b7b31a3e974b74a60b2417e7d bef8940 merge in m-wireless-internal-release history after reset to 841c9103cad1898ceca87b734acd4d4537f9f452 ab4c38c merge in m-wireless-internal-release history after reset to a7e698f5a9e062f62e21bc435643975c30bab846 2807a74 merge in m-wireless-internal-release history after reset to a7e698f5a9e062f62e21bc435643975c30bab846 99dbe9a merge in m-wireless-internal-release history after reset to 78c0b060f29b7b7014adddb2f98bf6ae9755c488 f7f8399 merge in m-wireless-internal-release history after reset to a5371c238b4e874d8313ac56a23451e7345ff541 3aa60d7 Make A2DP audio HAL a shared library again 3256a31 Move unused include file out of hci_audio.h b866b69 Add option for schedule_next_instance to force rescheduling 4ae5e3e Ensure alarms are called back when they expire in the past a7bd03e Rewrite alarms to use a single posix timer instance 88e7b15 Resolved hardware error observed during SCO Connection setup Change-Id: Ib9a0a2ffca1d4811a9a9e56674bf43275d8b2205
| * LE Privacy 1.2 and LE secure connectionsSatya Calloji2015-04-134-1/+35
| | | | | | | | | | | | Bug: 19816438 Original author: Chaojing Sun <cjsun@broadcom.com> Change-Id: I5951f4d4e038f8348a62aa6d19b2111bae0b3ecc