OSDN Git Service

android-x86/system-bt.git
10 years agoMerge "fix uninitialized fields in tBTM_PM_PWR_MD structs"
Adam Hampson [Tue, 20 May 2014 00:00:32 +0000 (00:00 +0000)]
Merge "fix uninitialized fields in tBTM_PM_PWR_MD structs"

10 years agoam 1e3da5c0: am 919f43b8: Fix ms to ns conversion unit
Matthew Xie [Mon, 19 May 2014 15:05:25 +0000 (15:05 +0000)]
am 1e3da5c0: am 919f43b8: Fix ms to ns conversion unit

* commit '1e3da5c0228e6f32f116da104bef565ea520c1d1':
  Fix ms to ns conversion unit

10 years agoam 919f43b8: Fix ms to ns conversion unit
Matthew Xie [Mon, 19 May 2014 15:01:32 +0000 (15:01 +0000)]
am 919f43b8: Fix ms to ns conversion unit

* commit '919f43b89e9c2a3534b2a52177ff35b670a343f8':
  Fix ms to ns conversion unit

10 years agofix uninitialized fields in tBTM_PM_PWR_MD structs
Adam Hampson [Fri, 16 May 2014 23:41:22 +0000 (16:41 -0700)]
fix uninitialized fields in tBTM_PM_PWR_MD structs

This could potentially cause BTM_SetPowerMode() to take an
incorrect code path.

Change-Id: Ibca83129fffb5fbb64372e991cc433de144d333d
Signed-off-by: Adam Hampson <ahampson@google.com>
10 years agoFix ms to ns conversion unit
Matthew Xie [Fri, 16 May 2014 22:00:57 +0000 (15:00 -0700)]
Fix ms to ns conversion unit

bug 14999968
Change-Id: I38455af24a4127e3915024a38ced758d82d406eb
(cherry picked from commit ac11e391f935cd4255d3956acddecc82236b3bda)

10 years agoMerge "Fix ms to ns conversion unit"
Matthew Xie [Fri, 16 May 2014 22:29:58 +0000 (22:29 +0000)]
Merge "Fix ms to ns conversion unit"

10 years agoFix ms to ns conversion unit
Matthew Xie [Fri, 16 May 2014 22:00:57 +0000 (15:00 -0700)]
Fix ms to ns conversion unit

bug 14999968
Change-Id: I38455af24a4127e3915024a38ced758d82d406eb

10 years agoLE: Add API to set scan interval and window (2/4)
Prerepa Viswanadham [Fri, 9 May 2014 23:08:49 +0000 (16:08 -0700)]
LE: Add API to set scan interval and window (2/4)
Delete client_if from scan api's
Change-Id: I66e0e17221601cd07ea77cf3d61ad9ce20a603a4

10 years agoMerge "Init variables to fix compiler error"
Matthew Xie [Fri, 9 May 2014 17:06:00 +0000 (17:06 +0000)]
Merge "Init variables to fix compiler error"

10 years agoMerge "Revert "Add -Wno-error=maybe-uninitialized to bdroid_CFLAGS""
Matthew Xie [Fri, 9 May 2014 17:05:40 +0000 (17:05 +0000)]
Merge "Revert "Add -Wno-error=maybe-uninitialized to bdroid_CFLAGS""

10 years agoInit variables to fix compiler error
Matthew Xie [Fri, 9 May 2014 08:04:04 +0000 (01:04 -0700)]
Init variables to fix compiler error

Change-Id: Ib41ecc8be53f64f10446b758c54eaf41f2a2e725

10 years agoRevert "Add -Wno-error=maybe-uninitialized to bdroid_CFLAGS"
Matthew Xie [Fri, 9 May 2014 05:20:36 +0000 (22:20 -0700)]
Revert "Add -Wno-error=maybe-uninitialized to bdroid_CFLAGS"

This reverts commit 5e18c1746f086f46177d64563b25db6bdd31223a.

10 years agoUnable to pair and connect A2DP headset with DUT on KWD
Zhihai Xu [Thu, 8 May 2014 23:39:34 +0000 (16:39 -0700)]
Unable to pair and connect A2DP headset with DUT on KWD

this is due to some field type is not defined correctly.
We don't have this problem with old compile option.
recently some compile option change expose this bug.

bug:14489818
Change-Id: Ief48ec7d1312eb588fc344ea0afb153226bf0541

10 years agoFix data type for rmt_auth_req; it stores an integral value.
Sharvil Nanavati [Sat, 3 May 2014 19:11:15 +0000 (12:11 -0700)]
Fix data type for rmt_auth_req; it stores an integral value.

This broke pairing in a bunch of ways, most notably the inability
to use Just Works pairing mode. Just Works is used quite heavily
by iOS devices.

http://b/14438257

Change-Id: I4d32b446d0435acfc73987b91dbd1a0bd3b53ec3

10 years agoam 6ddda3a8: (-s ours) am c90b5ab2: DO NOT MERGE: allow customization of sniff params
Dmitry Grinberg [Thu, 8 May 2014 18:31:26 +0000 (18:31 +0000)]
am 6ddda3a8: (-s ours) am c90b5ab2: DO NOT MERGE: allow customization of sniff params

* commit '6ddda3a87d8ab516cd996cd1bf59b33c3136d7ee':
  DO NOT MERGE: allow customization of sniff params

10 years agoam bb170e66: am 643e0310: am 556cc857: Merge "Remove unused LOCAL_LDLIBS."
Ying Wang [Thu, 8 May 2014 18:00:51 +0000 (18:00 +0000)]
am bb170e66: am 643e0310: am 556cc857: Merge "Remove unused LOCAL_LDLIBS."

