summaryrefslogtreecommitdiffstats
path: root/btcore
Commit message (Collapse)AuthorAgeFilesLines
* Bluetooth: Synchronizing access to hashmap in counter moduleGurpreet Ghai2016-02-181-0/+2
| | | | | | | | | | | | The hashmap access is not synchronized in counter module. The call for hashmap free is not under motex lock. This may lead to race condition during shut down when hash map is being cleared while in use by another thread. Added mutex lock for hash map free call. CRs-Fixed: 978566 Change-Id: I58dae83a1e483c50f63176df401c02c63e648b8a
* Bluetooth: Fix module cleanupAjay Kumar2015-12-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | if module does not start fully its state will either NONE OR INITIALIZED. While module_shut_down if module state is not STARTED, it will exit without shutting underlying layers which will give issues or ASSERT in next cleanup. In this specific issue hci module stucks in USERIAL_OPEN and startup timer expires and module exits with the error. Since there is no error check on hci module fail it goes ahead and enables BT(that might give issues later) but fails to cleanup and does not call USERIAL_CLOSE while hci module_shut_down as part of disable.Now this will ASSERT in next enable as USERIAL lib handle is not NULL. even if we call module_shut_down that is not going to help as it will exit without calling lifecycle function :shutdown. Adding module error state will solve the issue CRs-Fixed: 939575 Change-Id: I0f448eb438881a9df46d07eab44d809bae740ab5
* Disable opening network debug ports for security reasonsPavlin Radoslavov2015-09-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* Moved the OSI alarm_shutdown() operations to alarm_cleanup()Pavlin Radoslavov2015-06-011-11/+2
| | | | | | | | Also, removed the OSI module's start_up and shut_down steps, because now they are no-op. Bug: 21558791 Change-Id: I24259b327f399af57c37937111158baa9704f644
* Add missing clean_up step for the OSI module.Pavlin Radoslavov2015-05-281-1/+6
| | | | | | | | | | | | | | | Now the OSI module's shut_down processing is split into "shut_down" and "clean_up". Previously, there was an ordering issue manipulating some of the internal state during graceful shutdown/cleanup. Some of the modules had two steps: shut_down, followed by clean_up, while other had only shut_down step. This triggered the following assert in file alarm.c alarm_cancel: assertion "alarms != NULL" failed Bug: 21406940 Change-Id: Iab1f033a69cbff646a6b0f346760ae82f8b00b8f
* Build the shared library with --whole-archiveZach Johnson2015-05-191-33/+2
| | | | | | | | | | | | | | For stack static libraries, use LOCAL_WHOLE_STATIC_LIBRARIES to ensure they get --whole-archive applied to them. This means module symbols in static libraries won't be removed by the linker and dlsym will find them. This patch also removes the code hacks we needed to trick the linker into including the module symbols in the final shared library. Change-Id: I2463d0e6fb38f1e75c8293179cf9d4ca33eda84e
* Include osi_module reference in module_init funcionAndre Eisenbach2015-05-181-0/+9
| | | | | | This prevents a crash-loop if the module is stripped by the linker. Change-Id: I7a3f0349cb62a9e73e003707c1f48ec0a6de7f67
* Shutdown alarm callbacks on stack disable; added OSI moduleAndre Eisenbach2015-05-183-0/+66
| | | | Change-Id: Iecf1e2258da012bdac69a4f57d38b12a272e3edd
* Work around clang/llvm compilation problems.Chih-Hung Hsieh2015-05-062-1/+6
| | | | | | | | | | | | | 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
* Fix dlsym change/failure by hard-coding internal module references.Etan Cohen2015-04-011-1/+26
| | | | | | Should be reverted once permanent solution for dlsym change merged. Change-Id: I2c0843875f88c8c56899b60246907af12d29fb0c
* Fix build issues in bluedroid on masterEtan Cohen2015-03-311-0/+1
| | | | Change-Id: I0d3e93ea61dd03505fe9db902ed90bdd4141cab2
* Demote, cleanup and extend observed loggingChris Manton2015-03-162-2/+2
|
* Use fully qualified path for btcore includes.Sharvil Nanavati2015-03-163-4/+4
|
* Use fully qualified path for OSI includes.Sharvil Nanavati2015-03-162-10/+10
|
* property api unification, naming and testingChris Manton2015-03-163-173/+374
|
* Data type representing the bluetooth iac parameterChris Manton2015-03-161-0/+27
|
* bt property objectChris Manton2015-03-164-14/+152
|
* Add bdcopy methodChris Manton2015-03-162-0/+11
|
* uuid_testChris Manton2015-03-161-0/+166
|
* Device class implementationChris Manton2015-03-164-0/+473
|
* Add more uuid methodsChris Manton2015-03-163-1/+192
|
* Add a hash function for bluetooth addressesZach Johnson2015-03-166-2/+64
| | | | | Also includes simple tests for it + disambiguates including hash_function.h throughout the stack.
* Add key equality function option for hash_mapZach Johnson2015-03-162-2/+3
| | | | | | 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.
* 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-162-20/+20
| | | | | | 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.
* Add counter unit testsChris Manton2015-03-162-0/+123
|
* Update module names to not use C preprocessor and to be at top of headers.Sharvil Nanavati2015-03-162-2/+2
|
* Expand include pathnames and add bd root pathChris Manton2015-03-162-3/+4
| | | | Hopefully this will squash the sem_t semaphore_t collision
* counter implementationChris Manton2015-03-163-0/+458
|
* Move properties data primitive into btcoreChris Manton2015-03-163-0/+210
| | | | | | | This is a valuable data structure that could be used widely within the stack. It's used by bdtest and bdtool, and could be used by any other application built on top of the stack.
* Add comments to the device features and event mask structsZach Johnson2015-03-162-0/+5
|
* Refactor btm_devctl reset sequenceZach Johnson2015-03-163-0/+79
| | | | | | * 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 temporary callbacked wrapper for module startupZach Johnson2015-03-162-0/+67
| | | | | | | | | | | | When all is said and done with the module conversions, all lifecycle functions will run on the lifecycle managment thread, which can be blocked while waiting for futures. This CL means new modules can depend on that fact during start_up, alllowing newly converted modules to be spliced into the existing startup callback madness without having to sacrifice clean implementation. We can add other callbacked lifecycle function variants as necessary.
* First pass at implementing modulesZach Johnson2015-03-163-1/+228
| | | | | | | | | This first step creates the notion of a module and corresponding lifecycle functions, with helpers to simplify working with them. Once everything is converted over to this module format, then we can make the stack manager automagically find the correct order for init/start_up/shut_down/clean_up
* Add a UUID module to btcore for operating on UUIDs.Sharvil Nanavati2015-03-163-1/+53
| | | | | This change only adds a single function, uuid_is_empty, but I expect other UUID-related functions to find themselves here.
* Introduce btcore, a low-level library to manipulate Bluetooth data types.Sharvil Nanavati2015-03-163-0/+172
This change adds a single module to btcore: bdaddr. The bdaddr module is reponsible for manipulating and working with Bluetooth addresses.