summaryrefslogtreecommitdiffstats
path: root/hci
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit '4bf68bf020c7fd1aabcdc4b5d8f5fbb8bacdec9d' into merge_workPrerepa Viswanadham2015-04-102-0/+5
|\| | | | | | | Change-Id: Ibc6d6e691b7f97611d16f96220346dfd6ffbbf52
| * Fix missing #includes needed for glibcScott James Remnant2015-04-026-0/+12
| | | | | | | | | | | | | | | | Some standard library functions are used while relying on bionic headers including the headers the functions were actually declared on. Add those missing #includes so that bluetooth.default.so will compile on glibc. Change-Id: Ied9f89ce5a05911fca63f6bfe1b8cc8196ab3b1c
| * Using generic format specifier for logging pointersNitin Arora2015-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | This change uses generic format specifier for logging the pointers which can be 64 bit or 32 bit depending upon the system used for compilation. Also address of operator is used before casting a int variable to void pointer. Change-Id: Ie9dec408f3a5f674079f77c047d8192f65a004ca
* | Move HCI command response check to individual command handlersAndre Eisenbach2015-04-031-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | On some controllers, reading extended local feature pages can fail, leading to an assertion and subsequent stack crash. To work around this issue, the HCI command response status checked has been moved to individual HCI command handlers, where the same assert is raised. Only for extended local feature responses do we simply ignore any failure (for now). Bug: 20057316 Change-Id: I8601ecbdef07921edfe13d42d1f24110bc8ba535
* | Using generic format specifier for logging pointersNitin Arora2015-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | This change uses generic format specifier for logging the pointers which can be 64 bit or 32 bit depending upon the system used for compilation. Also address of operator is used before casting a int variable to void pointer. Change-Id: Ie9dec408f3a5f674079f77c047d8192f65a004ca
* | Fix build issues in bluedroid on masterEtan Cohen2015-03-316-0/+9
|/ | | | Change-Id: I0d3e93ea61dd03505fe9db902ed90bdd4141cab2
* Remove unused file hci/include/bt_hci_lib.hChris Manton2015-03-262-207/+0
| | | | Change-Id: I60d87da42fa28dd57d50384396e30504103d1ae5
* Change logtag to conform to rest of moduleChris Manton2015-03-261-1/+1
| | | | Change-Id: I9b99111f50dc4f1c581ef96e78b36d14b51a6866
* Move unused include file out of hci_audio.hAndre Eisenbach2015-03-261-2/+0
| | | | | | This fixes include path issues for libbt. Change-Id: I416f563c0056216e86898d8e9cc111b600c73ce0
* Resolved hardware error observed during SCO Connection setupMudumba Ananth2015-03-266-15/+82
| | | | | | | | | | | | | | | | Hardware error was caused due to a faulty HCI command formed in the process of vendor specific pre-SCO setup in the stack(set_audio_state) Fixed the above problem and also added back the vendor (interface) mapping for the set_audio_state functionality to facilitate the sending of the pre-SCO vendor specific commands. Made common vendor library audio setting by moving to hci subsystem. General cleanup around this functionality. Bug: 19923226 Change-Id: I4a743f6725459f360bd2a90e0a46f08fcca2292d
* Revert "Resolved hardware error observed during SCO Connection setup"Chris Manton2015-03-251-2/+1
| | | | | | This reverts commit 4d8ac4ff015ff87c4e985ac0d9a5f3c2a6b0d9fa. Change-Id: Ie1433c82014b6ddce78c5363100ab109ae0fecde
* Resolved hardware error observed during SCO Connection setupMudumba Ananth2015-03-251-1/+2
| | | | | | | | | | | | Hardware error was caused due to a faulty HCI command formed in the process of vendor specific pre-SCO setup in the stack(set_audio_state) Fixed the above problem and also added back the vendor (interface) mapping for the set_audio_state functionality to facilitate the sending of the pre-SCO vendor specific commands. Bug: 19923226 Change-Id: I03c6a1c048c21549b7326a783b70588686283eb3
* Extend Bluetooth startup timeout from 3s to 8sAndre Eisenbach2015-03-231-1/+1
| | | | Change-Id: I0e8af541bf9c5837d92b5ccc047b3dd9d3765767
* Demote, cleanup and extend observed loggingChris Manton2015-03-162-2/+2
|
* Use fully qualified path for btcore includes.Sharvil Nanavati2015-03-161-1/+1
|
* Use fully qualified path for OSI includes.Sharvil Nanavati2015-03-169-25/+25
|
* Rejig hci upwards dispatchZach Johnson2015-03-162-13/+45
| | | | | | | Split events and acl data in hci dispatch, and dispatch events by event code Future code will now be able to dynamically tie into hci events, instead of relying on a hard coded routing.
* Reinstate btsnoop last log savingZach Johnson2015-03-161-3/+12
| | | | | Waited for the merge to complete before reworking the feature into the stack.
* Add a hash function for bluetooth addressesZach Johnson2015-03-161-1/+1
| | | | | Also includes simple tests for it + disambiguates including hash_function.h throughout the stack.
* Add key equality function option for hash_mapZach Johnson2015-03-161-1/+1
| | | | | | This will allow us to do deeper equality on things like bluetooth addresses where the actual pointers are different but the values of the bluetooth addresses are the same.
* Canonicalize HCI logtags with bt_ prefixZach Johnson2015-03-164-4/+4
|
* Rename Bluetooth binaries to use the net_ and net_test_ prefixes.Sharvil Nanavati2015-03-161-1/+1
|
* Add platform-independent logging macros to OSI.Sharvil Nanavati2015-03-1614-105/+99
| | | | | | These macros should replace ALOG* and the various trace macros used throughout bluedroid. This change eliminates all uses of the ALOG* macros in favor of the new ones.
* Adding in some additional, but critical, logs.June R. Tate-Gans2015-03-161-0/+2
|
* Update module names to not use C preprocessor and to be at top of headers.Sharvil Nanavati2015-03-162-3/+5
|
* Fixed HAL layer ignore state handlingZach Johnson2015-03-162-6/+74
| | | | | | | | | | | | | If the hci layer ever entered the ignore state, synchronization death was immenent. This patch fixes that. Also adds additional info print out when entering the ignored state. Adds tests for the ignored state. Doesn't solve the problem of why we were getting NULL back from the buffer allocator, though. (The trigger for the ignored state.) Bug: 18156298
* Move controller module to device directoryChris Manton2015-03-166-491/+5
|
* Make hci/ depend on bdroid_CFLAGSSharvil Nanavati2015-03-161-3/+1
|
* Fix BLE GAP handling after callback refactoringZach Johnson2015-03-162-0/+8
| | | | | | | | | BLE supported states was moved to controller during the callback re-factoring CL, but in the commotion I forgot to remove the supported states variable from devcb. This meant I didn't realize GAP was looking at the wrong place for BLE supported states. This CL fixes that.
* Don't call null callback in vendor libZach Johnson2015-03-161-1/+3
| | | | | Don't require a vendor library command transmit to provide a callback. If the vendor library provides a null callback just ignore it.
* Fix accidental hardcoding of 2+ extended feature page numbersZach Johnson2015-03-161-1/+1
| | | | | | | Happened to be ok on devices with 1 or 2 feature pages, but for devices with 3 or more feature pages it was always loading the page at index 1 for pages past the page at index 0, causing an infinite loop, causing bluetooth enable to time out.
* Refactor btm_devctl reset sequenceZach Johnson2015-03-1611-158/+749
| | | | | | * 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
* Add a futured version of the HCI transmit_commandZach Johnson2015-03-162-1/+27
| | | | This will allow the controller restart sequence to be serialized into a single function.
* Modulizification of the HCI layerZach Johnson2015-03-166-84/+56
| | | | | | Shutdown is managed by the stack manager now, so we don't need to lock around it. The fetching of the device address is a bit hacky right now, until it becomes part of its own module.
* Refactor btsnoop and stack config into modulesZach Johnson2015-03-163-100/+121
| | | | | | | | | | | | Moves stack config out of the combined bte_config, and into its own module. Makes btsnoop more self sufficient and removes uneccessary levels of indirection. Refactor logging slightly into a (temporary) module to disassociate from the direct calls from config. Eliminates some useless stuff in the module as well.
* Fix packet fragmenter so it doesn't request acl sizes unless it's actually ↵Zach Johnson2015-03-161-34/+39
| | | | | | | | | | | | | an ACL packet During the startup process, commands are sent before the ACL sizes are fetched. With the change that we now assert the acl sizes are fetched when you request them from the controller, the assertion was being triggered during that phase. When I was rebasing the waiting changes and also making the assertion change, I should have been more careful to test this. mea culpa Also simplifies that code path just a bit.
* Shuffle HCI layer internal functions into a more logical orderingZach Johnson2015-03-161-129/+139
| | | | No actual code additions/deletions, other than additional forward declarations
* Refactor bte_main into more of a shell.Zach Johnson2015-03-166-156/+172
| | | | | | | Moves all HCI initialization into hci_layer. Removes superfluous exposed functionality on the HCI layer (like turning the chip on/off and logging) Also reorganizes some of hci_layer to group related functions together.
* Add non-repeating timer wrapper for alarmZach Johnson2015-03-161-22/+16
| | | | | | | Refactor the hci layer to use it. The timer wrapper allows you to specify the duration, etc at construction time rather than at start time, making some usage patterns of alarm more convenient.
* HCI layer cleanupZach Johnson2015-03-1630-261/+685
| | | | | | | | - x_interface_t started to get annoyingly verbose, changed to x_t - buffer_allocator is standalone now, no longer part of bte_main - new controller_t to handle controller start up and hold controller state - new hci_packet_factory to make packets, and hci_packet_parser to read information out of packets.
* Sink all HCI transmission management into the HCI layerZach Johnson2015-03-167-165/+401
| | | | | | | | | | | | Begins the refactoring of the HCI related code in BTA, corrects some hacks in the HCI layer (no more concept of internal commands, yay!), and corrects the handling of multiple commands pending response in the HCI layer. This introduce a horrible hack external to the HCI layer to keep BTU HCI handling of command complete/status events on the BTU task. That hack will be removed when BTU moves to a reactor model and we have osi threads to work with.
* Re-layout Android.mk for single shared libraryChris Manton2015-03-161-1/+0
|
* Rename init/cleanup to start_up/shut_down in the HCI layerZach Johnson2015-03-163-30/+30
|
* Use osi_free with osi_calloc in HCI layer to avoid corruptionSharvil Nanavati2015-03-161-1/+1
| | | | | | | There was a mismatch where the free function was GKI_free for a pointer allocated with osi_calloc. This resulted in GKI exceptions being thrown if the adapter goes through enable -> disable -> enable -> disable without terminating the process.
* Move HCI over to the osi allocators, and fix the tests accordinglyZach Johnson2015-03-169-25/+54
|
* Finish allocation tracking for the rest of osiZach Johnson2015-03-161-0/+1
| | | | And found a memory leak in config, so it's doing its job! :)
* Clean up scattered naive hash functionsZach Johnson2015-03-161-8/+2
|
* Modify eager reader to support multi-byte readsZach Johnson2015-03-167-83/+51
|
* H4: -1 -> INVALID_FD; make uart_fd invalid on closeZach Johnson2015-03-161-1/+2
|
* Implement an HCI HAL for MCTZach Johnson2015-03-169-1557/+502
| | | | Unit tested. Needs verification on actual device (i.e. HDP profile).