* commit 'bb170e660e50a0183263a4991bd84a2357f45134':
  Remove unused LOCAL_LDLIBS.

10 years agoAdd -Wno-error=maybe-uninitialized to bdroid_CFLAGS
Ji-Hwan Lee [Thu, 8 May 2014 13:28:16 +0000 (22:28 +0900)]
Add -Wno-error=maybe-uninitialized to bdroid_CFLAGS

To fix x86 build.

Change-Id: I14e1a418c19987fb76c71ab1bbb8dcb181b833ce

10 years agoam c90b5ab2: DO NOT MERGE: allow customization of sniff params
Dmitry Grinberg [Thu, 8 May 2014 00:53:52 +0000 (00:53 +0000)]
am c90b5ab2: DO NOT MERGE: allow customization of sniff params

* commit 'c90b5ab247ce9e297e4185444b2e623a799fe447':
  DO NOT MERGE: allow customization of sniff params

10 years agoam 643e0310: am 556cc857: Merge "Remove unused LOCAL_LDLIBS."
Ying Wang [Wed, 7 May 2014 22:53:34 +0000 (22:53 +0000)]
am 643e0310: am 556cc857: Merge "Remove unused LOCAL_LDLIBS."

* commit '643e0310fed3ccb238abef7a85d70442b84fbc06':
  Remove unused LOCAL_LDLIBS.

10 years agoam 556cc857: Merge "Remove unused LOCAL_LDLIBS."
Ying Wang [Wed, 7 May 2014 22:47:17 +0000 (22:47 +0000)]
am 556cc857: Merge "Remove unused LOCAL_LDLIBS."

* commit '556cc857c33ed1043e6c8a1f9235ac3eab058251':
  Remove unused LOCAL_LDLIBS.

10 years agoMerge "Remove unused LOCAL_LDLIBS."
Ying Wang [Wed, 7 May 2014 22:44:06 +0000 (22:44 +0000)]
Merge "Remove unused LOCAL_LDLIBS."

10 years agoDO NOT MERGE: allow customization of sniff params
Dmitry Grinberg [Wed, 7 May 2014 21:25:10 +0000 (14:25 -0700)]
DO NOT MERGE: allow customization of sniff params

This completely overrides sniff params with hardcoded external values.
Yes, we understand this is not likely to be useful in ther real world.
This was requested by a vendor for power testing purposes.

Change-Id: Iaf03516752ea49fff2f0be28d5a4b27b039f1214

10 years agoRemove unused LOCAL_LDLIBS.
Ying Wang [Wed, 7 May 2014 22:11:56 +0000 (15:11 -0700)]
Remove unused LOCAL_LDLIBS.

Change-Id: Ic5b17ad79d5796692c063714ea82f879c52b9857

10 years agoFix-build : Do not build bluedroid for 64 bit targets.
Narayan Kamath [Wed, 7 May 2014 10:18:11 +0000 (11:18 +0100)]
Fix-build : Do not build bluedroid for 64 bit targets.

This code is not 64 bit safe. In particular, it attempts
to cast pointer types to UINT32 in several places. For now,
build it as a 32 bit library. A 64 bit variant will not be
needed if libbluetooth_jni is also build for 32 bit only.

Change-Id: Ic5f86bd2823083cacf21a852d1c13b4796a7e125

10 years agofix incorrect function declaration of pan_control_state_changed
Matthew Xie [Wed, 7 May 2014 06:10:21 +0000 (23:10 -0700)]
fix incorrect function declaration of pan_control_state_changed

Change-Id: If4b857544917a13647959793fca32c5e5c59a05a

10 years agoHID: Send Close event to upper layers during reconnection
Hemant Gupta [Fri, 2 May 2014 19:01:26 +0000 (00:31 +0530)]
HID: Send Close event to upper layers during reconnection

This patch sends close event callback to upper layers, so that UI
is updated of correct state of HID connection when connection
between hid host and hid device drops for some reason and host is
attempting reconnection. Without this patch, upper layers gives
false update of connection still present when actually no connection
exists between hid devices. Connection state was only getting updated
if reconnection attempt was also failing.

Change-Id: Ic276d9b57c5c84c4264ddeeadc34c983c718ba3a

10 years agoGAP: Return BTM_CMD_STARTED from btm_sec_l2cap_access_req
Hemant Gupta [Thu, 19 Dec 2013 15:07:16 +0000 (20:37 +0530)]
GAP: Return BTM_CMD_STARTED from btm_sec_l2cap_access_req

Return BTM_CMD_STARTED from btm_sec_l2cap_access_req when
remote device link is neither authenticated or encrypted so as
to send L2CAP Peer connect response with status auth pending.
This lets remote device extend the waiting time. This fixes IOT
issues with HP laptop EliteBook 8440p/8460p where pairing was
not possible.

Change-Id: I6cf6a72640de938a8145b541d4bad1bcba758ac5

10 years agoMHF: Route call to correct HS in multi call scenario.
Hemant Gupta [Mon, 5 May 2014 12:15:08 +0000 (17:45 +0530)]
MHF: Route call to correct HS in multi call scenario.

  - This change makes sure that audio routes back to correct
    headset in multi call scenario even though the other
    headset tries to answer or dial.
  - Ignore setting hf_idx for ATA/BLDN received from HS
    for a waiting call when an active/held call is already
    present.

Change-Id: I19949471d481bf911fda2222dc6d730d1a821b65

