OSDN Git Service

android-x86/system-bt.git
9 years agoCode cleanup in GKI layer.
Sharvil Nanavati [Sun, 7 Sep 2014 09:15:19 +0000 (02:15 -0700)]
Code cleanup in GKI layer.

  * move buffer macros into .c from .h
  * delete dead code (e.g. GKI_igetpoolbuf, pool_list variable)
  * define task states as an enum and not a bitfield
  * start renaming fields in GKI control block for future consolidation

9 years agoEliminate unnecessary macros GKI_API, EXPORT_API, and UDRV_API.
Sharvil Nanavati [Sun, 7 Sep 2014 03:09:11 +0000 (20:09 -0700)]
Eliminate unnecessary macros GKI_API, EXPORT_API, and UDRV_API.

9 years agoDelete GKI debug code.
Sharvil Nanavati [Sun, 7 Sep 2014 02:49:20 +0000 (19:49 -0700)]
Delete GKI debug code.

GKI is slowly disappearing so much of that debug code isn't useful.

9 years agoEliminate GKI_os_malloc and GKI_os_free.
Sharvil Nanavati [Sun, 7 Sep 2014 02:42:22 +0000 (19:42 -0700)]
Eliminate GKI_os_malloc and GKI_os_free.

9 years agoEliminate unused variables bufpool{0..15} in GKI control block.
Sharvil Nanavati [Sun, 7 Sep 2014 01:55:43 +0000 (18:55 -0700)]
Eliminate unused variables bufpool{0..15} in GKI control block.

9 years agoGKI_USE_DEFERED_ALLOC_BUF_POOLS is always defined. Flatten code paths.
Sharvil Nanavati [Sun, 7 Sep 2014 01:42:48 +0000 (18:42 -0700)]
GKI_USE_DEFERED_ALLOC_BUF_POOLS is always defined. Flatten code paths.

9 years agoRemove unused fields from GKI internal header.
Sharvil Nanavati [Sun, 7 Sep 2014 01:31:03 +0000 (18:31 -0700)]
Remove unused fields from GKI internal header.

9 years agoCleanup and remove unused variables in GKI's common OS control block.
Sharvil Nanavati [Sun, 7 Sep 2014 01:17:55 +0000 (18:17 -0700)]
Cleanup and remove unused variables in GKI's common OS control block.

9 years agoUse arrays instead of variable names like Tmr0, Tmr1, ... in GKI.
Sharvil Nanavati [Sun, 7 Sep 2014 00:58:25 +0000 (17:58 -0700)]
Use arrays instead of variable names like Tmr0, Tmr1, ... in GKI.

9 years agoEliminate all attempts to set scheduling policy (all no-ops).
Sharvil Nanavati [Sat, 6 Sep 2014 23:53:25 +0000 (16:53 -0700)]
Eliminate all attempts to set scheduling policy (all no-ops).

9 years agoEliminate GKI_run and GKI_stop. Neither had any effect.
Sharvil Nanavati [Sat, 6 Sep 2014 23:46:46 +0000 (16:46 -0700)]
Eliminate GKI_run and GKI_stop. Neither had any effect.

GKI_run was called but didn't do anything: it would call
sched_setscheduler to increase the priority of the current process
but Android OS policy doesn't allow for that. And GKI_stop was never
called.

9 years agoEliminate always-on macro GKI_PTHREAD_JOINABLE.
Sharvil Nanavati [Sat, 6 Sep 2014 23:40:18 +0000 (16:40 -0700)]
Eliminate always-on macro GKI_PTHREAD_JOINABLE.

9 years agoEliminate unused 'stack' concept for GKI tasks.
Sharvil Nanavati [Sat, 6 Sep 2014 23:31:37 +0000 (16:31 -0700)]
Eliminate unused 'stack' concept for GKI tasks.

This change also fixes the type for task names: should be a const
string, not a mutable INT8*.

9 years agoMove BTU task creation into stack/btu/btu_init.c.
Sharvil Nanavati [Sat, 6 Sep 2014 23:16:19 +0000 (16:16 -0700)]
Move BTU task creation into stack/btu/btu_init.c.

