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 /src/eir.c | |
parent | 1ac88d03313b31aec630e221c479e3242781f19b (diff) | |
download | bluez-97b4ceb85cabb22a94422fc8b993da090a2b0574.tar.gz |
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 'src/eir.c')
-rw-r--r-- | src/eir.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -232,7 +232,7 @@ static void eir_generate_uuid128(GSList *list, uint8_t *ptr, uint16_t *eir_len) void eir_create(const char *name, int8_t tx_power, uint16_t did_vendor, uint16_t did_product, uint16_t did_version, - GSList *uuids, uint8_t *data) + uint16_t did_source, GSList *uuids, uint8_t *data) { GSList *l; uint8_t *ptr = data; @@ -269,11 +269,10 @@ void eir_create(const char *name, int8_t tx_power, uint16_t did_vendor, } if (did_vendor != 0x0000) { - uint16_t source = 0x0002; *ptr++ = 9; *ptr++ = EIR_DEVICE_ID; - *ptr++ = (source & 0x00ff); - *ptr++ = (source & 0xff00) >> 8; + *ptr++ = (did_source & 0x00ff); + *ptr++ = (did_source & 0xff00) >> 8; *ptr++ = (did_vendor & 0x00ff); *ptr++ = (did_vendor & 0xff00) >> 8; *ptr++ = (did_product & 0x00ff); |