summaryrefslogtreecommitdiff
path: root/include/net/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-01-30 23:21:04 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-01-30 23:21:04 +0400
commit0f496df2d9ba48faa808b5fa330de0da1a2d29d7 (patch)
treec1c85a625cff3f2ca6d95a5d5020a0157baa7521 /include/net/bluetooth/bluetooth.h
parent56e1bd770614da94f35e88c150cf9edf8d0b57a2 (diff)
parent9b008c0457e583e10e62d1215bed6ab26ee54906 (diff)
downloadlinux-0f496df2d9ba48faa808b5fa330de0da1a2d29d7.tar.xz
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r--include/net/bluetooth/bluetooth.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 2554b3f5222a..9531beee09b5 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -166,6 +166,29 @@ typedef struct {
#define BDADDR_LE_PUBLIC 0x01
#define BDADDR_LE_RANDOM 0x02
+static inline bool bdaddr_type_is_valid(__u8 type)
+{
+ switch (type) {
+ case BDADDR_BREDR:
+ case BDADDR_LE_PUBLIC:
+ case BDADDR_LE_RANDOM:
+ return true;
+ }
+
+ return false;
+}
+
+static inline bool bdaddr_type_is_le(__u8 type)
+{
+ switch (type) {
+ case BDADDR_LE_PUBLIC:
+ case BDADDR_LE_RANDOM:
+ return true;
+ }
+
+ return false;
+}
+
#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} })
#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} })