]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/bluetooth/mgmt.c
Merge remote-tracking branch 'bluetooth/master'
[karo-tx-linux.git] / net / bluetooth / mgmt.c
index b127b88015c94d1f89591a0eddca81c33f7c3aec..399e5024b5bdb70e1b4c9ff4c409a0cc9d9b435a 100644 (file)
@@ -2892,6 +2892,22 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
                if (scan)
                        hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);
 
+               if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
+                       u8 ssp = 1;
+
+                       hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp);
+               }
+
+               if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
+                       struct hci_cp_write_le_host_supported cp;
+
+                       cp.le = 1;
+                       cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR);
+
+                       hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED,
+                                    sizeof(cp), &cp);
+               }
+
                update_class(hdev);
                update_name(hdev, hdev->dev_name);
                update_eir(hdev);