OSDN Git Service

android-x86/system-bt.git
9 years agoCheck userial fd before reading
Chris Manton [Mon, 15 Sep 2014 15:48:35 +0000 (08:48 -0700)]
Check userial fd before reading

The userial read loop uses one global flag
to condition the serial port read and a
second global file descriptor variable that
may change from another thread underneath it.

Check the validity of the serial port file
descriptor by making a copy immediately before
the read and only proceeding if it's a valid fd.

bug: 17552690

Change-Id: Iaaf1b8476fdee462ddc178d2a31ef8f55cb33e52

9 years agoMerge "Add ability to preserve existing snoop log" into lmp-dev
Andre Eisenbach [Wed, 17 Sep 2014 23:55:58 +0000 (23:55 +0000)]
Merge "Add ability to preserve existing snoop log" into lmp-dev

9 years agoAdd ability to preserve existing snoop log
Andre Eisenbach [Wed, 17 Sep 2014 23:40:53 +0000 (16:40 -0700)]
Add ability to preserve existing snoop log

Currently a stack restart or device reboot will overwrite existing snoop
logs when the stack restarts. This patch adds a new configuration file
parameter "BtSnoopSaveLog" that, if enabled, will cause an existing
snoop log to be renamed to "<snoop_file_name>.last" before a new snoop
log is created.

This will allow for easier debugging of crashes that involve a reboot or
stack restart.

Change-Id: I4f56204d31a6bf2e96058938e8616eb6dee7360b

9 years agoMerge "For pairing over le transport, set default device type and address type" into...
Matthew Xie [Wed, 17 Sep 2014 20:50:55 +0000 (20:50 +0000)]
Merge "For pairing over le transport, set default device type and address type" into lmp-dev

9 years agoFor pairing over le transport, set default device type and address type
Matthew Xie [Tue, 16 Sep 2014 07:55:03 +0000 (00:55 -0700)]
For pairing over le transport, set default device type and address type

When the LE pairing is initiated over NFC, skipping device scan, there is
no device type or address type info. We set the default as le and public.
bug 17497942
Change-Id: I3dcbb9029ead6ea0f7c48e62f46c8a055f1bc293

9 years agoDocument LE IO capabilities and use BR/EDR constant for LE
Andre Eisenbach [Wed, 17 Sep 2014 15:45:56 +0000 (08:45 -0700)]
Document LE IO capabilities and use BR/EDR constant for LE

This removes a hack to set LE IO capabilities and reuses the existing
constant defined in bt_target.h.

Change-Id: I3c97629bd092ac78bd673afc29458775b2bce836

9 years agohost cannot recover when connection exceed controller capability
Priti Aghera [Wed, 10 Sep 2014 18:42:10 +0000 (11:42 -0700)]
host cannot recover when connection exceed controller capability

Host can not initiate new connection when exceed controller capability
and connection then drop back to lower than the max. Controller will not
generate connection complete event when initaite LE ll connection request
failed, and host is dead loop waiting for the connection complete
then can not recover. Included a connection complete callback with failure
status when controller capability is exceeded.

bug 17326529
Change-Id: I9b863578dc868456e092f1d060e50d2c9fdcb441

9 years agoAvoid premature LE connection notifaction to app
Prerepa Viswanadham [Thu, 11 Sep 2014 00:08:11 +0000 (17:08 -0700)]
Avoid premature LE connection notifaction to app

To avoid premature connection notification to app, always wait for
LE read remote feature complete with success before the connection
event is sent to application.

This patch also deprecates the BTA_SKIP_BLE_READ_REMOTE_FEAT flag.
Since the remote feature request is now serialized and start encryption
won't be called until the connection is up, this flag is no longer
necessary and interferes with the new behaviour.

This is an extension of previous CL

Bug: 17326529
Change-Id: Icfd4c5dfdd9f89d1318ef429e132eb005abb1f64

9 years agoMerge "Fix issues with manufacturer ID prefix scan filter." into lmp-dev
Wei Wang [Fri, 12 Sep 2014 22:15:26 +0000 (22:15 +0000)]
Merge "Fix issues with manufacturer ID prefix scan filter." into lmp-dev

9 years agoMerge "Fix ADV data exceeding max adv packet length" into lmp-dev
Wei Wang [Fri, 12 Sep 2014 22:14:16 +0000 (22:14 +0000)]
Merge "Fix ADV data exceeding max adv packet length" into lmp-dev

9 years agoLE: Use random address when initiating background connections
Andre Eisenbach [Thu, 11 Sep 2014 21:09:40 +0000 (14:09 -0700)]
LE: Use random address when initiating background connections

When re-connecting to HID devices, the first reconnection immediately
after a reboot incorrectly uses the static, public Bluetooth address of
the phone/tablet as the own address.

This patch fixes the Bluetooth initialization sequence to make sure
privacy is enabled before any Bluetooth services are started.

Bug: 16952502
Change-Id: I43e595ddc7e347fab972b059382b512fb03e9459