Also fixed function naming where the BTE prefix was used
instead of BTU.

9 years agoReplace timers and btu_task
Chris Manton [Fri, 29 Aug 2014 16:12:06 +0000 (09:12 -0700)]
Replace timers and btu_task

Replace GKI timers with alarms.

9 years agoReplace mailboxes with fixed queues.
Chris Manton [Wed, 27 Aug 2014 17:30:47 +0000 (10:30 -0700)]
Replace mailboxes with fixed queues.

Also refactored btu_task a bit.

9 years agoRemove #define BTA_SYS_TIMER_PERIOD
Chris Manton [Thu, 28 Aug 2014 20:28:39 +0000 (13:28 -0700)]
Remove #define BTA_SYS_TIMER_PERIOD

9 years agoRemove unused BTU timer/event APIs
Chris Manton [Wed, 3 Sep 2014 18:04:36 +0000 (11:04 -0700)]
Remove unused BTU timer/event APIs

btu_register_timer
btu_deregister_timer
btu_register_event_range
btu_deregister_event_range

9 years agoFix memory leak in L2CAP utils
Sharvil Nanavati [Wed, 3 Sep 2014 05:15:37 +0000 (22:15 -0700)]
Fix memory leak in L2CAP utils

A list was not freed (just its contents was).

9 years agoReplace BUFFER_Q with list_t
Chris Manton [Tue, 5 Aug 2014 05:03:39 +0000 (22:03 -0700)]
Replace BUFFER_Q with list_t

9 years agoReplace A2DP BUFFER_Q with a list
Chris Manton [Tue, 5 Aug 2014 20:24:41 +0000 (13:24 -0700)]
Replace A2DP BUFFER_Q with a list

The functions acting upon this list are all executed from action
or event context; which would be the same thread.

9 years agoRemove unused function BTM_SecSetConnectFilterCallback
Zach Johnson [Tue, 2 Sep 2014 21:54:49 +0000 (14:54 -0700)]
Remove unused function BTM_SecSetConnectFilterCallback

9 years agoMake SCO sockets request eSCO instead of SCO
Zach Johnson [Tue, 16 Sep 2014 23:34:31 +0000 (16:34 -0700)]
Make SCO sockets request eSCO instead of SCO

This fixes some audio routing problems.

9 years agoFix memory leak in RFCOMM sockets where some lists were not being freed.
Sharvil Nanavati [Sat, 30 Aug 2014 01:26:23 +0000 (18:26 -0700)]
Fix memory leak in RFCOMM sockets where some lists were not being freed.

9 years agoRemove unused #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK
Chris Manton [Tue, 26 Aug 2014 17:35:35 +0000 (10:35 -0700)]
Remove unused #define BTU_CMD_CMPL_TOUT_DOUBLE_CHECK

9 years agoRemove unused definitions using GKI events
Chris Manton [Tue, 26 Aug 2014 17:21:12 +0000 (10:21 -0700)]
Remove unused definitions using GKI events

9 years agoRe-layout Android.mk for single shared library
Chris Manton [Wed, 7 May 2014 23:21:00 +0000 (16:21 -0700)]
Re-layout Android.mk for single shared library

9 years agoRemove unncessary socket write to SCO socket.
Sharvil Nanavati [Sat, 23 Aug 2014 00:13:22 +0000 (17:13 -0700)]
Remove unncessary socket write to SCO socket.

I've verified that the BluetoothSocket is terminated in a timely manner
even without the write(2).

9 years agoUpdate SCO sockets to use OSI.
Sharvil Nanavati [Fri, 22 Aug 2014 01:17:19 +0000 (18:17 -0700)]
Update SCO sockets to use OSI.

This change brings us one step closer to eliminating btsock_thread.

9 years agoRewrite the btif_sock module.
Sharvil Nanavati [Thu, 21 Aug 2014 20:17:43 +0000 (13:17 -0700)]
Rewrite the btif_sock module.

