diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-01-30 23:21:04 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-30 23:21:04 +0400 |
commit | 0f496df2d9ba48faa808b5fa330de0da1a2d29d7 (patch) | |
tree | c1c85a625cff3f2ca6d95a5d5020a0157baa7521 /include/net/bluetooth/bluetooth.h | |
parent | 56e1bd770614da94f35e88c150cf9edf8d0b57a2 (diff) | |
parent | 9b008c0457e583e10e62d1215bed6ab26ee54906 (diff) | |
download | linux-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.h | 23 |
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} }) |