diff options
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 { | |||
166 | #define BDADDR_LE_PUBLIC 0x01 | 166 | #define BDADDR_LE_PUBLIC 0x01 |
167 | #define BDADDR_LE_RANDOM 0x02 | 167 | #define BDADDR_LE_RANDOM 0x02 |
168 | 168 | ||
169 | static inline bool bdaddr_type_is_valid(__u8 type) | ||
170 | { | ||
171 | switch (type) { | ||
172 | case BDADDR_BREDR: | ||
173 | case BDADDR_LE_PUBLIC: | ||
174 | case BDADDR_LE_RANDOM: | ||
175 | return true; | ||
176 | } | ||
177 | |||
178 | return false; | ||
179 | } | ||
180 | |||
181 | static inline bool bdaddr_type_is_le(__u8 type) | ||
182 | { | ||
183 | switch (type) { | ||
184 | case BDADDR_LE_PUBLIC: | ||
185 | case BDADDR_LE_RANDOM: | ||
186 | return true; | ||
187 | } | ||
188 | |||
189 | return false; | ||
190 | } | ||
191 | |||
169 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} }) | 192 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0} }) |
170 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} }) | 193 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff} }) |
171 | 194 | ||