10 years agoResolve Pairing failure with IPhone
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:30:55 +0000 (16:30 -0700)]
Resolve Pairing failure with IPhone

When pairing is initiated from the iPhone side, it sets Bonding bit
without MITM. We responded to this with No bonding, No MITM. This resulted
in JustWorks & Unauthenticated link key. After pairing iPhone initiates a
RFCOMM connection. This caused a link key upgrade to be done, which the iPhone
rejected, resulting in pairing failure. To resolve this the following
enhancements were made
1. If locally initiated pairing always set Bonding bit + MITM
2. If remote initiated
a. copy over the bonding bit
b. if peer has DisplayYesNo set MITM
3. As a fallback if remote had MITM, enable MITM in our response
This forces pairing to use Bonding bit+MITM thus resulting in authenticated
combination linkkey

Change-Id: I08f16c80821bc822023180d01868614ba41e6d88

10 years agoTemporarily fix test suite to swap arguments until code from AOSP is merged in.
Sharvil Nanavati [Sun, 4 May 2014 00:12:15 +0000 (17:12 -0700)]
Temporarily fix test suite to swap arguments until code from AOSP is merged in.

Change-Id: I5d8e56f7581df9bcefc8c46518835cac588f47df

10 years agoInitial import of HAL-layer tests for bluedroid.
Sharvil Nanavati [Thu, 10 Apr 2014 05:20:40 +0000 (22:20 -0700)]
Initial import of HAL-layer tests for bluedroid.

The test cases are in cases/, the support infrastructure for the
tests are in support/. Initially, as new test cases are being added
for different functional areas (e.g. BT socket) we'll need to also
write support functions to make those tests easier to write.
Over time, however, the support functions will be complete enough
that writing additional tests won't require also writing support
routines.

Change-Id: I54abb1011ca5132834a334cc256e3ff18cc20cbb

10 years agoGAP: Avoiding two disconnections from DUT
Hemant Gupta [Fri, 18 Apr 2014 09:34:43 +0000 (15:04 +0530)]
GAP: Avoiding two disconnections from DUT

Avoid sending two hci disconnect commandss from DUT when remote
initiated connection fails when user presses cancel for incoming
pairing request.

Change-Id: Idd05ffbcaac427515a54216adcdd7dbe26cb21c8

10 years agoGAP: Update local device name immediately
Hemant Gupta [Mon, 6 Jan 2014 08:58:28 +0000 (14:28 +0530)]
GAP: Update local device name immediately

Though the function btif_config_set_str requests to
save device name immediately, sometimes it doesn't
call save device name if the cached changes are more.

So calling the "btif_config_save" explicitly to avoid
failure cases.

Change-Id: I9fb05caf284d6a6feb906f87a4db19896182d2c9

10 years agoFix Null pointer access in GKI timer library
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:21:04 +0000 (16:21 -0700)]
Fix Null pointer access in GKI timer library

Change-Id: Iada2d426fe4592416eed988202c14599656b33e4

10 years agoMerge BT 4.1 features
Ganesh Ganapathi Batta [Wed, 16 Apr 2014 23:50:09 +0000 (16:50 -0700)]
Merge BT 4.1 features

The features include:
- LE Peripheral Mode
- Link Layer topology (LE Central & Peripheral Concurrency)
- Dual Mode Topology (Ability to choose LE transport when connecting with
other Dual Mode devices)
- Fast advertising Interval
- Limited Discovery Time Changes
- GAP Authentication and Lost Bond
- Dual Mode Addressing
- Common Profile and Service Error Code
- 32 bit UUIDs

Change-Id: Ic6701da4cf6aaa390ff2c8816b43157f36b7fb42

Conflicts:
stack/btu/btu_hcif.c

10 years agofix random crashes in bd2str caused by exceeding string array
Ganesh Ganapathi Batta [Wed, 30 Apr 2014 00:32:14 +0000 (17:32 -0700)]
fix random crashes in bd2str caused by exceeding string array

remove all casts to avoid sign extension of bd address as this may
exceed the size of destination str buffer

Change-Id: I27dc7e61b52440c6b284b7e9931e6daa66afbf12

10 years agofix compilation error due to not include correct header
Zhihai Xu [Tue, 29 Apr 2014 23:08:48 +0000 (16:08 -0700)]
fix compilation error due to not include correct header

Change-Id: Ic4c1fb319f9c4202efd108d180f438a6fa26e05a

10 years agoAdd support for Multi-HFP devices
Nitin Srivastava [Fri, 14 Mar 2014 23:19:58 +0000 (16:19 -0700)]
Add support for Multi-HFP devices

1. Add multi headset support in stack.
2. Each HS will be associated with unique CB in BTIF
and also corresponding SCB in BTA.
3. Upstream event callbacks will be sent to
specific HS based on BD_ADDR.
4. Similiarly all commands to BTIF will be for
specific HS.

Change-Id: I0dc6b1b54f16244b802d818ae60944877a41d020

10 years agoBluetooth: Clear Notification array on AVRCP disconnect
Nitin Srivastava [Thu, 13 Feb 2014 14:01:40 +0000 (19:31 +0530)]
Bluetooth: Clear Notification array on AVRCP disconnect

DUT does not clear previous AVRCP notification registration
on AVCTP disconnect hence DUT sends response even when remote
device hasn't registered.
Changes made to clear notification array and while sending
notification respose check if event is registered.

Change-Id: I610f8ae6381a63236378f179bb2a619ec0c6549e

10 years agoSet out stream to null if control socket fails to connect
Nitin Srivastava [Fri, 31 Jan 2014 10:21:24 +0000 (15:51 +0530)]
Set out stream to null if control socket fails to connect

