Bluetooth: Fix triggering BR/EDR L2CAP Connect too early
[platform/adaptation/renesas_rcar/renesas_kernel.git] / net / bluetooth / hci_event.c
index 60828cf..66ada77 100644 (file)
@@ -3006,6 +3006,12 @@ static void hci_key_refresh_complete_evt(struct hci_dev *hdev,
        if (!conn)
                goto unlock;
 
+       /* For BR/EDR the necessary steps are taken through the
+        * auth_complete event.
+        */
+       if (conn->type != LE_LINK)
+               goto unlock;
+
        if (!ev->status)
                conn->sec_level = conn->pending_sec_level;