The initialization flow now handles errors. The btif_sock module is
now solely responsible for managing the lifetime of the btsock_thread
it creates.

This change lays the foundation for switching all btif sockets to use
the OSI primitives.

9 years agoImplement GKI timers in terms of alarm.c. This also fixes some alarm/wake lock bugs.
Sharvil Nanavati [Thu, 28 Aug 2014 04:30:59 +0000 (21:30 -0700)]
Implement GKI timers in terms of alarm.c. This also fixes some alarm/wake lock bugs.

The OS callout implementation expects only a single outstanding alarm
and a single wake lock being taken. Since alarm.c uses both and GKI
timers use both, they were occasionally clobbering each other resulting
in unpredictable behaviour. By writing GKI timers in terms of alarm.c,
this change addresses those bugs.

9 years agoRemove unused "file system" concept & friends
Zach Johnson [Fri, 5 Sep 2014 06:05:55 +0000 (23:05 -0700)]
Remove unused "file system" concept & friends

Not actually ever used in the code, beyond importing some
header files and not calling any of their functions.

9 years agoRemove Windows related macros
Zach Johnson [Fri, 5 Sep 2014 01:33:10 +0000 (18:33 -0700)]
Remove Windows related macros

9 years agoEliminate call out/in indirection in bta_sys
Zach Johnson [Fri, 5 Sep 2014 00:57:58 +0000 (17:57 -0700)]
Eliminate call out/in indirection in bta_sys

9 years agoRemove FM/GPS/NFC related definitions
Zach Johnson [Thu, 4 Sep 2014 20:45:06 +0000 (13:45 -0700)]
Remove FM/GPS/NFC related definitions

9 years agoMake the DURING test stub macro support checking multiple modes at a time
Zach Johnson [Thu, 4 Sep 2014 07:17:41 +0000 (00:17 -0700)]
Make the DURING test stub macro support checking multiple modes at a time

This allows test modes which have almost identical code paths to share
some test stub code instead of having to duplicate it for each of them.

9 years agoRemove _WIDCOMM defines and AMP VSE events from hcidefs.h
Zach Johnson [Tue, 2 Sep 2014 22:41:26 +0000 (15:41 -0700)]
Remove _WIDCOMM defines and AMP VSE events from hcidefs.h

9 years agoRemove some more unused Broadcom specific macros
Zach Johnson [Tue, 2 Sep 2014 23:31:43 +0000 (16:31 -0700)]
Remove some more unused Broadcom specific macros

9 years agoRemove BTM_ReadBrcmFeatures because it shouldn't exist and isn't used
Zach Johnson [Tue, 2 Sep 2014 23:18:33 +0000 (16:18 -0700)]
Remove BTM_ReadBrcmFeatures because it shouldn't exist and isn't used

Also eliminates some related macros.

9 years agoRemove the company id defines (except broadcom for now)
Zach Johnson [Tue, 2 Sep 2014 23:01:00 +0000 (16:01 -0700)]
Remove the company id defines (except broadcom for now)

9 years agoRemove printf when attempting SDP requests.
Sharvil Nanavati [Wed, 3 Sep 2014 04:29:48 +0000 (21:29 -0700)]
Remove printf when attempting SDP requests.

9 years agoImplement BTM_InqDbRead in terms of btm_inq_db_find
Zach Johnson [Tue, 2 Sep 2014 20:54:18 +0000 (13:54 -0700)]
Implement BTM_InqDbRead in terms of btm_inq_db_find

duplicated_code--;

9 years agoRemove never used function BTM_GetNumLeLinks
Zach Johnson [Tue, 2 Sep 2014 21:24:56 +0000 (14:24 -0700)]
Remove never used function BTM_GetNumLeLinks

verified unused, even in the latest android code

9 years agoModify allocation tracking to include and verify the allocation source
Zach Johnson [Sat, 30 Aug 2014 00:08:44 +0000 (17:08 -0700)]
Modify allocation tracking to include and verify the allocation source

This will help detect and prevent allocator alloc/free mismatch.

