History log of /system/bt/stack/btm/btm_ble_gap.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3aa58c5fad5be75c559109ddce3ccd79ac807af9 15-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Fix compilation warnings/errors on fugu

Fix compilation warnings/errors on fugu about unused
variables.

Change-Id: Ib68097122f27c631ab36b71a6815d4e1f3b60558
/system/bt/stack/btm/btm_ble_gap.c
12265e39b511f28425236b0dc97c78e7d837304b 13-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Fix C/C++ compiler generated warnings

* Remove unused functions: -Wno-unused-function
* Fix logical operations that are missing parentheses:
-Wno-logical-not-parentheses, -Wno-parentheses
* Add missing braces in initializers: -Wno-missing-braces
* Remove unused variables: -Wno-unused-variable
* Fix printf()-like formatting issues: -Wno-format
* Avoid using unitialized variables:
-Wno-maybe-uninitialized, -Wno-uninitialized
* Fix a bug inside bta_gattc_get_gatt_db_impl()
when the processed GATT DB attribute type is unknown.
* Fix warnings about missing field initializers:
-Wno-missing-field-initializers
* Re-implement macro COMPILE_ASSERT(COND) to fix a compilation warning:
-Wno-non-literal-null-conversion
* Fix sign mismatch comparison warnings:
-Wno-sign-compare
* Fix warnings related to enum conversion:
-Wno-enum-conversion
* Fix warnings related to incompatible pointer types:
-Wno-incompatible-pointer-types
* Fix warnings related to enum conversion:
-Wno-enum-conversion

Bug: 26879229
Change-Id: I522931fe156aeab23ae841051a9e25ceab00b1c2
/system/bt/stack/btm/btm_ble_gap.c
cac784d772db7f42dc93acafb18e5d71617c04f3 01-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Keep sec_dev_rec in list instead of static array

This reduces the computational complexity of most BLE operations.

Change-Id: Ife35a50d9ef3467abdc5259c2712bf5d85b8f909
/system/bt/stack/btm/btm_ble_gap.c
7db2548c0346c1d33a46cc35b250e71fd24adae4 03-Feb-2016 Andre Eisenbach <eisenbach@google.com> Revert "Keep sec_dev_rec in list instead of static array"

Breaks pairing...

This reverts commit c9f86da73bfb637426c83b86497c50fede4e0f63.
/system/bt/stack/btm/btm_ble_gap.c
c9f86da73bfb637426c83b86497c50fede4e0f63 01-Feb-2016 Jakub Pawlowski <jpawlowski@google.com> Keep sec_dev_rec in list instead of static array

This reduces the computational complexity of most BLE operations.

Change-Id: I3997b414680ff4288091b1ddf00ec1ef1c4453fb
/system/bt/stack/btm/btm_ble_gap.c
78bcff79e1b1f0efce436b33bdd6da88745bfc8a 05-Dec-2015 Pavlin Radoslavov <pavlin@google.com> Refactor the Bluetooth timers

* Updated the alarm API:
- Existing API alarm_new() is modified to take an alarm name
as an argument.
- New API alarm_new_periodic() is used to create a periodic
alarm.
- Added new API alarm_is_scheduled() to test whether an alarm is
scheduled.
- Existing API alarm_set_periodic() is removed: a periodic
alarm is created by alarm_new_periodic().
- Added new API alarm_set_on_queue() to set an alarm whose
callback is executed on a specific queue.
- Added new API alarm_register_processing_queue() and
alarm_unregister_processing_queue() to register/unregister
a queue and the corresponding thread for alarm processing.
- Added corresponding unit tests.

* Updated the alarm internals:
- Added alarm_info_t for collecting alarm-related information
and statistics.
- Collect and store alarm-related statistics into alarm_info_t
per alarm.
- Include the alarm-related statistics and info into the native
dumpsys output for Bluetooth.
- Once an alarm expires, the alarm execution is scheduled for
processing on another internal alarm-specific thread, not
on the thread that is maintaining the alarms.
- Implemented callback execution ordering guarantee among
timers on the same thread with exactly same timeout values.

* Refactor some of the usage of alarm_set() and simplify the
code by using alarm_set_on_queue() instead.

* Removed the non_repeating timers wrapper, and use directly
the alarm mechanism / API.

* Refactored all timer_entry_t timers and replaced them with alarm_t
timers:
- Replaced the btu_start_timer() / btu_stop_timer() /
btu_start_quick_timer() / btu_stop_quick_timer() /
btu_oneshot_alarm() mechanism with alarm_set_on_queue() and
alarm_cancel()
- Removed the whole mechanism around the BTU_TTYPE_* timers.

* Fixed a bug when processing the GATT indication confirmation timer
expiration (timer tGATT_TCB.conf_timer: b/26610829).

* Renamed and/or split misc. timeout functions, fields, and timers

* Renamed time-related constants and changed the values from seconds
to milliseconds

* Replaced timer tAVDT_CCB.timer_entry with three mutually exclusive timers:
idle_ccb_timer, ret_ccb_timer, rsp_ccb_timer
The reason we are using three timers, is because in the original code
function avdt_ccb_chk_timer() used the timer type in its logic: it
would stop the timer only if the type is "idle".

* Removed btm_ble_timeout() and replaced it with multiple timeout
callback functions (per timer)

* Fix the actual value of the global constant BT_1SEC_TIMEOUT and
rename it to BT_1SEC_TIMEOUT_MS

* Removed btu_cb and associated timers and events, because they are
never used.

* Removed unused timers, functions, struct and declarations that are
not used / needed.

Bug: 26611369
Bug: 26610829

Change-Id: I812c8c31710a5daefc58b01fcf35c353768f390f
/system/bt/stack/btm/btm_ble_gap.c
284ff6b4806646a24612fc27fe567d9da17e088f 29-Oct-2015 Andre Eisenbach <eisenbach@google.com> Serialize remote version query over LE

Some devices (ex. Nexus Player remote) do not take well to having the
remote version queried while a remote feature request is also sent and
subsequently fail encryption.

This patch serializes the query of the remote version and requires both
remote features and the remote version to be read before calling a
connection established.

Bug: 25357767
Change-Id: Ie70eea241b47b81778d8e0df47f3a8f376316932
/system/bt/stack/btm/btm_ble_gap.c
9f1c9ad85759c7663e3bbc494f8e75b2f107da67 28-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Moved struct TIMER_LIST_ENT to OSI

* Moved struct TIMER_LIST_ENT to file osi/include/non_repeating_timer.h
and renamed it to timer_entry_t
NOTE: This is a short-term solution. timer_entry_t should be
removed, and its usage everywhere should be replaced by
struct non_repeating_timer_t .
* Renamed TIMER_CBACK to timer_callback_t
* Renamed TIMER_PARAM_TYPE to timer_param_t

