Bluetooth: HID: Use dynamic memory instead while sending data

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

Change-Id: I5ed12422355e88d7ef0391668800d7619ca3b685
CRs-Fixed: 566444
Bluetooth: Cleaning up pan_conn DB, if connection is not successful.

A case where DUT is paired with remoteDeviceA &  remoteDeviceB.
remoteDeviceA is not pagable(turned off or some other reason).
DUT(PANU) try to connect remoteDeviceA(NAP). But connection is
unsuccessful, Because remoteDeviceA is not pagable, In this scenario
btpan_conn Database is not cleaning up at btif layer. Later
remoteDeviceB(PANU) connect to DUT(NAP) & connection is succesful,
When remoteDeviceB disconnect existing connection. As database
still has remoteDeviceA BD address at Btif layer. remoteDeviceA
BD address is passed instead of remoteDeviceB BD address from Btif
to UI. So remoteDeviceB still shows connected on UI. Cleaning up
pan_conn database for particular pan connection at BTIF layer,
whichever connection is not successful will solve this issue.

Change-Id: I31dfe3ef46295e74bbfb57563e4fd4fc7155f006
CRs-Fixed: 555310
Bluetooth: Fixes read/write report characteristic for HOGP

This fixes issues to read and write report characterstics
to get the correct report for HIDinput UUID.
Adds logic to read/write rpt/descr/chars for mulitple
instances of HID service

Change-Id: I445fe413a11cb88c23bf4964ea08de1a9879d4c8
CRs-Fixed: 563295,557628,557656,562073
Merge "Bluetooth: Cleaning up pan_conn DB, if connection is not successful."
Support USB HCI

Issue: AXIA-1459
Change-Id: Ie4cc5766446774a0bae3bbf7d9baa5f44e814f59
Signed-off-by: Ravindranath Doddi <ravindranathx.doddi@intel.com>
Signed-off-by: Krishnan V <krishnanx.vaidyanathan.venkitakrishnan@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
Update USB support for 10.2

Change-Id: Ia476759fe3b996682e617844571de782eadbdb74
usb: Abort writes if device is absent

Fix crash loops when a device "loses" a removable USB adapter between
boots and the service was left enabled

Change-Id: I4ab7cebb631438bf092d55da1ff7218c2b8d096b
Merge "Bluetooth: HID: Use dynamic memory instead while sending data"
Bluetooth: HID: Use dynamic memory while sending report

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

CRs-Fixed: 568112
Change-Id: Icc8cd4a4ecfd4bc30cbf848a7c865fcf9308ddf8
Bluetooth: HID: Serialize L2CAP disconnection

This patch serializes host initiated hid disconnection by sending
control channel disconnect request only when disconnection response
for interrupt channel has been received. Also to prevent IOT issues
link policy is updated to disable sniff when hid disconnection is
in progress.

Change-Id: Ie0c5c62593bb0dd32f83b76bf0d6c1d950f1a684
CRs-Fixed: 568111
Bluetooth: HID: Update HID Device name to actual device name

This patch sets the HID Remote Device name while adding hid driver in
kernel instead of using hardcoded name "Broadcom Bluetooth HID".

Change-Id: I0755d6e51507121b037e0baff166abe578480456
CRs-Fixed: 566241
Bluetooth: HID: Synchronize access to uhid open and close API's

This patch synchronizes access to uhid open and close API's by calling
both from BTA context. Moving to btif context for uhid close was causing
lot of issues since the close was in some cases executed after a new
uhid open was processed because of delay in change in context from BTA
to BTIF context. To fix issues of glitch in A2DP while disconnecting
HID, poll timeout is reduced to 50 ms so that uhid poll thread can be
closed within 50 ms max thereby keeping max block time in BTA thread to
50 ms. Also some additional logging is added in code to provide better
debugging in future wrt uhid open and closei API's.

Change-Id: Id4f30f16d51994bf19d11b8472320b818fe31115
CRs-Fixed: 567656
Merge "Bluetooth: HID: Use dynamic memory while sending report"
Merge "Bluetooth: HID: Serialize L2CAP disconnection"
Merge "Bluetooth: HID: Update HID Device name to actual device name"
Merge "Bluetooth: HID: Synchronize access to uhid open and close API's"
Bluetooth: Generalize bluedroid for smd and uart based soc's

Remove compile time dependency to use bluedroid for SMD
based soc or uart based soc.

Change-Id: Ibb5ec04577af19b70bf0320db6e6349f2d3a079f
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
bluetooth: Added IBS feature to support ROME.

Inband Sleep Tx and Rx supported in H4 layer for ROME

Change-Id: I193785c470b581414cd86d05791482c49c45f439
CRs-fixed: 540383
Bluetooth: Add SIBS Macro to enable or disable based on a target

Based on a target, the bluetooth chipset can suppourt software
Inband sleep or not. So, SIBS feature should be controllable
to enable or disable base on a target

Change-Id: Ib8c20017f2ddcd22005d361e3b2ad1045e386b4d
CRs-fixed: 549989