Set out stream to null if control socket fails to connect.
This helps in avoiding wrong usage of audio device out stream
even after the same is freed as part of control socket connection
failure.

Change-Id: I8e2a7bbc71d581525b7eef1955e411c220d01627

10 years agoBluetooth: retry recv in case of EINTR
Nitin Srivastav [Fri, 21 Feb 2014 13:03:14 +0000 (18:33 +0530)]
Bluetooth: retry recv in case of EINTR

 -  retry recv call in HAL, in case socket call
    fails with EINTR

Change-Id: I3ab27752b0ce0a68f6776cf5da340580e7d1f345

10 years agoBluetooth: GAP: Remove bonded device info on Authentication fail
Zhihai Xu [Wed, 27 Nov 2013 08:40:53 +0000 (14:10 +0530)]
Bluetooth: GAP: Remove bonded device info on Authentication fail

Remove bonded device information from the BT-IF layer storage
on authentication failure if already bonded with just works
model.
from QCOM
Change-Id: Ia3c1635c446f39b1dbd4cdd0122c2f70cbbc8dd7

10 years agoFix issue of HDP select thread not exiting during BT OFF
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:25:52 +0000 (16:25 -0700)]
Fix issue of HDP select thread not exiting during BT OFF

Change-Id: I52a0a3caff327a7a51e293c431ddbc99db690180

10 years agoUse standard C99 integral types. This offers better type safety.
Sharvil Nanavati [Thu, 17 Apr 2014 04:51:56 +0000 (21:51 -0700)]
Use standard C99 integral types. This offers better type safety.

Notice that I had to change a couple of function declarations
because the compiler caught the inconsistency with the new typedefs.

Change-Id: I202fd1dc086de41e1cfe083eb1a5f74a942d01e5

10 years agoHID: Use dynamic memory while sending data
Hemant Gupta [Mon, 21 Apr 2014 18:53:21 +0000 (00:23 +0530)]
HID: Use dynamic memory while sending data

This patch uses dynamic memory allocation while sending HID output data to
remote device depending on size of data to be sent. Without this patch
fixed size static buffer of 200 bytes was being used for sending data to
remote device, which was resulting in crash in case data size to be sent
to remote device was greater than 200 bytes.

Change-Id: I5ed12422355e88d7ef0391668800d7619ca3b685

10 years agoHID: Parse paired hid devices from bluez.
Hemant Gupta [Fri, 25 Oct 2013 16:30:07 +0000 (22:00 +0530)]
HID: Parse paired hid devices from bluez.

This patch adds support for parsing SDP records of paired HID devices
from bluez device storage path and store the parsed hid sdp data into
bluedroid storage path. Without this patch, it was not possible to
have paired HID devices during upgrade from BlueZ to Bluedroid Stack.

Change-Id: I7db4a801f3cf9ca46fc0eabfd929e8d7c16b5edb

10 years agoGAP: Try to retrieve CoD from NVRAM if 0
Hemant Gupta [Thu, 28 Nov 2013 07:37:10 +0000 (13:07 +0530)]
GAP: Try to retrieve CoD from NVRAM if 0

This patch tries to retreive CoD from NVRAM if CoD is 0. This is
because in scenarios when airplane mode on/off, inquiry is not
performed again on devices shown in Available devices List of
UI, so CoD is 0 during SSP information as database of stack is
not properly updated since inquiry is not performed again. Without
this patch it was observed because of wrong CoD info device icon
for HID mouse was changed to Joystick and device is not shown in
Paired List. Also some extra debug logs are added in code for
better debugging.

Change-Id: I14858ccee04728cb4b9cd60d397b79fa6494b842

10 years agoHID: Reset Disconnect Reason on Connection Establishment
Hemant Gupta [Fri, 5 Jul 2013 18:05:58 +0000 (23:35 +0530)]
HID: Reset Disconnect Reason on Connection Establishment

This patch resets the disconnect reason to successful on HID Interrupt
channel establishment. Without this change, wrong reason is propogated
to BTA layer on disconnection initiated either from DUT or Remote end.

Change-Id: I42641b511e44a761574faf8eafb7b0826e24aeb3

10 years agoHID: Remove device from nvram on auth failure
Zhihai Xu [Fri, 13 Dec 2013 10:39:21 +0000 (16:09 +0530)]
HID: Remove device from nvram on auth failure

This patch removed hid pointing device from nvram on authentication failure
due to pairing timeout or when wrong passkey is entered. Without this patch
it was observed that hid pointing device was always shown in paired list
when DUT was restarted after authentication failure.
CL from qcom(Hemant Gupta)
Change-Id: I69c43d2ed982d5d5abfd5707db90ef4b5c65b34f

10 years agoHID: Use dynamic memory while sending report
Zhihai Xu [Mon, 21 Apr 2014 19:05:42 +0000 (00:35 +0530)]
HID: Use dynamic memory while sending report

This patch uses dynamic memory allocation while sending HID output data to
remote device depending on size of data to be sent. Without this patch
fixed size static buffer of 200 bytes was being used for sending data to
remote device, which was resulting in crash in case data size to be sent
to remote device was greater than 200 bytes.

CL from qcom(Hemant Gupta)
Change-Id: Icc8cd4a4ecfd4bc30cbf848a7c865fcf9308ddf8

10 years agoHID: Serialize L2CAP disconnection
Hemant Gupta [Tue, 29 Oct 2013 06:11:16 +0000 (11:41 +0530)]
HID: Serialize L2CAP disconnection

