OSDN Git Service
Srinu Jella [Tue, 7 Jul 2015 16:17:02 +0000 (16:17 +0000)]
am
42f37840: SDP: Validate input UUID\'s length
* commit '
42f37840a891eddfee0943fbdf84c2e4f0d765c5':
SDP: Validate input UUID's length
Andre Eisenbach [Tue, 7 Jul 2015 16:17:02 +0000 (16:17 +0000)]
am
97269982: Remove extraneous patch from secure connections workaround
* commit '
97269982095f2da252d667542688d98e5fee128f':
Remove extraneous patch from secure connections workaround
Srinu Jella [Tue, 7 Jul 2015 16:17:01 +0000 (16:17 +0000)]
am
f1029c7a: Remove stored link key for temporarily paired devices
* commit '
f1029c7afb9b4c9fcf95b3f98ce9c68b10d5a02c':
Remove stored link key for temporarily paired devices
Srinu Jella [Thu, 24 Jul 2014 14:24:32 +0000 (19:54 +0530)]
SDP: Validate input UUID's length
Use case: Crash observed during BT IOT testing
1. Try to pair to the remote device.
2. Connect to the remote device's audio profiles.
3. Remote device has given the wrong UUID's length.This will leads to crash.
Failure: crash observed during profile connection
Root cause: Remote sent invalid UUID length,which is causing crash
in comparison logic.
Fix: Validate input UUID's length before going for actual comparison.
Bug:
19417758
Change-Id: I8216d17e3f6cc22dfbeca4b31972b5b5584a73ea
Andre Eisenbach [Tue, 7 Jul 2015 05:27:00 +0000 (22:27 -0700)]
Remove extraneous patch from secure connections workaround
Bug:
21817410
Change-Id: I55b3753b0ae9f389f1531bb588c4868e96842aeb
Srinu Jella [Tue, 2 Sep 2014 10:12:11 +0000 (15:42 +0530)]
Remove stored link key for temporarily paired devices
Problem: Device shows up in paired list during just work pairing
1. Create a connection from DUT to remote.
2. Remove the link key in remote.
3. Send a file from remote to DUT.
4. Turn OFF BT. Turn ON.
Failure: Device should not move to paired list after BT on/off
as device removed from UI during just work pairing
Root cause: remote device is not removed from btif but
its removed from UI during justworks pairing
Fix: remote device is removed from btif during justworks
pairing to sync up UI and btif paired list
Bug:
19417758
Change-Id: I73de0a94c4f7ada644d258790a9e3e4bf11fc4e5
Tucker Sylvestro [Tue, 7 Jul 2015 00:40:41 +0000 (00:40 +0000)]
am
1192df9f: Save all snoop logs when BtSnoopSaveLog=true
* commit '
1192df9f7e709b9d9508ac86cbf5099a3a7ffa0e':
Save all snoop logs when BtSnoopSaveLog=true
Tucker Sylvestro [Mon, 6 Jul 2015 23:29:06 +0000 (19:29 -0400)]
Save all snoop logs when BtSnoopSaveLog=true
Previously, only the last snoop log was saved, which was often not
enough if the bluetooth stack was in a crash loop or an app was
resetting it frequently.
Bug:
22202788
Change-Id: I74622ceabe9ce12d5ba03c640c37f697d5a5bb01
Andre Eisenbach [Mon, 6 Jul 2015 23:01:25 +0000 (23:01 +0000)]
am
7927f68b: Blacklist Nexus Remote for LE secure connections
* commit '
7927f68bb2d9b963288261e1e858463b43c52a2d':
Blacklist Nexus Remote for LE secure connections
Nitin Arora [Mon, 6 Jul 2015 23:01:25 +0000 (23:01 +0000)]
am
4f6c9b4f: Use correct transport type while encrypting link
* commit '
4f6c9b4f68d152baf7aa029cbe9b570994584101':
Use correct transport type while encrypting link
Andre Eisenbach [Thu, 2 Jul 2015 23:14:28 +0000 (16:14 -0700)]
Blacklist Nexus Remote for LE secure connections
The Nexus remote will disconnect during encryption when paired with the
secure connections feature enabled. This patch will blacklist the remote
and mask out the feature during pairing.
This patch introduces a new interop database with the aim of
consolodating various blacklists and interop workarounds into a single
database for code readability and maintainability of the list.
Bug:
21817410
Change-Id: I6f510e1c8c6050ab4e313209122d028e12e5f54f
Nitin Arora [Tue, 9 Jun 2015 22:30:18 +0000 (15:30 -0700)]
Use correct transport type while encrypting link
This patch uses the transport type from the GATT event instead
of using the device type stored in NVRAM, to determine the
transport type while encrypting the link. The issue is seen
with dual mode devices, when the connection on LE transport
causes encryption request on the BR/EDR transport
Bug:
21652097
Change-Id: I895756f9c0048b5a559ea00f633b1100109e52b8
Andre Eisenbach [Mon, 6 Jul 2015 16:56:19 +0000 (16:56 +0000)]
am
d69bef4e: Merge "Prevent LE remote name request during inquiry" into mnc-dev
* commit '
d69bef4e26accb3ed85db244c442a4e028927ea8':
Prevent LE remote name request during inquiry
Andre Eisenbach [Mon, 6 Jul 2015 16:45:30 +0000 (16:45 +0000)]
Merge "Prevent LE remote name request during inquiry" into mnc-dev
Nitin Arora [Fri, 11 Jul 2014 21:33:05 +0000 (14:33 -0700)]
Prevent LE remote name request during inquiry
This change prevents the LE RNR at the end of inquiry. This prevents
extra LE connections created during BT scan, to fetch remote name,
which will be performed later during connections.
Bug:
22228981
Change-Id: Ied61bc192cec611e7b2f41e474c5f032ed9f0981
Priti Aghera [Mon, 6 Jul 2015 16:01:39 +0000 (16:01 +0000)]
am
8e928b4a: Set random identity only if enhanced privacy is supported
* commit '
8e928b4ad152c6b2713147067e02327f3bbedde6':
Set random identity only if enhanced privacy is supported
Priti Aghera [Wed, 1 Jul 2015 20:27:57 +0000 (13:27 -0700)]
Set random identity only if enhanced privacy is supported
Change Own address type to Random identity only if controller supports enhanced
privacy. Check if controller supports enhanced privacy before changing own adress type
and peer address type to 0x02 or 0x03 in auto connection.
Privacy 4.1 only supports Public and Random address.
Bug:
20817308
Change-Id: I9f5531e4e41c824426cd64de517b44355ac2655d
Pavlin Radoslavov [Thu, 2 Jul 2015 00:46:54 +0000 (00:46 +0000)]
am
9345c8fd: Use the correct memory free function within HCI layer shutdown
* commit '
9345c8fd0dae6d1c1954c9d2e29ad57fcf5015ad':
Use the correct memory free function within HCI layer shutdown
Pavlin Radoslavov [Wed, 1 Jul 2015 04:39:11 +0000 (21:39 -0700)]
Use the correct memory free function within HCI layer shutdown
The entries on the "command_queue" are allocated by osi_calloc()
hence they should be deallocated by osi_free()
Bug:
21784321
Change-Id: Ic6e13dbafef2c6ac79ce74ebfc4db702c9ef04c5
Evgenii Stepanov [Tue, 30 Jun 2015 01:53:30 +0000 (01:53 +0000)]
am
df81c3aa: Add missing library dependency.
* commit '
df81c3aaadee7a5f91e5d993cc823d4e65db25db':
Add missing library dependency.
Evgenii Stepanov [Mon, 29 Jun 2015 20:59:44 +0000 (13:59 -0700)]
Add missing library dependency.
Fixes the following link error in SANITIZE_TARGET=address build for
hammerhead:
system/bt/audio_a2dp_hw/audio_a2dp_hw.c:208: error: undefined reference
to 'osi_socket_local_client_connect'
Bug:
21785137
Change-Id: Ie29a2772e7f1a4f697d895eb29b01d39d6f9c651
Andre Eisenbach [Sun, 28 Jun 2015 17:30:12 +0000 (17:30 +0000)]
am
fa3c1214: Fix possible null-pointer de-reference in bta_gattc_util
* commit '
fa3c1214f5b006edced961a66c758b8b47b0f482':
Fix possible null-pointer de-reference in bta_gattc_util
Andre Eisenbach [Sat, 27 Jun 2015 05:30:33 +0000 (22:30 -0700)]
Fix possible null-pointer de-reference in bta_gattc_util
Bug:
21756298
Change-Id: I4bd38f6fa594ccb4dd9f23f3887484743a3bc451
Pavlin Radoslavov [Sat, 27 Jun 2015 03:22:35 +0000 (03:22 +0000)]
am
3a2fa83d: Copy an AVRC packet before sending a response back
* commit '
3a2fa83dac1b07b661a20e2412aad9bf81492106':
Copy an AVRC packet before sending a response back
Pavlin Radoslavov [Fri, 26 Jun 2015 21:44:12 +0000 (14:44 -0700)]
Copy an AVRC packet before sending a response back
Don't reuse AVRC buffers for responding back. Apparently,
in the AVRC packets we transmit the offset with the payload must
be at least 15 octets. If the original buffer is not large enough,
this results in memory corruption.
Also, use an explicit check for 'bt_rc_ctrl_callbacks' as a workaround
until the upper layer does the right thing with the callbacks registration.
Bug:
22006014
Change-Id: I28c248d1580bdddbda76298d19faadf8985187fc
Tucker Sylvestro [Thu, 25 Jun 2015 21:26:52 +0000 (21:26 +0000)]
am
dd2021c6: Always ACK indications in the event of an error
* commit '
dd2021c65b8a1a14e67e4f23628b3e15faf9fdcc':
Always ACK indications in the event of an error
Tucker Sylvestro [Thu, 18 Jun 2015 22:14:25 +0000 (18:14 -0400)]
Always ACK indications in the event of an error
This works around a race condition in which the just-connected remote
device sends the local device an indication before the appropriate
handle/device/etc. has been added to the cache. Previously we were
dropping that indication, which led to the remote device timing out
and disconnecting some time after the connection had been successfully
established.
Bug:
21026847
Change-Id: Iea43e7c93e48b5e7a7e78a1c3fb591d6fe972fc3
Pradeep Panigrahi [Thu, 25 Jun 2015 17:42:19 +0000 (17:42 +0000)]
am
d9663b2d: Set idle timeout to zero when removing fixed channel
* commit '
d9663b2d7ab5457cb9ab6fe39dcadb191e8f1012':
Set idle timeout to zero when removing fixed channel
Avish Shah [Thu, 25 Jun 2015 17:21:49 +0000 (17:21 +0000)]
am
8bc9ca59: Resolved incorrect AV startup sequence
* commit '
8bc9ca592a1c80d50f85b4dafba24ba2394b4ab7':
Resolved incorrect AV startup sequence
Pradeep Panigrahi [Tue, 16 Jun 2015 04:32:50 +0000 (10:02 +0530)]
Set idle timeout to zero when removing fixed channel
Use Case:
1) pair and Connect to HOGP mouse
2) Disconnect from setting menu.
Failure:
Disconnect is not sent immediately
Root Cause:
While disconnecting we start lcb's default timeout of 4 seconds before
disconnecting the link. Since we are removing fixed channels associated
to a remote, setting idle timeout to 0 for immediate disconnection.
Bug:
21877809
Change-Id: I39fedb6cac6f952149cb2722d028115fbdc20b70
Avish Shah [Thu, 25 Jun 2015 12:31:33 +0000 (18:01 +0530)]
Resolved incorrect AV startup sequence
Issue:
-> In AV start-up sequence, State machine initialization was being
called after enabling Btif A2dp service.
-> In that case, State machine handle will be empty and it will
prevent enable and register events to enter into BTIF.
-> Because of the absence of enable/register events, AV module in
stack will be unaware of upper layer registration and will not
proceed for connection.
Fix:
-> Changed the sequence in AV start-up, initialized State machine
first before dispatching any events to State machine.
-> So, the handle will not be empty and will not block events like
BTA_AV_ENABLE_EVT and BTA_AV_REGISTER_EVT to enter into BTIF.
Bug:
21451237
Change-Id: I5d47e20ed68ea5730a7c149c316446eb8a1d41af
Miao Chou [Thu, 25 Jun 2015 01:12:36 +0000 (01:12 +0000)]
am
10969128: build: Eliminate cutils/sockets dependencies from system/bt
* commit '
109691281c0135fd4298debcdec37fdc5855261e':
build: Eliminate cutils/sockets dependencies from system/bt
Miao Chou [Wed, 10 Jun 2015 00:39:46 +0000 (17:39 -0700)]
build: Eliminate cutils/sockets dependencies from system/bt
Eliminate cutils/sockets dependencies by pulling sources files from
core/libcutils into osi/.
- Pulled source files from cutils/ into osi/ and modified GN files and
Android.mk
- Updated includes to use the headers in osi/ and removed unused/duplicated
headers.
- Renamed the functions of osi/sockets and updated wherever they are called
to avoid usign symbols from cutils/sockets, since other cutils
dependencies have not been eliminated yet.
Bug:
21667795
Change-Id: I3dd4371d585f120d97ac0433ab1f35edb820dbb9
Subramanian Srinivasan [Wed, 24 Jun 2015 01:00:12 +0000 (01:00 +0000)]
am
641e21a5: HOGP: Clear allocated memory for unmatched HID reports
* commit '
641e21a5389dd3765364f52a15a4a302a99fa360':
HOGP: Clear allocated memory for unmatched HID reports
Subramanian Srinivasan [Thu, 12 Feb 2015 00:55:12 +0000 (16:55 -0800)]
HOGP: Clear allocated memory for unmatched HID reports
Prevents GKI Exception in BT stack when phone enters suspended state
after performing HOGP device connection by clearing the allocated
memory when write to an unmatched report is done.
Bug:
22028876
Change-Id: Ia6ca9405142410e894c7ebe84d8827ffdc7659ba
Nitin Arora [Wed, 24 Jun 2015 00:12:50 +0000 (00:12 +0000)]
am
ea8292ea: SMP state machine fix for passkey entry
* commit '
ea8292eab91f90c7f917252d27aeab2f5a2393e0':
SMP state machine fix for passkey entry
Nitin Arora [Wed, 24 Jun 2015 00:12:49 +0000 (00:12 +0000)]
am
11e6c293: Configure Bluetooth Low Energy scan parameters correctly
* commit '
11e6c2939f63398e86757d08eac32ef1d4f89fdf':
Configure Bluetooth Low Energy scan parameters correctly
Satya Calloji [Wed, 24 Jun 2015 00:04:30 +0000 (00:04 +0000)]
am
483847a3: Incorrect address type in LE connected event
* commit '
483847a3d46e5a1f3c15c69b8344fb1f20b9972f':
Incorrect address type in LE connected event
Nitin Arora [Mon, 1 Jun 2015 12:24:10 +0000 (05:24 -0700)]
SMP state machine fix for passkey entry
The SMP slave state machine goes on to generate local nonce
after a successful commit, and ignores any commit from the
remote master if received during the generation process.
This change fixes that race condition
Bug:
21896912
Change-Id: I0cc2f1d20f6754d19f8b39fd62e3176007c50f1b
Nitin Arora [Tue, 30 Sep 2014 01:43:27 +0000 (18:43 -0700)]
Configure Bluetooth Low Energy scan parameters correctly
This patch ensures that Bluetooth Inquiry uses the low latency
scan parameters, and the scan params set by the Apps for LE scan
are retained and set at the end of a BT inquiry.
Bug:
21896912
Change-Id: Iaf9e47330393cc1e0c21c625e8e07ce933506983
Satya Calloji [Fri, 19 Jun 2015 17:46:03 +0000 (10:46 -0700)]
Incorrect address type in LE connected event
Enable address resolution to resolve the incoming connection details
to provide the correct address type as part of the LE connection
event.
Bug:
21751039
Change-Id: I148b0ffbfa1a39a32d90f5607362754d1901203f
Srinu Jella [Tue, 23 Jun 2015 23:09:12 +0000 (23:09 +0000)]
am
c5c74107: Set the security mode to secure connections only mode
* commit '
c5c741075fbc36e373f0bec4c3520188d2ba9a38':
Set the security mode to secure connections only mode
Srinu Jella [Tue, 23 Jun 2015 23:09:12 +0000 (23:09 +0000)]
am
f88e742e: Correct the logic of UIPC thread id check
* commit '
f88e742ea5f95a529a1758cb00aea0e58fdb9863':
Correct the logic of UIPC thread id check
Srinu Jella [Fri, 19 Jun 2015 12:20:40 +0000 (17:50 +0530)]
Set the security mode to secure connections only mode
Use case: Test the secure connections only mode PTS test cases.
Test Steps:
1. Call the API BTM_SetSecureConnectionsOnly from BT-IF layer to
put the DUT is under secure connections only mode to execute
the PTS test case TP/SEC/SEM/BV-11-C.
2. Run the required steps for PTS test case.
Failure: Failed to enter into secure connections only mode.
Root Cause: The function BTM_SetSecureConnectionsOnly doesn't set
btm layer security mode variable to only mode and all further checks
are based on that variable.
Fix: Fixed it by setting the security mode variable properly
in the API function.
Bug:
21896912
Change-Id: I21d37e7d24c443c2cbcd72d6f62f5e31fa7cf107
Srinu Jella [Tue, 12 May 2015 14:48:43 +0000 (20:18 +0530)]
Correct the logic of UIPC thread id check
Use case: Check the A2dp play , pause from headset
STR:
Connect to the headset from DUT
Try play , pause from Headset once the song is started playing from headset.
Failure: Bluetooth process crashed due to invalid fd descriptor while
clearing fds using FD_CLR
Root cause: Root cause for this issue is pthread join mechanism for
UIPC thread is not proper ( incorrect logic ), as a result UIPC thread
still running, and A2DP media task will try to start a new UIPC thread
before the previous UIPC read thread is closed, finally sometimes
this scenario leads to this issue. This issue doesn't come always,
if the media task is in process of initiating the fds before staring
the new UIPC thread, and previous UIPC thread is in exiting state.
Fix: Correct the logic of UIPC thread id check while joining the UIPC thread.
Thread id might hold pointer value where it's value is negative vaule with
singed bit is set,so corrected the logic to check against zero or non zero.
Bug:
21896912
Change-Id: I1307d848958656e718e95a972f258526470b1974
Srinu Jella [Tue, 23 Jun 2015 22:43:40 +0000 (22:43 +0000)]
am
bf3e67e7: Reset the pairing state on pairing failure
* commit '
bf3e67e76aa2e7eced6b28669f10b599c08ab931':
Reset the pairing state on pairing failure
Srinu Jella [Tue, 23 Jun 2015 22:33:10 +0000 (22:33 +0000)]
am
ca7e0b1b: Handle connection request to already connected device.
* commit '
ca7e0b1bd428ffa60cc8e49514421be94151f828':
Handle connection request to already connected device.
Srinu Jella [Mon, 13 Oct 2014 12:36:01 +0000 (18:06 +0530)]
Reset the pairing state on pairing failure
Use case: Test the paring scenario with remote device with security mode 3.
STR:
1. Create a connection from Remove dev with Security Mode-3 to DUT.
2. Enter pin key in remote, when pin key pop-up comes in DUT, reject the same.
3. Try to create connection from DUT to Remote dev-2, within 30 seconds.
Failure: Create connection not sent from DUT to remote, even though
there was no pairing taking place
Root cause: As the pairing state is not reset properly it disturbs
the next pairing process.
Reproducible using MecApp test application.
Fix: Reset the pairing state to idle in case stored paring
device matches with the device for which the pairing
failure happened.
Bug:
21896912
Change-Id: I0a9e143a44bb2ae7e296d7d76c1323e517f9cc42
Srinu Jella [Wed, 15 Oct 2014 11:10:02 +0000 (16:40 +0530)]
Handle connection request to already connected device.
Use case: Test the connect collision scenario from DUT and Headset.
STR:
1. Create a connection from DUT to headset, disconnect and unpair the link.
2. Turn OFF and turn ON headset, keep in pairing mode, headset keeps trying
to connect back to DUT.
3. Inquiry in DUT, and connect to headset.
Failure: DUT gets stuck in pairing, whenever there is a clash in
accept_connection and create_connection.
Root cause: When DUT and remote try to connect to each other simultaneously,
an ACL handle is created with first connect request and the second connect
request is also processed.DUT doesn't check whether there is already a
ACL handle present between the devices.
Fix: Fixed the issue by reusing the existing handle and
discarding the second connect request.
Bug:
21896912
Change-Id: I2001bc3b2fa50f827a4e3b41cde91af1ea106c54
Srinu Jella [Tue, 23 Jun 2015 21:50:15 +0000 (21:50 +0000)]
am
c0532307: Allocated requested buffer size in SDP attribute request
* commit '
c0532307d35ac86f5427243809f2c98b4fd8cacd':
Allocated requested buffer size in SDP attribute request
Srinu Jella [Tue, 23 Jun 2015 21:50:15 +0000 (21:50 +0000)]
am
a3dbe938: NULL pointer check in sdpu_build_attrib_entry
* commit '
a3dbe938e519dfbdbfd121b8d7a8473cccfd3e70':
NULL pointer check in sdpu_build_attrib_entry
Srinu Jella [Mon, 22 Dec 2014 14:16:28 +0000 (19:46 +0530)]
Allocated requested buffer size in SDP attribute request
Use case: Allocated required GKI buf in sdp attr req
1. Enter UUID - 0100 for L2CAP or 110C for AVRCP Target so DUT sends
continuation frame for TSPX_sdp_service_search_pattern on PTS
2. Start Test case TP/SSA/BV-06 in PTSv6.0
Failure: Some PTS test cases request less attributes in first packet
and request more attributes in continuation packets.
As stack allocates the buf in start packet and using the same
buf in continuation packets, it's causing buffer corruption and crash
Root cause: Buffer allocated for start packet is not sufficient
in continuation packets
Fix: Fixing this issue by dynamically allocating buffer in continuation
packets of service_search_attr_req and service_attr_req
Bug:
21896912
Change-Id: I8daeffb7d6486c7b916ad2f0505ad422d91a613c
Srinu Jella [Wed, 18 Jun 2014 15:45:55 +0000 (21:15 +0530)]
NULL pointer check in sdpu_build_attrib_entry
Use case: NULL pointer check in sdpu_build_attrib_entry
Crash observed during BT stability test
Failure: Crash observed while accessing p_attr->value_ptr
Root cause: There is no null check for p_attr->value_ptr while
accessing it in sdpu_build_attrib_entry
Fix: Fixing this issue by adding null check for p_attr->value_ptr
while accessing it in sdpu_build_attrib_entry
Bug:
21896912
Change-Id: I1dd352a33ff6f86add7d1b1bfdf240d1b7992b83
Hemant Gupta [Tue, 23 Jun 2015 21:07:25 +0000 (21:07 +0000)]
am
0bcf0c6e: HID: Allow reconnection from Host on paired HID Devices.
* commit '
0bcf0c6e6b5b09b9bc7f856f739e57321120f67b':
HID: Allow reconnection from Host on paired HID Devices.
Nitin Shivpure [Tue, 23 Jun 2015 21:06:30 +0000 (21:06 +0000)]
am
eeb249bd: PAN: Fix to avoid buffer corruption while rebuilding the Bnep header
* commit '
eeb249bd2844a14a5b6914f99bad99a38f165caf':
PAN: Fix to avoid buffer corruption while rebuilding the Bnep header
Hemant Gupta [Mon, 4 Aug 2014 12:37:41 +0000 (18:07 +0530)]
HID: Allow reconnection from Host on paired HID Devices.
Host can send connection request when paired HID device
is in disconnected state. We are not checking the
NORMALLY_CONNECTABLE flags from sdp record, and by default
sending this request from host, for subsequent user initiated
connection to paired remote HID Devices.
If the remote HID is in page scan mode, it will get connected
and if not, connection will fail after retrying until
HID_HOST_MAX_CONN_RETRY times.
Without this patch, if remote hid device sdp record shows that
device's NORMALLY_CONNECTABLE flag is false, host will not be
able to create outgoing connection to remote device even if the
device is in pairing mode until device is unpaired giving bad
user experience.
Bug:
22028876
Change-Id: I2b3c5c25dc7b08ab6ed0c3667897e5ea0f05f914
Nitin Shivpure [Tue, 15 Jul 2014 12:30:21 +0000 (18:00 +0530)]
PAN: Fix to avoid buffer corruption while rebuilding the Bnep header
A case, where 3 remote device (PANU role) is connected with DUT (NAP role).
the one remote (PANU role) send BNEP_COMPRESSED_ETHERNET_DEST_ONLY
packet to DUT (NAP role), which is for another remote device (PANU role).
So DUT (NAP role) forwards this packet to another remote device (PANU role).
As same pbuf is used across the L2CAP/BNEP/PAN layer since reception from
L2CAP to writing on L2CAP CID of another PANU. Sometimes buffer (p_buf) gets
corrupted, when required buffer size is greater than actual buffer size,
while rebuilding the Bnep header.
Using bnep_write instead of bnep_writeBuf to solve the buffer corruption
issue, which allocates the new buffer & append data into it.
This patch also add TRC_BNEP & TRC_PAN into conf file.
Bug:
22028876
Change-Id: I125cab6d3da0f8126605bc7e9f764a27ee72fb1f
Anubhav Gupta [Tue, 23 Jun 2015 18:08:17 +0000 (18:08 +0000)]
am
f799a869: Proper construction of AVDTP general reject message
* commit '
f799a869d9e9d656764b1550fb0162276d772739':
Proper construction of AVDTP general reject message
Anubhav Gupta [Tue, 23 Jun 2015 18:08:04 +0000 (18:08 +0000)]
am
8795a9a1: Delay A2DP HAL out stream open process
* commit '
8795a9a1789c4b32b7a2b99c7c09b4fb4ba3775d':
Delay A2DP HAL out stream open process
Anubhav Gupta [Tue, 23 Jun 2015 18:07:57 +0000 (18:07 +0000)]
am
a0124571: Suspend AVDTP link in remote initiated AVDTP Start
* commit '
a0124571e3d5455448dbfcea7617f583b20210f9':
Suspend AVDTP link in remote initiated AVDTP Start
Anubhav Gupta [Tue, 23 Jun 2015 18:07:56 +0000 (18:07 +0000)]
am
96162b60: A2DP: Use mutex to only to check and set HAL state
* commit '
96162b608ce2ad6d86214d7efd2bcc120d1f079c':
A2DP: Use mutex to only to check and set HAL state
Anubhav Gupta [Wed, 12 Nov 2014 14:25:00 +0000 (19:55 +0530)]
Proper construction of AVDTP general reject message
Build AVDTP general reject message as per AVDTP Specification.
Resolves issue with PTS AVDTP case TP/SIG/SMG/BI-28.
Bug:
21896912
Change-Id: I10e729f099898096f666081f5e5cd8e4a9dc3ae7
Anubhav Gupta [Mon, 14 Apr 2014 08:59:25 +0000 (14:29 +0530)]
Delay A2DP HAL out stream open process
Delay A2DP HAL out stream open process to ensure that the
Headset is in proper state when START is initiated from DUT
immediately after the connection due to ongoing music playback.
Jawbone speaker goes to bad state unless it gets enough time
between AVDTP OPEN and START.
Bug:
22028876
Change-Id: I79a895a85ac7d37208192acf9064fd5c979dd28b
Anubhav Gupta [Mon, 12 Aug 2013 20:07:22 +0000 (01:37 +0530)]
Suspend AVDTP link in remote initiated AVDTP Start
As media player is not started as part of remote initiated
AVDTP start, hence if link is kept in Started state when
remote initiated START is received it unncessarily blocks
power manager to trigger sniff on that link which increases
power number.
Related issue is seen with Moto HS820, Denso08.
These peer devices send AVDTP start on AVDTP connect and
does not suspend causing link not to go to sniff.
This change takes care of sending suspend in such scenarios
DUT initiated start gets triggered when local playback starts.
Moreover this change helps in suspending streaming if remote
initiates avdtp start during an ongoing call. This helps
remote and DUT's a2dp state to be in sync.
Bug:
22028876
Change-Id: I8ebee009c95148cf733e39d897bc8ffe5af7791e
Anubhav Gupta [Thu, 4 Jun 2015 11:24:37 +0000 (16:54 +0530)]
A2DP: Use mutex to only to check and set HAL state
In multi-threaded env A2DP state gets updated to suspended
after checking and before acquiring mutex lock. A2DP State
should be checked inside mutex lock to avoid checking against
inconsistent state.
Moreover this change prevents overwriting of state
from AUDIO_A2DP_STATE_SUSPENDED to AUDIO_A2DP_STATE_STOPPED
which would start the data path when there is data inflow
from audio in suspended state, which is not intended.
This change helps avoiding above wrong actions.
Bug:
22028876
Change-Id: I4fb73c1a6851fa97d539860d5fc0b8022b019bc1
Pavlin Radoslavov [Tue, 23 Jun 2015 02:35:23 +0000 (19:35 -0700)]
resolved conflicts for merge of
4197cfdb to mnc-dev-plus-aosp
Change-Id: I01e295c4f86e821f84e45fbf1985088dd1a5347a
Pavlin Radoslavov [Sat, 20 Jun 2015 02:21:47 +0000 (19:21 -0700)]
Fix the file permissions of /data/misc/bluedroid/bt_config.conf
Fix the file access permissions and group ownership of
"/data/misc/bluedroid/bt_config.conf" so the file can be reused when
switching users on the device.
For that purpose, we need to do the following:
1. Set the set-group-ID (bit 02000) flag for directory "/data/misc/bluedroid"
so the files created in that directory will have group-id of
"net_bt_stack" .
2. Change the file's permissions of file "/data/misc/bluedroid/bt_config.conf"
to Read/Write by User and Group.
Bug:
21493919
Change-Id: I48b73711789734b5221231729f8cd9ff9bb94be7
Anubhav Gupta [Fri, 19 Jun 2015 18:20:55 +0000 (18:20 +0000)]
am
6a27776c: Property based change to qualify TC_INT_SRC_SIG_SMG_BV_23_C
* commit '
6a27776c488dd5ce2d29bce543ee42a12dfad60b':
Property based change to qualify TC_INT_SRC_SIG_SMG_BV_23_C
Anubhav Gupta [Thu, 13 Nov 2014 14:28:09 +0000 (19:58 +0530)]
Property based change to qualify TC_INT_SRC_SIG_SMG_BV_23_C
As Bluedroid AVDTP solution does not use ABORT command
in any of the usecases hence this property based change
is made to pass AVDTP ABORT mandatory TC using PTS.
Affected PTS TC: TC_INT_SRC_SIG_SMG_BV_23_C.
System Property to enable sending ABORT to pass the TC is:
bluetooth.pts.force_a2dp_abort
Bug:
21896912
Change-Id: I71bd11de07b9d8fb15a933712db25f0a93e10dd5
Andre Eisenbach [Thu, 18 Jun 2015 02:03:39 +0000 (02:03 +0000)]
am
ee039728: Add deep copy of AVRCP metadata commands
* commit '
ee03972892ca31fe47a759f69be15dd46b0abefe':
Add deep copy of AVRCP metadata commands
Andre Eisenbach [Tue, 16 Jun 2015 13:58:20 +0000 (19:28 +0530)]
Add deep copy of AVRCP metadata commands
The data structure for RC metadata event contains pointers within.
Added deep copy of the data structures to avoid memory corruption.
Bug:
20017069
Change-Id: Ibc5bc75cfd62abda9611060b5b435bed9e472376
Nitin Arora [Wed, 17 Jun 2015 20:42:24 +0000 (20:42 +0000)]
am
90dcc56c: Disconnect Gatt during failure of service changed discovery process
* commit '
90dcc56c1357f2f0b2fa03638033455d89a8a758':
Disconnect Gatt during failure of service changed discovery process
Anubhav Gupta [Wed, 17 Jun 2015 20:42:23 +0000 (20:42 +0000)]
am
4508f24b: Not Implemented response for unsupported AVRCP commands.
* commit '
4508f24b72ed40b6d0cc320cae8cebade6521b2c':
Not Implemented response for unsupported AVRCP commands.
Nitin Arora [Fri, 20 Mar 2015 01:06:41 +0000 (18:06 -0700)]
Disconnect Gatt during failure of service changed discovery process
Gatt service changed discovery holds link till it completes discovery of service,
characteristics, descriptots and writing notification for characteristic descriptor,
this change takes care of removing the link if service discovery fails during any
stage of this process.
Bug:
21896912
Change-Id: Ie97a039568fedc66403895e7e917e4d72a5419e1
Anubhav Gupta [Wed, 23 Oct 2013 12:23:09 +0000 (17:53 +0530)]
Not Implemented response for unsupported AVRCP commands.
Ensure DUT responds as not implemented for AVRCP
pass-through commands which are not supported by DUT.
This gives right impression to peer device on the correct
set of pass-thorugh commands supported by DUT.
Bug:
21896912
Change-Id: Ie10e74e2a399bb420f55c55005600c945b53bfc2
Nitin Arora [Wed, 17 Jun 2015 19:33:42 +0000 (19:33 +0000)]
am
00ba745e: Use correct UUID for Central Address Resolution characteristic
* commit '
00ba745e3a5f76111db92026c0a2ff9097290fa7':
Use correct UUID for Central Address Resolution characteristic
Nitin Arora [Wed, 10 Jun 2015 23:46:45 +0000 (16:46 -0700)]
Use correct UUID for Central Address Resolution characteristic
This patch rectifies the UUID used for Central Address resolution
characteristic which was earlier assigned the same value as
UUID for service change indication
Bug:
21896912
Change-Id: I2b341413d0a4331584844b54971f7645fd7e438e
Anubhav Gupta [Tue, 16 Jun 2015 21:23:53 +0000 (21:23 +0000)]
am
19165cb5: Reject AVDTP START and SUSPEND request in invalid state
* commit '
19165cb562df83f29f7403b9a0f38b199a2edfb3':
Reject AVDTP START and SUSPEND request in invalid state
Sharvil Nanavati [Tue, 16 Jun 2015 21:23:53 +0000 (21:23 +0000)]
am
fa8c7958: Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
* commit '
fa8c795867b284239eb88970889a145cfa026f78':
Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
Anubhav Gupta [Wed, 6 May 2015 10:54:10 +0000 (16:24 +0530)]
Reject AVDTP START and SUSPEND request in invalid state
Reject remote initiated AVDTP START and SUSPEND request
in invalid state. This helps passing the below PTS cases.
TC_ACP_SRC_SIG_SMG_BI_20
TC_ACP_SRC_SIG_SMG_BI_26
Change-Id: I177456389246df89e7d7560555ffffde0639e618
Sharvil Nanavati [Sat, 13 Jun 2015 09:12:08 +0000 (02:12 -0700)]
Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
This patch improves RFCOMM throughput and reduces CPU utilization.
Instead of using a counting semaphore to measure bytes and reading
one at a time from the eager reader's buffer, read in bulk based
on the incoming read request size.
Change-Id: I17046bfbc3ca49576a9c82b38911aeb84234881a
Sharvil Nanavati [Mon, 15 Jun 2015 23:09:22 +0000 (23:09 +0000)]
am
08019f3e: Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
* commit '
08019f3e6a2430e0631f2524e577e497e420c04e':
Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
Mudumba Ananth [Mon, 15 Jun 2015 22:53:06 +0000 (22:53 +0000)]
am
6efc8233: Fix insufficient buffer size allocation in hci_inject
* commit '
6efc8233c745717562aa6d21bb395494d5d10a01':
Fix insufficient buffer size allocation in hci_inject
Sharvil Nanavati [Sat, 13 Jun 2015 09:12:08 +0000 (02:12 -0700)]
Reduce CPU utilization from ~60% to ~10% on busy HCI reads.
This patch improves RFCOMM throughput and reduces CPU utilization.
Instead of using a counting semaphore to measure bytes and reading
one at a time from the eager reader's buffer, read in bulk based
on the incoming read request size.
Change-Id: I17046bfbc3ca49576a9c82b38911aeb84234881a
Mudumba Ananth [Thu, 4 Jun 2015 13:00:48 +0000 (06:00 -0700)]
Fix insufficient buffer size allocation in hci_inject
A bug in the hci_inject when requesting a buffer to carry the
injected HCI packet. The allocated size should include the BT_HDR
header size.
Change-Id: Ic1fd41264249103140ce50dff843a99a6bd7dbd8
Sharvil Nanavati [Sun, 14 Jun 2015 23:21:28 +0000 (23:21 +0000)]
am
d5137a4b: Merge "Rename alarm->creation to alarm->creation_time for readability."
* commit '
d5137a4b82870b5384b748a1a70d26238d2883e0':
Rename alarm->creation to alarm->creation_time for readability.
Sharvil Nanavati [Sun, 14 Jun 2015 23:02:08 +0000 (23:02 +0000)]
Merge "Rename alarm->creation to alarm->creation_time for readability."
Arman Uguray [Sat, 13 Jun 2015 02:25:54 +0000 (02:25 +0000)]
am
5e5bc23c: service: Fix clang warnings in uuid_test.cpp
* commit '
5e5bc23ca797f9060e5bf382a0d4a80e4952ceba':
service: Fix clang warnings in uuid_test.cpp
Ian Coolidge [Sat, 13 Jun 2015 02:25:44 +0000 (02:25 +0000)]
am
a59e8d1f: Merge "Add bthost, a simple BLE GATT server."
* commit '
a59e8d1f46d9881ba3221afcca732241416e6804':
Add bthost, a simple BLE GATT server.
Arman Uguray [Sat, 13 Jun 2015 02:25:28 +0000 (02:25 +0000)]
am
bb954527: build: Fix ptr <-> integer cast warnings
* commit '
bb95452741bfd65723ea417c25dbd326c7568ab7':
build: Fix ptr <-> integer cast warnings
Arman Uguray [Sat, 13 Jun 2015 02:25:27 +0000 (02:25 +0000)]
am
ecb1b43c: osi: Introduce ptr <-> integer conversion macros
* commit '
ecb1b43c54458de894a570349f371eb4fb2c8b8c':
osi: Introduce ptr <-> integer conversion macros
Arman Uguray [Sat, 13 Jun 2015 02:25:27 +0000 (02:25 +0000)]
am
cab5fc17: gn-build: Remove all -Wno-unused-* flags from build files
* commit '
cab5fc179730ce6910989307680b275195876c4d':
gn-build: Remove all -Wno-unused-* flags from build files
Arman Uguray [Sat, 13 Jun 2015 00:33:34 +0000 (17:33 -0700)]
service: Fix clang warnings in uuid_test.cpp
This CL fixes some clang compile warnings and errors and style issues in
service/uuid_test.cpp
Bug: none
Change-Id: I2d1ecf6e21fe4d6b1741f2a113ed5834518a29c6
Ian Coolidge [Fri, 12 Jun 2015 22:50:56 +0000 (22:50 +0000)]
Merge "Add bthost, a simple BLE GATT server."
Ian Coolidge [Thu, 4 Jun 2015 00:20:30 +0000 (17:20 -0700)]
Add bthost, a simple BLE GATT server.
This is accessible via Unix socket.
It only has a couple of interesting features:
* Built in support for large blob attributes (>512 octets)
* Attribute caching (avoid frame-level IO for IPC clients)
Some string utilies are taken from modp_b64 and Chromium base.
Bug:
21076037
Change-Id: I6a29959159de76f8dd68d6bbaabe2100daabb6fa
Arman Uguray [Wed, 3 Jun 2015 04:11:07 +0000 (21:11 -0700)]
build: Fix ptr <-> integer cast warnings
This CL removes the -Wno-pointer-to-integer-cast and
-Wno-integer-to-pointer-cast flags from GN build files. The resulting errors
were fixed using the following:
1. All ptr <-> integer casts are now done by using the new
PTR_TO_INT/INT_TO_PTR macros defined in osi.h
2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and
include/bt_target.h have been redefined as void* rather than UINT32. This
is better, since "void*" can act as a simple container without any
precision loss that would be caused by a type such as UINT32 on 64-bit
systems. void* inherently is a safer container for all pointer types but
UINT32 isn't.
BUG=
21570302
Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
Arman Uguray [Wed, 3 Jun 2015 02:48:51 +0000 (19:48 -0700)]
osi: Introduce ptr <-> integer conversion macros
This CL introduces macros for safe pointer to integer conversion (and vice
versa). Also fixed a small style issue in log.h
Bug:
21570302
Change-Id: If76bf5e35970f9b33f9bef53fbd03a7effae08dc
Arman Uguray [Tue, 2 Jun 2015 21:56:45 +0000 (14:56 -0700)]
gn-build: Remove all -Wno-unused-* flags from build files
This CL removes the -Wno-unused-variable, -Wno-unused-value, and
-Wno-unused-function flags from all GN build and Android.mk files
(except in test/ & tools/, which are not built using GN yet). Compile
warnings, caused by the newly enabled flags, have been fixed throughout
the code base.
Bug:
21570302
Change-Id: I1c128b62256faa17668124798341005bcd0f7315
Pavlin Radoslavov [Fri, 12 Jun 2015 05:15:35 +0000 (05:15 +0000)]
am
74626115: Re-enable the OSI memory allocation tracker.
* commit '
74626115db17478a12d1d39bcefd5af500fadfda':
Re-enable the OSI memory allocation tracker.
Evgenii Stepanov [Thu, 11 Jun 2015 22:54:00 +0000 (22:54 +0000)]
am
1ab6fd76: Revert previous commit and disable net_test_hci under sanitizers.
* commit '
1ab6fd76ae670029fa3811c93878329dc793cde3':
Revert previous commit and disable net_test_hci under sanitizers.