9 years agoFix ADV data exceeding max adv packet length
Satya Calloji [Sat, 6 Sep 2014 00:16:33 +0000 (17:16 -0700)]
Fix ADV data exceeding max adv packet length

Fixed the 128-bit UUID handling during setting up
of adv data/scan response

Bug:16799331
Change-Id: I81e4ab0a80a5c1b7abf012dccc29eead54229b21

9 years agoMerge "LE link_xmit_quota is not correctly allocated" into lmp-dev
Andre Eisenbach [Wed, 10 Sep 2014 17:28:15 +0000 (17:28 +0000)]
Merge "LE link_xmit_quota is not correctly allocated" into lmp-dev

9 years agoMerge "SMP doesn't detect the event of local processing taking more than SMP timeout...
Andre Eisenbach [Wed, 10 Sep 2014 17:27:47 +0000 (17:27 +0000)]
Merge "SMP doesn't detect the event of local processing taking more than SMP timeout (30 sec)" into lmp-dev

9 years agoLE link_xmit_quota is not correctly allocated
Mudumba Ananth [Fri, 11 Jul 2014 07:05:54 +0000 (00:05 -0700)]
LE link_xmit_quota is not correctly allocated

LE link transmit quota should be calculated based on the total LE
buffer available and number of LE link that shares the buffer. Currently
it's been calculated based on the ACL buffer number and total physical
links(BR and LE), that cause the LE link transmit quota not being
done right.
Modify the link transmit quota allocation, and keep track of LE link
seperately, also keep track of round robin scheme for LE links
solving the problem.

Bug: 16560957
Change-Id: I70f91827b96f2c10421e91311ea34cc81a5ef4b8

9 years agoMerge "LE: Remove stored link key if encryption fails due to missing key (remote...
Andre Eisenbach [Tue, 9 Sep 2014 22:34:51 +0000 (22:34 +0000)]
Merge "LE: Remove stored link key if encryption fails due to missing key (remote)" into lmp-dev

9 years agoMerge "If L2CA_ConnectFixedChnl fails, free L2CAP lcb for the attempted connection...
Andre Eisenbach [Tue, 9 Sep 2014 19:56:07 +0000 (19:56 +0000)]
Merge "If L2CA_ConnectFixedChnl fails, free L2CAP lcb for the attempted connection" into lmp-dev

9 years agoFixed SMP pairing failure due to race condition
Priti Aghera [Tue, 9 Sep 2014 18:30:25 +0000 (11:30 -0700)]
Fixed SMP pairing failure due to race condition

SMP pairing failure if remote send security request before master
side receive LE link connection callback. The racing condition will
cause master side bonding failure upon ignoring remote security request
and flush out all SMP information. Retain SMP information when a
locally initiated pairing is in process solves the problem.

Bug: 17412687
Change-Id: Ia2256160c866413f93c6f49e5db82b4c6489d9d2

9 years agoSMP doesn't detect the event of local processing taking more than SMP timeout (30...
Mudumba Ananth [Fri, 4 Jul 2014 10:15:37 +0000 (03:15 -0700)]
SMP doesn't detect the event of local processing taking more than SMP timeout (30 sec)

Bug: 16560957
Change-Id: I1113f367187a30e01fa3d5d2a5ccb0243580e06b

9 years agoIf L2CA_ConnectFixedChnl fails, free L2CAP lcb for the attempted connection
Mudumba Ananth [Fri, 4 Jul 2014 06:14:43 +0000 (23:14 -0700)]
If L2CA_ConnectFixedChnl fails, free L2CAP lcb for the attempted connection

Bug: 16560957
Change-Id: I91fd2cc90435d0b899474b555b4a4ab00306c156

9 years agoMerge "LE: Disable background connections if RPA offloading is not supported" into...
Andre Eisenbach [Tue, 9 Sep 2014 01:48:20 +0000 (01:48 +0000)]
Merge "LE: Disable background connections if RPA offloading is not supported" into lmp-dev

9 years agoLE: Disable background connections if RPA offloading is not supported
Andre Eisenbach [Mon, 18 Aug 2014 18:20:06 +0000 (11:20 -0700)]
LE: Disable background connections if RPA offloading is not supported

If the local device does not support RPA offloading, background
connections to a resolvable random address will not work. Added callback
to indicate to the application writer that the requested operation is
not supported.

Bug: 16831527
Change-Id: I083d66b16704e997f52a40ea4daced3056b50ad5

9 years agoFix issues with manufacturer ID prefix scan filter.
Satya Calloji [Wed, 3 Sep 2014 17:01:44 +0000 (10:01 -0700)]
Fix issues with manufacturer ID prefix scan filter.

Handled the case of no manufacturer data in filter configuration

Bug:17324059
Change-Id: I87c2c44644f808bd88f4d8681ff53e2d92815658