This patch serializes host initiated hid disconnection by sending
control channel disconnect request only when disconnection response
for interrupt channel has been received.

Change-Id: Ie0c5c62593bb0dd32f83b76bf0d6c1d950f1a684

10 years agoHID: Handle connection failure in disconnecting state
Hemant Gupta [Fri, 22 Nov 2013 15:23:53 +0000 (20:53 +0530)]
HID: Handle connection failure in disconnecting state

This patch handles connectio error of interrupt channel while in
disconnecting state. Without this patch it was seen that upper
layers would not be informed about failure of interrupt channel
connection in this corner case leading to UI stuck at connecting
forever.

Change-Id: I1f5f18e70470eff17b21f2ed921edaefd3c89f9c

10 years agoHID: Reset Idle timeout to 0 while hid disconnection
Hemant Gupta [Mon, 9 Dec 2013 13:13:33 +0000 (18:43 +0530)]
HID: Reset Idle timeout to 0 while hid disconnection

This patch resets idle l2cap timeout to 0 while disconnecting HID L2CAP's.
without this patch it was observed that after hid l2cap disconnection,
ACL disconnection was taking 4 seconds.

Change-Id: I39f16d3981f4a8b5cdf28cd7865631900007d5b8

10 years agoHID: Fix memory leak in HID Code
Zhihai Xu [Sun, 24 Nov 2013 10:53:55 +0000 (16:23 +0530)]
HID: Fix memory leak in HID Code

This patch fixes memory leak in HID code when interrupt reports are
received from remote device before HID connection is setup.
CL from qcom(Hemant Gupta)

Change-Id: If4fe961921c7b1212035cf5f2aa60d2359e322e2

10 years agoHID: Reduce poll time to 50 ms for polling from uhid driver
Hemant Gupta [Thu, 10 Apr 2014 11:00:55 +0000 (16:30 +0530)]
HID: Reduce poll time to 50 ms for polling from uhid driver

This patch reduces poll time for data received from uhid driver to 50 ms
from existing 500 ms. Without this change bta thread was getting blocked upto
max 500 ms when HID is disconnected, which caused delay in sending
of AVDTP Media packets during A2DP and HID concurrent test cases resulting
in audio break on BT headset during HID disconnection as closing of uhid
polling thread is done from BTA context.

Change-Id: I033e2d81e895831555bbfdff1f93fad5f2cc5e59

10 years agoHID: Update SSR parameters during copy.
Hemant Gupta [Mon, 21 Apr 2014 18:14:13 +0000 (23:44 +0530)]
HID: Update SSR parameters during copy.

This patch correctly stores SSR parameters (max latency and min timeout)
retrieved from remote device SDP record in NVRAM.

Change-Id: I87d8b6181981090df21ab746deac7053a1d0e938

10 years agoHID: Establish Interrupt Channel when Control channel is configured
Hemant Gupta [Wed, 2 Apr 2014 13:58:47 +0000 (19:28 +0530)]
HID: Establish Interrupt Channel when Control channel is configured

This patch starts establishment of Interrupt channel only when HID Control
channel has been properly configured.

Change-Id: I28f1100abeece9255fbdd5df312236c18baebe17

10 years agoAdd flow control for PAN.
Sharvil Nanavati [Mon, 7 Apr 2014 20:52:37 +0000 (13:52 -0700)]
Add flow control for PAN.

This change reads from the TAP fd only when btpan_cb.flow == 1.
The value of this flag changes based on L2CAP congestion events.

http://b/13246629

Change-Id: Ic28bf65737dbd74c41b68198fceee58e3bff08d4

Conflicts:
btif/src/btif_pan.c

10 years agoFixed a build warning.
Wei Wang [Fri, 18 Apr 2014 23:08:43 +0000 (16:08 -0700)]
Fixed a build warning.

Change-Id: I34885d6e588855d3ca8192db8a54b43ef348c794

10 years agoLE: Add controller based advertising filter API (2/2)
Andre Eisenbach [Thu, 21 Nov 2013 01:23:06 +0000 (17:23 -0800)]
LE: Add controller based advertising filter API (2/2)

Change-Id: I444654bf19a048d5fcef33f79edbf1cdda3d3b62

10 years agoEliminate warnings, add -Wall and -Werror to all projects.
Sharvil Nanavati [Fri, 18 Apr 2014 05:32:05 +0000 (22:32 -0700)]
Eliminate warnings, add -Wall and -Werror to all projects.

This change enables all warnings and treats warnings as errors. As
a result, nobody should be able to submit new code to bluedroid
that contains compiler warnings. Instead, they should fix the warnings
before submitting.

This change has already caught a type mismatch bug in
stack/avrc/avrc_api.c where an integer was being stored in a boolean.

Change-Id: Ic41960754b39a1a6aa37f1c1095003195f466183

10 years agoincrease the bluetooth task priority when start a2dp.
Zhihai Xu [Wed, 8 Jan 2014 19:45:17 +0000 (11:45 -0800)]
increase the bluetooth task priority when start a2dp.

change the BT task priority based on audio play state.
increase the BT task priority to ANDROID_PRIORITY_URGENT_AUDIO
,when start ad2p audio playing.
to better prevent CPU premption by other process/task(UI).
restore the BT task priority when stop a2dp audio playing.

bug:12082841
Change-Id: I34e8344cffea87f68987149c820cd3e84a4196d1

Conflicts:
utils/include/bt_utils.h

10 years agoCompile using C99.
Sharvil Nanavati [Sat, 5 Apr 2014 07:44:19 +0000 (00:44 -0700)]
Compile using C99.

