Bluedroid: Add support to send h/w error event

Bluedroid stack needs to be reset whenever H/w chip restarts
like Subsytem restart.

CRs-fixed: 514760
Change-Id: I5888f0c7a29eb540b77c789774d672180f330168
Merge commit 'android-4.3_r2.1' into merge_branch

* commit 'android-4.3_r2.1':
  LE: Release transmit buffer credits
  Do not abort bonding if link disconnects during SDP after Auth cmplt
Bluetooth: HCI: sends link policy commands while Authentication

Observed audio loss in A2DP playback, if we are not sending
HCI link policy commands during ACL connection procedure.
This is a revert of CR fix 500631.As we observed some audio loss  issues in some
Headsets like Jabra,we have made this revert.

CRs-Fixed: 516579

Change-Id: Idcb2830082a45b0a2fe562d1fcbce3afd3675714
Bluetooth: Auto connect is serialized with stack Init.

Some times Auto connect is getting triggered before stack
Initialization.

Added the connect request to the connect queue and triggering
connect queue to excecute after the Initialization

Change-Id: I4236a0b37d7a9cbfff4c058b589ce201d539c5a2
CRs-fixed: 495376
Bluetooth: Modify bdt tool to execute testcases from commandline

Modify the bdt tool so that it can be executed by sending the
command line arguments for the automation tests

Change-Id: I1c5de59c0b102862bbb9a7cc0b85653e4974ce31
Merge "Bluetooth: HCI: sends link policy commands while Authentication"
Merge "Bluedroid: Add support to send h/w error event"
Merge "Bluetooth: Modify bdt tool to execute testcases from commandline"
Merge "Merge commit 'android-4.3_r2.1' into merge_branch"
Bluetooth: Send Error for Invalid AT Command.

Some Headsets send HFP 1.6 cmds even when it is not
supported by DUT.Send error response in those cases.

CRs-fixed: 500854

Change-Id: If7745959c00fd49bd737b41a49adba9e726aa5c7
Bluetooth: L2CAP: Send HCI connect with all packet types supported

HCI create connect function is now supporting only single slot packet
during HCI connection initiation. Added support for all basic rate
packet types.

CRs-Fixed: 500631

Change-Id: Ieeb892ea43dc9bb801a8f97a644a0f8c06b8184a
Merge "Bluetooth: L2CAP: Send HCI connect with all packet types supported"
Bluetooth: Security: Handle security error codes during authentication

Handle error codes in authentication complete event with failures
like reject pairing , unspecified error.

Change-Id: I392b7531a8625efbf91bf80f7f617a6954229892
CRs-Fixed: 516087
Bluetooth: Getbuf returning invalid buffer pointer

Getbuff is checking for the pool which can accommodate
requested size, but it changing the pool with a restricted
check and not checking for the free memory size in that pool.

Added a check to avoid returng the wrong pool free buf pointer.

Change-Id: Id66d460c5a40d8c3208438d7cfaf729e9b355184
CRs-fixed: 513060
Bluetooth: Add Interleave scan feature

Add Interleave Bluetooth scan feature so that both
Bluetooth classic and LE devices can be discovered

CRs-fixed: 521875

Change-Id: I8e5b026f0cb7c10fd29fbecf21873a502bb965cb
Merge "Bluetooth: Auto connect is serialized with stack Init."
Merge "Bluetooth: Send Error for Invalid AT Command."
Bluetooth: Added BTA_AG_FEAT_UNAT bitmask.

This bitmask is used by BT stack along with
BRSF feature set to enable handling non
HFP AT commands and propagating them to
application to process.

CRs-Fixed: 522602

Change-Id: I7bd72cf9aef7a5825cecc865299260af1221da45
Merge "Bluetooth: Add Interleave scan feature"
Merge "Bluetooth: Security: Handle security error codes during authentication"