summaryrefslogtreecommitdiffstats
path: root/tools/hcitool.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hcitool.c')
-rw-r--r--tools/hcitool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 0194b650..675d829e 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -436,7 +436,7 @@ static void cmd_info(int dev_id, int argc, char **argv)
bacpy(&cr->bdaddr, &bdaddr);
cr->type = ACL_LINK;
if (ioctl(dd, HCIGETCONNINFO, (unsigned long) cr) < 0) {
- if (hci_create_connection(dd, &bdaddr, HCI_DM1 | HCI_DH1, 0, 0, &handle, 25000) < 0) {
+ if (hci_create_connection(dd, &bdaddr, htobs(HCI_DM1 | HCI_DH1), 0, 0, &handle, 25000) < 0) {
perror("Can't create connection");
close(dd);
exit(1);
@@ -653,7 +653,7 @@ static void cmd_cc(int dev_id, int argc, char **argv)
exit(1);
}
- if (hci_create_connection(dd, &bdaddr, ptype, 0, role, &handle, 1000) < 0)
+ if (hci_create_connection(dd, &bdaddr, htobs(ptype), 0, role, &handle, 1000) < 0)
perror("Can't create connection");
hci_close_dev(dd);
}