From: Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCHv2 hcidump 1/3] add btohll macro
Date: Wed, 12 Oct 2011 11:31:34 +0300 [thread overview]
Message-ID: <1318408296-28840-2-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1318408296-28840-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
handle 64 bit swap
---
lib/bluetooth.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 738e07a..b0680e2 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -93,13 +93,17 @@ enum {
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobs(d) (d)
#define htobl(d) (d)
+#define htobll(d) (d)
#define btohs(d) (d)
#define btohl(d) (d)
+#define btohll(d) (d)
#elif __BYTE_ORDER == __BIG_ENDIAN
#define htobs(d) bswap_16(d)
#define htobl(d) bswap_32(d)
+#define htobll(d) bswap_64(d)
#define btohs(d) bswap_16(d)
#define btohl(d) bswap_32(d)
+#define btohll(d) bswap_64(d)
#else
#error "Unknown byte order"
#endif
--
1.7.4.1
next prev parent reply other threads:[~2011-10-12 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 8:31 [PATCHv2 hcidump 0/3] decode fixed channels Emeltchenko Andrei
2011-10-12 8:31 ` Emeltchenko Andrei [this message]
2011-10-12 8:31 ` [PATCHv2 hcidump 2/3] add fixed channel definitions Emeltchenko Andrei
2011-10-12 8:31 ` [PATCHv2 hcidump 3/3] decode fixed channel list info rsp Emeltchenko Andrei
2011-10-14 19:15 ` Johan Hedberg
2011-10-17 8:22 ` Andrei Emeltchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318408296-28840-2-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox