OSDN Git Service
Mallikarjuna GB [Fri, 19 Sep 2014 14:57:17 +0000 (20:27 +0530)]
Don't open SCO for 2nd MO call if a call is active
When user dials a 2nd call, do not open SCO if 1st call was
active on DUT earpiece or speaker.
Change-Id: I974f5bcf917e6972705e60cf1da195eae23f885a
Mallikarjuna GB [Tue, 28 Oct 2014 17:43:51 +0000 (23:13 +0530)]
Don't close SCO for MO calls
This change removes condition to disconnect SCO
when MO call process is started.
Change-Id: I2af4ab82c097c7d9ce1bc892bdf40cc09ff6d97e
Mallikarjuna GB [Wed, 8 Oct 2014 08:31:16 +0000 (14:01 +0530)]
SCO connection should happen after SLC.
This change makes sure that SCO audio
connection request is not processed until
HFP SLC connection is done.
Change-Id: Ia2fcad49882deaaf049ae190d90442e5ca7ad71b
Andre Eisenbach [Thu, 4 Jun 2015 18:43:57 +0000 (11:43 -0700)]
Fix compile error in bta_ag_sco.c
Change-Id: I8839ba732560a31a5e8a2351ea4bfb16999cf5ea
Mallikarjuna GB [Thu, 21 May 2015 14:34:46 +0000 (20:04 +0530)]
Create listen SCO for HS1 if HS2 disconnects during SCO xfer
During SCO transfer process from HS1 to HS2, firstly active SCO for
HS1 is disconnected. However, if suddenly HS2 disconnects even
before SCO transfer is complete, listen SCO for HS1 is not created.
This causes further incoming SCO connections from HS1 to be rejected.
The change creates listen SCO for HS1 and moves SCO state properly
to LISTEN.
Change-Id: I0993c1ba1c24b3b7e9c243d179a913d7a0c40446
Mallikarjuna GB [Thu, 21 May 2015 14:20:27 +0000 (19:50 +0530)]
Don't open SCO on state change for multi party call on DUT.
When multi party calls(1 active, 1 held) are ongoing on phone
speaker and any of these call drops, do not open SCO for
other call since user expects call to still remain on phone
speaker.
Change-Id: I9079c809ac665fc1c6e890302e37d23a12f8d4f4
Mallikarjuna GB [Thu, 21 May 2015 13:11:03 +0000 (18:41 +0530)]
Reset sniff subrating while in SCO
Sniff subrating should not be used when link is
in SCO connection. Since the subrating value is
higher, the link would take more time to process
ACL data while in SCO connection causing unwanted
results like delay in SCO disconnects.
Change-Id: I7b964faa397624b65e0158209b8743efe13a6075
Mallikarjuna GB [Sat, 30 May 2015 17:25:18 +0000 (22:55 +0530)]
Open SCO for held call.
Use case:
1. Connect to headset/carkit
2. Make an outgoing call from AG
3. Turn off BT on AG
4. Hold the call from AG
5. Turn on BT on AG (No SCO link is established here)
6. Unhold call from AG (still no SCO link is established)
Failure:
No SCO connection established when held call is there
during headset connection.
Root cause:
SCO is not initiated when SLC is done during held call.
Fix:
AG opens SCO connection when HF connected while in call and
the call was in held state.
Change-Id: I63d7655d26ddbf68cbf94c745df745cffa917b5e
Mallikarjuna GB [Fri, 28 Nov 2014 04:51:15 +0000 (10:21 +0530)]
Update call state before opening SCO.
This change makes sure to update the current
call state before opening SCO connection when
incoming call is answered. Some car kits are
strict in checking this sequence and go in
bad state if not done this way.
Change-Id: Ie744dc26c02d897eaf016ee73022bfc2a0db067e
Mallikarjuna GB [Fri, 22 May 2015 06:26:48 +0000 (11:56 +0530)]
Handle multi party call states
UseCase:
1. Set up Bluetooth connection between phone and remote device.
2. Disconnect BT link by turning off remote device.
3. Start Mo call from phone.
4. Receive MT call from far end.
5. Turn on remote device.
6. BT connection gets established successfully, but audio
doesn't get transferred to headset.
Failure:
Call audio not routed to BT HS. SCO not established.
Root cause:
When a HS connects while in an active call and 2nd call
(incoming/outgoing/alerting) setup ongoing, incorrect post SLC
call setup updates might cause HS to get confused as phone had
already updated correct call states in CIND response during SLC.
This may cause HS to behave abnormally like delayed response to
BCS as seen with jabra wave +.
Fix:
Avoid sending incorrect call updates post SLC since we already
have sent correct updates during SLC as reponse to CIND.
Change-Id: I53e57baf7cca782af6f374a043667971c66a956d
Mallikarjuna GB [Thu, 21 May 2015 12:28:12 +0000 (17:58 +0530)]
Update held call state to connected headset
In a three way call scenario, when an active
call is dropped by remote, the single held call
state is not updated to the connected headset.
This change will make sure that it is updated
properly.
Change-Id: I558602e791279d510edb23989b125cd8f7a7ebde
Pavlin Radoslavov [Tue, 2 Jun 2015 20:54:58 +0000 (13:54 -0700)]
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
There were several leftover places that were still using
malloc/calloc/free .
Those are replaced to use osi_malloc/osi_calloc/osi_free like
majority of the rest of the code.
Note: There are few remaining places that are still using
malloc/calloc/free:
* Some of the unit tests
* audio_a2dp_hw/audio_a2dp_hw.c
It is used as part of the audio.a2dp.default.so library,
and the bluetooth.default.so library
Its usage of malloc/calloc/free should be refactored
independently.
Change-Id: Iafbed996e5f1ae8eb1343fb2acfadf32e515e419
Sunny Kapdi [Tue, 2 Jun 2015 05:21:28 +0000 (22:21 -0700)]
Fix memory corruption due to BLE multi-adv macro
INST_ID_IDX_MAX macro was not protected with parenthesis, resulting
in incorrect calculation of the size needed to allocate memory for
the client_if map.
Change-Id: Ib3591f4f9ac7288f2191e9078a71aab431ca7130
Hemant Gupta [Wed, 19 Nov 2014 13:39:54 +0000 (19:09 +0530)]
HID: Handle closing of uhid driver in case failure
This patch handles closure of the uhid driver in case of following:
- Due to concurrency of disconnection from a conencted device
and an incoming connection request from another device, the error
code for the ACL disconnection becomes HCI_ERR_HOST_REJECT_SECURITY
in the stack.
- On reception of disconnection with that error codes, the uhid driver
was not closed from the btif layer leading to issues in reconnection
with same device that got disconnected.
Change-Id: I13c83757051850cc631aa1c24a036a2e1a4d0087
Srinu Jella [Thu, 13 Nov 2014 11:52:28 +0000 (17:22 +0530)]
Reset pairing state to idle only for the current device
Reset the pair state during auth complete for the BD_ADDR of the pairing
device only. The authentication complete event may come for profile level
authetication also. In such cases, if device already in paired state,
there is no need to reset the pairing state.
Change-Id: Id0ef9127895177527a6d4559ad873aa1c62a56bb
Pavlin Radoslavov [Mon, 1 Jun 2015 23:08:18 +0000 (16:08 -0700)]
Moved the OSI alarm_shutdown() operations to alarm_cleanup()
Also, removed the OSI module's start_up and shut_down steps,
because now they are no-op.
Bug:
21558791
Change-Id: I24259b327f399af57c37937111158baa9704f644
Pavlin Radoslavov [Mon, 1 Jun 2015 18:42:39 +0000 (11:42 -0700)]
Disable the OSI allocation tracker.
Temporary disable the allocation tracker initialization
(even for BLUEDROID_DEBUG) when initializing Bluetooth.
This is a short-term workaround solution for several issues related to
the usage of the allocation tracker.
* Inconsistent usage of osi_malloc()/osi_calloc() and osi_free()
- Within some of the Bluetooth-related unit tests we have two copies
of the same libosi library: one copy statically linked against the
unit test, and another dlopen() at runtime as part of bluetooth.default.so
Each of those copy has its own static variables.
- For the dlopen() copy we do call allocation_tracker_init(), while for the
static copy within the unit test we don't call allocation_tracker_init()
- Occasionally, there is a memory allocation via osi_calloc()
within the dlopen()-ed library, and then it is osi_free()-ed
within the statically linked library.
Such (mis)usage creates issues in two ways: (1) free()-ing incorrect
pointer, and (2) the osi hash_map() in the dlopen()-ed library still considers
the osi-tracked memory as allocated.
NOTE: (1) could trigger random crashes, while (2) is the reason the unit
test triggers an assert
* Avoid potential issues that could result from the fact that calling
allocation_tracker_init() is not mandatory; i.e., the same
issue described above could be triggered if osi_malloc()/osi_callod()
was called before the call to allocation_tracker_init()
* There is still code that uses malloc(3)/calloc(3) and free(3) instead
of osi_malloc()/osi_calloc() and osi_free()
Also, add missing pthread_mutex_lock()/pthread_mutex_unlock() guards,
and fix the allocation_tracker_uninit() implementation so it works
properly even if void allocation_tracker_init() wasn't called.
Bug:
21561735
Change-Id: Ic83d6cd40af1189c4ee9c1dbfd0ad8e4666e1502
Srinu Jella [Wed, 8 Oct 2014 11:06:43 +0000 (16:36 +0530)]
Handle pairing timeout during remote name request
If a remote name request is in progress and a pairing timeout is
triggered, the host needs to post the bond failure to the UI and
needs to reset the pairing cb state, otherwise the UI will be stuck
in pairing mode and scanning won't work until Bluetooth is cycled
OFF->ON.
Change-Id: I76d9a83b1db7236db51617da998b5857b0de39f0
Andre Eisenbach [Thu, 28 May 2015 18:16:52 +0000 (11:16 -0700)]
Reduce GATT log verbosity
Change-Id: I55e6ec1afdd8a13f4401809ef89ef2d80efb7f66
Srinu Jella [Fri, 30 May 2014 15:45:01 +0000 (21:15 +0530)]
Avoid null pointer exception for invalid L2CAP channels
Change-Id: I8ac40e9cfe6dd015f40c6f493727e123a0d247e6
Pavlin Radoslavov [Sat, 23 May 2015 02:47:49 +0000 (19:47 -0700)]
Add missing clean_up step for the OSI module.
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
Hemant Gupta [Thu, 15 Jan 2015 14:45:07 +0000 (20:15 +0530)]
Sniff: Use correct sniff configuration for PAN & HS
Change-Id: I95c302dd46cdcc63058c9cb3de17fdfd6ffe8d2e
Andre Eisenbach [Wed, 27 May 2015 00:40:12 +0000 (17:40 -0700)]
Make secure connections mode configurable
Change-Id: Id6101abc1fc339147c8b55023c7426ec1c807ee6
Prerepa Viswanadham [Wed, 27 May 2015 00:25:38 +0000 (17:25 -0700)]
Increase the min LE connection interval to 11.25ms
To reduce audio choppiness, increase the min LE connection interval
to 11.25ms from 7.5ms
Bug:
18776956
Change-Id: I8404ebe2f9562d555a2131ae30dd63b74bb362a4
Satya Calloji [Thu, 21 May 2015 23:44:06 +0000 (16:44 -0700)]
Pairing is prompted with a wrong bd-address
Slave initiated encryption was not being notified on the correct
address and causes the key to be lost on slave device triggering
new pairing once in a while.
Change-Id: I5441a9e0bcf8ba45199483ccd02f207892ec296e
Andre Eisenbach [Fri, 22 May 2015 23:38:54 +0000 (16:38 -0700)]
Fix problem where multi-adv instances cannot be re-used
After using all multi-adv instances and stopping them, the instance ID
for each instance is incorrectly reset, causing the instance to be not
usable anymore.
Bug:
21404808
Change-Id: Ie3a3f07bc2204c7268567cb56248cd3eb7751742
Nitin Arora [Fri, 22 May 2015 00:58:36 +0000 (17:58 -0700)]
Recitfy condition when removing device from IRK resolving list
This patch corrects the conditional logic before sending HCI
command to remove the IRK list entry from the IRK resolving
list based on the max size of resolving list
Change-Id: I9adc933f0988ae907b3e218ba63814d106784787
Andre Eisenbach [Thu, 21 May 2015 06:55:13 +0000 (23:55 -0700)]
Fix build after cross-key issues broke non privacy enabled builds
Change-Id: Idef7239b07115be9290d7cca6610c603ffb3afa5
Satya Calloji [Tue, 19 May 2015 23:08:40 +0000 (16:08 -0700)]
Fix device/address types and IRK value handling
Handles the device and address types based on BD address
and provides the IRK values as available.
Change-Id: I351e0aea7f5e55caefa405b34261c75e78306552
Satya Calloji [Thu, 30 Apr 2015 20:58:59 +0000 (13:58 -0700)]
Fixed cross key for LE when paired over BR-EDR
SMP state machine was resending security request and waiting for a response
when paired over BR-EDR. The state machine state timed out due to this and
SMP failed while doing cross key pairing. Thus, user was asked for pairing
again.
Original author: Priti Aghera <paghera@broadcom.com>
Change-Id: I568f936bb7bee21fb78e8454469ecad3445f026f
Satya Calloji [Wed, 6 May 2015 16:24:06 +0000 (09:24 -0700)]
Fix SMP pairing request issue on LE
The cause of the failure:
- the master device sent the three keys to slave, but slave only receive
two and got the link drop before the third key is received.
- the slave device treats it as pairing failure due to the key missing.
SMP should wait for all keys been sent to controller before dropping the link.
Implement L2CAP fix channel tx_complete callback for this reason,
and it has been applied on the channel 6 (SMP).
Channel 7 (BR_SMP channel) was not keeping track of total_tx_unacked
number and closed the link too early. Added check in the
smp_br_key_distribution() and the ACL data tracking there before
posting SMP_BR_AUTH_CMPL_EVT.
Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: If48a4c5e28b1d177f14ff089e8dfa3ace41eba83
Satya Calloji [Tue, 21 Apr 2015 23:34:54 +0000 (16:34 -0700)]
Unpair the other transport on a device paired
When unpair is initiated for LE or BR-EDR transport for a device,
close the link for other transport and unpair the device on
both transports, since both transports on a device are paired
due to cross key.
Original author: Priti Aghera <paghera@broadcom.com>
Change-Id: I13d4757eb056c4bd4c7cc0699ec61a28852702c5
Satya Calloji [Fri, 24 Apr 2015 06:39:49 +0000 (23:39 -0700)]
Static address is seen on scanner after unpairing
Fix for bonded devices that cannot be removed from resolving list when
scanning, advertising or when a connection is being initiated.
Suspend all active adv, scanning or connection initiation upon
completion of any resolving list operation.
Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: Id104dace2944b1878eaf65b93aba3d01e477191d
Satya Calloji [Thu, 7 May 2015 21:06:37 +0000 (14:06 -0700)]
Fix for chip capability version check
Fixes the issue of extended scan command being sent out
for non-capable chipsets
Bug:
20916419
Change-Id: Ib5d848f49c34a3fc9c053a7488e12fb0c252587c
Satya Calloji [Tue, 31 Mar 2015 20:24:32 +0000 (13:24 -0700)]
LE low power scan feature
LE low power extended scan feature stack changes
based on Google BLE spec v0.95
Bug:
20029342
Change-Id: I1db2d9bb648295340d0e93ca89d27e1b938d33d3
Nitin Arora [Fri, 12 Sep 2014 01:35:55 +0000 (18:35 -0700)]
Fix allocation for LE scan filter parameters
This change allocates memory for LE scan filter parameters
to copy filter params set by btif inquiry process initiated
using Settings UI
Change-Id: I56ed33b80af3f26ddc8a83edb807f88048503fa7
Nitin Arora [Wed, 11 Mar 2015 17:40:59 +0000 (10:40 -0700)]
Fix for premature BLE RPA timeout
RPA timeout expires prematurely when multiple FindMe server
instances start and stop advertisiment continuously. During start
adv TIMER3 is started using oneshot timer and during stop adv
same TIMER0 is stopped, so the TIMER3 is still running and expires
prematurely. This fix stops TIMER3 during disable adv and when RPA
is sent to controller.
Change-Id: I336f84043e5e0e8a833cc6080f8bcc0c1665893e
Satya Calloji [Thu, 7 May 2015 16:45:00 +0000 (09:45 -0700)]
Fix GATT connection failure after BT reset
Handles the address type incorrect value storage issue
and removes usage of DMT supported flag which was based
on legacy code
Bug:
20912064
Change-Id: I5bd20dc9cd0997ac3dbd4b346cc0513f1809f241
Nitin Arora [Thu, 31 Jul 2014 20:00:21 +0000 (13:00 -0700)]
Use correct structure to read LE connection handle
This patch corrects the retrieval of the connection handle
after the gatt write operation has succeeded successfully.
Change-Id: Iac79a64d6c626c2349b6f1a3744ea49a521a45f4
Zach Johnson [Tue, 19 May 2015 21:49:37 +0000 (14:49 -0700)]
Build the shared library with --whole-archive
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
Satya Calloji [Tue, 19 May 2015 21:42:32 +0000 (14:42 -0700)]
Fix for IRK and IR key write issue
Fixes the incorrect flipping of values
for IRK and IR keys in bt_config.conf file
Change-Id: Ia4f9c274b6a3f7594ec31d8bd89b27d1ae54ac78
Andre Eisenbach [Tue, 19 May 2015 19:22:59 +0000 (12:22 -0700)]
Re-enabled enhanced inquiry scan
A merge/re-factoring error caused enhanced inquiry scan to be disabled,
severely slowing down inquiry and device name resolution.
Change-Id: Id7bc1687a1e1bbbbc8b8b42cc184ce628b6d1b9c
Chih-Hung Hsieh [Tue, 19 May 2015 18:18:35 +0000 (11:18 -0700)]
Fix format-security warning found by clang/llvm.
BUG:
21299815
Change-Id: I3dd7e92444a9b439c210f7e6ce677307a38113ab
Andre Eisenbach [Tue, 19 May 2015 01:44:03 +0000 (18:44 -0700)]
Fix string template in connection event debug log
Also fixed timestamp/bdname buffer confusion.
Change-Id: Idab9746a87ec665cba836c79978f03e13c36d17b
Andre Eisenbach [Tue, 19 May 2015 01:42:29 +0000 (18:42 -0700)]
Include osi_module reference in module_init funcion
This prevents a crash-loop if the module is stripped by the linker.
Change-Id: I7a3f0349cb62a9e73e003707c1f48ec0a6de7f67
Zach Johnson [Mon, 18 May 2015 21:48:50 +0000 (14:48 -0700)]
Fix AlarmTestHarness so alarm tests pass again
Ensures all alarm resources are torn down before the
test ends, so the allocation tracker is happy and
doesn't assert-fail the tests.
Also guard alarm_shutdown to make sure it only runs
if lazy_initialize was run (to avoid undefined behavior)
Change-Id: Iaf78fe85edd2fc65b9c5ee11c74665a11a3bc9ba
Andre Eisenbach [Mon, 18 May 2015 16:41:06 +0000 (09:41 -0700)]
Shutdown alarm callbacks on stack disable; added OSI module
Change-Id: Iecf1e2258da012bdac69a4f57d38b12a272e3edd
Mudumba Ananth [Wed, 6 May 2015 16:15:41 +0000 (09:15 -0700)]
Fix BT PAN crash by re-ordering callback initialization
Bug:
20868163
Change-Id: I8e3bb844b96b762f90a85d8d9d678a1a9cec9c32
Andre Eisenbach [Fri, 5 Dec 2014 17:40:20 +0000 (09:40 -0800)]
Bluetooth native dumpsys logging support (2/5)
Includes support for BTSnoop logging in memory.
Bug:
18508263
Change-Id: I175da528cbcdc00d40622647d518a74210cfe6fd
Andre Eisenbach [Mon, 11 May 2015 18:49:59 +0000 (11:49 -0700)]
Only register key types with uinput that we can actually map
Bug:
20641307
Change-Id: I40cb1e22c35963429481a2cc9da897b5b2f554fe
Pavlin Radoslavov [Sat, 9 May 2015 02:39:31 +0000 (19:39 -0700)]
Elimininate unnecessary calls for releasing the wake lock.
Bug:
20884459
Change-Id: Id010cb29cf09b95800dc9f5fd5b660e71e4a47bc
David Stevens [Wed, 29 Apr 2015 17:44:04 +0000 (10:44 -0700)]
Handle lack of service better
- Set the service availability flag during ciev events
- Don't drop AT+COPS and AT+CNUM events on the floor if there is no
service. Instead, send fake OK responses up the stack.
Bug:
20127723
Change-Id: Id2d9ae8c5df5b5372e50e804e44ed51657b2a4a9
Miao Chou [Sat, 30 May 2015 04:16:19 +0000 (21:16 -0700)]
gn-build: Build net_test_device using GN + ninja
This CL adds gtest dependency to device/BUILD.gn to enable building
net_test_device using GN + ninja.
Bug:
21444879
Change-Id: I3760511d884f7b3562f86abcec96f679704ef2f4
Arman Uguray [Fri, 29 May 2015 22:30:13 +0000 (15:30 -0700)]
gn-build: Get bluetooth.default.so to compile
Now that most of the modules here are compiled in their own static libraries,
there is no need to include their sources from main/BUILD.gn. This CL cleans
this up and adds all the missing dependencies for the //main:bluetooth.default
shared library target. Missing includes and non-Android compile errors have
always been fixed.
BUG=
21339022
Change-Id: Ibcc693d5ff17aa9c446db777d4b9fbb706f8c7dd
Arman Uguray [Fri, 29 May 2015 22:49:34 +0000 (15:49 -0700)]
gn-build: Get //bta:bta to compile
This CL gets the //bta:bta target to compile using GN + ninja.
BUG=
21339022
Change-Id: I98e7ab732515b638f4f0c356a62f218ec223662a
Arman Uguray [Fri, 29 May 2015 22:27:58 +0000 (15:27 -0700)]
gn-build: Get btif to compile as its own module
This CL adds support to build //btif:btif as its own target as a static library
by introducing a new module-level BUILD.gn file, adding missing includes, and
conditionally compiling code that is Android-specific (depends on libcutils).
This removes/breaks some functionality on non-Android builds since the
corresponding features are missing until we have a more unified replacement.
BUG=
21339022
Change-Id: Ibb0372da45f256c55fa894fdda3d70319ea008c9
Arman Uguray [Fri, 29 May 2015 22:24:14 +0000 (15:24 -0700)]
gn-build: Get //udrv:udrv to compile
This patch gets the //udrv:udrv target to compile using GN + ninja as its own
build target. Since this module only contains a single file, keeping it as a
"source_set".
Change-Id: I98c3b78b374f4102b2e6e565841eaa474bef9056
Arman Uguray [Fri, 29 May 2015 22:21:43 +0000 (15:21 -0700)]
gn-build: Get //embrdv/sbc to compile
This CL builds the SBC codec that lives in embdrv/sbc to compile as a static
library. Unlike the Android build that creates two separate libraries for the
encoder and the decoder, the GN build creates a single static library.
BUG=
21339022
Change-Id: I9f12e63339c850d26f49a3756526a185ca7fec8d
Arman Uguray [Fri, 29 May 2015 22:18:11 +0000 (15:18 -0700)]
gn-build: Compile audio.a2dp.default.so
This patch adds the build file to get the audio.a2dp.default shared module to
compile using GN + ninja.
BUG=
21339022
Change-Id: I2c39ee49ca01f023c73b3fa675f6d9d2dc80e133
Arman Uguray [Fri, 29 May 2015 22:10:45 +0000 (15:10 -0700)]
gn-build: Get //utils:utils to compile
This CL conditionally removes the dependency on libcutils to get the
//utils:utils static library target to compile in GN. This technically breaks
the functionality on non-Android platforms until we come up with a common way to
make the logic work.
BUG=
21339022
Change-Id: I47cd8f7991942dbe43a577cef1f95626560f7f72
Arman Uguray [Fri, 29 May 2015 22:07:51 +0000 (15:07 -0700)]
gn-build: Get //stack:stack to compile
This CL adds a missing include to get the //stack:stack target to compile.
BUG=
21339022
Change-Id: Ie41816514c97ddcb1e4f1f0b9481364a563d8b9b
Arman Uguray [Fri, 29 May 2015 22:01:38 +0000 (15:01 -0700)]
gn-build: Get HCI and net_test_hci to compile
This CL fixes the HCI module so that the HCI static library and the net_test_hci
unit test can be compiled using GN + ninja.
BUG=
21339022,
21444689
Change-Id: If3d8649b25297880e5e674a2026badb1b0e01fee
Arman Uguray [Fri, 29 May 2015 21:43:20 +0000 (14:43 -0700)]
gn-build: Clean up GN files
Removed unnecessary library and include flags from build files. To make the
initial build outputs more similar to Android, this CL changes the usage of the
GN "source_set" idiom to "static_library". This comes at a performance loss
while keeping the builds similar until we get the whole stack to compile.
BUG=
21339022
Change-Id: I46f70b3b64b2537634a1dbb517a5168566230efb
Arman Uguray [Fri, 29 May 2015 21:30:42 +0000 (14:30 -0700)]
gn-build: Add tinyxml2 as a secondary source
Added tinyxml2 as a secondary source. Moved //build/secondary/testing to
//build/secondary/third_party in the process. This means that all third_party
sources (gtest, tinyxml2) should be placed in a top-level third_party directory.
BUG=
21339022
Change-Id: If324ef1eb0d5061e005f62a80d23fef25e7e78a4
Marie Janssen [Wed, 27 May 2015 19:36:23 +0000 (12:36 -0700)]
build: Build net_test_btcore using GN + ninja
Changes needed:
- add gtest dependency
- add includes to allow build on Goobuntu Trusty
Bug:
21444625
Change-Id: Ic2495258681c6b93de8d4ddb5dfff2c24248b979
Arman Uguray [Fri, 29 May 2015 21:46:30 +0000 (14:46 -0700)]
gn-build: Add missing global compiler flags
This CL introduces compiler flags that enable stripping of unused symbols out of
static libraries at the linking stage. This is used by the Android build to keep
module dependencies small while building specialized executables (such as unit
tests).
Also added a preprocessor definition for the EXPORT_SYMBOL macro, recently
introduced by icoolidge@.
BUG=
21339022
Change-Id: I7d3f9f64abc1f4e080196c18ccb893443ee1b64a
Ian Coolidge [Thu, 28 May 2015 16:45:38 +0000 (16:45 +0000)]
Merge "Fix use-after-free while setting advertisement data."
Ian Coolidge [Tue, 21 Apr 2015 23:25:08 +0000 (16:25 -0700)]
Set default symbol visibility to 'hidden'.
Bug:
20427982
Change-Id: I003469d6dfce681a38baa71b5709236a1a4a2189
Ian Coolidge [Thu, 21 May 2015 02:59:10 +0000 (19:59 -0700)]
Fix use-after-free while setting advertisement data.
Producer context was freeing data buffers without
performing a deep copy on the passed structure.
Also added some const correctness so we can reason
about the state of btif_adv_data_t as its data
gets associated with the advertising instance.
Bug:
21343750
Change-Id: Ifea0209e8426b61d8456c299c836ba640bd30f31
Arman Uguray [Thu, 21 May 2015 20:52:25 +0000 (13:52 -0700)]
build: Build net_test_osi using GN + ninja
This CL adds support to build the net_test_osi target using GN + ninja.
The BUILD.gn file now pulls in gtest as a dependency. Missing libc
includes have been added to sources that prevented compilation on
Goobuntu (14.04).
The osi/include/log.h header has been modified to conditionally call the
Android log utilities vs plain-old printf on non-Android builds.
BUG=
21339022
Change-Id: If3c356360c56c63b3bf551b41dc8d3269d8e7e09
Arman Uguray [Thu, 21 May 2015 20:39:18 +0000 (13:39 -0700)]
build: Add build arguments for libhardware and core dirs
This patch adds GN arguments to add libhardware and core library include
paths in a generic manner.
Example args.gn file:
libhw_include_path = "../../libhardware/include"
core_include_path = "../../core/include"
Also introduced in this CL is the "OS_GENERIC" preprocessor define, that
will allow us to conditionally compile Android-specific vs generic code
until we shed the Android-specific dependencies.
BUG=
21339022
Change-Id: I42b1cc501738653a6e886a0365c9cbef2e9a525e
Arman Uguray [Thu, 21 May 2015 20:20:01 +0000 (13:20 -0700)]
build: Add gtest as a secondary source
As a temporary solution, this CL introduces gtest as a secondary build
source. For now, gtest can be included in testonly targets as a direct
GN target dependency, by placing the gtest source under "testing/gtest"
at the root of the tree.
Moving forward, we can use solutions like gclient to pull in external
dependencies such as gtest, or we can depend on it being available on
the system.
BUG=
21339022,
21340407
Change-Id: I80ab3a81a53d7c29d54857a8d0cd9677fed77549
Arman Uguray [Tue, 26 May 2015 21:50:36 +0000 (14:50 -0700)]
build: Add missing copyright headers to new GN build files
BUG=
21339022
Change-Id: I946fad7bf8116054f9081e064748793e79a6f85a
Scott James Remnant [Thu, 21 May 2015 17:28:22 +0000 (17:28 +0000)]
Merge "Initial attempt at a GN/Ninja-based build system"
Chih-Hung Hsieh [Mon, 18 May 2015 21:36:21 +0000 (14:36 -0700)]
Include gki.h to get correct function declarations.
BUG:
21119653
Change-Id: I8e4caf1946f525ea57fadf003ca3fd7d303976cb
Scott James Remnant [Tue, 12 May 2015 20:58:49 +0000 (13:58 -0700)]
Initial attempt at a GN/Ninja-based build system
BUG=
20491586
Andre Eisenbach [Sat, 9 May 2015 00:42:10 +0000 (17:42 -0700)]
Fix compilation on platforms with BLE_INCLUDED == FALSE
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
Chih-Hung Hsieh [Mon, 11 May 2015 21:02:26 +0000 (21:02 +0000)]
Merge "Work around clang/llvm compilation problems."
Brian Carlstrom [Fri, 8 May 2015 04:54:08 +0000 (21:54 -0700)]
Resetting system/bt
git reset --hard
fa5fec7c98ff3c56bd825bc51a1d28bdc3bad0bb^^
git reset --soft aosp/master
git commit -a
Change-Id: I2939d9bbd825110a42a71008e5255945e38a77e1
Chih-Hung Hsieh [Mon, 4 May 2015 19:12:39 +0000 (12:12 -0700)]
Work around clang/llvm compilation problems.
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: Ib1d6e2ef86c255ba87c1d51f9fdeabe5c8de2ada
(cherry picked from commit
23546918662bba21937c4f8fb4c3373588710b5c)
David Stevens [Thu, 7 May 2015 17:32:10 +0000 (17:32 +0000)]
Merge "Handle lack of service better" into mnc-dev
Satya Calloji [Tue, 31 Mar 2015 20:24:32 +0000 (13:24 -0700)]
LE low power scan feature
LE low power extended scan feature stack changes
based on Google BLE spec v0.95
Bug:
20029342
Change-Id: I1db2d9bb648295340d0e93ca89d27e1b938d33d3
Andre Eisenbach [Thu, 7 May 2015 05:32:05 +0000 (05:32 +0000)]
Merge "Increases number of LE multi-advertiser instances supported" into mnc-dev
Nitin Arora [Thu, 30 Apr 2015 18:47:21 +0000 (11:47 -0700)]
Increases number of LE multi-advertiser instances supported
Change-Id: I0d43b3922b2b5dc8c57511d908f45dfe8d8f1b9c
Andre Eisenbach [Thu, 7 May 2015 04:49:35 +0000 (21:49 -0700)]
Fix compilation on some platforms with LE disabled
Change-Id: Iabbb20b111beaaaef8a465f6917b4286e1b93972
Nitin Arora [Fri, 1 May 2015 00:20:27 +0000 (17:20 -0700)]
Fix allocation of instance ID for LE services
Defers the incrementing of the total services count after the allocation
of the instance ID for the service. If the increment is not deferred,
the current service is compared with its own instance in the cached
service list while allocating the instance ID. This leads to an
incorrect instance ID being allocated for the service.
Change-Id: I547888ae0f7015cfdb9b1a995373523699642a6c
David Stevens [Wed, 29 Apr 2015 17:44:04 +0000 (10:44 -0700)]
Handle lack of service better
- Set the service availability flag during ciev events
- Don't drop AT+COPS and AT+CNUM events on the floor if there is no
service. Instead, send fake OK responses up the stack.
Bug:
20127723
Change-Id: Id2d9ae8c5df5b5372e50e804e44ed51657b2a4a9
Andre Eisenbach [Tue, 5 May 2015 19:36:12 +0000 (19:36 +0000)]
Merge "Ensure PAN is initialized before invoking callbacks" into mnc-dev
Andre Eisenbach [Tue, 5 May 2015 18:39:28 +0000 (11:39 -0700)]
Ensure PAN is initialized before invoking callbacks
Fix minor conditional check and clean up surrounding code.
Bug:
20717705
Change-Id: I581fda37708062327c86cc0548b2665c9811be25
Pavlin Radoslavov [Tue, 5 May 2015 01:28:52 +0000 (18:28 -0700)]
Fix a memory corruption issue when processing AVRCP packets.
As a side effect of the memory corruption, the AVRCP metadata
information was not visible.
Apparently, the bug was in a very old (almost unchanged) code,
and it was triggered because the rest of the code has evolved.
Bug:
20108272
Change-Id: I28466edf6a2fbfc31cfb46d74d03b6c0399f8594
Andre Eisenbach [Fri, 1 May 2015 20:14:59 +0000 (13:14 -0700)]
Use BTM structures for LE pairink keys and store LTK
The long term key (LTK) was not assigned to the correct struct element
before saving the key to NVRAM.
Change-Id: Icfce82f5b70518e725875771756edde0b9caeb88
Nitin Arora [Fri, 1 May 2015 20:11:28 +0000 (13:11 -0700)]
Stop media task alarm when task is exiting
Bug:
20717705
Change-Id: I76e76cf33d7c9f4366f921daf2230e4f681098f7
Andre Eisenbach [Thu, 30 Apr 2015 22:29:57 +0000 (15:29 -0700)]
Change "ltk" to "pltk" and "csrk" to "pcsrk"
To clarify local/peer key deliniation.
Change-Id: I79573015c80456ce3287acfe5551a6881ff581b2
Andre Eisenbach [Thu, 30 Apr 2015 05:27:15 +0000 (22:27 -0700)]
Fix LE pairing LTK storage issue
Two separate issues prevented the correct LTK from being storred in
non-volatile storage and thus prevented an LE device from working after
Bluetooth was restarted:
1. tBTM_SEC_BLE_KEYS contained a field "pltk" which stored the LTK, but
downstream the field "ltk" in the same structure was used to access
the key.
2. The structure element p_key_value was not deep-copied for
BTA_DM_BLE_KEY_EVT events, causing data corruption and instabilities.
This patch addresses both issues.
Bug:
20091926
Change-Id: I9f9481a44bfe83cacd351f9e578451e77b573564
Andre Eisenbach [Wed, 29 Apr 2015 18:25:50 +0000 (11:25 -0700)]
Add LE device to device database before adding LE keys
A small bug in btif_read_le_key() would prevent a paired LE device from
being added back into the internal device database after reboot, causing
the security keys not being loaded.
Also added a debug statement to trace keys being loaded.
Bug:
20091926
Change-Id: Id2d6c69497857edc21e2d4c6a67ad9e8dadabcaa
Nitin Shivpure [Tue, 28 Apr 2015 07:19:04 +0000 (12:49 +0530)]
Fix PAN initialization
Change-Id: I32d8975f0f6e1ea18a361a19260ffea7a3ec8467
Andre Eisenbach [Tue, 28 Apr 2015 08:56:38 +0000 (01:56 -0700)]
Keep track of pending LE background connections
In order to only scan for peripherals when we have pending background
connections, we need to keep track of devices that have been added to
the whitelist.
Bug:
20091926
Change-Id: Id7b1861829d984c150d69371ebd13f7d52d3093c
Chaojing Sun [Wed, 22 Apr 2015 20:40:21 +0000 (13:40 -0700)]
Cross transport key mapping fixes
Change-Id: I22d97303054eccc876c4a9c7c0a50e369ff4fa62
Etan Cohen [Fri, 24 Apr 2015 20:42:20 +0000 (13:42 -0700)]
Merge commit '
1c00656' into merge2
Etan Cohen [Fri, 24 Apr 2015 20:41:56 +0000 (13:41 -0700)]
Merge commit '
00e8f5e' into merge2
Change-Id: Ifa83bd342458eba33fdd11a9db38d2f9e818b759