OSDN Git Service
TreeHugger Robot [Mon, 29 Aug 2016 21:51:21 +0000 (21:51 +0000)]
Merge "Disable auto-pairing for hands-free devices" into nyc-dev
Andy Hung [Thu, 28 Jul 2016 17:45:54 +0000 (10:45 -0700)]
audio_a2dp_hw: Always update frame counter in out_write
Required now that we always return success.
Bug:
30025777
Change-Id: I7db51321672c128039545cc0fb604c615f169bc3
(cherry picked from commit
f4a37b255d1d6fa4cf7cefe2aeb1c3f4fdf33f3c)
Andre Eisenbach [Thu, 7 Jul 2016 16:58:59 +0000 (09:58 -0700)]
Disable auto-pairing for hands-free devices
Fixes:
30004157
Change-Id: Id170856fbee5ea345f02f55d3a6e3376d846c2de
(cherry picked from commit
e8b81851c33095fe3b3ac78329073309be5421e1)
Andre Eisenbach [Mon, 27 Jun 2016 22:49:53 +0000 (15:49 -0700)]
Add Subaru and Nissan car kits to auto pair blacklist
Bug:
29157087
Change-Id: If227963b939a9b0ed55e6d900364c71932d3cfe8
Andre Eisenbach [Thu, 23 Jun 2016 23:14:53 +0000 (16:14 -0700)]
A2DP media task: Flush full TX queue on congestion
Currently, our TX queue does not allow for quick recovery of minor
congestion. As we only clear as much room in the queue as is needed to
fix the news frames needed for a given timer tick, any minor congestion
on the TX path can result in single frames to be dropped over an
excessively long amount of time.
From the "just rip the band-aid off" school of thought, drop the whole
queue instead to cause a single drop-out on congestion and catch up to
the live stream immediately, hoping that the stream recovers...
Bug:
29601962
Change-Id: I482c3cfef6d8b51143e54733eb2da5f70663636f
Andre Eisenbach [Fri, 24 Jun 2016 17:16:52 +0000 (17:16 +0000)]
Merge "Remove SBC frame scrambling" into nyc-dev
Andre Eisenbach [Thu, 23 Jun 2016 22:25:44 +0000 (15:25 -0700)]
Remove SBC frame scrambling
Bug:
29601962
Change-Id: I30ce09f1c7550a1be9fd1c8ed70745f9aa0cdb44
Andre Eisenbach [Thu, 23 Jun 2016 21:22:35 +0000 (14:22 -0700)]
Remove log spam in btif_gattc_update_properties
Bug:
29601962
Change-Id: I4a86b786609b0203a72b750a1c4a38c82fcc5f97
Sharvil Nanavati [Wed, 22 Jun 2016 01:19:12 +0000 (01:19 +0000)]
resolve merge conflicts of
1f433cb to mnc-dr-dev am:
f15ca6d21d -s ours am:
8e80a26078
am:
edb7ce120e
Change-Id: Ie7ea41474e11479b54ba526294977dfaa60c8cd7
Sharvil Nanavati [Wed, 22 Jun 2016 01:16:24 +0000 (01:16 +0000)]
resolve merge conflicts of
1f433cb to mnc-dr-dev am:
f15ca6d21d -s ours
am:
8e80a26078
Change-Id: I54a690024ccd316058d9d59ff7b16206f7fcd543
Sharvil Nanavati [Wed, 22 Jun 2016 01:13:44 +0000 (01:13 +0000)]
resolve merge conflicts of
1f433cb to mnc-dr-dev
am:
f15ca6d21d -s ours
Change-Id: Ic1a23e2c6d0284b9fdf346a681f59cdcbaa599e0
Sharvil Nanavati [Tue, 21 Jun 2016 22:56:42 +0000 (15:56 -0700)]
resolve merge conflicts of
1f433cb to mnc-dr-dev
Change-Id: I7278875d21c59316217cb1b99d902f4fc248ca06
Sharvil Nanavati [Tue, 21 Jun 2016 02:16:12 +0000 (19:16 -0700)]
DO NOT MERGE Fix potential DoS caused by delivering signal to BT process
Bug:
28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Matadeen Mishra [Wed, 3 Feb 2016 12:43:39 +0000 (18:13 +0530)]
L2CAP: Handle invalid HCI packets
- Handled Buffer over flow for uint16_t
- 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
Steps:
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.
Bug:
29498064
Change-Id: I6f93c80244fc39d607ad285185136bbbca83d7ae
Pavlin Radoslavov [Thu, 16 Jun 2016 23:37:57 +0000 (16:37 -0700)]
Add missing NULL pointers assignments
Each pointer that was freed by one of the following functions should
be reset to NULL:
- config_free()
- data_dispatcher_free()
- fixed_queue_free()
- list_free()
Bug:
29421693
Change-Id: Ie55a04ed986393994564edcf872d7413b0767a85
(cherry picked from commit
8cbc291080730cd7d04990a8fc0e11249b06aa08)
Andy Hung [Wed, 15 Jun 2016 02:58:58 +0000 (19:58 -0700)]
Improve BT HAL write response to BT server reads
By polling, we ensure the socket buffer is nearly always full,
as blocking socket writes may not wake in time to avoid underflow.
Bug:
28286313
Change-Id: I056768dbd860993c41d44c33a4846d62c50db933
TreeHugger Robot [Wed, 15 Jun 2016 00:28:58 +0000 (00:28 +0000)]
Merge "HOGP: Clear pending operations for a given device on connect" into nyc-dev
TreeHugger Robot [Tue, 14 Jun 2016 23:28:20 +0000 (23:28 +0000)]
Merge "HOGP: Preffer write command over write requests" into nyc-dev
Jakub Pawlowski [Tue, 14 Jun 2016 22:03:29 +0000 (22:03 +0000)]
Merge "Use UINT16 for GATT attribute id field" into nyc-dev
Jakub Pawlowski [Tue, 14 Jun 2016 21:40:51 +0000 (14:40 -0700)]
HOGP: Preffer write command over write requests
Some HID devices will accept both write request and write command.
Prefer write commands when possible.
This is due to bug in some hardware, that will not send write response
when too many commands are queued.
Bug:
29184976
Change-Id: I5bafc067f044a48f152c60b8e17722067bc1453e
Jakub Pawlowski [Tue, 14 Jun 2016 19:47:52 +0000 (12:47 -0700)]
Use UINT16 for GATT attribute id field
Id field is equal to attribute handle, so it must be 16bits.
Otherwise only piece of GATT database can be used.
Bug:
29253825
Change-Id: Ia88e3ad3eb96ca8e97349aa5e852e66c57072b49
Jakub Pawlowski [Tue, 14 Jun 2016 19:23:44 +0000 (12:23 -0700)]
Fix missing GATT Characteristic from last service
GATT Service is contained between start and end handle. If
characteristic definition is at end handle, and it's value definition is
after end handle, it will not be properly discovered. That's because we
use value_handle instead of attribute_handle to identify
characteristics.
As a workaround, increase service boundary if value is defined after
it's definition.
Bug:
29253825
Change-Id: Ib145aea4f5cf38a1fbb977c301136e16f8f900f7
Jakub Pawlowski [Mon, 13 Jun 2016 17:30:17 +0000 (10:30 -0700)]
HOGP: Clear pending operations for a given device on connect
If there are any HID operations scheduled after disconnect, mark the
device as no longer executing after establishing connection. Otherwise
we'll be unable to send any HID commands to it.
Change-Id: Ie1bb622388a3bcb574dec3dde76ef4518ee1102f
Jakub Pawlowski [Fri, 10 Jun 2016 23:32:26 +0000 (16:32 -0700)]
HOGP: Clear pending operations for a given device on disconnect
If there are any GATT operations interrupted by a disconnect, mark the
device as no longer executing. Otherwise we'll stil receive data from
the device, but we'll be unable to send any HID commands to it.
Bug:
29184976
Change-Id: I489f41c970abad0ff1145005d3250beafa83d27e
AnubhavGupta [Wed, 6 Apr 2016 06:17:05 +0000 (11:47 +0530)]
Do not request AVRC_CAP_COMPANY_ID if A2DP Sink is not enabled
Also fixed AVRC_PDU_GET_PLAY_STATUS timeout response.
Bug:
28177785
Change-Id: Icde64a5c1806453850abe101f9707fff61566566
(cherry picked from commit
1c512b851d76deac860fce1232e4a1fa1a097f1c)
Srinu Jella [Wed, 8 Jun 2016 10:20:53 +0000 (15:50 +0530)]
Set disable timer in case of any active ACL connection
Use Case: Disable time out when atleast one active ACL connections
Steps:
1. Turn ON Bluetooth
2. Connect to any Headset
3. Turn OFF bluetooth.
Failure: Turn OFF bluetooth is failed when atleast one active ACL connections
Root Cause:i If we have one or more active ACL links, so it is not notitying
BTA_DM_DISABLE_EVT to upper layer.
Fix: Set disable timer in case of any active ACL connection
Bug:
29217385
Change-Id: Ica47717119f1ab9fa9f4f5244e8483c408276a2a
(cherry picked from commit
3e4f01ada8c1627bd48f31cd0c8269984b8e5f96)
TreeHugger Robot [Wed, 8 Jun 2016 22:03:23 +0000 (22:03 +0000)]
Merge "btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result" into nyc-dev
TreeHugger Robot [Wed, 8 Jun 2016 01:30:28 +0000 (01:30 +0000)]
Merge "Fix payload size for GATT Read by type request" into nyc-dev
Pankaj Kanwar [Wed, 8 Jun 2016 01:28:49 +0000 (01:28 +0000)]
Merge "Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel" into nyc-dev
Subramanian Srinivasan [Fri, 27 May 2016 23:32:55 +0000 (16:32 -0700)]
Fix payload size for GATT Read by type request
Payload size for GATT Read by type request for UUID32 and UUID128
are incorrectly allocated. This leads to memory overflow when
Read by type request is sent for them and eventually results
in crash during free. This change makes sure that the payload
can accomodate upto 128 bit UUID.
This crash is observed while running TC_GAR_CL_BV_03_C Qual test
case.
Bug:
29011042
Change-Id: Ib2b41b769b394670099f4549f204e2972f7df876
(cherry picked from commit
7da98621a4dfa8196b8d20e8955ad508f540e5d9)
Venkata Jagadeesh [Fri, 27 May 2016 10:06:20 +0000 (15:36 +0530)]
Reject L2CAP INFO RSP and ECHO RSP on the LE signaling channel
Steps:
Execute TC_LE_REJ_BI_02_C
Failure:
PTS stuck after sending INFO RSP, ECHO RSP on the LE signaling channel
Root Cause:
The Bluetooth stack is not rejecting INFO RSP, ECHO RSP even though
these commands are invalid for the LE signaling Channel.
Fix:
Reject the INFO RSP, ECHO RSP with error L2CAP_CMD_REJ_NOT_UNDERSTOOD.
Bug:
27852645
Change-Id: Ie09f658d606206cbdbea928e8cb6d10332743cf4
(cherry picked from commit
d35bb40dd563e7f37df0a2fa9c0f61d0958b9601)
Myles Watson [Tue, 7 Jun 2016 23:14:18 +0000 (16:14 -0700)]
btm: Restrict EXTENDED_INQUIRY_RESULT to 1 result
The spec only allows one result per event.
Abort processing and return if the spec is not followed.
Bug:
29141745
Change-Id: Ic414b28adadec274779b0d953d12d499a619aff6
Signed-off-by: Myles Watson <mylesgw@google.com>
Nitin Arora [Tue, 15 Mar 2016 22:00:36 +0000 (15:00 -0700)]
Remote device changes for SMP certification
Use Case:
Certification test cases for SMP require various scenarios
where the remote device needs to show a specific behavior
where it fails the pairing in a certain way, and the DUT is
required to abort the pairing properly.
In abcense of a proper PTS suite to execute these test cases,
we can use another device running the same host by configuring
certain run time property.
Test Cases:
TP/SCJW/BI-02-C
TP/SCJW/BV-02-C
TP/SCPK/BI-03-C
TP/SCPK/BI-04-C
TP/SCPK/BV-02-C
TP/SCPK/BV-03-C
TP/SCJW/BI-01-C
TP/SCCT/BV-01-C
TP/SCCT/BV-02-C
TP/SCPK/BI-01-C
TP/SCPK/BI-02-C
TP/SCPK/BV-04-C
TP/SCPK/BV-01-C
Fix:
Added a property in the bt_stack.conf file. The property name
is "SmpFailureCase". The values 2 to 6(inclusive), are forcausing SMP
failures with various failure reasons.
Failure case 1 and 9 are for producing error "Confirm value failure".
Cases 7 and 8 are for generating specific errors at pair cancel.
Note:
The default use of this feature is controlled using a compile
time flag BTM_BLE_SMP_CERTIFICATION.
The BTM_BLE_SMP_CERTIFICATION = TRUE is needed only while we
wait for the PTS support for the LE Secure connections.
Bug:
27852645
Change-Id: I1f7a8ff2659d85b5978b75870c57162a34d394d0
(cherry picked from commit
0bd0c8fc88a7141691a7ca839b11cb711945ee33)
Pankaj Kanwar [Tue, 7 Jun 2016 00:09:01 +0000 (00:09 +0000)]
Merge "Revert "DO NOT MERGE Proper construction of AVDTP general reject message"" into nyc-dev
Pankaj Kanwar [Tue, 7 Jun 2016 00:07:46 +0000 (00:07 +0000)]
Merge "Clear BLE block from device records at unpair" into nyc-dev
Nitin Arora [Mon, 25 Apr 2016 21:47:51 +0000 (14:47 -0700)]
Clear BLE block from device records at unpair
Use Case:
Pair and unpair LE remote device repeatedly. The repair
intermittently fails with the error "DHKey Check Failure"
Failure:
Pairing failure is observed when pairing is performed
after unpairing, without performing a BT reset.
Further analysis of the SMP logs indicate that DUT uses the
static address of the remote device for calculation of the
MacKey value. At the time of pairing, the remote RPA should
be used (and the static address has not yet been distributed either).
The problem is caused by the previous dev record which is left in
the stack, and at the time of repair, stack picks the old device
record and reuses it.
Fix:
This change removes the entire BLE block from the device record,
after the unpairing is performed, so that a new device record
is allocated, after the repairing is done.
Bug:
27852645
Change-Id: I8d605d1bb3b1c32061a8d8a7a7fe0fe200030abc
JivakDhadse [Fri, 7 Aug 2015 13:28:38 +0000 (18:58 +0530)]
Revert "DO NOT MERGE Proper construction of AVDTP general reject message"
This reverts commit
2ed10d442266eade44be121cd24fd473c85007d0.
Original change needs to be reverted to align with Errata
ESR04 where "Section 8.17, General Reject Page 71" of adopted
AvDTP Spec is changed to have "Invalid Signal Identifier"
in first 6 bits of Octet 1.
This change helps passing PTS case TP/SIG/SMG/ESR04/BI-28-C
Bug:
27852645
Change-Id: Idfc960ce00662e8aacc26f3b3fdca9deca8a2aff
Navin Kochar [Fri, 18 Mar 2016 06:34:30 +0000 (12:04 +0530)]
Fix for issue introduced due to rebase of LE L2CAP COC
During
6721232 patch, some code got missed while doing manual rebase.
This patch is adding that missing code.
Bug:
27852645
Change-Id: I2525908c29e3288e0ace1ee26c5f2aa6cfd59d68
Signed-off-by: Navin Kochar <navin.kochar@intel.com>
Andre Eisenbach [Mon, 30 May 2016 19:00:46 +0000 (12:00 -0700)]
HID: Check for EINTR in uhid_event() and fix return value evaluation
uhid_event() returns 0 in the normal case. Commit
3a2c2d61
results in the polling thread to be exited.
Bug:
28942565
Change-Id: Id0aff2958bc7c2704ba340aa0ff7848afb8dcf80
Pavlin Radoslavov [Fri, 27 May 2016 19:07:06 +0000 (12:07 -0700)]
Update the HCI unit test if BT_CLEAN_TURN_ON_DISABLED is TRUE
Bug:
28614494
Change-Id: I3f4a923f9e14faef57b2d694bfc253fd10749414
(cherry picked from commit
7496372239773b7121359a34291681b749beda5f)
Jakub Pawlowski [Thu, 26 May 2016 22:13:04 +0000 (15:13 -0700)]
Add minimum LE connection timeout that can be used for HID devices
Fixes:
28979841
Change-Id: I520608a13224601fb9101d00c08b34cdb0f8d374
Pavlin Radoslavov [Thu, 26 May 2016 01:08:29 +0000 (18:08 -0700)]
Remove the RFComm MCB from the ports when releasing it
Bug:
28849621
Change-Id: I3ce1c857d0d0a2c00c59d8f71b40685ae602dc29
(cherry picked from commit
1f9eb3d62c78bae8b429a48f71629d6e53f9fc87)
Jacky Cheung [Wed, 18 May 2016 22:41:09 +0000 (15:41 -0700)]
Improve config file sync during configuration save.
Add fsync() calls to force sync to disk while saving configuration
file. It is necessary to do a sync on the temp file before rename,
and to sync again on its parent directory to ensure both the
file content and the directory are up-to-date.
Bug:
27354612
Change-Id: I3a862ad59c8ae5beb8ea2c727eb5f275a2d5823e
(cherry picked from commit
95dbe03a693f4a920204b8c6acbba5269915a59f)
Ayan Ghosh [Mon, 11 Nov 2013 13:55:16 +0000 (19:25 +0530)]
Limit number of SBC frames to fit into single MTU
- Calculate number of SBC frames to fit into single MTU for EDR capable
remote devices. This makes sure the maximum utilization of the
available bandwidth, keeping the bitrate at high quality.
- This change helps to address the discrepancy seen with a few available
2 Mbps headsets which set the AVDTP media MTU size greater than the
2DH5 packet payload size which eventually forces AVDTP packets to get
fragmented in the controller. This change ensures packing of the SBC
frames in a way that AVDTP packet size fits within the 2DH5 payload
size.
- As packet size is restricted to meet the required bit rate more than
one AVDTP packet can be sent to the controller in a given iteration
based on the bit rate requirement.
Bug:
24875861
Change-Id: Icae7656ad563bbbdef65ecbfa15a89b26cf9edb2
Jakub Pawlowski [Tue, 24 May 2016 22:16:05 +0000 (22:16 +0000)]
Merge "Fix crashes in btif_sendmsg when worqueue not initialized" into nyc-dev
Ajay Panicker [Tue, 24 May 2016 22:15:52 +0000 (22:15 +0000)]
Merge "Add guest mode functionality (2/3)" into mnc-dev am:
4439d380e5 am:
99bbe2fffe -s ours am:
34619f8e30
am:
84970d1300
* commit '
84970d13000623b266a72433474c4c2ae6abd3c6':
Add guest mode functionality (2/3)
Change-Id: I8e26f8bb0fa6898427507dfc888dfb6fd743fcac
Ajay Panicker [Tue, 24 May 2016 22:13:00 +0000 (22:13 +0000)]
Merge "Add guest mode functionality (2/3)" into mnc-dev am:
4439d380e5 am:
99bbe2fffe -s ours
am:
34619f8e30
* commit '
34619f8e30adb98a2a605665b02df16a9fda6032':
Add guest mode functionality (2/3)
Change-Id: I00a7ad9675ba8e3f68e2066aca2fd1a5baaf06db
Ajay Panicker [Tue, 24 May 2016 22:10:22 +0000 (22:10 +0000)]
Merge "Add guest mode functionality (2/3)" into mnc-dev am:
4439d380e5
am:
99bbe2fffe -s ours
* commit '
99bbe2fffe98c57295a26d35b30e15c432d6a1e3':
Add guest mode functionality (2/3)
Change-Id: Ie493166a8d452f2892bb96323b23527efe053dd7
Ajay Panicker [Tue, 24 May 2016 22:02:04 +0000 (22:02 +0000)]
Merge "Add guest mode functionality (2/3)" into mnc-dev
am:
4439d380e5
* commit '
4439d380e5e2ec3c24b04f7eba1bcbceae78191a':
Add guest mode functionality (2/3)
Change-Id: Ia13560babbc18e2ee290e16f9b03fb5202894c23
Ajay Panicker [Tue, 24 May 2016 21:53:32 +0000 (21:53 +0000)]
Merge "Add guest mode functionality (2/3)" into mnc-dev
Jakub Pawlowski [Tue, 24 May 2016 16:15:50 +0000 (09:15 -0700)]
Fix crashes in btif_sendmsg when worqueue not initialized
Instead of crashing whole stack when trying to post task to
uninitialized queue, log error message. This can happen in two cases:
stack is not initialized yet, or we're shutting down and already cleaned
up the workqueue thread.
Bug:
28889608
Change-Id: I9b8652d27abc2489b2489997c928634b68433a3e
Jakub Pawlowski [Mon, 23 May 2016 21:47:48 +0000 (14:47 -0700)]
Don't disconnect on failure to register for service changed notification
Bug:
28721625
Change-Id: I2214fb2576f0f0794922ed9b47d8805839d69bfd
TreeHugger Robot [Thu, 19 May 2016 22:39:37 +0000 (22:39 +0000)]
Merge "Improve poll(2) handling and log messages" into nyc-dev
Pavlin Radoslavov [Wed, 18 May 2016 21:34:31 +0000 (14:34 -0700)]
Improve poll(2) handling and log messages
* Better error handling and log messages inside
uipc_flush_ch_locked()
* Add missing error check inside UIPC_Read()
* Add missing OSI_NO_INTR() wrapper around poll()
inside function btu_exec_tap_fd_read()
Bug:
28823662
Change-Id: I5f1c720861bea594d53ed6465a5ff327ba352598
Pavlin Radoslavov [Wed, 18 May 2016 21:30:53 +0000 (14:30 -0700)]
Add error log messages for A2DP commands
Bug:
28823662
Change-Id: Ifa9950dd2277b444bedd5108beff2db029a5ed93
TreeHugger Robot [Wed, 18 May 2016 23:31:07 +0000 (23:31 +0000)]
Merge "Add L2CAP signaling headers and more ACL data to btsnooz" into nyc-dev
Andre Eisenbach [Tue, 17 May 2016 04:49:23 +0000 (21:49 -0700)]
Add L2CAP signaling headers and more ACL data to btsnooz
Increase the BTSNOOZ log buffer to 256kb and adds complete L2CAP
signaling headers as well as more data per ACL data packet. This will
allow additional RFCOMM debugging.
Fixes:
28845518
Change-Id: I19e1a4a40bb1c8d332a25283fb50635d791bc275
Pavlin Radoslavov [Tue, 17 May 2016 00:14:03 +0000 (17:14 -0700)]
Add a log message to capture NULL pointer in l2c_link_hci_disc_comp()
Added a log message inside l2c_link_hci_disc_comp() to help capture
a NULL pointer p_lcb->p_fixed_ccbs[xx] that triggers SIGSEGV crash.
Also, updated the typedef of bdstr_t and moved it to
file "btcore/include/bdaddr.h"
Bug:
28765514
Change-Id: Iacd9376cfb9e18b58e18865581da8edad9f68821
Pavlin Radoslavov [Tue, 17 May 2016 23:46:29 +0000 (23:46 +0000)]
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR am:
f9a4d9e8bf -s ours
am:
529f7e35ff -s ours
* commit '
529f7e35ff204c641f822e318770e8240d1ae570':
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR
Change-Id: I79ab95e5cd139dc99183f398bec5fe5ca2fbd38c
Pavlin Radoslavov [Tue, 17 May 2016 23:42:42 +0000 (23:42 +0000)]
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR
am:
f9a4d9e8bf -s ours
* commit '
f9a4d9e8bf63b006bec9c30f6dc430ac5d30a85b':
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR
Change-Id: I982345259966a2d7108a6a9699b3f71cb6d2e26f
Pavlin Radoslavov [Thu, 12 May 2016 18:36:44 +0000 (11:36 -0700)]
DO NOT MERGE ANYWHERE Restart failed system calls interrupted with errno of EINTR
In number of places we don't handle properly system calls failures
when the errno is EINTR (i.e., the system call was interrupted
by a signal). In all our use cases, the system calls should be
restarted. The handling of the following system calls (as used in the code)
has been updated/fixed:
poll, send, recv, sendmsg, nanosleep, epoll_wait
read - mostly (e.g., socket-like fds)
write - mostly (e.g., socket-like fds)
select, accept, connect
Bug:
28471477
Bug:
28658141
Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
Pavlin Radoslavov [Sat, 14 May 2016 04:10:22 +0000 (21:10 -0700)]
Add missing arguments to log messages
Bug:
28769522
Change-Id: I37c2b8400619646a8711099cf0bd369c3cf8eb51
Marie Janssen [Mon, 16 May 2016 18:04:27 +0000 (18:04 +0000)]
DO NOT MERGE btif: check overflow on create_pbuf size am:
ad31ee0f0f am:
d47ab963e1 am:
6f6949ff93
am:
fae8da3f76 -s ours
* commit '
fae8da3f76947e30f4e65baddf8867956eb5dc45':
DO NOT MERGE btif: check overflow on create_pbuf size
Change-Id: I050ce836c311c54efab4f7e495f42901cd0a0d4e
Marie Janssen [Mon, 16 May 2016 18:02:02 +0000 (18:02 +0000)]
DO NOT MERGE btif: check overflow on create_pbuf size am:
ad31ee0f0f am:
d47ab963e1
am:
6f6949ff93
* commit '
6f6949ff93d3e370cf72b0e18673a7749bfdfa0f':
DO NOT MERGE btif: check overflow on create_pbuf size
Change-Id: I1ed5ea4b978e5f9b6628a5443a0acc3e61c297d7
Marie Janssen [Mon, 16 May 2016 17:59:28 +0000 (17:59 +0000)]
DO NOT MERGE btif: check overflow on create_pbuf size am:
ad31ee0f0f
am:
d47ab963e1
* commit '
d47ab963e1b6afd164bcfb051fe55ec47c1d211d':
DO NOT MERGE btif: check overflow on create_pbuf size
Change-Id: I839427756e92067e8c54822988648a85e537cc27
Marie Janssen [Mon, 16 May 2016 17:57:02 +0000 (17:57 +0000)]
DO NOT MERGE btif: check overflow on create_pbuf size
am:
ad31ee0f0f
* commit '
ad31ee0f0f03953064cc503314d5e39d687af50a':
DO NOT MERGE btif: check overflow on create_pbuf size
Change-Id: I77748f8ce26e15cf87f53cf3a34a11ecc19471f5
Ajay Panicker [Thu, 12 May 2016 22:52:01 +0000 (15:52 -0700)]
Add sync to write the backup file to the filesystem
Bug:
27354612
Change-Id: I5a7751b6f08831d43647391774501f211336e9eb
Jakub Pawlowski [Fri, 13 May 2016 20:09:08 +0000 (13:09 -0700)]
Fail gracioulsy when GATT_MAX_APPS reached
Bug:
28677905
Change-Id: I092494ab3f9e9ae4330d5d2a6f6ef010c61fe2a4
Marie Janssen [Thu, 12 May 2016 22:30:16 +0000 (15:30 -0700)]
DO NOT MERGE btif: check overflow on create_pbuf size
Bug:
27930580
Change-Id: Ieb1f23f9a8a937b21f7c5eca92da3b0b821400e6
Ajay Panicker [Thu, 12 May 2016 18:03:39 +0000 (11:03 -0700)]
Add config logging, make parsing stricter, and move sync
The functions that parse the config file will report failure if
the config file is improperly formatted or is missing the necessary
Adapter section. Also moved sync to sync the filesystem after the
config file is saved.
Bug:
27354612
Change-Id: Ia75ff628d83bdc933c4bc16761d6c55eef19b757
Eric Laurent [Thu, 12 May 2016 01:18:54 +0000 (18:18 -0700)]
audio HAL: improve control socket error handling
Implement retry upon control socket receive error
in a2dp_ctrl_receive() if EAGAIN or EINTR.
Implement recovery from previous socket error in
a2dp_command().
Increase socket receive timeout to account for
headsets will long activation time.
Fixed state update error in start_audio_datapath()
in case the data socket is already opened.
Added missing mutex around state updated in oput_write()
and in_read()
Made read and write code symmetric.
Bug:
28727517
Change-Id: I68d7fe63f298bbd1e387ec42fdb1277b2dcdfef5
TreeHugger Robot [Thu, 12 May 2016 23:30:32 +0000 (23:30 +0000)]
Merge "Restart failed system calls interrupted with errno of EINTR" into nyc-dev
Pavlin Radoslavov [Thu, 12 May 2016 18:36:44 +0000 (11:36 -0700)]
Restart failed system calls interrupted with errno of EINTR
In number of places we don't handle properly system calls failures
when the errno is EINTR (i.e., the system call was interrupted
by a signal). In all our use cases, the system calls should be
restarted. The handling of the following system calls (as used in the code)
has been updated/fixed:
poll, send, recv, sendmsg, nanosleep, epoll_wait
read - mostly (e.g., socket-like fds)
write - mostly (e.g., socket-like fds)
select, accept, connect
Bug:
28471477
Bug:
28658141
Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
Marie Janssen [Wed, 11 May 2016 21:58:48 +0000 (14:58 -0700)]
btif: only save config when bonded devices change
Bug:
27354612
Change-Id: I15f816c85d3ab1991abf076f7c1ae2914d773d54
Jacky Cheung [Thu, 12 May 2016 18:40:44 +0000 (18:40 +0000)]
DO NOT MERGE ANYWHERE SMP: Delay authorization complete. am:
8c519caec3 -s ours
am:
731684b29a -s ours
* commit '
731684b29a6603e3c6b22e80229d49f46c44a56c':
DO NOT MERGE ANYWHERE SMP: Delay authorization complete.
Change-Id: I01ba378fc44a2e273ef2cd53787ddc6504de38b8
Jacky Cheung [Thu, 12 May 2016 18:38:06 +0000 (18:38 +0000)]
DO NOT MERGE ANYWHERE SMP: Delay authorization complete.
am:
8c519caec3 -s ours
* commit '
8c519caec3908ce20832ce4c756f2514158da132':
DO NOT MERGE ANYWHERE SMP: Delay authorization complete.
Change-Id: I1dbfbc0b3f5cddecd18f604f5d4d0271777ce02a
Jacky Cheung [Wed, 11 May 2016 19:17:31 +0000 (12:17 -0700)]
DO NOT MERGE ANYWHERE SMP: Delay authorization complete.
Delay authorization complete during Bond Pending state in SMP.
Instead of automatically advancing the Bond Pending state, create
a 500ms window to allow the slave to stop pairing by sending over
the Pairing Failed command during the Bond Pending state.
BUG:
28475887
Change-Id: I164e8312fdf9170d0f36caf404fc42e293ed5d79
TreeHugger Robot [Wed, 11 May 2016 20:29:53 +0000 (20:29 +0000)]
Merge "Add additional VW car kits to absolute volume blacklist" into nyc-dev
Andre Eisenbach [Wed, 11 May 2016 19:21:41 +0000 (12:21 -0700)]
Add additional VW car kits to absolute volume blacklist
Change-Id: I8b0b73595e9183b9c1540b06e9e0378312c6a63d
Fixes:
25613423
Andre Eisenbach [Wed, 11 May 2016 19:06:17 +0000 (19:06 +0000)]
DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition am:
d7ec6c9c59 -s ours
am:
2e2ef67bcf -s ours
* commit '
2e2ef67bcfe9eff2e24bd336a589c17392ec9ba6':
DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition
Change-Id: Ife87fe9a7bb266daddf4407d1ec5adaf4eba3e22
Andre Eisenbach [Wed, 11 May 2016 19:01:31 +0000 (19:01 +0000)]
DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition
am:
d7ec6c9c59 -s ours
* commit '
d7ec6c9c59aab205a1e90fd1db3f98431e983dfd':
DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition
Change-Id: Ida3953705286386634d27d00ceef540090ecc533
Andre Eisenbach [Wed, 11 May 2016 03:27:20 +0000 (20:27 -0700)]
DO NOT MERGE ANYWHERE Fix double mutex unlock and if() condition
Commit "L2CAP and SDP Search API for BT profiles (2/2)" introduced two
separate issues in btsock_rfc_signaled():
1. The "slot_lock" potentially gets unlocked twice, causing
undefined behaviour.
2. The call to BTA_JvRfcommWrite() was incorrectly taken outside
of the conditional if() block that only executes the code if
data is available.
This patch reverts the relevant locking change and fixes the if()
condition.
Bug:
27204458
Change-Id: I63b1257d21ca7bdd248858ec67e28f64e37a7895
(cherry picked from commit
2d7ddd09c163c84eacddd101cf08fd8021a35370)
Andre Eisenbach [Wed, 11 May 2016 18:20:26 +0000 (18:20 +0000)]
Merge changes I693b0596,Ib5a05c47,I1da213fd,I32cd6412,If62f334d, ... into nyc-dev
* changes:
PTS: Read SMP pairing options from bt_stack.conf
PTS: Avoid BR SDP after LE pairing
PTS: Allow disabling connection updates
PTS: Add a Secure Only mode.
Changes to allow LE key upgrade
Allow C++ code to check bt_stack_config options
Sharvil Nanavati [Wed, 11 May 2016 17:23:52 +0000 (17:23 +0000)]
Merge "Fix double mutex unlock and if() condition" into nyc-dev
Jakub Pawlowski [Wed, 11 May 2016 16:08:02 +0000 (16:08 +0000)]
Merge "Change initial order of commands after establishing an LE connection" into nyc-dev
Nitin Arora [Sat, 12 Mar 2016 00:37:51 +0000 (16:37 -0800)]
PTS: Read SMP pairing options from bt_stack.conf
Use Case:
A number of cenrtification test cases require the host
to change the pairing options including auth request,
I/O capabilities, key distribution mask, key length
and Out of band capability.
Test Case: TP/PKE/BV-02-C
Failure:
Host currently only supports fixed SMP options and only
a few test cases involving pairing, are executed due
to that limitation.
Fix:
Added changes to read the SMP options from the bt_stack.conf
file at run time.
The pairing options are entered as a comma separated list eg:
SMPOptions=0xD,0x4,0xf,0xf,0x10
where the included hex values are in the following order:
\#auth, io, ikey, rkey, ksize
If all 5 options are not present, the host falls back to the
default values
Bug:
27852645
Change-Id: I693b05966695cf4660c5da10249c5f7c0663e53a
Nitin Arora [Fri, 11 Mar 2016 02:27:24 +0000 (18:27 -0800)]
PTS: Avoid BR SDP after LE pairing
Use Case: Certification test case requiring LE secure pairing
with PTS.
Test Case: TP/SCJW/BV-01-C
Failure:
While pairing with PTS for certification test cases, LE secure
pairing followed by BR/EDR cross key derivation results in the
host initiating the SDP to gather the remote BR/EDR services.
PTS considers it as a test failure.
Fix: Added run time flag in bt_stack.conf file
"PTS_DisableSDPOnLEPair" to disable the SDP immidiately after
LE pairing followed by cross key derivation.
Bug:
27852645
Change-Id: Ib5a05c47b99c2ef8256967a608ae9ebbdfba60ee
Nitin Arora [Thu, 11 Jun 2015 00:10:57 +0000 (17:10 -0700)]
PTS: Allow disabling connection updates
Use Case: Certification test case requiring LE secure pairing
with PTS.
Failure:
LE pairing test cases follow the host behavior where
connection parameters are switched to fast parameters
for SMP and service discovery and switched back to the
default values after SMP/LE discovery is complete.
PTS disconnects to these series of connection updates.
Fix:
This change disables connection updates based on run time
flag "PTS_DisableConnUpdates" fetched from bt_stack.conf
Bug:
27852645
Change-Id: I1da213fd143ccfcb0ac82c7049a94094d2716ff1
Nitin Arora [Fri, 11 Mar 2016 20:26:51 +0000 (12:26 -0800)]
PTS: Add a Secure Only mode.
Use Case:
Certification test cases require BLE to be in secure only
mode and reject legacy pairing requests.
Test Case: TP/SEC/SEM/BV-28-C
Failure:
Currently the host doesn't have a method of putting host into
a mode where it can only perform secure pairing.
This prevents execution of certification test cases
requiring Secure Only mode.
Fix:
Made changes to read the value of a tag "PTS_SecurePairOnly"
at runtime from the file "bt_stack.conf".
Bug:
27852645
Change-Id: I32cd6412621efeed2cb31c760a031762d9f369f9
Nitin Arora [Tue, 30 Jun 2015 22:04:23 +0000 (15:04 -0700)]
Changes to allow LE key upgrade
Use Case: Certifiation test cases require the LE key upgrade
to happen when the current MITM level of the device has
been upgraded. In that case, a repairing is performed,
leading to more authenticated LTK.
Test Case: TP/SEC/AUT/BV-17-C
Steps:
1. Perform LE pairing between two devices using no MITM.
2. Change the IO capability of the devices, so that a
repair would involve authentication.
3. Reconnect the devices and expect key upgrade.
Failure:
No key upgrade is seen at reconnection and the devices
continue to use the old key.
Fix:
Added changes to re-calulate the requirement of key
upgrade when the LE channel is already encrypted.
Bug:
27852645
Change-Id: If62f334dcf298b2ce9840e95035b4398cb951c84
Myles Watson [Thu, 5 May 2016 18:57:54 +0000 (11:57 -0700)]
Allow C++ code to check bt_stack_config options
Stack configuration options are parsed in C.
Bug:
28485365
Change-Id: I046ef5c676256a8da23bf8c0a7d1eeb1e9603c05
Marie Janssen [Wed, 11 May 2016 03:56:04 +0000 (03:56 +0000)]
resolve merge conflicts of
d266361 to mnc-dr1.5-dev
am:
922654c09e -s ours
* commit '
922654c09e4c114e74090e481a4777a2c393731d':
btif: Don't persist remote devices to the config
Change-Id: Id2e7cc528b34841b092d298a0d13d3bd4f3358cc
Andre Eisenbach [Wed, 11 May 2016 03:27:20 +0000 (20:27 -0700)]
Fix double mutex unlock and if() condition
Commit "L2CAP and SDP Search API for BT profiles (2/2)" introduced two
separate issues in btsock_rfc_signaled():
1. The "slot_lock" potentially gets unlocked twice, causing
undefined behaviour.
2. The call to BTA_JvRfcommWrite() was incorrectly taken outside
of the conditional if() block that only executes the code if
data is available.
This patch reverts the relevant locking change and fixes the if()
condition.
Bug:
27204458
Change-Id: I63b1257d21ca7bdd248858ec67e28f64e37a7895
Jakub Pawlowski [Tue, 10 May 2016 23:43:41 +0000 (16:43 -0700)]
Change initial order of commands after establishing an LE connection
This patch changes order of commands send to LE device after connecting.
This will cause update connection parameters to be send after read
remote version. Having it other way around cause some problems with
broadcom chips, even though it should work both ways.
Bug:
28435172
Change-Id: I8ecf76217b036842e1d9ec7df714da94a99df7d5
Jakub Pawlowski [Tue, 10 May 2016 20:44:49 +0000 (20:44 +0000)]
Merge "Change initial order of commands after establishing an LE connection" into nyc-dev
Jakub Pawlowski [Tue, 10 May 2016 20:29:59 +0000 (13:29 -0700)]
Change initial order of commands after establishing an LE connection
This patch changes order of commands send to LE device after connecting.
This will cause update connection parameters to be send after read
remote features. Having it other way around cause some problems with
broadcom chips, even though it should work both ways.
Bug:
28435172
Change-Id: I280993d40b63d41729f5a8ccf246809c3abf617d
Lianchao Song [Tue, 10 May 2016 15:38:56 +0000 (15:38 +0000)]
DO NOT MERGE ANYWHERE Do not update sco_state when no matching peer_addr is found am:
5130f53 -s ours
am:
6ded1cbed4 -s ours
* commit '
6ded1cbed4df0d4552103b1df190651dea55d7c8':
DO NOT MERGE ANYWHERE Do not update sco_state when no matching peer_addr is found
Change-Id: I6bcc41f6a5e8470f8ff514350d4043b3e4a08620
Alain Vongsouvanh [Tue, 10 May 2016 15:38:55 +0000 (15:38 +0000)]
Merge "DO NOT MERGE ANYWHERE Bring back support for legacy bt_config.xml" into cw-e-dev am:
debb9bf -s ours
am:
8fd9b7f82e -s ours
* commit '
8fd9b7f82e5907d0e5d491a0191c88ebd49cba9d':
DO NOT MERGE ANYWHERE Bring back support for legacy bt_config.xml
Change-Id: I21ffcd61c64c4e7d915b9aff721477dec85e9ebe
Zhao Xuewen [Tue, 10 May 2016 15:38:54 +0000 (15:38 +0000)]
DO NOT MERGE ANYWHERE Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect. am:
7cd14dc -s ours
am:
78d9f31d73 -s ours
* commit '
78d9f31d73caeeab3b1cc7645082d9ca9a8eff53':
DO NOT MERGE ANYWHERE Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
Change-Id: Ie91872eb8022f827230e7c39a75f497f4ba758c1
Marie Janssen [Tue, 10 May 2016 15:38:54 +0000 (15:38 +0000)]
DO NOT MERGE Check size of pin before replying am:
f0a69c3 am:
d016a5e am:
0c841c8
am:
9d8e2f6a49 -s ours
* commit '
9d8e2f6a498b966db73f45c5098e8dd13133d0d6':
DO NOT MERGE Check size of pin before replying
Change-Id: I87d3d4a73e309a0e4989c2cf53e9f78c54b0e6e6