]> Pileus Git - ~andy/linux/blobdiff - include/net/bluetooth/bluetooth.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net into net
[~andy/linux] / include / net / bluetooth / bluetooth.h
index 2554b3f5222ae0fa32b7f6fce650fb65327a65db..9531beee09b55342fec2266e5d9c9bba41248c2d 100644 (file)
@@ -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} })