History log of /system/bt/stack/btm/btm_acl.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 05-Feb-2016 Pavlin Radoslavov <pavlin@google.com> Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free()

Removed the alternative buffer allocation osi_getbuf() / osi_freebuf()
and use instead osi_malloc() / osi_free().

Correspondingly, replaced usage of osi_freebuf_and_reset()
with osi_free_and_reset().

Bug: 24914560
Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/stack/btm/btm_acl.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_acl.c
dd339ab075d913334c84fe4c817c8ab09f5eda47 20-Nov-2015 Scott James Remnant <keybuk@google.com> Allow Bluetooth to build on systems with no LE support

Bug: 25387258
Change-Id: Ie82dae7a1a6807b398c067d4e1984a098793c589
/system/bt/stack/btm/btm_acl.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_acl.c
27e239dbd31dd9ee7fab5fb8558fbd2292cf7e5d 26-Oct-2015 Andre Eisenbach <eisenbach@google.com> Check remote LMP version before enabling secure connections

Request remote version information for LE links when connecting and
ensure LMP version is >= 8 (Bluetooth 4.2) before setting the LinkKey
bits in the pairing request.

This is to ensure older remote devices do not get confused by the
additional bit(s) in the pairing request.

Bug: 25277879
Change-Id: I25424e541fa5244d8f522dffc62cdedc24f4f35b
/system/bt/stack/btm/btm_acl.c
258c2538e3b62a8cdb403f2730c45d721e5292b4 28-Sep-2015 Pavlin Radoslavov <pavlin@google.com> GKI cleanup - moved GKI buffer allocation wrappers to OSI

* Moved the following GKI buffer allocation functions to OSI:
- GKI_getbuf() -> osi_getbuf()
- GKI_freebuf() -> osi_freebuf()
- GKI_get_buf_size() -> osi_get_buf_size()

For now we need the osi_getbuf() / osi_freebuf() allocation wrapper,
because we need to be able to call osi_get_buf_size() on the allocated
buffer.
In the future those should be replaced with osi_malloc() / osi_free().
Currently, the osi_malloc() buffer size internal allocation tracker
does not always track the size, hence we need the osi_getbuf() wrapper.

* Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE

