From ae072dcf83d8124e45a0bf5ca69c3699e2a4b8fe Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 12 Feb 2003 15:53:40 +0000 Subject: Fix the voice command for big endian machines --- tools/hciconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/hciconfig.c b/tools/hciconfig.c index ed8fdcd2..9f80f4c4 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -535,7 +535,7 @@ void cmd_voice(int ctl, int hdev, char *opt) exit(1); } if (opt) { - uint16_t vs = htobl(strtoul(opt, NULL, 16)); + uint16_t vs = htobs(strtoul(opt, NULL, 16)); if (0 > hci_write_voice_setting(s, vs, 1000)) { printf("Can't write voice setting on hci%d. %s(%d)\n", hdev, strerror(errno), errno); @@ -549,6 +549,7 @@ void cmd_voice(int ctl, int hdev, char *opt) hdev, strerror(errno), errno); exit(1); } + vs = htobs(vs); ic = (vs & 0x0300) >> 8; print_dev_hdr(&di); printf("\tVoice setting: 0x%04x%s\n", vs, -- cgit