summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-11-24 04:47:48 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-11-24 04:47:48 +0000
commitc20d8468a85840b9235694f369d021118abe23c5 (patch)
treeb5b09f76ad2e150a41add77ccdf3e318909ae93d /tools
parent64ff01e4de2931c0092cd927330e95d82aa413ad (diff)
Fix big endian problem with ACL and SCO MTU settings
Diffstat (limited to 'tools')
-rw-r--r--tools/hciconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 417147a5..47488546 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -348,7 +348,7 @@ static void cmd_aclmtu(int ctl, int hdev, char *opt)
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;
- dr.dev_opt = mpkt | (mtu << 16);
+ dr.dev_opt = htobl(htobs(mpkt) | (htobs(mtu) << 16));
if (ioctl(ctl, HCISETACLMTU, (unsigned long) &dr) < 0) {
fprintf(stderr, "Can't set ACL mtu on hci%d: %s(%d)\n",
@@ -368,7 +368,7 @@ static void cmd_scomtu(int ctl, int hdev, char *opt)
if (sscanf(opt, "%4hu:%4hu", &mtu, &mpkt) != 2)
return;
- dr.dev_opt = mpkt | (mtu << 16);
+ dr.dev_opt = htobl(htobs(mpkt) | (htobs(mtu) << 16));
if (ioctl(ctl, HCISETSCOMTU, (unsigned long) &dr) < 0) {
fprintf(stderr, "Can't set SCO mtu on hci%d: %s (%d)\n",