Revert "Bluetooth: mgmt: Fix device_connected sending order.  The mgmt_ev_device_connected signal must be sent before any event indications happen for sockets associated with the connection. Otherwise e.g. device authorization for the sockets will fail with ENOTCONN as user space things that there is no baseband link.  This patch fixes the issue by ensuring that the device_connected event is sent (if it hasn't been so already) as soon as the first ACL data packet arrives from the remote device."

This reverts commit a0275bfa1ac4c555ba5c5db9a4950a9aff06681b.
Revert "Bluetooth: Hold wakelock until BT idle timer kicks in.  Holding a wakelock avoids suspend power collapse, whichallow the BT idle timer to kick in, which eventually initiates BT low power modes."

This reverts commit 950f8cb647b20565061d84805d3ff18d65dedb36.
Revert "Bluetooth : hidp: Get the valid hci_conn while unlink.  Since the context where unlink will be called is unaware of validity of hci_conn pointer, fetch the valid hci_conn before unlink."

This reverts commit 46efcf2a1a63c450e2a3a4fd923b5bd60a492673.
Revert "Bluetooth : Ignore incomming events when the hci device is down.  In error conditions Adapter state machine via Bluez tries to reset the hci device, during that in some rare scenario if some pending event comes from riva, the command complete apis tries to access some already freed memory in reset sequence."

This reverts commit db73c135fcc14d9e4fa49b94b7df063c5bf35e8b.
Revert "Bluetooth: Validate session before rfcomm_session_del In rfcomm_session_put API the session count is decremented and when it is equal to zero rfcomm_session_del is called where session is removed from sessions list and freed. The current change is verify the existance of session in list before acting session. The avoids the possibility of action on a deleted session, which causes crash."

This reverts commit 23113acd1e7b0950375e2d37636d1ea35ce473c7.
Revert "Bluetooth: Handle ACL buffers sharing between multiple connections.  The BT host has fixed set of buffers to send data to SoC, generic value is 5. When a connection, like A2DP playback is ready to send data it fills one of the buffer available and sends to SoC. Once SoC got acknowledged from remote side that the data received it updates the host and the buffer is freed. Till host is acknowledged the send Complete info, the data buffer is locked for that data transfer. The below is the example for buffers availability."

This reverts commit 2807328b6f8bc28cfe95f56742e5b4ad1c164b53.
Revert "bluetooth: Check for hcon during during sock_close.  It is possible that during BT OFF operation the hcon could be released from a tasklet context while we are trying to send the l2cap disconnect req. Make sure that hcon is valid before dereferencing it during l2cap disconnect req."

This reverts commit dea4b950bb190bb5447978dc55f2107230781698.
Revert "Bluetooth: Avoid a case where sleep is getting called in soft irq context.  While turning off BT, sleep is getting called in the soft isr context from work queue which is queued from a code section guarded under the bh lock, To resolve this released the bh lock before queing the work, as it wont impact any BT functionality."

This reverts commit 94b802cacae7627158fe0618011b83c1b1fea868.
Revert "Bluetooth: Adding HCI Dev lock for set_active and set_sniff routines.  When data transfer is in progress on a ACL connection, all the time the set_active_mode API will be called to update the timer for next sniff mode. If there is ACL disconnect triggered from remote side, there is possibility of hci connection delete when set_active routine in progress. Found a condition where delete API destroyed the wake lock, which is used in set_active API. In codition leads to crash in set_wakelock API. The current change is to lock hdev, before set_active and set_sniff APIs are called. This avoids the race condition in accessing hci connection, while delete in progress and vice versa."

This reverts commit 4e8bdb7dce9f395476c81465fa7b09f524c50ab7.
Revert "Bluetooth: hidp: use dest address from session info.  While hid device unpair process, we are trying to access released socket as apart of getting hci device which results a kernel panic."

This reverts commit 16a7a72b64de3c836a2b539dde0139a0d13eab53.
Revert "Bluetooth: Disable sniff when the subrate values doesnt match.  Found there is possibility of sniff subrate collision with some IOT devices. When this collision happned if the remote device send subrate values that doesn't match with DUT supported values exit sniff mode. This will allow DUT to reconfigure sniff after idle time."

This reverts commit 8d9cb56b261623f0f6898063173e6570936625c5.
Revert "Bluetooth: Block SCO disconnect operation on BT_CLOSED state.  Have maximum blocking time for shutdown operation as DISCONNECT_TIMEOUT.   During this period when SCO connection closes, the userspace will be updated on the close operation. Existing approach of immidiate return on shutdown call can cause synchronization issues on SCO state between kernel and userspace. This happens when disconnect operation takes more time at kernel space."

This reverts commit 25afbf3a97f69432bf9369b4c2e46b15085693ff.