* Added new file include/bt_common.h that can be usee to include
few files that should be included alost everywhere (e.g. bt_target.h"
NOTE: This file might be removed in the future and we should include
everywhere the right set of header files.

* Removed some of the GKI-related references

* Removed file include/gki_target.h

Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/stack/btm/btm_acl.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_acl.c
259a94a915556b953f01dcd1729bce272e65905f 10-Jul-2015 Srinu Jella <sjella@codeaurora.org> am 8f766350: Reset the ACL connection data on ACL disconnection

* commit '8f766350bbb7026ddf34b73c9d87967decff792b':
Reset the ACL connection data on ACL disconnection
8f766350bbb7026ddf34b73c9d87967decff792b 03-Jul-2015 Srinu Jella <sjella@codeaurora.org> Reset the ACL connection data on ACL disconnection

Use case: Reconnection of legacy mouse.

Failure: Not able to reconnect with mouse if the previous
connection rejected was with SC enabled device.

Test Steps:
1. Pair and connect remote devices.
2. Start streaming music over headset and Disconnect HID
mouse.
3. Inquire and try to pair with any DUT which supports
secure connection.
4. Cancel pairing and Turn OFF remote headset.
5. Now try reconnection from HID mouse.

Root Cause: When the secure connection is established, it will
have the 3 pages filled, and when the same acl entry is reused
for next mouse reconnection, only one page is getting over
written because legacy HID will have only one page supported
and remaining 2 pages still holds the previous device's data.

Fix: Fixed it by resetting the ACL entry when the ACL is
disconnected so that even though one page is copied and
remaining pages will not contain valid data.

Bug: 22249108
Change-Id: Icd96f22fe0787ef5845ee02940c2b0eacf7a2bbd
/system/bt/stack/btm/btm_acl.c
bb95452741bfd65723ea417c25dbd326c7568ab7 03-Jun-2015 Arman Uguray <armansito@google.com> build: Fix ptr <-> integer cast warnings

This CL removes the -Wno-pointer-to-integer-cast and
-Wno-integer-to-pointer-cast flags from GN build files. The resulting errors
were fixed using the following:

1. All ptr <-> integer casts are now done by using the new
PTR_TO_INT/INT_TO_PTR macros defined in osi.h

2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and
include/bt_target.h have been redefined as void* rather than UINT32. This
is better, since "void*" can act as a simple container without any
precision loss that would be caused by a type such as UINT32 on 64-bit
systems. void* inherently is a safer container for all pointer types but
UINT32 isn't.

BUG=21570302

Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
/system/bt/stack/btm/btm_acl.c
4609a0383247e86ca54221058381893bce219cd1 24-Apr-2015 Andre Eisenbach <eisenbach@google.com> Fix LE pairing on hosts with privacy disabled

When privacy is disabled, the local BDA is not set correctly when ACL
connections are created. This leads to SMP pairing challenges to be sent
with the wrong local BDA (00:00:00:00:00:00).

Bug: 20091926
Change-Id: I554245a3a3cbed72d79aa6c1261c813999019e2b
/system/bt/stack/btm/btm_acl.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
899b77140675a157dba034e98527ab546bc9ac35 30-Jan-2015 Mudumba Ananth <ananthm@broadcom.com> BR/EDR secure connections support

As a part of BT 4.1 stack upgrade, added host support for BR/EDR
secure connections to be able to interact with controllers that
support secure connections and upgrade the SSP mechanism to use
secure connection rules.

This change checks for controller support in the extended_features
(LMP page 2) and then declares the host support (extended_features
LMP page 1) using WRITE SECURE CONNECTIONS HOST SUPPORT.
If both the sides support secure connections, the simple pairing
process utilizes the link key generated using P-256 elliptic curve
(in the controller) and both the sides will be
in a secure connection.

Bug: 19289699
Change-Id: Idb3c41f439973bea137f5a4a69468c1f55aecbd7
/system/bt/stack/btm/btm_acl.c
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_acl.c
e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe 31-Mar-2015 Etan Cohen <etancohen@google.com> Merge commit 'f7f839985b3931682363d2ef3b7c5cae55a842ee' into merge

Change-Id: Iaaec1ea0bf3009b7e32a9a60f697631a3f56e889
f4c4b78b6d85b785afa53a4b8f440b3f657e8b67 19-Mar-2015 Andre Eisenbach <eisenbach@google.com> Remove ACL connection reference counting

In addition to maintaining ACL link control blocks, which carry a
"in_use" flag, ACL links are reference counted in the num_acl links
variable.

The reference counting is thrown off when a SM connection initiated for
pairing is followed up by a GATT connection after pairing completes. The
2nd connection is counted against num_acl, even so other parts of the
code recognize the connection as a duplicate ACL connection to the same
BDA.

This patch removes the unecessary reference counting and relies on the
control block status instead, which is correctly maintained.

Bug: 19019189
Change-Id: I0a5f4d279fc634689d0e8c0ef4ad639d0ce5d687
/system/bt/stack/btm/btm_acl.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_acl.c
6b88521cada9486d3a2a3ad5bda55ed431505926 07-Jan-2015 Zach Johnson <zachoverflow@google.com> Remove some more unused functions in btm_acl
/system/bt/stack/btm/btm_acl.c
de35e095aa0a97ec4687aebec188205d41444a3e 07-Jan-2015 Zach Johnson <zachoverflow@google.com> Remove unused read link policy + friends

Was never called, and the removal of which obviated
a lot of other code.
/system/bt/stack/btm/btm_acl.c
a2caad53c843b5c03441d702fbce5e2a22ff553b 07-Jan-2015 Zach Johnson <zachoverflow@google.com> Remove unused link supervision timeout code

The btm callback was never set, so this code
did nothing useful.
/system/bt/stack/btm/btm_acl.c
79ecab5d0418fde77e9afcdd451bd713af73e180 31-Oct-2014 Chris Manton <cmanton@google.com> Move controller module to device directory
/system/bt/stack/btm/btm_acl.c
df7634158b0853bee885cb292dfdd30356615db8 16-Oct-2014 Chris Manton <cmanton@google.com> Remove unused functions BTM_RegForLstoEvt/btm_acl_set_discing
/system/bt/stack/btm/btm_acl.c
e7ef465c37298c2b64b7e9794659b1b1b50ab877 16-Oct-2014 Chris Manton <cmanton@google.com> Remove always true BTM_PWR_MGR_INCLUDED

There are two code paths to set the chip into the power modes.
The power manager aggregates access to the power modes.
Does not compile when set to false.
/system/bt/stack/btm/btm_acl.c
584846a2109f8b34b3794683b61c8322ad6eb11a 15-Oct-2014 Chris Manton <cmanton@google.com> Remove always true BTM_BUSY_LEVEL_CHANGE_INCLUDED
/system/bt/stack/btm/btm_acl.c
794f3b5f126fffc3dd1129a710187591348bbf23 01-Oct-2014 Chris Manton <cmanton@google.com> Removal of bd.[c|h]

Consolidate legacy types into bt_types.h
/system/bt/stack/btm/btm_acl.c
f1c764fab01c929f71e185b97433bf40938026d3 24-Feb-2015 Sharvil Nanavati <sharvil@google.com> Make build more strict by adding more warning flags.

This change introduces -Wunused-but-set-variable to help catch
programming errors. It also undefines NDEBUG so assertions are
fatal and defines LOG_NDEBUG=1 to suppress LOGV.
/system/bt/stack/btm/btm_acl.c
65779660ffced1b16f2efa06c8b96fa8de98458a 08-Oct-2014 Zach Johnson <zachoverflow@google.com> Comment said BTM_PM_SNIFF_SLOT_WORK_AROUND would be removed someday. Today is that day.

Looks like this has been around for a while, and isn't/shouldn't be used.
restore_pkt_types then becomes obsolete, so removed.
/system/bt/stack/btm/btm_acl.c
e7faae66ddb7c4fc318c5e4986f820c92a787307 28-Oct-2014 Zach Johnson <zachoverflow@google.com> Remove unused function BTM_ChangeLinkKey & friends

Not used in the codebase. Removed it along with
all its related code.

According to the spec the change link key event is only
sent in response to the change link key command, so
it should be completely safe to remove that logic.
/system/bt/stack/btm/btm_acl.c
39110ec88460421618330863807804e03594ef67 06-Oct-2014 Zach Johnson <zachoverflow@google.com> Remove duplicate local bdaddr management functions
/system/bt/stack/btm/btm_acl.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_acl.c
5fc4be1aa79e3b732e4503a84908522fd754b56f 29-Sep-2014 Zach Johnson <zachoverflow@google.com> Remove <BT 2.0 workarounds
/system/bt/stack/btm/btm_acl.c
1d73a94c2a8a1a72bb7a23acc8adbaff63053930 02-Sep-2014 Zach Johnson <zachoverflow@google.com> Remove never used function BTM_GetNumLeLinks

verified unused, even in the latest android code
/system/bt/stack/btm/btm_acl.c
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_acl.c
1fbddc8faacde61190df31a8e6ea9142feb4bc88 10-Oct-2014 Andre Eisenbach <eisenbach@google.com> Revert "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on"

This reverts commit a934f018b6c6a7eda4662a60f2f04828afc3ab77.

This patch caused various headset audio break issues and slow
reconnections on headsets like the Bose AE2W.

Based on the original bug under which this patch was merged
(b/10648781) it is unlikely that this bug even fixed the
issue it was meant to address.

Bug: 17520043
Change-Id: I39bb9abbf5735abff25b5257425c34972287dc27
/system/bt/stack/btm/btm_acl.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_acl.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_acl.c
29bfd63d650c25f6858df4c542f37bf4215870d2 26-Aug-2014 Thomas.TT_Lin <Thomas.TT_Lin@htc.com> 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>
/system/bt/stack/btm/btm_acl.c
817eec282452d37d308a0ae90e8f4832c6dff650 12-Aug-2014 Priti Aghera <paghera@broadcom.com> 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
/system/bt/stack/btm/btm_acl.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_acl.c
4dbb90f07682b1d348ddf22189fce8e9e96b66ad 29-Jun-2014 Hemant Gupta <hemantg@codeaurora.org> am 831423ea: Bluetooth: Fix to avoid NULL pointer dereferences

* commit '831423ea1879244e746f39d7696ad4a66681f306':
Bluetooth: Fix to avoid NULL pointer dereferences
831423ea1879244e746f39d7696ad4a66681f306 07-Jan-2014 Hemant Gupta <hemantg@codeaurora.org> Bluetooth: Fix to avoid NULL pointer dereferences

This fix for avoiding NULL pointer dereferences:
- Added check for state checking in btm_remove_acl function
to avoid sending disconnect command if already in Disconnecting
state.
- Added NULL check for 'pin_code' in btif_dm_pin_reply function
- Null check before accessing in BD interface layer configuration
node variables.
- Add NULL check before accessing p_bd_addr variable to avoid null
pointer exception while referring to invalid memory.

Change-Id: Ib7ed45b6a1692785a45224d739a564f767e5b10f
/system/bt/stack/btm/btm_acl.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_acl.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_acl.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_acl.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_acl.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_acl.c
5be3cb02b6947a5f115eee0c8a419f99b936c296 01-Apr-2014 Mike J. Chen <mjchen@google.com> Fix compiler warnings when BLE_INCLUDED is FALSE

Change-Id: I0d8f861d8a9a94586885c9acd683dd040249a465
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/stack/btm/btm_acl.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_acl.c
23b252c2604a02959b31180ddafc26c1e0c8082a 01-Feb-2014 Mike J. Chen <mjchen@google.com> Fix warnings about implicit declaration of bdcmp and bdcpy

Change-Id: Ib6ad46f566900d514d63a9538a6a8b1c53f04806
Signed-off-by: Mike J. Chen <mjchen@google.com>
/system/bt/stack/btm/btm_acl.c
cd9ceb9f48d633b68570e5f70768475c8fe93af1 02-Nov-2013 Zhihai Xu <zhihaixu@google.com> Merge "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on" into klp-dev
7a5c5910c1df73ab86e57d18c4e6e35a623d98ce 14-Aug-2013 Sunny Kapdi <sunnyk@codeaurora.org> Fixes BLE HCI commands concurrency issue

Removes HCI LE Read Remote features command call
to prevent the concurrency between this command and
HCI LE start encryption command.

CRs-fixed: 517330

bug:11450568
Change-Id: I6445ab8095a4261c2a3f84acea1c546e6924f50d
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
/system/bt/stack/btm/btm_acl.c
a934f018b6c6a7eda4662a60f2f04828afc3ab77 08-Oct-2013 Zhihai Xu <zhihaixu@google.com> Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on

we should use the same role as the previous connection, if phone walk out of range,
and reconnect back from remote device.
bug:10648781

Change-Id: I6abd77067d26769067ba2fbd45d9e8f75cf7c764
/system/bt/stack/btm/btm_acl.c
24c0f58c67c569e92e7b7d46e2d0cd29ebb64eb7 17-Apr-2013 Zhihai Xu <zhihaixu@google.com> Audio glitches while playing songs over MOTO S305 headset

The MOTO S305 doesn't support read remote extended features command.
The fix is we should always use ReadRemoteSupportedFeaturesCommand at first,
Only send ReadRemoteExtendedFeaturesCommand if extend features are supported
by remote device.

issue 8618753

Change-Id: Id6d9c0e712dc892bcfca20336d1290b9443213ac
/system/bt/stack/btm/btm_acl.c
9d140a9dc432e457a0437920d5f84c22e3baea0d 12-Apr-2013 Ganesh Ganapathi Batta <ganeshg@broadcom.com> Make host side of Read Local/Remote Extended Features more reliable

Issue Ext feature request only if the local controller supports
the command. Fall back to read remote feature command,
if the extended feature request fails
Bug:8591628

Change-Id: I744d9845c04b30d2dca1fd491fea49616adbb2d7
/system/bt/stack/btm/btm_acl.c
c2bb2c13030b2b48b861eac31f4eb134975fa8c5 09-Apr-2013 Matthew Xie <mattx@google.com> Read the extended feature after ACL channel creation

This problem was introduced by Bluetooth stack merge.
bug 8521185

Change-Id: I9191c639e96382a452cf0fe336d5a9ef5b5f0f4a
/system/bt/stack/btm/btm_acl.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_acl.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_acl.c
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

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