9 years agoAdd memory canaries and turn them on for unit tests
Zach Johnson [Thu, 28 Aug 2014 20:30:17 +0000 (13:30 -0700)]
Add memory canaries and turn them on for unit tests

This will allow us to verify with resonable certainty
that the code is not writing past the end or beginning
of the memory allocation that it was given.

With canaries on, the canaried pointers returned by the
osi alloc functions are no longer passable directly to
free, since they must be offset to get the real allocation
pointers. This means all legacy code must be converted
over to the osi alloc functions before turning canaries
on in the wider codebase.

9 years agoRemove unused function BTM_SetInquiryFilterCallback
Zach Johnson [Tue, 2 Sep 2014 18:49:55 +0000 (11:49 -0700)]
Remove unused function BTM_SetInquiryFilterCallback

9 years agoRemove unused function BTM_InquiryRegisterForChanges and associated code
Zach Johnson [Tue, 2 Sep 2014 18:42:09 +0000 (11:42 -0700)]
Remove unused function BTM_InquiryRegisterForChanges and associated code

9 years agoAdd a VALGRIND #define to heap-allocate all GKI buffers.
Sharvil Nanavati [Tue, 2 Sep 2014 17:53:46 +0000 (10:53 -0700)]
Add a VALGRIND #define to heap-allocate all GKI buffers.

This change allows us to run Valgrind on bluedroid to find memory
leaks. It has already been used to track down multiple memory leaks
which weren't trackable with the existing GKI buffer implementation.

9 years agoFix memory leak in BTU where enequeued buffers were never freed on shutdown.
Sharvil Nanavati [Sat, 30 Aug 2014 01:28:19 +0000 (18:28 -0700)]
Fix memory leak in BTU where enequeued buffers were never freed on shutdown.

This resulted in the stack running out of GKI buffers on repeated
enable/disable cycles.

9 years agoRename init/cleanup to start_up/shut_down in the HCI layer
Zach Johnson [Sat, 30 Aug 2014 01:20:48 +0000 (18:20 -0700)]
Rename init/cleanup to start_up/shut_down in the HCI layer

9 years agoDon't pass in uninitialized memory to epoll_ctl. Make valgrind happy.
Sharvil Nanavati [Fri, 29 Aug 2014 23:30:25 +0000 (16:30 -0700)]
Don't pass in uninitialized memory to epoll_ctl. Make valgrind happy.

9 years agoRemove incomplete FTP #defines and implementation
Zach Johnson [Fri, 29 Aug 2014 23:03:20 +0000 (16:03 -0700)]
Remove incomplete FTP #defines and implementation

9 years agoRemove unreferenced BTRC_DISP macro
Zach Johnson [Fri, 29 Aug 2014 21:57:53 +0000 (14:57 -0700)]
Remove unreferenced BTRC_DISP macro

9 years agoRemove unreferenced BTE macros
Zach Johnson [Fri, 29 Aug 2014 21:54:43 +0000 (14:54 -0700)]
Remove unreferenced BTE macros

9 years agoFix heap memory leak by placing the BT device struct in static storage
Sharvil Nanavati [Fri, 29 Aug 2014 22:39:56 +0000 (15:39 -0700)]
Fix heap memory leak by placing the BT device struct in static storage

9 years agoRemoved always false macro BTM_INQ_GET_REMOTE_NAME
Zach Johnson [Fri, 29 Aug 2014 21:05:36 +0000 (14:05 -0700)]
Removed always false macro BTM_INQ_GET_REMOTE_NAME

9 years agoRemove some never used BTM macros
Zach Johnson [Fri, 29 Aug 2014 20:57:21 +0000 (13:57 -0700)]
Remove some never used BTM macros

9 years agoRemove always false macro L2CAP_HOST_FLOW_CTRL
Zach Johnson [Fri, 29 Aug 2014 20:23:07 +0000 (13:23 -0700)]
Remove always false macro L2CAP_HOST_FLOW_CTRL

