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 b75a87948fed1c08f1367283975a3654e2c2d6a0.
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 b5a90b4e3570371170f3e34a7ceba62c5f3004fd.
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 43aeeef080c13402c8675b0e4f84d9147b52ab37.
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 5afdf571a2401cf06f47937c2cee140277492ae6.
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 533ca1d8a09e1735b15eed66c58b5f76f13f3bd2.
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 d760bc6bfd0eae80eb0d947480a80ec036b9cada.
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 8be8516a84add982f42c1ce2ce33c3d01ea251c7.
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 7c636164b29e58343657d4e3ffe86cdda6089298.
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 b73680aca3a7b75610200e3798b4540139dfde30.
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 debc7649181c24d5b533f5885f6368f05200ba75.
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 e7e758aa49062d90b7e24a5fabafc078100d6f5d.
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 4de8db472d77b04d6d6c8bae646170826800650b.