Change-Id: Ifda03e0b3ee3a915bf7ce5a5dce27e5e215dcce2

Conflicts:
bta/Android.mk
gki/Android.mk
main/Android.mk
stack/Android.mk
test/bluedroidtest/Android.mk

10 years agoBluetooth: GAP: Send bond none in case of temp pairing
Hemant Gupta [Tue, 24 Dec 2013 14:29:57 +0000 (19:59 +0530)]
Bluetooth: GAP: Send bond none in case of temp pairing

Send BOND_NONE in case of temporary device pairing on
receiving the authentication complete, so that UI
doesn't get stucked in pairing for that device.

Change-Id: Ided412ef89d928f958a0052362be145232411c0a

10 years agoRemove unused file gki_inet.h and BIG_ENDIAN macro.
Sharvil Nanavati [Mon, 14 Apr 2014 04:26:56 +0000 (21:26 -0700)]
Remove unused file gki_inet.h and BIG_ENDIAN macro.

Change-Id: I52bb7befdff6138dce4ce74ebd65d4e3763b82aa

10 years agoRemove executable bit on source files.
Sharvil Nanavati [Sun, 13 Apr 2014 06:01:10 +0000 (23:01 -0700)]
Remove executable bit on source files.

Change-Id: Id456478aea626f57fed3479346e8fb4dbd0fafa6

10 years agoam 2827e9be: am a0a1c864: Merge commit \'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5...
Bill Yi [Wed, 30 Apr 2014 00:57:49 +0000 (00:57 +0000)]
am 2827e9be: am a0a1c864: Merge commit \'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5\' into HEAD

* commit '2827e9bef9f57db4a3c5854194cab698de92dc03':

10 years agoam a0a1c864: Merge commit \'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5\' into HEAD
Bill Yi [Wed, 30 Apr 2014 00:49:53 +0000 (00:49 +0000)]
am a0a1c864: Merge commit \'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5\' into HEAD

* commit 'a0a1c864abe6076442cd2c9e48d8f65b8d3a3c6e':

10 years agoMerge commit 'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5' into HEAD
Bill Yi [Tue, 29 Apr 2014 18:34:02 +0000 (11:34 -0700)]
Merge commit 'b48f9962d57d9c500bfa8c8dbe65ce04f67918e5' into HEAD

10 years agoam 1b562939: am 2e470dc4: Merge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT...
Matthew Xie [Tue, 22 Apr 2014 13:41:58 +0000 (13:41 +0000)]
am 1b562939: am 2e470dc4: Merge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue"

* commit '1b562939899f7c91c437b390e6e216c7c53acfd6':
  Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue

10 years agoam 2e470dc4: Merge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue"
Matthew Xie [Tue, 22 Apr 2014 13:36:22 +0000 (13:36 +0000)]
am 2e470dc4: Merge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue"

* commit '2e470dc48e608fd46cd2d55aa01efb9ce7eb4bdb':
  Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue

10 years agoMerge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue"
Matthew Xie [Tue, 22 Apr 2014 00:00:02 +0000 (00:00 +0000)]
Merge "Use 0000 as pin key for PORCHE_PAIRING_CONFLICT issue"

10 years agoam c352606d: (-s ours) am 9056d20c: DO NOT MERGE Rewrite PAN_Write in terms of...
Ariel Gertzenstein [Mon, 21 Apr 2014 18:50:22 +0000 (18:50 +0000)]
am c352606d: (-s ours) am 9056d20c: DO NOT MERGE    Rewrite PAN_Write in terms of PAN_WriteBuf.

* commit 'c352606db3258360fc32cf435c0ad23e55a1cc67':
  DO NOT MERGE    Rewrite PAN_Write in terms of PAN_WriteBuf.

10 years agoam 9056d20c: DO NOT MERGE Rewrite PAN_Write in terms of PAN_WriteBuf.
Ariel Gertzenstein [Mon, 21 Apr 2014 18:47:37 +0000 (18:47 +0000)]
am 9056d20c: DO NOT MERGE    Rewrite PAN_Write in terms of PAN_WriteBuf.

* commit '9056d20c9364cb4829aabeb517b98440aa0d5240':
  DO NOT MERGE    Rewrite PAN_Write in terms of PAN_WriteBuf.

10 years agoDO NOT MERGE Rewrite PAN_Write in terms of PAN_WriteBuf.
Ariel Gertzenstein [Sat, 5 Apr 2014 06:57:10 +0000 (23:57 -0700)]
DO NOT MERGE    Rewrite PAN_Write in terms of PAN_WriteBuf.

The original code looked copy/pasted. The new implementation still
results in the same number of buffer copies but is much easier to
read and reduces redundancy.

Change-Id: I3ace395d2b124074e9687d13ae9a1b0b93a25a31

10 years agoam 72f5ce63: am 4b416130: Merge "Bluetooth: Adding Sniff feature for PAN Profile"
Matthew Xie [Mon, 21 Apr 2014 18:21:20 +0000 (18:21 +0000)]
am 72f5ce63: am 4b416130: Merge "Bluetooth: Adding Sniff feature for PAN Profile"

* commit '72f5ce63c2dbf31c7cfbb903c687ea71ad29b3ea':
  Bluetooth: Adding Sniff feature for PAN Profile

10 years agoam 4b416130: Merge "Bluetooth: Adding Sniff feature for PAN Profile"
Matthew Xie [Mon, 21 Apr 2014 18:16:24 +0000 (18:16 +0000)]
am 4b416130: Merge "Bluetooth: Adding Sniff feature for PAN Profile"