9 years agoLE: Remove stored link key if encryption fails due to missing key (remote)
Priti Aghera [Fri, 29 Aug 2014 18:21:28 +0000 (11:21 -0700)]
LE: Remove stored link key if encryption fails due to missing key (remote)

Remove the link key if encryption fails due to missing key or
authentication error. When a remote device loses the bond, all
HOGP services cached should be discarded and all client configuration
descriptors needs to be re-enabled. This will ensure successful
re-connection.

Bug: 15022622
Change-Id: Ie1730830c0cbbc294e2cd579d7dca69d16cf8218

9 years agoNotify that link is up after LE read remote features completes
Priti Aghera [Mon, 8 Sep 2014 20:04:29 +0000 (13:04 -0700)]
Notify that link is up after LE read remote features completes

ACL link up notifaction was not sent after LE read remote features was successful.
Thus, total ACL link up count was not updated. Included a link up notification
after LE read remote features is successfull.

Bug: 17410697
Change-Id: I41fc640e76fa99354cb63d9b0b3031582178c057

9 years agoMake sure conn_id is valid before using it
Matthew Xie [Sun, 7 Sep 2014 23:08:59 +0000 (16:08 -0700)]
Make sure conn_id is valid before using it

Bug: 17401266
Change-Id: I5f36e13b3ccb327f191db33123fff98858f07c5f

9 years agoAvoid premature LE connection notifaction to app
Priti Aghera [Tue, 2 Sep 2014 22:41:56 +0000 (15:41 -0700)]
Avoid premature LE connection notifaction to app

To avoid premature connection notification to app, always wait for
LE read remote feature complete with success before the connection
event is sent to application.
bug 17326529

Change-Id: Id731bf02e8d5d5a68db12e0478b8eb74723eb95d

9 years agoSet random address before connection request
Priti Aghera [Thu, 4 Sep 2014 20:29:28 +0000 (13:29 -0700)]
Set random address before connection request

Send Set_Random_Address when privacy is enabled. If Set_Random_Address
is not sent to controller, Connection request will be sent with host
address as all 0's

Bug: 17386986
Change-Id: I59877e52bf76a56696800ff0e75487c633adde3c

9 years agoMerge "Add an override for entering sniff mode after idle on FTS and OTP" into lmp-dev
Fred Quintana [Thu, 4 Sep 2014 21:43:04 +0000 (21:43 +0000)]
Merge "Add an override for entering sniff mode after idle on FTS and OTP" into lmp-dev

9 years agoMerge "Fix error in tick calculation when timer is removed" into lmp-dev
Andre Eisenbach [Thu, 4 Sep 2014 19:48:19 +0000 (19:48 +0000)]
Merge "Fix error in tick calculation when timer is removed" into lmp-dev

9 years agoFix error in tick calculation when timer is removed
Andre Eisenbach [Thu, 4 Sep 2014 19:43:05 +0000 (12:43 -0700)]
Fix error in tick calculation when timer is removed

A previous changed introduced an error in the timer tick calculation
when removing a timer. This could lead to timers expiring sooner than
expected.

Bug: 17390240
Change-Id: Id3291aaf492a7178782e6f804dad71387c3c9382

9 years agoMerge "Limit the time PAN can occupy the BTU stack thread" into lmp-dev
Andre Eisenbach [Thu, 4 Sep 2014 18:11:39 +0000 (18:11 +0000)]
Merge "Limit the time PAN can occupy the BTU stack thread" into lmp-dev

9 years agoAdd an override for entering sniff mode after idle on FTS and OTP
Fred Quintana [Wed, 3 Sep 2014 23:23:14 +0000 (16:23 -0700)]
Add an override for entering sniff mode after idle on FTS and OTP

Change-Id: I5e3d164898563478ddf5d21197e682600f8cc33f

9 years agoAvoid race condition in SBC encoder initialization
Andre Eisenbach [Wed, 3 Sep 2014 19:48:44 +0000 (12:48 -0700)]
Avoid race condition in SBC encoder initialization

In the A2DP media task, btif_a2dp_encoder_update() relies on the fact
that btif_a2dp_encoder_init() is called beforehand. Otherwise division
by zero errors will occur.

Since _init() called after the audio stream is opened, and _update() is
called in resonse the the audio stream being opened, a race condition
could ensue where _update() was called before open.

This patch changes the A2DP stream start sequence to ensure the SBC
encoder is initialized before the updated parameters are calculated.

Bug: 17339248
Change-Id: I6ed36a7fff0e4aa672a8866727030681eb4b3dfc

9 years agoLimit the time PAN can occupy the BTU stack thread
Zhenye Zhu [Tue, 26 Aug 2014 21:26:56 +0000 (14:26 -0700)]
Limit the time PAN can occupy the BTU stack thread

Also make sure tap read/write are non-blocking and PAN does not use the
complete shared buffer pool to avoid GKI buffer overruns.

Bug: 16374840
Change-Id: I6f96d1c8d2804d253d33fe37ff87275e03e55ddd