9 years agoRemove unused #define's BTM_IS_CONNECTABLE and BTM_IS_DISCOVERABLE
Zach Johnson [Fri, 29 Aug 2014 18:11:22 +0000 (11:11 -0700)]
Remove unused #define's BTM_IS_CONNECTABLE and BTM_IS_DISCOVERABLE

9 years agoEliminate unused #define BTM_INTERNAL_BB
Zach Johnson [Fri, 29 Aug 2014 05:09:14 +0000 (22:09 -0700)]
Eliminate unused #define BTM_INTERNAL_BB

9 years agoUse osi_free with osi_calloc in HCI layer to avoid corruption
Sharvil Nanavati [Fri, 29 Aug 2014 08:35:03 +0000 (01:35 -0700)]
Use osi_free with osi_calloc in HCI layer to avoid corruption

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.

9 years agoRemove unused auto-reset code path, with associated macros.
Zach Johnson [Fri, 29 Aug 2014 04:42:39 +0000 (21:42 -0700)]
Remove unused auto-reset code path, with associated macros.

9 years agoRemove unused #define BTM_AFTER_RESET_TIMEOUT
Zach Johnson [Fri, 29 Aug 2014 04:25:04 +0000 (21:25 -0700)]
Remove unused #define BTM_AFTER_RESET_TIMEOUT

9 years agoRemove indirection in the controller reset sequence
Zach Johnson [Fri, 29 Aug 2014 00:05:08 +0000 (17:05 -0700)]
Remove indirection in the controller reset sequence

9 years agoFix issue where last character of device name is missing
Sharvil Nanavati [Thu, 28 Aug 2014 04:56:41 +0000 (21:56 -0700)]
Fix issue where last character of device name is missing

The device name stored on disk is correct but has a missing character
at the end when read off of disk. This happened because the returned
|length| parameter to |btif_config_get_str| is in number of *bytes*,
not in number of characters (i.e. must add one for NULL character).

9 years agoAdd a UUID module to btcore for operating on UUIDs.
Sharvil Nanavati [Thu, 28 Aug 2014 02:03:03 +0000 (19:03 -0700)]
Add a UUID module to btcore for operating on UUIDs.

This change only adds a single function, uuid_is_empty, but I expect
other UUID-related functions to find themselves here.

9 years agoIntroduce btcore, a low-level library to manipulate Bluetooth data types.
Sharvil Nanavati [Wed, 20 Aug 2014 16:39:25 +0000 (09:39 -0700)]
Introduce btcore, a low-level library to manipulate Bluetooth data types.

This change adds a single module to btcore: bdaddr. The bdaddr module
is reponsible for manipulating and working with Bluetooth addresses.

9 years agoFix digital transposition in saving binary config data
Zach Johnson [Thu, 21 Aug 2014 00:09:25 +0000 (17:09 -0700)]
Fix digital transposition in saving binary config data

Was causing link keys to be saved/read incorrectly, causing reconnect on reboot to fail.

9 years agoEliminate unused arguments to btif_config and clarify variable names
Sharvil Nanavati [Tue, 19 Aug 2014 16:50:18 +0000 (09:50 -0700)]
Eliminate unused arguments to btif_config and clarify variable names

9 years agoSwitch over from an XML based file format to .INI-style conf files
Sharvil Nanavati [Sat, 16 Aug 2014 01:58:22 +0000 (18:58 -0700)]
Switch over from an XML based file format to .INI-style conf files

This change moves us to using a single file format for all configuration
throughout bluedroid. I've provided a transcoder that converts the
previous config file to the new format so settings will be preserved.

In a future revision of bluedroid, we should remove the transcoder and
drop our dependency on tinyxml2.

9 years agoAdd a method to check for available bytes on a socket
Sharvil Nanavati [Thu, 28 Aug 2014 02:05:40 +0000 (19:05 -0700)]
Add a method to check for available bytes on a socket

The available bytes function shouldn't normally be required (and
if it is, the code design is probably bad and should be rethought) but
is introduced as a stop-gap until we can redesign the BTA code that
expects a priori knowledge of the number of bytes that can be read from
the socket.

