*/
HCI_QUIRK_BROKEN_STORED_LINK_KEY,
+ /* When this quirk is set, an external configuration step
+ * is required and will be indicated with the controller
+ * configuation.
+ *
+ * This quirk can be set before hci_register_dev is called or
+ * during the hdev->setup vendor callback.
+ */
+ HCI_QUIRK_EXTERNAL_CONFIG,
+
/* When this quirk is set, the public Bluetooth address
* initially reported by HCI Read BD Address command
* is considered invalid. Controller configuration is
if (hdev->setup && test_bit(HCI_SETUP, &hdev->dev_flags)) {
ret = hdev->setup(hdev);
- if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks))
+ if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks) ||
+ test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks))
set_bit(HCI_UNCONFIGURED, &hdev->dev_flags);
}
{
u32 options = 0;
+ if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks))
+ options |= MGMT_OPTION_EXTERNAL_CONFIG;
+
if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks) &&
!bacmp(&hdev->public_addr, BDADDR_ANY))
options |= MGMT_OPTION_PUBLIC_ADDRESS;
memset(&rp, 0, sizeof(rp));
rp.manufacturer = cpu_to_le16(hdev->manufacturer);
+ if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks))
+ options |= MGMT_OPTION_EXTERNAL_CONFIG;
+
if (hdev->set_bdaddr)
options |= MGMT_OPTION_PUBLIC_ADDRESS;
settings |= MGMT_SETTING_PRIVACY;
}
- if (hdev->set_bdaddr)
+ if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks) ||
+ hdev->set_bdaddr)
settings |= MGMT_SETTING_CONFIGURATION;
return settings;