9 years agoMerge "Clean up fd when failed to add monitor thread" into lmp-dev
Matthew Xie [Wed, 3 Sep 2014 19:28:34 +0000 (19:28 +0000)]
Merge "Clean up fd when failed to add monitor thread" into lmp-dev

9 years agoClean up fd when failed to add monitor thread
Matthew Xie [Wed, 3 Sep 2014 06:39:43 +0000 (23:39 -0700)]
Clean up fd when failed to add monitor thread

Bug: 10773872
Change-Id: I7f5b5f976ee7fa522e02b9ee4369b8f152b15cfb

9 years agoBluetooth: Properly initialize UART fds
Chris Manton [Wed, 3 Sep 2014 16:40:10 +0000 (09:40 -0700)]
Bluetooth: Properly initialize UART fds

If the vendor library is unable to open the UART,
the passed in file descriptor array is unchanged.
This array was uninitialized stack memory which
may miss the illegal fd check and barrel ahead
forking a userial read thread causing FD_SET
problems should the uninitialized stack memory be
bogus fds outside the processes boundaries.
Verify that the vendor library was actually opening
exactly one uart.

Bug: 16651586

Change-Id: I24e700cdb0b0f3ed107f56b94b5b535abba66806

9 years agoBluetooth: Trigger bta_dm_disable_timer_cback() again if remove ACL failed
lungtsai_lin [Mon, 25 Aug 2014 05:19:56 +0000 (13:19 +0800)]
Bluetooth: Trigger bta_dm_disable_timer_cback() again if remove ACL failed

To avoid trun off BT failed, stack have to send out BTA_DM_DISABLE_EVT
even disconnect ACL failed during turning of BT procedire. Trigger
bta_dm_disable_timer_cback() again after 1.5 sec.

Bug: 17158327

Change-Id: I096d535603faf7b302febea7cfff7a3364d4b048
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
9 years agoAutomatically determine transport to used to read RSSI.
Thomas.TT_Lin [Tue, 26 Aug 2014 06:38:27 +0000 (14:38 +0800)]
Automatically determine transport to used to read RSSI.

Determine the transport to use for BTM_ReadRSSI based on the
device type of the remote device.

Bug: 16694076
Change-Id: I5a591f9d629547b63a750cefd7feb72899922595
Signed-off-by: Thomas.TT_Lin <Thomas.TT_Lin@htc.com>
9 years agoMerge "onBatchScanStorageConfigured returns status 12" into lmp-dev
Wei Wang [Fri, 29 Aug 2014 18:29:03 +0000 (18:29 +0000)]
Merge "onBatchScanStorageConfigured returns status 12" into lmp-dev

9 years agoMerge "Add LE device to inquiry DB before pairing" into lmp-dev
Andre Eisenbach [Fri, 29 Aug 2014 18:17:40 +0000 (18:17 +0000)]
Merge "Add LE device to inquiry DB before pairing" into lmp-dev

9 years agoAdd LE device to inquiry DB before pairing
lungtsai_lin [Fri, 29 Aug 2014 05:47:47 +0000 (13:47 +0800)]
Add LE device to inquiry DB before pairing

There is no remote device type info wgeb OOB pairing LE
devices. Add device type according to transport.

Bug: 17156993
Change-Id: I29182ca13f801f8a7f2c3a95969d6ae23312dd7e

9 years agoonBatchScanStorageConfigured returns status 12
Satya Calloji [Thu, 21 Aug 2014 01:28:13 +0000 (18:28 -0700)]
onBatchScanStorageConfigured returns status 12

Stack changes for handling the API call sequence changes. Please refer buganizer for more details on the API sequence changes

Bug:16850169
Change-Id: Iabef8247a290d163c1fe03cb853d12678b559664

9 years agoMerge "GKI_exception on running longer batch scans" into lmp-dev
Wei Wang [Fri, 29 Aug 2014 07:18:02 +0000 (07:18 +0000)]
Merge "GKI_exception on running longer batch scans" into lmp-dev

9 years agoscanWindow and interval are reversed
Satya Calloji [Fri, 22 Aug 2014 00:09:35 +0000 (17:09 -0700)]
scanWindow and interval are reversed

Corrected the byte position for HCI Command
- Set Batch Scan Param sub cmd

bug 17182636

Change-Id: I45045a6e548ed2539d5e43695725883ca1e4ed7a

9 years agoGKI_exception on running longer batch scans
Satya Calloji [Wed, 13 Aug 2014 20:57:27 +0000 (13:57 -0700)]
GKI_exception on running longer batch scans

Fixed GKI memory leak in btif_gatt_client.c file
besides few needed logic improvements which will
help in preventing leaks on exception conditions

Bug:16829603
Change-Id: Id39267fbedeb7435cdc2c3a9eda25d4b3cd82c2f

9 years agoMerge "Protect against potential endless loop in BTU task timer handling" into lmp-dev
Andre Eisenbach [Mon, 25 Aug 2014 22:26:35 +0000 (22:26 +0000)]
Merge "Protect against potential endless loop in BTU task timer handling" into lmp-dev