* commit '4b41613019829b40e8ca75a87219a415c51ae3a1':
  Bluetooth: Adding Sniff feature for PAN Profile

10 years agoMerge "Bluetooth: Adding Sniff feature for PAN Profile"
Matthew Xie [Mon, 21 Apr 2014 18:09:38 +0000 (18:09 +0000)]
Merge "Bluetooth: Adding Sniff feature for PAN Profile"

10 years agoam a80ba72d: am 743034a5: Merge "bluedroid: audio_a2dp_hw 64 bit compile issues"
Mark Salyzyn [Thu, 17 Apr 2014 23:33:48 +0000 (23:33 +0000)]
am a80ba72d: am 743034a5: Merge "bluedroid: audio_a2dp_hw 64 bit compile issues"

* commit 'a80ba72d63b0422c202ed1db273dbaa61bbd6a1b':
  bluedroid: audio_a2dp_hw 64 bit compile issues

10 years agoam 743034a5: Merge "bluedroid: audio_a2dp_hw 64 bit compile issues"
Mark Salyzyn [Thu, 17 Apr 2014 23:22:36 +0000 (23:22 +0000)]
am 743034a5: Merge "bluedroid: audio_a2dp_hw 64 bit compile issues"

* commit '743034a53dcf8552a53ec3d69157109c77b64f8e':
  bluedroid: audio_a2dp_hw 64 bit compile issues

10 years agoMerge "bluedroid: audio_a2dp_hw 64 bit compile issues"
Mark Salyzyn [Thu, 17 Apr 2014 23:11:13 +0000 (23:11 +0000)]
Merge "bluedroid: audio_a2dp_hw 64 bit compile issues"

10 years agobluedroid: audio_a2dp_hw 64 bit compile issues
Mark Salyzyn [Thu, 17 Apr 2014 20:45:20 +0000 (13:45 -0700)]
bluedroid: audio_a2dp_hw 64 bit compile issues

Change-Id: Ieeb5d463215c503afb3fca9953c7b0248abf812f

10 years agoam b9e8b464: (-s ours) am 3a038dd6: DO NOT MERGE Fix bug where btpan_control_state...
Ariel Gertzenstein [Wed, 16 Apr 2014 21:24:22 +0000 (21:24 +0000)]
am b9e8b464: (-s ours) am 3a038dd6: DO NOT MERGE    Fix bug where btpan_control_state_callback is called with invalid args.

* commit 'b9e8b46481e60beef43886acdd173caaf139e74e':
  DO NOT MERGE    Fix bug where btpan_control_state_callback is called with invalid args.

10 years agoam e74b1a0e: am 87bea5bc: Merge "Fix bug where btpan_control_state_callback is called...
Matthew Xie [Wed, 16 Apr 2014 21:20:34 +0000 (21:20 +0000)]
am e74b1a0e: am 87bea5bc: Merge "Fix bug where btpan_control_state_callback is called with invalid args."

* commit 'e74b1a0e4613d4aa109378b692d6ebdb9f2c6a6d':
  Fix bug where btpan_control_state_callback is called with invalid args.

10 years agoam 3a038dd6: DO NOT MERGE Fix bug where btpan_control_state_callback is called...
Ariel Gertzenstein [Wed, 16 Apr 2014 21:18:33 +0000 (21:18 +0000)]
am 3a038dd6: DO NOT MERGE    Fix bug where btpan_control_state_callback is called with invalid args.

* commit '3a038dd60e898e23c103bae94eae91d3b15b4c38':
  DO NOT MERGE    Fix bug where btpan_control_state_callback is called with invalid args.

10 years agoDO NOT MERGE Fix bug where btpan_control_state_callback is called with invalid...
Ariel Gertzenstein [Sun, 2 Feb 2014 00:53:15 +0000 (16:53 -0800)]
DO NOT MERGE    Fix bug where btpan_control_state_callback is called with invalid args.

When there's a connection error, btpan_control_state_callback sometimes
gets called back with incorrect local_role and remote_role values. These
values are simply not set (uninitialized) on one of the error handling
codepaths.

http://b/12854810

Change-Id: Ie2d9d252f185fca48ee6e2bfb697039d0ac10b43

10 years agoam 87bea5bc: Merge "Fix bug where btpan_control_state_callback is called with invalid...
Matthew Xie [Wed, 16 Apr 2014 20:56:33 +0000 (20:56 +0000)]
am 87bea5bc: Merge "Fix bug where btpan_control_state_callback is called with invalid args."

* commit '87bea5bc24f03b671328bfdbac86b60085c1d2e1':
  Fix bug where btpan_control_state_callback is called with invalid args.

10 years agoMerge "Fix bug where btpan_control_state_callback is called with invalid args."
Matthew Xie [Wed, 16 Apr 2014 20:49:20 +0000 (20:49 +0000)]
Merge "Fix bug where btpan_control_state_callback is called with invalid args."

10 years agoam 77a19389: (-s ours) am 34fa499c: DO NOT MERGE Fix bug in PAN code where no...
Ariel Gertzenstein [Wed, 16 Apr 2014 18:38:05 +0000 (18:38 +0000)]
am 77a19389: (-s ours) am 34fa499c: DO NOT MERGE    Fix bug in PAN code where no new PAN connections can be made.

* commit '77a1938999278af07710c7c28bbe0075dfa956f5':
  DO NOT MERGE    Fix bug in PAN code where no new PAN connections can be made.