This change also relaxes the requirement that on socket_register that
at least one of read_cb or write_cb must be specified.

9 years agoMake osi_strdup report allocation size correctly
Zach Johnson [Thu, 28 Aug 2014 03:26:00 +0000 (20:26 -0700)]
Make osi_strdup report allocation size correctly

9 years agoMove HCI over to the osi allocators, and fix the tests accordingly
Zach Johnson [Wed, 27 Aug 2014 23:30:29 +0000 (16:30 -0700)]
Move HCI over to the osi allocators, and fix the tests accordingly

9 years agoFinish allocation tracking for the rest of osi
Zach Johnson [Wed, 27 Aug 2014 03:16:03 +0000 (20:16 -0700)]
Finish allocation tracking for the rest of osi

And found a memory leak in config, so it's doing its job! :)

9 years agoRemove unused #define RPC_INCLUDED
Chris Manton [Wed, 27 Aug 2014 04:20:44 +0000 (21:20 -0700)]
Remove unused #define RPC_INCLUDED

9 years agoFix timer allocations in the test harness, so bdtest runs again
Zach Johnson [Wed, 27 Aug 2014 22:45:35 +0000 (15:45 -0700)]
Fix timer allocations in the test harness, so bdtest runs again

9 years agoCorrect comments and some redundant statements.
Steve Gu [Wed, 27 Aug 2014 17:44:52 +0000 (10:44 -0700)]
Correct comments and some redundant statements.

9 years agoRemove must-always-be-on #define HCISU_H4_INCLUDED
Chris Manton [Tue, 26 Aug 2014 23:11:45 +0000 (16:11 -0700)]
Remove must-always-be-on #define HCISU_H4_INCLUDED

9 years agoAdd strdup to tracked allocations
Zach Johnson [Wed, 27 Aug 2014 03:15:19 +0000 (20:15 -0700)]
Add strdup to tracked allocations

9 years agoAdd internal constructors to hash map and list
Zach Johnson [Wed, 27 Aug 2014 00:21:44 +0000 (17:21 -0700)]
Add internal constructors to hash map and list

This makes allocation tracker safe and ensures the hash map
and associated lists for the allocation tracker don't show
up in the allocation tracker's stats.

9 years agoClean up scattered naive hash functions
Zach Johnson [Tue, 26 Aug 2014 19:23:09 +0000 (12:23 -0700)]
Clean up scattered naive hash functions

9 years agoMove some of osi to use the allocation interfaces
Zach Johnson [Tue, 26 Aug 2014 06:22:24 +0000 (23:22 -0700)]
Move some of osi to use the allocation interfaces

Also changes some tests to ensure all memory freed.

9 years agoAdd a method to pass file descriptors and one to create a socket from an fd.
Sharvil Nanavati [Fri, 22 Aug 2014 01:13:46 +0000 (18:13 -0700)]
Add a method to pass file descriptors and one to create a socket from an fd.

9 years agoRewrite the SCO socket implementation to be more robust.
June R. Tate-Gans [Thu, 19 Feb 2015 22:29:35 +0000 (14:29 -0800)]
Rewrite the SCO socket implementation to be more robust.

This code presents a socket interface for SCO connections. Like the
previous implementation, it does not support sending/receiving data
over the sockets; rather, it only provides a mechanism to establish
and tear down connections. It is assumed that all SCO data routing is
done out-of-band over PCM/I2S.

A SCO socket is represented internally by a file descriptor and SCO
handle. The file descriptor is one end of a socketpair (the other
end is sent to the Java process) and the SCO handle represents a
server (listening) or client (connecting) socket owned by the BTM
layer of the stack.

The most notable implementation detail is that, unlike typical
sockets, listening SCO sockets get "upgraded" when a connection is
established. In other words, a SCO handle for a listening socket
turns into a handle for a connected socket. To present a BSD-style
API to Java processes, we play a trick: when a listening socket gets
upgraded, we create a new listening SCO socket and reassociate the
SCO handle for the two sockets. The reassociation allows the Java
process to continue listening for new incoming SCO connections on
the same file descriptor.

