]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/bluetooth/hci_event.c
Merge tag 'sound-4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[linux.git] / net / bluetooth / hci_event.c
index f47f8fad757ac97db775ad05fb3db3ce6285d336..ef9928d7b4fb5abd497e01a45261aa5dab8ac1e0 100644 (file)
@@ -4937,31 +4937,27 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,
        hci_debugfs_create_conn(conn);
        hci_conn_add_sysfs(conn);
 
-       if (!status) {
-               /* The remote features procedure is defined for master
-                * role only. So only in case of an initiated connection
-                * request the remote features.
-                *
-                * If the local controller supports slave-initiated features
-                * exchange, then requesting the remote features in slave
-                * role is possible. Otherwise just transition into the
-                * connected state without requesting the remote features.
-                */
-               if (conn->out ||
-                   (hdev->le_features[0] & HCI_LE_SLAVE_FEATURES)) {
-                       struct hci_cp_le_read_remote_features cp;
+       /* The remote features procedure is defined for master
+        * role only. So only in case of an initiated connection
+        * request the remote features.
+        *
+        * If the local controller supports slave-initiated features
+        * exchange, then requesting the remote features in slave
+        * role is possible. Otherwise just transition into the
+        * connected state without requesting the remote features.
+        */
+       if (conn->out ||
+           (hdev->le_features[0] & HCI_LE_SLAVE_FEATURES)) {
+               struct hci_cp_le_read_remote_features cp;
 
-                       cp.handle = __cpu_to_le16(conn->handle);
+               cp.handle = __cpu_to_le16(conn->handle);
 
-                       hci_send_cmd(hdev, HCI_OP_LE_READ_REMOTE_FEATURES,
-                                    sizeof(cp), &cp);
+               hci_send_cmd(hdev, HCI_OP_LE_READ_REMOTE_FEATURES,
+                            sizeof(cp), &cp);
 
-                       hci_conn_hold(conn);
-               } else {
-                       conn->state = BT_CONNECTED;
-                       hci_connect_cfm(conn, status);
-               }
+               hci_conn_hold(conn);
        } else {
+               conn->state = BT_CONNECTED;
                hci_connect_cfm(conn, status);
        }