summaryrefslogtreecommitdiffstats
path: root/hcid/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-22 01:50:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-22 01:50:41 +0000
commitb22d297c0c679b400d7825367e31fed46c552a49 (patch)
tree48f403d960004356af7ce70bedfc4f2490231945 /hcid/main.c
parent145dfdd4b2e09f6b5b9e0be03d134c0242261b81 (diff)
First attempt for automatic setting of service classes value
Diffstat (limited to 'hcid/main.c')
-rw-r--r--hcid/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/main.c b/hcid/main.c
index bd470c87..75229fba 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -467,12 +467,15 @@ static void configure_device(int dev_id)
if (read_local_class(&di.bdaddr, cls) < 0) {
class = htobl(device_opts->class);
+ cls[2] = get_service_classes();
memcpy(cp.dev_class, &class, 3);
} else {
if (!(device_opts->scan & SCAN_INQUIRY))
cls[1] &= 0xdf; /* Clear discoverable bit */
+ cls[2] = get_service_classes();
memcpy(cp.dev_class, cls, 3);
}
+
hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_CLASS_OF_DEV,
WRITE_CLASS_OF_DEV_CP_SIZE, &cp);
}