9 years agoMove the disconnect_immediately logic so that it's only in effect for data sockets
Ian McKellar [Wed, 19 Feb 2014 23:33:32 +0000 (15:33 -0800)]
Move the disconnect_immediately logic so that it's only in effect for data sockets

9 years agoClear connected & disconnect_immediately flags when intializing SCO sockets
Ian McKellar [Thu, 13 Feb 2014 22:11:06 +0000 (14:11 -0800)]
Clear connected & disconnect_immediately flags when intializing SCO sockets

9 years agoFix a race condition where closing a SCO connection that was not yet fully open would...
Ian McKellar [Tue, 11 Feb 2014 00:52:26 +0000 (16:52 -0800)]
Fix a race condition where closing a SCO connection that was not yet fully open would silently fail.

9 years agoClean up closed SCO listen sockets
Ian McKellar [Fri, 10 Jan 2014 02:28:30 +0000 (18:28 -0800)]
Clean up closed SCO listen sockets

9 years agoFix locking in btsock_sco_signaled
Ian McKellar [Thu, 9 Jan 2014 22:51:49 +0000 (14:51 -0800)]
Fix locking in btsock_sco_signaled

9 years agoRefactor SCO code to allow closing
Ian McKellar [Mon, 16 Dec 2013 20:26:19 +0000 (12:26 -0800)]
Refactor SCO code to allow closing

9 years agoSCO socket support in bluedroid
Ian McKellar [Fri, 8 Nov 2013 00:30:05 +0000 (16:30 -0800)]
SCO socket support in bluedroid

9 years agoEnforce GKI API buffer usage
Chris Manton [Tue, 6 May 2014 17:35:42 +0000 (10:35 -0700)]
Enforce GKI API buffer usage

Also add another API GKI_queue_length(BUFFER_Q *)

9 years agoRefactor RFCOMM code; also fixes a random-disconnect / performance bug.
Sharvil Nanavati [Fri, 22 Aug 2014 20:44:24 +0000 (13:44 -0700)]
Refactor RFCOMM code; also fixes a random-disconnect / performance bug.

The majority of this change is just style cleanup and eliminating
unnecessary code. There was a bug in the code where, if an entire
data buffer gets successfully written to the app, the rest of the
queue is not drained and the connection may get dropped. This bug
came about due to an early function exit from a switch statement
instead of breaking out of the switch.

9 years agoImplement memory allocation tracker
Zach Johnson [Mon, 25 Aug 2014 23:44:56 +0000 (16:44 -0700)]
Implement memory allocation tracker

Provides an interface to track memory allocations, and assert
bad things like double frees don't happen.

9 years agoAdd common hash functions so we don't have to redefine everywhere
Zach Johnson [Tue, 26 Aug 2014 01:21:12 +0000 (18:21 -0700)]
Add common hash functions so we don't have to redefine everywhere

9 years agoRemove unnecessary layer of indirection
Chris Manton [Tue, 26 Aug 2014 00:54:40 +0000 (17:54 -0700)]
Remove unnecessary layer of indirection

9 years agoAdd back hash_map_test to ositests
Chris Manton [Tue, 26 Aug 2014 16:41:13 +0000 (09:41 -0700)]
Add back hash_map_test to ositests

Somewhere along the way it got lost

9 years agoGlobal counter API for bluedroid
Chris Manton [Wed, 13 Aug 2014 23:36:50 +0000 (16:36 -0700)]
Global counter API for bluedroid

9 years agoAdded encapulsated iterator to hashmap
Chris Manton [Wed, 13 Aug 2014 23:25:24 +0000 (16:25 -0700)]
Added encapulsated iterator to hashmap

Also added back hash_map_test which seemed
to have been dropped somewhere along the way.

9 years agoModify eager reader to support multi-byte reads
Zach Johnson [Fri, 22 Aug 2014 04:00:43 +0000 (21:00 -0700)]
Modify eager reader to support multi-byte reads