9 years agoMerge "MAP: SDP corruption" into lmp-dev
Matthew Xie [Mon, 25 Aug 2014 17:46:00 +0000 (17:46 +0000)]
Merge "MAP: SDP corruption" into lmp-dev

9 years agoMerge "use correct trace debug level" into lmp-dev
Matthew Xie [Thu, 21 Aug 2014 06:05:24 +0000 (06:05 +0000)]
Merge "use correct trace debug level" into lmp-dev

9 years agouse correct trace debug level
Matthew Xie [Wed, 20 Aug 2014 22:40:42 +0000 (15:40 -0700)]
use correct trace debug level

Change-Id: I997f5f9395af6c5da0403dc496317b2bad1683e6

9 years agoProtect against potential endless loop in BTU task timer handling
Andre Eisenbach [Wed, 20 Aug 2014 02:10:31 +0000 (19:10 -0700)]
Protect against potential endless loop in BTU task timer handling

Fix potential bug where stale timer list entry causes endless loops in
BTU task. Also added return parameter to GKI_remove_from_timer_list() to
allow breaking out of the BTU timer task look in case the timer list
becomes corrupted.

Bug: 16897789
Change-Id: Ic70cf4346efbb063bbb952ebe7c2f7d0bf395493

9 years agoMerge "LE: Remove general/limited discoverability bits for non-connectable adv" into...
Andre Eisenbach [Tue, 19 Aug 2014 23:49:55 +0000 (23:49 +0000)]
Merge "LE: Remove general/limited discoverability bits for non-connectable adv" into lmp-dev

9 years agoMAP: SDP corruption
Casper Bonde [Mon, 18 Aug 2014 10:40:53 +0000 (12:40 +0200)]
MAP: SDP corruption

Terminate strings before parsing to values.

Might be related to:
bug: 16877287

Change-Id: I0c46861229a90f37e266bd06bcba9ac78e3fc155
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoLE: Remove general/limited discoverability bits for non-connectable adv
Andre Eisenbach [Sun, 17 Aug 2014 19:31:13 +0000 (12:31 -0700)]
LE: Remove general/limited discoverability bits for non-connectable adv

According to the Bluetooth spec, section 9.1.1.2, "A device in the
broadcast mode shall not set the â€˜LE General Discoverable Mode’
flag or the â€˜LE Limited Discoverable Mode’ flag in the Flags AD Type.

This patch masks out the specific bits for non-connectable
advertisements.

Bug: 16924631
Change-Id: Ia2c0011fb31de3e4166a8bd2c2732e50aad3a610

9 years agoam 390d5386: (-s ours) am e68188f8: Bluetooth: Restarting PM timer during incoming...
Jeff Deng [Mon, 18 Aug 2014 18:05:56 +0000 (18:05 +0000)]
am 390d5386: (-s ours) am e68188f8: Bluetooth: Restarting PM timer during incoming rfcomm data.

* commit '390d53864515a53e177de08ecd3130c89adad87a':
  Bluetooth: Restarting PM timer during incoming rfcomm data.

9 years agoFix userial build error for Razor/Mako/Flo
Andre Eisenbach [Sun, 17 Aug 2014 23:32:26 +0000 (16:32 -0700)]
Fix userial build error for Razor/Mako/Flo

Change-Id: Ia4ecf38de8a017f5624ab7b32f8ac398de15dee4

9 years agoLE: Fix build for devices not support BLE/Privacy
Andre Eisenbach [Sun, 17 Aug 2014 21:58:32 +0000 (14:58 -0700)]
LE: Fix build for devices not support BLE/Privacy

Change-Id: I00951bb14384be4fdc946410f1082963af8ad569

9 years agoMerge "Remove IRK entry from controller when LE device is unpaired" into lmp-dev
Andre Eisenbach [Sun, 17 Aug 2014 20:59:31 +0000 (20:59 +0000)]
Merge "Remove IRK entry from controller when LE device is unpaired" into lmp-dev

9 years agoMerge "Eliminate userial thread race condition" into lmp-dev
Andre Eisenbach [Sun, 17 Aug 2014 18:56:55 +0000 (18:56 +0000)]
Merge "Eliminate userial thread race condition" into lmp-dev

9 years agoam 212ffc1d: (-s ours) am 39277ce1: enhance the "invalid rfc slot id" log to include...
Fred Quintana [Sat, 16 Aug 2014 00:42:29 +0000 (00:42 +0000)]
am 212ffc1d: (-s ours) am 39277ce1: enhance the "invalid rfc slot id" log to include the caller\'s name

* commit '212ffc1d3bda659c8da35e10a50091b08db187b6':
  enhance the "invalid rfc slot id" log to include the caller's name