Change-Id: I9ca830718bf900195f9c0a513a97f6995322693b
/system/bt/stack/btm/btm_ble_gap.c
1a3844f933bd63c8a381371dabfb35c6a0249e3e 25-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue

* Added new functions to OSI:
- fixed_queue_init()
- fixed_queue_length()
- fixed_queue_try_remove_from_queue()
- fixed_queue_try_peek_last()

* Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first()

* Replaced usage of GKI queue functions with OSI fixed_queue functions:
- GKI_init_q() -> fixed_queue_new(SIZE_MAX)
NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory /
state that needs to be released by calling fixed_queue_free()
- GKI_enqueue() -> fixed_queue_enqueue()
- GKI_dequeue() -> fixed_queue_try_dequeue()
NOTE: fixed_queue_try_dequeue() is non-blocking
- GKI_queue_length() -> fixed_queue_length()
- GKI_queue_is_empty() -> fixed_queue_is_empty()
- GKI_getfirst() -> fixed_queue_try_peek_first()
- GKI_getlast() -> fixed_queue_try_peek_last()
- GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue()
- Queue elements iteration.
In the fixed_queue implementation we have to use the underlying
list_t mechanism to iterate over the elements.
OLD:
p = GKI_getfirst(queue);
...
while ((p = GKI_getnext(p) != NULL) {
...
}
NEW:
list_t *list = fixed_queue_get_list(queue);
for (const list_node_t *node = list_begin(list);
node != list_end(list); node = list_next(node)) {
p = list_node(node);
}

* Remove initialization of the GKI module, because it is not needed
anymore

* Removed unused files in GKI:
gki/common/gki_common.h
gki/ulinux/gki_int.h
gki/ulinux/gki_ulinux.c

Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
/system/bt/stack/btm/btm_ble_gap.c
1a1b3ebb41aa89f0ab38ea6ef41444f7f9b010f5 24-Aug-2015 Ian Coolidge <icoolidge@google.com> am bc6ad53e: Merge "Improve adv_data transfer between contexts."

* commit 'bc6ad53e310c2b6b1734883e8d92f5c147279d23':
Improve adv_data transfer between contexts.
7af80bbe9c57086b0d1e62168f7787484a8a231f 14-Aug-2015 Iliyan Malchev <malchev@google.com> am 1e1f1598: Merge "[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn\'t match" into mnc-dev

* commit '1e1f1598c0574ccda0978bc31bf759708c33a0c9':
[DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match
d4c103624b3d7672110abeb753ed79113ee48989 08-Aug-2015 Ian Coolidge <icoolidge@google.com> Improve adv_data transfer between contexts.

- Drops some unused members from btgatt_multi_adv_inst_cb.
- Flatten tBTA_BLE_ADV_DATA to only require one allocation.
- Copy all of tBTA_BLE_ADV_DATA contents to bt_workqueue_thread.

Bug: 23042223
Change-Id: I5f4d25d5cdd39731a2dfe64394928b7fb77c7c7c
/system/bt/stack/btm/btm_ble_gap.c
08393054f0867d0f86a7f9c2eb156e67a86382c7 07-Aug-2015 Marie Janssen <jamuraa@google.com> resolved conflicts for merge of 49a86709 to mnc-dev-plus-aosp

Change-Id: Icd7ec2fd78ac4383da430708a88abaeba9009437
5aad24f5f41a1260a81c63dc689cb2849a860e28 07-Aug-2015 Jacob Lee <jacob.lee@mediatek.com> [DS] BTM_VSC_CHIP_CAPABILITY_M_VERSION doesn't match

In the document, the supported version is 96.
But, the defined supported version is 95 in the code.
The callback function btm_ble_vendor_capability_vsc_cmpl_cback
can not read number of track entries when it compare with 95
and supported version from firmware.

Bug: 22906552

Change-Id: I64e6f14f34ef3ed0ddc3fee2fad05eb03e5938f1
Signed-off-by: Jacob Lee <jacob.lee@mediatek.com>
/system/bt/stack/btm/btm_ble_gap.c
49a86709488e5cfd5e23759da18bf9613e15b04d 08-Jul-2015 Marie Janssen <jamuraa@google.com> build: LOG_TAG consistency, include order, build fixes

Fix the order of includes across a bunch of files, and declare LOG_TAG
at the top of every file in which it is used.

Consistently use bt_ as a LOG_TAG prefix.
Fix issues with LOG macro usage.
Remove unused includes and double-includes (when in related .h)

Add includes as necessary to compile cleanly (problems surfaced by
reordering includes)

Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6
/system/bt/stack/btm/btm_ble_gap.c
3feea42be114f26bc983b1af0228e3e109960196 30-Jul-2015 Andre Eisenbach <eisenbach@google.com> am 48a4b9cd: Assign pseudo address for host-based RPA resolution matches

* commit '48a4b9cd18a306a45249898008c73f80fb3b9d48':
Assign pseudo address for host-based RPA resolution matches
48a4b9cd18a306a45249898008c73f80fb3b9d48 29-Jul-2015 Andre Eisenbach <eisenbach@google.com> Assign pseudo address for host-based RPA resolution matches

Bug: 21963935
Change-Id: Id72001ce17996ea04c3eba32cebcac4dbbe317bc
/system/bt/stack/btm/btm_ble_gap.c
263cc8773270c298bb6491302bf466f2bc0f7132 15-Jul-2015 VenkatRaghavan VijayaRaghavan <venkatrv@broadcom.com> am 76356aee: Bug fix PM changes and LE connectivity mode fixes

* commit '76356aee883af67898ddc1aa3b628195f396d42a':
Bug fix PM changes and LE connectivity mode fixes
76356aee883af67898ddc1aa3b628195f396d42a 21-Apr-2015 VenkatRaghavan VijayaRaghavan <venkatrv@broadcom.com> Bug fix PM changes and LE connectivity mode fixes

Allow PM to support multiple delay timer for different profiles and
power mode requests. And set correct connectivity mode.

Bug: 22040710
Change-Id: Idabd9ea944f0c5a89ce542d85db9f103fa7d1816
/system/bt/stack/btm/btm_ble_gap.c
d33e39f14834ddfcfad27b9bef5ffb87919a8644 07-Jul-2015 Marie Janssen <jamuraa@google.com> am db554581: build: Update osi log functions, use consistently

* commit 'db554581079863974af8e1289646f5deea6fc044':
build: Update osi log functions, use consistently
db554581079863974af8e1289646f5deea6fc044 26-Jun-2015 Marie Janssen <jamuraa@google.com> build: Update osi log functions, use consistently

Update the LOG_* functions to take a tag argument which makes them more
consistent with the Android Log.*(TAG, s) common syntax and removes
some #define-dependency with osi/include/log.h.

Also update to never use Android log functions directly.

Also contains minor cleanup of some header includes.

Bug: 21569831
Change-Id: If07385cafbea062232ecdbc7c673f908d5ef8921
/system/bt/stack/btm/btm_ble_gap.c
0479f714f561a1c4b05af6f27deac42d496055b6 24-Jun-2015 Nitin Arora <niarora@codeaurora.org> am 11e6c293: Configure Bluetooth Low Energy scan parameters correctly

* commit '11e6c2939f63398e86757d08eac32ef1d4f89fdf':
Configure Bluetooth Low Energy scan parameters correctly
11e6c2939f63398e86757d08eac32ef1d4f89fdf 30-Sep-2014 Nitin Arora <niarora@codeaurora.org> 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
/system/bt/stack/btm/btm_ble_gap.c
cab5fc179730ce6910989307680b275195876c4d 02-Jun-2015 Arman Uguray <armansito@google.com> 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
/system/bt/stack/btm/btm_ble_gap.c
a021a12987c4257d137437c6de9438b3344c6f6b 21-May-2015 Andre Eisenbach <eisenbach@google.com> Fix build after cross-key issues broke non privacy enabled builds

Change-Id: Idef7239b07115be9290d7cca6610c603ffb3afa5
/system/bt/stack/btm/btm_ble_gap.c
70b9598970e5b18ba53c282319e68faea6eb5681 24-Apr-2015 Satya Calloji <satyac@broadcom.com> Static address is seen on scanner after unpairing

Fix for bonded devices that cannot be removed from resolving list when
scanning, advertising or when a connection is being initiated.
Suspend all active adv, scanning or connection initiation upon
completion of any resolving list operation.

Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: Id104dace2944b1878eaf65b93aba3d01e477191d
/system/bt/stack/btm/btm_ble_gap.c
3e46b83098196782328c339f5fe8021dc52172fc 07-May-2015 Satya Calloji <satyac@broadcom.com> Fix for chip capability version check

Fixes the issue of extended scan command being sent out
for non-capable chipsets

Bug: 20916419
Change-Id: Ib5d848f49c34a3fc9c053a7488e12fb0c252587c
/system/bt/stack/btm/btm_ble_gap.c
935324abbe8706307297f09cf79bbcd4efb73367 31-Mar-2015 Satya Calloji <satyac@broadcom.com> LE low power scan feature

LE low power extended scan feature stack changes
based on Google BLE spec v0.95

Bug: 20029342
Change-Id: I1db2d9bb648295340d0e93ca89d27e1b938d33d3
/system/bt/stack/btm/btm_ble_gap.c
a9c5301d8dcddedc46f6a713039b60b3cb0e2bf6 21-May-2015 Andre Eisenbach <eisenbach@google.com> Fix build after cross-key issues broke non privacy enabled builds

Change-Id: Idef7239b07115be9290d7cca6610c603ffb3afa5
/system/bt/stack/btm/btm_ble_gap.c
877123f5b9df90e7a71ea7b15997c521229decc1 24-Apr-2015 Satya Calloji <satyac@broadcom.com> Static address is seen on scanner after unpairing

Fix for bonded devices that cannot be removed from resolving list when
scanning, advertising or when a connection is being initiated.
Suspend all active adv, scanning or connection initiation upon
completion of any resolving list operation.

Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: Id104dace2944b1878eaf65b93aba3d01e477191d
/system/bt/stack/btm/btm_ble_gap.c
b151a436f34546ca53f5ca86487f430767df6391 07-May-2015 Satya Calloji <satyac@broadcom.com> Fix for chip capability version check

Fixes the issue of extended scan command being sent out
for non-capable chipsets

Bug: 20916419
Change-Id: Ib5d848f49c34a3fc9c053a7488e12fb0c252587c
/system/bt/stack/btm/btm_ble_gap.c
f6c48a09e398de804f7d563a44904e917afd2c32 08-May-2015 Brian Carlstrom <bdc@google.com> Resetting system/bt

git reset --hard fa5fec7c98ff3c56bd825bc51a1d28bdc3bad0bb^^
git reset --soft aosp/master
git commit -a

Change-Id: I2939d9bbd825110a42a71008e5255945e38a77e1
/system/bt/stack/btm/btm_ble_gap.c
5725fc6d2c639a8c22a08b9b6629309eeda3715e 31-Mar-2015 Satya Calloji <satyac@broadcom.com> LE low power scan feature

LE low power extended scan feature stack changes
based on Google BLE spec v0.95

Bug: 20029342
Change-Id: I1db2d9bb648295340d0e93ca89d27e1b938d33d3
/system/bt/stack/btm/btm_ble_gap.c
e28055315f96c0d06e73a66a9bb06df85247b5a7 22-Apr-2015 Chaojing Sun <cjsun@broadcom.com> Cross transport key mapping fixes

Change-Id: I22d97303054eccc876c4a9c7c0a50e369ff4fa62
/system/bt/stack/btm/btm_ble_gap.c
b8b3e8070ad027e7a45ca5048ae807c4ec099b15 18-Apr-2015 Priti Aghera <paghera@broadcom.com> Initialize white list size after stack reset

The white list size is not currently set correctly, preventing devices
from being added to the LE whitelist, thus completely breaking
re-connects.

This fixes the white list management and propagates the correct reason
code for HID close events to make sure a device is re-added to the white
list if necessary.

Bug: 20290744
Change-Id: I46d7254ff3568c9964688cb192b9deb6b7d3062d
/system/bt/stack/btm/btm_ble_gap.c
2cd086a11a972f2e437dd521a121ed76ea79a15a 15-Apr-2015 Vinit Deshpande <vinitd@google.com> am f29a2fb..e07ad10 from mirror-m-wireless-internal-release

e07ad10 merge in m-wireless-internal-release history after reset to d232721ae5e5b6949a5249f0d116408b8a3c5f1d
d232721 L2CAP socket - fix merge errors
899b771 BR/EDR secure connections support
7fb0da6 Support numeric comparison in SMP
aa351f2 merge in m-wireless-internal-release history after reset to 399e89150b3df87172bdf92d54712b379324b149
399e891 Fix for AVRCP CTRL stops sending pass through command
daddea9 Free Avrcp Controller callbacks on Cleanup
764babe Protect reset of out stream with mutex
444a8da LE Privacy 1.2 and LE secure connections
8372aa5 L2CAP and SDP Search API for BT profiles (2/2)
fd422a7 Update Service Availability.
2a0652a merge in m-wireless-internal-release history after reset to 0b47e0a35c16f5b7d77c30ec1c095ed92ff4fd74
78d0f4c merge in m-wireless-internal-release history after reset to m-wireless-internal-dev
0b47e0a Avoid duplicate disconnection callbacks for fixed channel connections
5646973 Add a section on assertions to the style guide.
d768767 Merge "Avoid null-pointer dereference in l2c_release_lcb()" into m-wireless-dev
ef92b53 Avoid null-pointer dereference in l2c_release_lcb()
4bf68bf merge in m-wireless-internal-release history after reset to f538707fe64c62b1dbb8e4210e4a1bfa0bab2b56
de6ac86 Add a 'Bluedroid conventions' section to the style guide.
1b80439 Add a section to the style guide on variable declarations.
485f19e merge in m-wireless-internal-release history after reset to 4540f59bc447dc2b7b31a3e974b74a60b2417e7d
bef8940 merge in m-wireless-internal-release history after reset to 841c9103cad1898ceca87b734acd4d4537f9f452
ab4c38c merge in m-wireless-internal-release history after reset to a7e698f5a9e062f62e21bc435643975c30bab846
2807a74 merge in m-wireless-internal-release history after reset to a7e698f5a9e062f62e21bc435643975c30bab846
99dbe9a merge in m-wireless-internal-release history after reset to 78c0b060f29b7b7014adddb2f98bf6ae9755c488
f7f8399 merge in m-wireless-internal-release history after reset to a5371c238b4e874d8313ac56a23451e7345ff541
3aa60d7 Make A2DP audio HAL a shared library again
3256a31 Move unused include file out of hci_audio.h
b866b69 Add option for schedule_next_instance to force rescheduling
4ae5e3e Ensure alarms are called back when they expire in the past
a7bd03e Rewrite alarms to use a single posix timer instance
88e7b15 Resolved hardware error observed during SCO Connection setup

Change-Id: Ib9a0a2ffca1d4811a9a9e56674bf43275d8b2205
444a8da807abaf5f9e813ce70c56a79160495fb3 06-Mar-2015 Satya Calloji <satyac@broadcom.com> LE Privacy 1.2 and LE secure connections

Bug: 19816438
Original author: Chaojing Sun <cjsun@broadcom.com>
Change-Id: I5951f4d4e038f8348a62aa6d19b2111bae0b3ecc
/system/bt/stack/btm/btm_ble_gap.c
b246a1a750c5a337faaa6033b39e78c8bdd4c2fb 10-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '4bf68bf020c7fd1aabcdc4b5d8f5fbb8bacdec9d' into merge_work

Change-Id: Ibc6d6e691b7f97611d16f96220346dfd6ffbbf52
f538707fe64c62b1dbb8e4210e4a1bfa0bab2b56 10-Feb-2015 Satya Calloji <satyac@broadcom.com> OnFound/OnLost feature changes based on Google spec v0.90

Bug: 19609671
Change-Id: If9e61b405a141cb77fb65741d08227284cb22ccd
/system/bt/stack/btm/btm_ble_gap.c
7cf7da925d73600f108be6efcf9a542f14c93063 05-Feb-2015 Satya Calloji <satyac@broadcom.com> Set dual-mode bits correctly in multi-adv instance flags

Bug: 19369962
Change-Id: I081f9db56d52e85cff50f668752322b8ab8adf42
/system/bt/stack/btm/btm_ble_gap.c
e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe 31-Mar-2015 Etan Cohen <etancohen@google.com> Merge commit 'f7f839985b3931682363d2ef3b7c5cae55a842ee' into merge

Change-Id: Iaaec1ea0bf3009b7e32a9a60f697631a3f56e889
f8027005333c88a2f097cfd70d15c3d54c7764ae 12-Mar-2015 Chris Manton <cmanton@google.com> Demote, cleanup and extend observed logging
/system/bt/stack/btm/btm_ble_gap.c
a330b102cc2f0b87919ff457563a3a722a73dd67 29-Dec-2014 Sharvil Nanavati <sharvil@google.com> Collapse RFCOMM_INCLUDED and GAP_INCLUDED guards.

Both of these features are always available in bluedroid.
/system/bt/stack/btm/btm_ble_gap.c
44802768c447ab480d4227b3a852a97d923b816d 24-Dec-2014 Sharvil Nanavati <sharvil@google.com> Add platform-independent logging macros to OSI.

These macros should replace ALOG* and the various trace macros
used throughout bluedroid. This change eliminates all uses of the
ALOG* macros in favor of the new ones.
/system/bt/stack/btm/btm_ble_gap.c
79ecab5d0418fde77e9afcdd451bd713af73e180 31-Oct-2014 Chris Manton <cmanton@google.com> Move controller module to device directory
/system/bt/stack/btm/btm_ble_gap.c
34b6a92011ac1ed94c9eaf4da9cbd1e7bfaef910 23-Oct-2014 Chris Manton <cmanton@google.com> Remove always true BTM_USE_INQ_RESULTS_FILTER
/system/bt/stack/btm/btm_ble_gap.c
584846a2109f8b34b3794683b61c8322ad6eb11a 15-Oct-2014 Chris Manton <cmanton@google.com> Remove always true BTM_BUSY_LEVEL_CHANGE_INCLUDED
/system/bt/stack/btm/btm_ble_gap.c
a87c8214181c5828dae719dd2b884a12652a1744 29-Oct-2014 Zach Johnson <zachoverflow@google.com> Fix BLE GAP handling after callback refactoring

BLE supported states was moved to controller during the callback
re-factoring CL, but in the commotion I forgot to remove the
supported states variable from devcb.

This meant I didn't realize GAP was looking at the wrong place
for BLE supported states. This CL fixes that.
/system/bt/stack/btm/btm_ble_gap.c
30e58068c1adaac7c5ccb3aa9cfb045d41d2a10e 27-Sep-2014 Zach Johnson <zachoverflow@google.com> Refactor btm_devctl reset sequence

* Controller bring up on blockable thread now
* Removed some duplicate and commands during controller bring up
* The code to make commands for controller bring up is smaller and better
/system/bt/stack/btm/btm_ble_gap.c
24933b5b1a06274c47133debac5251a97128a267 25-Sep-2014 June R. Tate-Gans <jtgans@google.com> Removing unnecessary BTAPI #defines.
/system/bt/stack/btm/btm_ble_gap.c
11cf5ccd5cd6dd1568bf69e4b6cbc27c95f5026d 11-Dec-2014 Chih-Hung Hsieh <chh@google.com> resolved conflicts for merge of ed0bdd42 to lmp-mr1-dev-plus-aosp

Change-Id: Ife8b72d3688ed78a95ccb8d5e0b60f40e7fec9e9
104e3f238f500cacdb8afaccdc672dfc34eae7ee 12-Nov-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Cleanups needed to make clang happy

This patch removes a slew of unused variables and some unused functions,
fixes some incomplete initializations of structs and an sprintf
parameter mismatching the format string.

Change-Id: I35f22fdccc8350f885cd357d3685b869224fa433
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/system/bt/stack/btm/btm_ble_gap.c
72833a19b228fbe5e1931255b325edf0bce0b994 17-Oct-2014 Wei Wang <weiwa@google.com> Remove spammy log information for BLE scan.

Bug:17574681
Change-Id: Ia33d0a845d5a4ac5aa58bd32529aeae60db4fd49
/system/bt/stack/btm/btm_ble_gap.c
de898558badd0d575829c4011fdffd33c548c1d6 06-Oct-2014 Wei Wang <weiwa@google.com> Merge "Fix an "array index out of bound" bug for RPA." into lmp-dev
d5aa24750c2202ce944560c2c27ead0214e8350d 24-Sep-2014 Satya Calloji <satyac@broadcom.com> LE: Peer device's latest RPA is not being applied

The latest discovered address is not used when reconnecting to devices
using resolvable private addresses, if RPA resolution offloadin is not
supported in the controller.
This patch also address the exception case where BT off is memseting
all control value while the IRK list is still being cleaned up.

Bug: 17187661
Change-Id: Ifeb5b8297e7eadb0e34ec1afbd41f46bdd836cf3
Author: Chaojing Sun <cjsun@broadcom.com>
/system/bt/stack/btm/btm_ble_gap.c
21015a484b3fa3d7aa7cdc291b30238089d14f4e 03-Oct-2014 Wei Wang <weiwa@google.com> Fix an "array index out of bound" bug for RPA.

Also returns no more than BTM_BLE_MULTI_ADV_MAX for max advertise
instances.

Bug:17810619
Change-Id: If655e207b641fd4cd1590ae47b28185dc9f7cbbb
/system/bt/stack/btm/btm_ble_gap.c
b5c2cdc900b368a45401cadb6fa00cd2ce574d61 06-Dec-2013 Nitin Arora <niarora@codeaurora.org> Remove HOGP device from background connection list

This adds logic to remove the device from whitelist when user unpairs or
disconnects device.
Bug: 17318494
Change-Id: I43c06dd16c665f9ce2e71a0e031c4f0f11a4012e
/system/bt/stack/btm/btm_ble_gap.c
3f24f460ec3efedde25723e6a4297efc10873cd2 17-Sep-2014 Satya Calloji <satyac@broadcom.com> All 00 mac address with advt

Read the controller features before local name read

Bug 17505545
Change-Id: I7995a8c714ebec6e1751af5371edfd29c74b12ea
/system/bt/stack/btm/btm_ble_gap.c
24adb37e4106bf8544c7729d34451fdf2777c4dc 10-Sep-2014 Priti Aghera <paghera@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
7ae25156f4250af9d0e8cd8d559d916cfb847feb 11-Sep-2014 Prerepa Viswanadham <dham@google.com> 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
/system/bt/stack/btm/btm_ble_gap.c
7bf480e3e3e1df04c0be6d466d8dffac5abaae40 08-Sep-2014 Priti Aghera <paghera@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
9c29d08bc7c6da33db5cfc777404354c6dca845c 03-Sep-2014 Priti Aghera <paghera@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
2bfa490a23a3b8ad6c992db4bb74f560a6a059e3 04-Sep-2014 Priti Aghera <paghera@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
720405962c82ab8d43995e8631b25a76a3dcceba 21-Aug-2014 Matthew Xie <mattx@google.com> use correct trace debug level

Change-Id: I997f5f9395af6c5da0403dc496317b2bad1683e6
/system/bt/stack/btm/btm_ble_gap.c
16fe0822ccd3eb6f66d3afd9965d25a0a0cb4c30 07-Aug-2014 Prerepa Viswanadham <dham@google.com> 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
/system/bt/stack/btm/btm_ble_gap.c
4a7ad9be81cc2b515502f2c1fb1b7ec7e3104146 30-Jul-2014 Satya Calloji <satyac@broadcom.com> Tx power is 0 in ADV packet

b/15412969 Tx power is always 0 in advertising packet

Change-Id: I7eb1f16b5fb1ab4ed669ba6a72f9603885cebc99
/system/bt/stack/btm/btm_ble_gap.c
e5ba8841cd39e17c05aeb4ab65b5b761d41577da 04-Jul-2014 Satya Calloji <satyac@broadcom.com> LE energy info feature

Stack and BT-IF changes for LE energy feature

Change-Id: I671e63aaead210c6352b45a5e20ad5e4bbbb77b7
/system/bt/stack/btm/btm_ble_gap.c
dab87145ee90c71bcec1b78a55ad5a011322ce34 19-Jul-2014 Mike J. Chen <mjchen@google.com> Make auto connect work for multiple known BLE devices

Due to a bug with wl_state not ever setting WL_INIT,
auto connect was not working for more than one known
BLE device after a reboot. The fix is to set the WL_INIT
flag when in initiator state.

I also added code to set the WL_SCAN flag when in
scanning state. Not sure if that fixes any bug but
it looks like it should have been done too.

WL_ADV was the only state flag previously being set.

Bug 16404692

Change-Id: Id42907c0d8301e347e603684e2c03e4905bfec49
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/stack/btm/btm_ble_gap.c
1a9247a1229aa65b3d1dce16426177bc5828e54d 05-Jun-2014 Satya Calloji <satyac@broadcom.com> LE ADV Filter changes

BTIF and stack layer changes for ADV filter feature

Change-Id: I865e57c41802751e172248547b8510598261ec94
/system/bt/stack/btm/btm_ble_gap.c
c4e2596a112a0dd63ac681b1226548c0f95e828c 11-May-2014 Satya Calloji <satyac@broadcom.com> LE batch scan feature

BTIF and stack changes for batch scan feature

Change-Id: I4dd2d551435e9f1f0e43906bd695294e97ed4bba
/system/bt/stack/btm/btm_ble_gap.c
21cf5dbe659716e5ac6cae107b7734b97c16fd94 30-Jun-2014 Nitin Arora <niarora@codeaurora.org> am 021e17a6: Clear background conn list entries during BT power off

* commit '021e17a641e61e3f139717cd755bf6f9b9b9eb12':
Clear background conn list entries during BT power off
021e17a641e61e3f139717cd755bf6f9b9b9eb12 30-Jan-2014 Nitin Arora <niarora@codeaurora.org> Clear background conn list entries during BT power off

This clears whitelist entries and resets bgconn device lists

Change-Id: I551791d63fa826071c113abd383540838f6c59b2
/system/bt/stack/btm/btm_ble_gap.c
26112633d80098314048914c0be33442a0048fb7 07-Jun-2014 Sharvil Nanavati <sharvil@google.com> Fix build: BTM_BleLocalPrivacyEnabled is called from outside BLE_PRIVACY_SPT guard.

Change-Id: I1ca7f824e035b496c9c038b9afdb4c4f2af4234b
/system/bt/stack/btm/btm_ble_gap.c
3a4b1aca3e8e5c8407f0a431b2d276ff78f4c86f 06-Jun-2014 Nitin Arora <niarora@codeaurora.org> Bluetooth: Assign max adv instance value from vendor capabilities

This change assigns the value of the max instances supported
for multiple advertisement, to the multi adv block

Change-Id: Ide181f8cad7a290a0dac8fdd01ae3ed2187868ef
/system/bt/stack/btm/btm_ble_gap.c
8d41691e6b16ba945711e8c3846df1ec70fdb724 31-May-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Support for reading LE specific controller features

Support for reading LE specific controller features via get adapter properties
API

Change-Id: Ia0b813be45fb826ce27d1d7a31ca41650d7286dd
/system/bt/stack/btm/btm_ble_gap.c
5344d6dcb09a184eaf1f9e46cc1ac3962822435c 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: HCI and BTM trace macros.

Change-Id: Icdea5aede9fde2c11d0cde745a9bedc26d69640c

Conflicts:
stack/btm/btm_acl.c
stack/btm/btm_ble.c
stack/btm/btm_ble_bgconn.c
stack/btm/btm_ble_gap.c
stack/btm/btm_inq.c
stack/btm/btm_pm.c
stack/btm/btm_sec.c

Conflicts:
stack/btm/btm_ble_gap.c
stack/btm/btm_sec.c
/system/bt/stack/btm/btm_ble_gap.c
c0048149c344473218f746f435dc2ab4181e689d 07-Jun-2014 Sharvil Nanavati <sharvil@google.com> Fix build: BTM_BleLocalPrivacyEnabled is called from outside BLE_PRIVACY_SPT guard.

Change-Id: I1ca7f824e035b496c9c038b9afdb4c4f2af4234b
/system/bt/stack/btm/btm_ble_gap.c
b8cb95764ddfbed821ba03d3f24b53ac913f7cc3 06-Jun-2014 Nitin Arora <niarora@codeaurora.org> Bluetooth: Assign max adv instance value from vendor capabilities

This change assigns the value of the max instances supported
for multiple advertisement, to the multi adv block

Change-Id: Ide181f8cad7a290a0dac8fdd01ae3ed2187868ef
/system/bt/stack/btm/btm_ble_gap.c
9546abf9fc4400853803ee220482ae63e63f0d9d 31-May-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Support for reading LE specific controller features

Support for reading LE specific controller features via get adapter properties
API

Change-Id: Ia0b813be45fb826ce27d1d7a31ca41650d7286dd
/system/bt/stack/btm/btm_ble_gap.c
83c5256f1951db020d81412e1d595d7a37962f3e 04-May-2014 Sharvil Nanavati <sharvil@google.com> Logging cleanup: HCI and BTM trace macros.

Change-Id: Icdea5aede9fde2c11d0cde745a9bedc26d69640c

Conflicts:
stack/btm/btm_acl.c
stack/btm/btm_ble.c
stack/btm/btm_ble_bgconn.c
stack/btm/btm_ble_gap.c
stack/btm/btm_inq.c
stack/btm/btm_pm.c
stack/btm/btm_sec.c
/system/bt/stack/btm/btm_ble_gap.c
d8ab91712132bc3e03f01be1a73e557588094a0d 02-Jun-2014 Adam Hampson <ahampson@google.com> Merge "fix compliation when BLE_VND_INCLUDED is false"
bf6119caaa0edf418e014c1a724d9dac144dec7a 02-Jun-2014 Adam Hampson <ahampson@google.com> Merge "ble: use appearance uuid to determine class of device"
401b33c4d5c099f4afe34beae02d2c6839da533c 31-May-2014 Nitin Arora <niarora@codeaurora.org> am 66988a02: This patch contains bug fixes for solving race conditions for multiple advertisers and incorrect VS command length which makes uuid filters not working.

* commit '66988a022d219f5385b3f76e3ae26566ad80fb86':
This patch contains bug fixes for solving race conditions for multiple advertisers and incorrect VS command length which makes uuid filters not working.
845c2601ece4c2323a03c6d705cd16545f6df08a 27-May-2014 Adam Hampson <ahampson@google.com> fix compliation when BLE_VND_INCLUDED is false

Change-Id: I48785d6d36965fb03657523ee6eb48cb63fd5364
Signed-off-by: Adam Hampson <ahampson@google.com>
/system/bt/stack/btm/btm_ble_gap.c
e6c7450a2addbb856e68b66a726b71286f809b19 31-May-2014 Adam Hampson <ahampson@google.com> ble: use appearance uuid to determine class of device

The current code is inferring the cod of a ble hid device based on
the service type. This change uses the appearance uuid to map to
to an equivalent cod.

Bug: 15346094

Change-Id: I6ab2c49bc5e7e956a285c9684ddefb339944a3dc
Signed-off-by: Adam Hampson <ahampson@google.com>
/system/bt/stack/btm/btm_ble_gap.c
66988a022d219f5385b3f76e3ae26566ad80fb86 29-May-2014 Nitin Arora <niarora@codeaurora.org> This patch contains bug fixes for solving race conditions for multiple
advertisers and incorrect VS command length which makes uuid filters not
working.

b/15094154, b/15174583

Change-Id: I78746b923301fa47afb21f8bedb0d79b42f492b9
/system/bt/stack/btm/btm_ble_gap.c
fa994c9b7d63d381e33a5d63a7c97ae3edf4dc0f 29-May-2014 Nitin Arora <niarora@codeaurora.org> Bluetooth: Changes to enable features on KWD

This patch contains changes needed to enable features,
multiple advertisment, packet content filtering and
privacy mode on kwd branch

Change-Id: If95bfb38eafe26f16db20e7650865c2f19553548
/system/bt/stack/btm/btm_ble_gap.c
186cddb6f0e23f05742074b703c99805e3f37ac3 27-May-2014 Adam Hampson <ahampson@google.com> ble: handle multiple events within HCI_BLE_ADV_PKT_RPT_EVT HCI event

The Marvell 8797 chip will report both BTM_BLE_CONNECT_EVT and
BTM_BLE_SCAN_RSP_EVT events in a single HCI event.

Bug: 14386651

Change-Id: Id922dff9fa7f6ae8fc15ebbcca4fb9ec537e9f26
Signed-off-by: Adam Hampson <ahampson@google.com>
/system/bt/stack/btm/btm_ble_gap.c
ed534e330bf63c72e778fc8daae09ddd63c395b2 20-May-2014 Wei Wang <weiwa@google.com> Revert "Revert "LE: Add RRA offloading and vendor specific PCF commands""

This reverts commit 146bb736bc1cdfd679bbafcf3f33c7af612096b9.

Change-Id: Ie4e6b4d7118a622d04c46623add1073906366edf
/system/bt/stack/btm/btm_ble_gap.c
a6ce7751d84218c193eb90d390aef23217b1737e 20-May-2014 Wei Wang <weiwa@google.com> Revert "Revert "LE Multi ADV feature""

This reverts commit ea85048a8e86b1e1b6b725649f6bb0834ba17301.

Change-Id: I9a9305db4fabff07b4309a38f65361dca3f5f37c
/system/bt/stack/btm/btm_ble_gap.c
ea85048a8e86b1e1b6b725649f6bb0834ba17301 20-May-2014 Wei Wang <weiwa@google.com> Revert "LE Multi ADV feature"

This reverts commit 87776cf5e201b18646cbc16f11a7110d5ffe510c.

Change-Id: I5b544a5c965999096b665b1bd2edb021e3054be8
/system/bt/stack/btm/btm_ble_gap.c
146bb736bc1cdfd679bbafcf3f33c7af612096b9 20-May-2014 Wei Wang <weiwa@google.com> Revert "LE: Add RRA offloading and vendor specific PCF commands"

This reverts commit 15fa3be8ecd576b9ef88e20cf9a6f4bd765cbc6b.

Change-Id: Iaa484508ac664d4cb6c94758c2984d53263a902a
/system/bt/stack/btm/btm_ble_gap.c
15fa3be8ecd576b9ef88e20cf9a6f4bd765cbc6b 12-May-2014 Satya Calloji <satyac@broadcom.com> LE: Add RRA offloading and vendor specific PCF commands

Change-Id: Iadca8e73ceaadcd0429421ea70f1b76644e88c42
/system/bt/stack/btm/btm_ble_gap.c
87776cf5e201b18646cbc16f11a7110d5ffe510c 01-May-2014 Satya Calloji <satyac@broadcom.com> LE Multi ADV feature

BTIF and stack changes for LE multi ADV feature

Change-Id: I5e009ff8cbac5fc6f92ca943c61c4faf98e4e2ce
/system/bt/stack/btm/btm_ble_gap.c
0943c10ed5713a08659f08e39e13de4894aaba61 12-May-2014 Satya Calloji <satyac@broadcom.com> LE: Add RRA offloading and vendor specific PCF commands

Change-Id: Iadca8e73ceaadcd0429421ea70f1b76644e88c42
/system/bt/stack/btm/btm_ble_gap.c
ffb3960bb05f9acb0717d213612403487e9ad433 01-May-2014 Satya Calloji <satyac@broadcom.com> LE Multi ADV feature

BTIF and stack changes for LE multi ADV feature

Change-Id: I5e009ff8cbac5fc6f92ca943c61c4faf98e4e2ce
/system/bt/stack/btm/btm_ble_gap.c
7fa4fba6f59f97df00aff07dbe8fb21b114b3c2c 17-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
b6eec9b5426ce1b4d79fdebefa37aa213a0cbb1e 17-Apr-2014 Sharvil Nanavati <sharvil@google.com> 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
/system/bt/stack/btm/btm_ble_gap.c
8fe58875ce67c6e1099e7ba2339dcd2b979491b0 17-Apr-2014 Ganesh Ganapathi Batta <ganeshg@broadcom.com> 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
/system/bt/stack/btm/btm_ble_gap.c
2e1e6d89907172fadabc5d9bbef27198ce81cb00 17-Apr-2014 Sharvil Nanavati <sharvil@google.com> 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
/system/bt/stack/btm/btm_ble_gap.c
f96da0ee19d8eb9d159b965338bdd15d327cb474 22-Feb-2014 Zhihai Xu <zhihaixu@google.com> Allow simultaneous LE Observe and BTM Inquiry/Scan

This patch allows BTM inquiry and LE observe to be launched
and overlap each others' occurance by redirecting results
and handling states accordingly.

CRs-Fixed: 579505

Conflicts:
stack/btm/btm_ble_gap.c
bug 12939764
Change-Id: Ifde73f17f8d40e9ebfff3b49e409591189574ee0
/system/bt/stack/btm/btm_ble_gap.c
6f908b2cf977794342ce661d99c7d45b03dc6f58 11-Mar-2014 Zhihai Xu <zhihaixu@google.com> support resolve BLE random mac address for both central and peripheral mode.

bug:12990335
Change-Id: Ica42dcf039487b7b01454ce9255f3f6fae2faaaf
/system/bt/stack/btm/btm_ble_gap.c
0830ad47f790fea658ddc6fa857fb36880e0c552 22-Feb-2014 Nitin Arora <niarora_qca@codeaurora.org> Allow simultaneous LE Observe and BTM Inquiry/Scan

This patch allows BTM inquiry and LE observe to be launched
and overlap each others' occurance by redirecting results
and handling states accordingly.

CRs-Fixed: 579505

Conflicts:
stack/btm/btm_ble_gap.c
bug 12939764
Change-Id: Ifde73f17f8d40e9ebfff3b49e409591189574ee0
/system/bt/stack/btm/btm_ble_gap.c
55083646d66d134d34e858e59593f590038485ea 20-Mar-2014 Zhihai Xu <zhihaixu@google.com> am a724ae33: am 593b6b9d: am e2273716: Merge "support resolve BLE random mac address for both central and peripheral mode." into klp-modular-dev

* commit 'a724ae3347f2c4f8bcccc267cee859ab422cfedc':
support resolve BLE random mac address for both central and peripheral mode.
222a49eaeac35c2c8291fbc5c18af1ccb7e3f6ee 20-Mar-2014 Matthew Xie <mattx@google.com> Revert "Allow simultaneous LE Observe and BTM Inquiry/Scan"

This reverts commit 890dc789cec13e2d2e5ff95574f74b1740bdecf0.

Change-Id: I8916a973ae6d278764f111267220b7751143687c
/system/bt/stack/btm/btm_ble_gap.c
890dc789cec13e2d2e5ff95574f74b1740bdecf0 22-Feb-2014 Nitin Arora <niarora_qca@codeaurora.org> Allow simultaneous LE Observe and BTM Inquiry/Scan

This patch allows BTM inquiry and LE observe to be launched
and overlap each others' occurance by redirecting results
and handling states accordingly.

CRs-Fixed: 579505
bug 12939764
Change-Id: Ifde73f17f8d40e9ebfff3b49e409591189574ee9
/system/bt/stack/btm/btm_ble_gap.c
8b35b3fccc065730e6f0ee1050d3e4528e58ea37 11-Mar-2014 Zhihai Xu <zhihaixu@google.com> support resolve BLE random mac address for both central and peripheral mode.

bug:12990335
Change-Id: Ica42dcf039487b7b01454ce9255f3f6fae2faaaf
/system/bt/stack/btm/btm_ble_gap.c
85c1751ac78a4b9ae9f2250130000755081905fb 11-Feb-2014 Mike J. Chen <mjchen@google.com> am 3d4f5c71: am b83a8234: Merge changes Ifc373f95,I95eb887a,I1e6be2ab,Ia6ea939a,I147d0138, ... into klp-modular-dev

* commit '3d4f5c715204c3c5eeb21e351aff73072000f61e': (24 commits)
Make all warnings fatal compilation errors
Major warnings cleanup
Add macro UNUSED() to bt_utils.h
Fix unused parameter warning in static function
Add "static" to a static function
Fix a number of unused parameter warnings in static functions
Fix bug with wrong parameter passed to logu
Default send_ind_evt should be FALSE
Fix warning "implicit declaration of function 'GAP_BleReadPeerPrefConnParams'"
Fix unused parameter warnings in static functions by changing prototype
Fix some unused parameter warnings in static functions
Fix warnings about implicit declaration of bdcmp and bdcpy
Fix warning "comparison is always true due to limited range of data type"
Fix warning "suggest braces around empty body in an 'if' statement"
Fix warning "comparison is always true due to limited range of data type"
Add a function prototype for btm_ble_test_command_complete
Change argument to return ptr rather than assign to unused local
Fix warning "comparison is always true due to limited range of data type"
Fix warnings about implicit declarations
Fix warning "implicit declaration of function 'bdcmp'"
...
5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb 01-Feb-2014 Mike J. Chen <mjchen@google.com> Major warnings cleanup

Mostly fixing unused parameter warnings.
A few other warnings also fixed like possible use of
unitialized variables (no real issue found, just compiler couldn't
follow the path), signed vs unsigned warning.

Also fixed some typos, indent issues, removal of dead code, etc.

Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/stack/btm/btm_ble_gap.c
7f9bcf85168b776133ebb8c7b3f2db16a1ec0f79 16-Jan-2014 Zhihai Xu <zhihaixu@google.com> memory corruption on bluetooth stack.

This memory corruption will happen if the remote BLE device name
is more than 249 bytes (the maximum attribute length our BLE support is 600.).
after we send/receive GATT remote device name service attribute.
We will copy upto 600 bytes data to a local name buffer with size of 249.
This will cause serious memory corruption on the stack memory.

bug:12570982
Change-Id: I5b2ffd5f5a16f4d80d5491e86bf18bf47e30629e
/system/bt/stack/btm/btm_ble_gap.c
1237ee3c4bf3c8b65c2e83409db76669b1f1dcfd 27-Nov-2013 Zhihai Xu <zhihaixu@google.com> set HID major in class of device of inquiry result for HID over LE

need to set HID major in class of device of inquiry result for HID over LE,
if HID over LE service UUID is found in BLE advertisement data.
so we can show the HID icon in device list for HID over LE device.
16 bit UUID list in BLE advertisement data can contain multiple UUID,
need to go through the 16bit UUID list to find HID over LE service UUID.

bug:11450485
Change-Id: I7b2ee4c88485b287609eac34c35ce5e714e48280
/system/bt/stack/btm/btm_ble_gap.c
bf68ac75380057ad7b23669c0443ca585b84ccc3 26-Oct-2013 Andre Eisenbach <andre@broadcom.com> Treat devices advertising random addr. as LE only

Some remote devices use random addresses, but are not setting the
"BR/EDR not supported" flag. Thus we try to connect to the device using
BR/EDR.

This patch ignores the ADV flags if the device is using a random
address and always makes the connection over the LE transport.

bug 11418071
Change-Id: I628775b819abd8f17745aaf98db4bb3c59166955
/system/bt/stack/btm/btm_ble_gap.c
6975b4d711142b885af479721cada448952c6b41 06-Aug-2013 Andre Eisenbach <andre@broadcom.com> LE: UPF 45 bug fixes

This change fixes the following issues:
- Second GATT-over-BR/EDR channel cannot be established when there
already is an existing GATT-over-BR/EDR channel
- If encryption fails for an LE connection due to a missing key,
the security state is not being cleared and blocks all further
security processing
- When DM discovery of an LE Peripheral device fails with a
connection timeout, no further discovery requests can be made
- GATT service discovery can get into endless loop when duplicate descriptor
definitions are found on the remote device
- When GATT over BR/EDR fails, BTA does not give a connection
callback to the application initiating the connection
- BR/EDR connection to remote platform does not generate API callbacks
- Stack crash discovered during UPF after remote disconnects
- The host is sending HCI disconnect to invalid HCI handle when
SMP fails because of a connection timeout
- Possible race condition:
If a disconnect is immediately followed by a connection complete,
the connection complete cannot be processed in the BTA GATT state
machine
- Write Complete event is not triggered for Prepare Write requests

Change-Id: I539cdedd68007818ff4f0d0213cee1c913f72d0f

Conflicts:
bta/gatt/bta_gatts_act.c
/system/bt/stack/btm/btm_ble_gap.c
946c681e59451164b343b7ab9415aa73b0d176bc 04-Apr-2013 Andre Eisenbach <andre@broadcom.com> Fix LE background connections not adding device to white-list.

Also changed maximum number of client applications to 32.

Change-Id: Id4697924b211330e231b36d7f89ca9d89b54117f
/system/bt/stack/btm/btm_ble_gap.c
3aa60544585b5fb0f35c1165539a4a859fc0f25c 23-Mar-2013 Andre Eisenbach <andre@broadcom.com> Parse LMP features to enable LE support

Only send LE commands if the local Bluetooth radio supports LE.
Improved remote feature parsing by reading extended features. Before
this change, only the first page of the features was parsed.
bug 8332905

Change-Id: I0b90771dcfc453efea157f463b9df006e0178609
/system/bt/stack/btm/btm_ble_gap.c
ead3cde4bac0c3e32cd31f149093f004eef8ceeb 06-Feb-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Initial version of BLE support for Bluedroid

Change-Id: I9825a5cef9be2559c34c2a529b211b7d471147cf
/system/bt/stack/btm/btm_ble_gap.c
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/system/bt/stack/btm/btm_ble_gap.c