10 years agoam 34fa499c: DO NOT MERGE Fix bug in PAN code where no new PAN connections can...
Ariel Gertzenstein [Wed, 16 Apr 2014 18:35:52 +0000 (18:35 +0000)]
am 34fa499c: DO NOT MERGE    Fix bug in PAN code where no new PAN connections can be made.

* commit '34fa499c449b8e464cb417a9e8dce4eb027b4a30':
  DO NOT MERGE    Fix bug in PAN code where no new PAN connections can be made.

10 years agoDO NOT MERGE Fix bug in PAN code where no new PAN connections can be made.
Ariel Gertzenstein [Fri, 31 Jan 2014 21:39:43 +0000 (13:39 -0800)]
DO NOT MERGE    Fix bug in PAN code where no new PAN connections can be made.

If you call PAN_connect() followed quickly by PAN_disconnect(),
you won't be able to establish any additional PANU connections.
This happens because the connection never has a chance to make
it into PAN_STATE_CONNECTED and num_conns only gets decremented
if you disconnect in the connected state. As a result, subsequent
calls to connect will fail because the stack still believes there
to be an existing connection.

Change-Id: Id24873828ca4f517496cb19a44993d0e8e837a1e

10 years agoBluetooth: Adding Sniff feature for PAN Profile
Nitin Shivpure [Thu, 29 Aug 2013 15:58:59 +0000 (21:28 +0530)]
Bluetooth: Adding Sniff feature for PAN Profile

Sniff feature for PAN profile was not implemented in power
manager module of the stack, which was causing higher power
consumption after connecting PAN profile, Even though PAN
ACL link is idle & there is no data communication between
DUT & remote device. Adding sniff feature for PANU role &
NAP role to reduce power consumption.

Change-Id: Idf568f53a317abd536edf34fbdf1733fdf53b7d0

10 years agoflounder64: bluetooth: Adjust volume level on BT HS and DUT side
Thomas.TT_Lin [Mon, 7 Apr 2014 08:13:06 +0000 (16:13 +0800)]
flounder64: bluetooth: Adjust volume level on BT HS and DUT side

MW600 Bluetooth address is "58:17:0c:e8:b0:7a". It is not included in
AVRCP profile white list. So it can't support absolute volume. We need
to  whitelist it by device name "MW600" instead device address method.

Signed-off-by: Thomas.TT_Lin <Thomas.TT_Lin@htc.com>
Change-Id: I41b27fbab13dcf9d0005e8d5ae25ffb95eb546d4

10 years agoam 4ec26844: am c7d4ce67: Merge "Bluetooth:GAP: Add NULL check before accessing accep...
Matthew Xie [Tue, 8 Apr 2014 09:24:13 +0000 (09:24 +0000)]
am 4ec26844: am c7d4ce67: Merge "Bluetooth:GAP: Add NULL check before accessing accept socket"

* commit '4ec26844f88e37dda00f1319ce6ab44fa87539f2':
  Bluetooth:GAP: Add NULL check before accessing accept socket

10 years agoam c7d4ce67: Merge "Bluetooth:GAP: Add NULL check before accessing accept socket"
Matthew Xie [Tue, 8 Apr 2014 09:14:39 +0000 (09:14 +0000)]
am c7d4ce67: Merge "Bluetooth:GAP: Add NULL check before accessing accept socket"

* commit 'c7d4ce671ccc74ee05813bef10639fd34e1bf81f':
  Bluetooth:GAP: Add NULL check before accessing accept socket

10 years agoMerge "Bluetooth:GAP: Add NULL check before accessing accept socket"
Matthew Xie [Tue, 8 Apr 2014 06:59:56 +0000 (06:59 +0000)]
Merge "Bluetooth:GAP: Add NULL check before accessing accept socket"

10 years agoam 2f2d9f41: am a0cf8d6f: remove all advertised services in SDP btif_av_init is calle...
Zhihai Xu [Mon, 7 Apr 2014 19:54:54 +0000 (19:54 +0000)]
am 2f2d9f41: am a0cf8d6f: remove all advertised services in SDP btif_av_init is called twice. Don\'t need call it in enable. disable EDR ATT SDP record

* commit '2f2d9f412f7dc999eee87161cb2c30c786523ff2':
  remove all advertised services in SDP btif_av_init is called twice. Don't need call it in enable. disable EDR ATT SDP record

10 years agoam a0cf8d6f: remove all advertised services in SDP btif_av_init is called twice....
Zhihai Xu [Mon, 7 Apr 2014 19:48:36 +0000 (19:48 +0000)]
am a0cf8d6f: remove all advertised services in SDP btif_av_init is called twice. Don\'t need call it in enable. disable EDR ATT SDP record

* commit 'a0cf8d6f47fd6709085b9ad2c8626986f7ae7f21':
  remove all advertised services in SDP btif_av_init is called twice. Don't need call it in enable. disable EDR ATT SDP record

10 years agoremove all advertised services in SDP
Zhihai Xu [Sat, 5 Apr 2014 07:25:20 +0000 (00:25 -0700)]
remove all advertised services in SDP
btif_av_init is called twice. Don't need call it in enable.
disable EDR ATT SDP record

bug:13558005
Change-Id: Id834697eae150018f9a0382d9c1e6c972e885739

10 years agoam 616c40a8: am d5733232: open GATT client didn\'t reserve the BLE link if open after...
Zhihai Xu [Thu, 3 Apr 2014 01:41:26 +0000 (01:41 +0000)]
am 616c40a8: am d5733232: open GATT client didn\'t reserve the BLE link if open after connected.

* commit '616c40a8684e9324af002a9742ce74f01f87038c':
  open GATT client didn't reserve the BLE link if open after connected.