9 years agoam e68188f8: Bluetooth: Restarting PM timer during incoming rfcomm data.
Jeff Deng [Sat, 16 Aug 2014 00:02:53 +0000 (00:02 +0000)]
am e68188f8: Bluetooth: Restarting PM timer during incoming rfcomm data.

* commit 'e68188f83efc681a9a085359a473a2dab3bb94f1':
  Bluetooth: Restarting PM timer during incoming rfcomm data.

9 years agoBluetooth: Restarting PM timer during incoming rfcomm data.
Jeff Deng [Fri, 15 Aug 2014 23:00:06 +0000 (16:00 -0700)]
Bluetooth: Restarting PM timer during incoming rfcomm data.

During incoming rfcomm data, we were setting the pm mode to
active, thereby stopping timer and never restarting it again.
So it was never going to sniff , if the last packet is incoming
packet. Therefore add change to restart the PM timer during incoming
data.

Bug:17044698
Change-Id: I4396bb2f267b12cb92a944c15609ddeaa13288ad

9 years agoRemove IRK entry from controller when LE device is unpaired
Nitin Arora [Wed, 30 Jul 2014 23:41:06 +0000 (16:41 -0700)]
Remove IRK entry from controller when LE device is unpaired

Change-Id: I04f3087a4fb3d715fafcfa91510a48b78d49f27f

9 years agoEliminate userial thread race condition
Chris Manton [Fri, 15 Aug 2014 16:04:00 +0000 (09:04 -0700)]
Eliminate userial thread race condition

The userial thread MUST be torn down
BEFORE the hci worker thread
as the userial thread passes work to
the hci worker thread.

bug: 16708951
bug: 17008713

Change-Id: Ic744a06b81e7bba5f4d16707a7482a6b9ef437d1

9 years agoam 39277ce1: enhance the "invalid rfc slot id" log to include the caller\'s name
Fred Quintana [Fri, 15 Aug 2014 16:45:59 +0000 (16:45 +0000)]
am 39277ce1: enhance the "invalid rfc slot id" log to include the caller\'s name

* commit '39277ce1db191a1b58bc1d14b1ac786f9c60491b':
  enhance the "invalid rfc slot id" log to include the caller's name

9 years agoenhance the "invalid rfc slot id" log to include the caller's name
Fred Quintana [Thu, 14 Aug 2014 22:58:18 +0000 (15:58 -0700)]
enhance the "invalid rfc slot id" log to include the caller's name

this adds context to that log

Change-Id: I916532baaae67d45b8edc217137ef9eb452722e7

9 years agoMerge "Enable local privacy configuration based on flag" into lmp-dev
Andre Eisenbach [Wed, 13 Aug 2014 17:52:15 +0000 (17:52 +0000)]
Merge "Enable local privacy configuration based on flag" into lmp-dev

9 years agoFixed SMP failure for Privacy enabled Multi-Adv
Priti Aghera [Tue, 12 Aug 2014 21:31:28 +0000 (14:31 -0700)]
Fixed SMP failure for Privacy enabled Multi-Adv

When privacy is enabled and multi adv instance is used, SMP pairing
was failing as wrong local connection address was used. Included a fix
so that local connection address is always updated when connection handle
to adv instance mappping event is received.

Bug: 16872808
Change-Id: I288cd6cd85fe8547d0e85b1d8419a3412a993126

9 years agoEnable local privacy configuration based on flag
Priti Aghera [Mon, 11 Aug 2014 18:15:02 +0000 (11:15 -0700)]
Enable local privacy configuration based on flag

Included a check to make local privacy configuration only if
BLE_PRIVACY_SPT flag is TRUE. This fixes the compile time error
when privacy is disabled.

Bug: 16901853
Change-Id: I4eeff8d8f725970aba87f3231eac9fd727efa71f

9 years agoMerge "LE: Fix limited advertising not stopping after timeout" into lmp-dev
Andre Eisenbach [Wed, 13 Aug 2014 16:34:32 +0000 (16:34 +0000)]
Merge "LE: Fix limited advertising not stopping after timeout" into lmp-dev

9 years agoLE: Fix limited advertising not stopping after timeout
Andre Eisenbach [Tue, 12 Aug 2014 23:46:51 +0000 (16:46 -0700)]
LE: Fix limited advertising not stopping after timeout

When starting to advertise with a given timeout, the alarm did not fire
and thus not stop the advertising. This patch switchs from the new alarm
system to use BTU timers.

Also fixes a bug in the oneshot timer handling where adding a new timer
with a short timeout value would not actually restart the timer to pull
in the deadline.

Bug: 16988160
Change-Id: Ia556562675636be440ddca7682ac7d092bc0b48b

9 years agoMerge "A2DP: Protect against division-by-zero error in bitpool calculation" into...
Andre Eisenbach [Tue, 12 Aug 2014 23:50:53 +0000 (23:50 +0000)]
Merge "A2DP: Protect against division-by-zero error in bitpool calculation" into lmp-dev

