aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-07-04 11:23:33 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-04 14:08:15 -0400
commiteb1904f49d3e11468997e0667e6ec332a66697c9 (patch)
tree15d50031dbd8245166bebb14ec73fc4b0337ba7a /net/bluetooth/mgmt.c
parent42a9bc148960b2c85f9ec5ef1abe3a87e0155c60 (diff)
Bluetooth: Add quirk for external configuration requirement
When a controller requires external configuration, then setting this quirk will allow indicating this. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 766411e11ac7..d2d0e051e4f2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -445,6 +445,9 @@ static __le32 get_missing_options(struct hci_dev *hdev)
445{ 445{
446 u32 options = 0; 446 u32 options = 0;
447 447
448 if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks))
449 options |= MGMT_OPTION_EXTERNAL_CONFIG;
450
448 if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks) && 451 if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hdev->quirks) &&
449 !bacmp(&hdev->public_addr, BDADDR_ANY)) 452 !bacmp(&hdev->public_addr, BDADDR_ANY))
450 options |= MGMT_OPTION_PUBLIC_ADDRESS; 453 options |= MGMT_OPTION_PUBLIC_ADDRESS;
@@ -465,6 +468,9 @@ static int read_config_info(struct sock *sk, struct hci_dev *hdev,
465 memset(&rp, 0, sizeof(rp)); 468 memset(&rp, 0, sizeof(rp));
466 rp.manufacturer = cpu_to_le16(hdev->manufacturer); 469 rp.manufacturer = cpu_to_le16(hdev->manufacturer);
467 470
471 if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks))
472 options |= MGMT_OPTION_EXTERNAL_CONFIG;
473
468 if (hdev->set_bdaddr) 474 if (hdev->set_bdaddr)
469 options |= MGMT_OPTION_PUBLIC_ADDRESS; 475 options |= MGMT_OPTION_PUBLIC_ADDRESS;
470 476
@@ -509,7 +515,8 @@ static u32 get_supported_settings(struct hci_dev *hdev)
509 settings |= MGMT_SETTING_PRIVACY; 515 settings |= MGMT_SETTING_PRIVACY;
510 } 516 }
511 517
512 if (hdev->set_bdaddr) 518 if (test_bit(HCI_QUIRK_EXTERNAL_CONFIG, &hdev->quirks) ||
519 hdev->set_bdaddr)
513 settings |= MGMT_SETTING_CONFIGURATION; 520 settings |= MGMT_SETTING_CONFIGURATION;
514 521
515 return settings; 522 return settings;