Merge tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / net / bluetooth / mgmt.c
index 09e099c..f9be7f9 100644 (file)
@@ -3730,8 +3730,11 @@ static int read_controller_cap(struct sock *sk, struct hci_dev *hdev,
 
        /* When the Read Simple Pairing Options command is supported, then
         * the remote public key validation is supported.
+        *
+        * Alternatively, when Microsoft extensions are available, they can
+        * indicate support for public key validation as well.
         */
-       if (hdev->commands[41] & 0x08)
+       if ((hdev->commands[41] & 0x08) || msft_curve_validity(hdev))
                flags |= 0x01;  /* Remote public key validation (BR/EDR) */
 
        flags |= 0x02;          /* Remote public key validation (LE) */
@@ -7979,7 +7982,6 @@ static int add_ext_adv_params(struct sock *sk, struct hci_dev *hdev,
                goto unlock;
        }
 
-       hdev->cur_adv_instance = cp->instance;
        /* Submit request for advertising params if ext adv available */
        if (ext_adv_capable(hdev)) {
                hci_req_init(&req, hdev);