9 years agoMerge "Fix batch scan not reporting regression." into lmp-dev
Wei Wang [Tue, 12 Aug 2014 20:12:38 +0000 (20:12 +0000)]
Merge "Fix batch scan not reporting regression." into lmp-dev

9 years agoProtect hci library cleanup with mutex
Chris Manton [Thu, 7 Aug 2014 23:23:41 +0000 (16:23 -0700)]
Protect hci library cleanup with mutex

hci library cleanup is no longer thread safe
and must have access serialized.

Change-Id: I155a09f6b0ab60dcc5e076ee1108a2bec8b96251

9 years agoFix batch scan not reporting regression.
Wei Wang [Mon, 11 Aug 2014 06:27:57 +0000 (23:27 -0700)]
Fix batch scan not reporting regression.

b/16912745

Change-Id: I6d011aa9c50e4352ec73b936ef9bf1503f2289d1

9 years agoMerge "LE: Fix multi-advertiser not rotation BDA correctly" into lmp-dev
Andre Eisenbach [Sun, 10 Aug 2014 21:08:57 +0000 (21:08 +0000)]
Merge "LE: Fix multi-advertiser not rotation BDA correctly" into lmp-dev

9 years agoA2DP: Protect against division-by-zero error in bitpool calculation
Andre Eisenbach [Sat, 9 Aug 2014 03:22:31 +0000 (20:22 -0700)]
A2DP: Protect against division-by-zero error in bitpool calculation

If the encoder parameters have not been configured correctly before the
SBC encoder is initialized, a division-by-zero can occur resulting in a
SIGFPE.

Bug: 16902125
Change-Id: Ie4c6715b6b374a2d62fcfa0a1a99d40c689d0e2a

9 years agoLE: Fix multi-advertiser not rotation BDA correctly
Andre Eisenbach [Sat, 9 Aug 2014 03:14:46 +0000 (20:14 -0700)]
LE: Fix multi-advertiser not rotation BDA correctly

The wrong timer function was invoked to trigger the address refresh.
Fixed to use one-shot timer instead.

Bug: 15086940
Change-Id: I2b890b0fb1ccf5a55e9d4ab70803e6d38693e3a5

9 years agoAdditional rebase fixes
Andre Eisenbach [Fri, 8 Aug 2014 06:25:48 +0000 (23:25 -0700)]
Additional rebase fixes

Change-Id: I0bb6c9f96987a7e8b8d91473681f5e208d3b844f

9 years agoFix Bluedroid rebase error
Andre Eisenbach [Fri, 8 Aug 2014 02:34:56 +0000 (19:34 -0700)]
Fix Bluedroid rebase error

Change-Id: I80a2f3767acaee6095389bb9579aad4241d7c42f

9 years agoLE: Add limited advertising duration capability (2/3)
Andre Eisenbach [Thu, 7 Aug 2014 22:19:33 +0000 (15:19 -0700)]
LE: Add limited advertising duration capability (2/3)

Change-Id: Id2ebc353f1bcd94978c5c8dc55a235c92ebc7658

9 years agoFix build error in bluedroid
Prerepa Viswanadham [Fri, 8 Aug 2014 01:30:59 +0000 (18:30 -0700)]
Fix build error in bluedroid

Change-Id: I6bcf655540f13db578948ac8eddde971637ed26b

9 years agoMoved per device tx power configuration capability in bdroid_buildcfg.h
git-zhenye.broadcom.com [Thu, 7 Aug 2014 19:50:16 +0000 (12:50 -0700)]
Moved per device tx power configuration capability in bdroid_buildcfg.h

Bug 16711526

Change-Id: Ia8099765113068fd3b211acb882702d3581bd4b1

9 years agoUse run time parameters to control LE features
Prerepa Viswanadham [Thu, 7 Aug 2014 18:38:06 +0000 (11:38 -0700)]
Use run time parameters to control LE features

Use values read from controller to enable and control LE features such as
multi advertising, RPA offload, maximum irk size etc

bug 15393216

Change-Id: I193e2b9a0dc61b86f667e986803571440e390160

9 years agoChange max GATT apps from 10 to 32.
Wei Wang [Thu, 7 Aug 2014 04:27:16 +0000 (21:27 -0700)]
Change max GATT apps from 10 to 32.

Fixes b/15706224

Change-Id: I663c09f9c04c669fc79e6ba3330d0c83468d9ea9

9 years agoam 4badab05: (-s ours) am c4766e31: Revert "commit 001ccea74ec61b1be00c8ede827f55c035...
Dmitry Grinberg [Wed, 6 Aug 2014 21:42:54 +0000 (21:42 +0000)]
am 4badab05: (-s ours) am c4766e31: Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshivpur@codeaurora.org> Date:   Tue Jun 17 16:29:18 2014 +0530"

* commit '4badab05fadbe71a8759f46c1997ecec07700b7d':
  Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshivpur@codeaurora.org> Date:   Tue Jun 17 16:29:18 2014 +0530"

