diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-03-28 12:03:15 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-03-28 13:15:40 +0300 |
commit | 97b4ceb85cabb22a94422fc8b993da090a2b0574 (patch) | |
tree | 09c68b2f71723d7cfe98c9ccdb87b499e86d25b7 /plugins | |
parent | 1ac88d03313b31aec630e221c479e3242781f19b (diff) | |
download | bluez-97b4ceb85cabb22a94422fc8b993da090a2b0574.tar.gz bluez-97b4ceb85cabb22a94422fc8b993da090a2b0574.tar.xz bluez-97b4ceb85cabb22a94422fc8b993da090a2b0574.zip |
Add support for setting VID source in DeviceID from config file
This allows to set if VID source is Bluetooth SIG or USB. Assigner is
provided as string {bluetooth,usb} and fallback to usb if none is set
in config.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/hciops.c | 7 | ||||
-rw-r--r-- | plugins/mgmtops.c | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c index 4f287f07..6b4a82c2 100644 --- a/plugins/hciops.c +++ b/plugins/hciops.c @@ -147,6 +147,7 @@ static struct dev_info { struct hci_version ver; + uint16_t did_source; uint16_t did_vendor; uint16_t did_product; uint16_t did_version; @@ -672,7 +673,8 @@ static void update_ext_inquiry_response(int index) memset(&cp, 0, sizeof(cp)); eir_create(dev->name, dev->tx_power, dev->did_vendor, dev->did_product, - dev->did_version, dev->uuids, cp.data); + dev->did_version, dev->did_source, dev->uuids, + cp.data); if (memcmp(cp.data, dev->eir, sizeof(cp.data)) == 0) return; @@ -886,13 +888,14 @@ fail: } static int hciops_set_did(int index, uint16_t vendor, uint16_t product, - uint16_t version) + uint16_t version, uint16_t source) { struct dev_info *dev = &devs[index]; dev->did_vendor = vendor; dev->did_product = product; dev->did_version = version; + dev->did_source = source; return 0; } diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index 4aa38fef..c24757c9 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -2116,10 +2116,10 @@ static int mgmt_encrypt_link(int index, bdaddr_t *dst, bt_hci_result_t cb, } static int mgmt_set_did(int index, uint16_t vendor, uint16_t product, - uint16_t version) + uint16_t version, uint16_t source) { - DBG("index %d vendor %u product %u version %u", - index, vendor, product, version); + DBG("index %d vendor %u product %u version %u source %u", + index, vendor, product, version, source); return -ENOSYS; } |