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 58e26f643031811564c8970c3e712690fe735ff6.
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 42a4af2972a18f76ba26782b6557a9ca21f6875a.
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 1cbe85141c1265e550a592f45cd45bb31157864e.
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 38511826813ff109283da3fb465b6a6ca4b26bf9.
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 7ceece74fce568593f104a00e843aee8ca81441d.
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 b8f8fbade5e8a741d1e4579abd08a57b43514f11.
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 53587e21b24f6003b13365ec5a6a82741c250e3b.
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 ab62646936a5631e36c7b7adddceb89fc4743770.
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 dfcd73dfecc7b8af38a50f610ab0a6a704149d74.
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 8b12edecfd8e98adfbf495d53ad71721358be454.
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 af1b3fc193c606fd2cb4947266a8d9f1394080be.
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 f408007dba8a3aa0b32b435f3698b7990a899793.