9 years agoam c4766e31: Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin...
Dmitry Grinberg [Wed, 6 Aug 2014 21:38:22 +0000 (21:38 +0000)]
am c4766e31: Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshivpur@codeaurora.org> Date:   Tue Jun 17 16:29:18 2014 +0530"

* commit 'c4766e31eae58e417ab265b5d3ae637efcedfb5e':
  Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshivpur@codeaurora.org> Date:   Tue Jun 17 16:29:18 2014 +0530"

9 years agoRevert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshiv...
Dmitry Grinberg [Wed, 6 Aug 2014 21:18:08 +0000 (21:18 +0000)]
Revert "commit 001ccea74ec61b1be00c8ede827f55c0359d1051 Author: Nitin Shivpure <nshivpur@codeaurora.org> Date:   Tue Jun 17 16:29:18 2014 +0530"

Bug: 16786608
This reverts commit 8d502374a5f903e85d77c2a4476f90dd9d85de47.

Change-Id: I29aae4e68960578ade8b6b7206c97da9b947bbef

9 years agoBT MAP: added support for email sharing over BT
Matthew Xie [Thu, 27 Mar 2014 14:22:02 +0000 (15:22 +0100)]
BT MAP: added support for email sharing over BT

- added more dynamic SDP record name setting for MAP in order to support
multiple mas instances with different name strings.

Change-Id: I7a78da3ba9707a08d1f6a6245c27fc3f1b86d244

9 years agoMerge "Add transport parameter to createBond() function (2/4)" into lmp-dev
Andre Eisenbach [Tue, 5 Aug 2014 16:57:48 +0000 (16:57 +0000)]
Merge "Add transport parameter to createBond() function (2/4)" into lmp-dev

9 years agoAdd transport parameter to createBond() function (2/4)
Andre Eisenbach [Tue, 5 Aug 2014 00:50:10 +0000 (17:50 -0700)]
Add transport parameter to createBond() function (2/4)

Change-Id: I8176b932da705f8d0a230abd56bc5faa00005eb6

9 years agoMerge "LE batchscan consolidated reports" into lmp-dev
Wei Wang [Sun, 3 Aug 2014 23:46:06 +0000 (23:46 +0000)]
Merge "LE batchscan consolidated reports" into lmp-dev

9 years agoLE batchscan consolidated reports
Satya Calloji [Wed, 16 Jul 2014 00:37:13 +0000 (17:37 -0700)]
LE batchscan consolidated reports

Provide consolidated batchscan reports

Change-Id: Ie3da240c38b014fe29d4394438f3858fd4e731fa

9 years agoupdate test to build and run with latest BT HAL
Thierry Strudel [Fri, 1 Aug 2014 05:53:46 +0000 (22:53 -0700)]
update test to build and run with latest BT HAL

Change-Id: I497ac4649081a3244549e067fe6d5181ee2f7b2a
Signed-off-by: Thierry Strudel <thierry.strudel@intel.com>
9 years agoMerge "Blacklist Apple HID devices to skip SDP" into lmp-dev
Matthew Xie [Mon, 4 Aug 2014 23:25:19 +0000 (23:25 +0000)]
Merge "Blacklist Apple HID devices to skip SDP" into lmp-dev

9 years agoBlacklist Apple HID devices to skip SDP
Priti Aghera [Thu, 26 Jun 2014 18:23:51 +0000 (11:23 -0700)]
Blacklist Apple HID devices to skip SDP

Remote initiated HID connection fails as Apple devices goes out of resource.
During incoming connection SDP is performed after authentication is successful.
Apple device is out of resources and thus sends No resources available error
for SDP request. In order to avoid this situation a apple HID devices are blacklisted
to skip SDP after authentication in case of incoming connections.

bug 15566403

Change-Id: Ic7fdfd2543c90e81341b4d5b7bef9c1d1c11b928

9 years agoMerge "Fixed wrong return condition when all RFCOMM data was sent succesfully" into...
Andre Eisenbach [Sun, 3 Aug 2014 23:29:41 +0000 (23:29 +0000)]
Merge "Fixed wrong return condition when all RFCOMM data was sent succesfully" into lmp-dev

9 years agoFixed wrong return condition when all RFCOMM data was sent succesfully
Zhenye Zhu [Fri, 1 Aug 2014 18:32:32 +0000 (11:32 -0700)]
Fixed wrong return condition when all RFCOMM data was sent succesfully

Bug: 16566991
Change-Id: I4e0d2487b71e2d8ad8e571e88d2623db2852bb1e

9 years agoLE: Fix random address resolution when done in the stack
Andre Eisenbach [Sun, 3 Aug 2014 22:57:06 +0000 (15:57 -0700)]
LE: Fix random address resolution when done in the stack

If the local device does not support random address resolution in the
Bluetooth chip, it has to be performed in the host stack. This patch
fixes some instances where address resolution was not performed
properly, causing device reconnection to fail.

Change-Id: Ifb84a9fa44995caa3680d9a0b4248ef911eb9ad0