diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-04-24 20:02:49 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo@padovan.org> | 2012-05-09 00:40:42 -0400 |
commit | 591f47f31ba4e89fc0cce2ad90da80945ce8bf94 (patch) | |
tree | f76c50645f1b90d677699eefe53f79188bf0e9d0 /include/net/bluetooth | |
parent | 2bbf2968e5cd72d2dd9e229d85c1617b8aa48f4e (diff) |
Bluetooth: Move address type macros to bluetooth.h
This patch moves address type macros to bluetooth.h since they will be
used by management interface and Bluetooth socket interface. It also
replaces the macro prefix MGMT_ADDR_ by BDADDR_.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 5 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 16 |
2 files changed, 11 insertions, 10 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index d0e44a4151e6..27a6a936487d 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -163,6 +163,11 @@ typedef struct { | |||
163 | __u8 b[6]; | 163 | __u8 b[6]; |
164 | } __packed bdaddr_t; | 164 | } __packed bdaddr_t; |
165 | 165 | ||
166 | /* BD Address type */ | ||
167 | #define BDADDR_BREDR 0x00 | ||
168 | #define BDADDR_LE_PUBLIC 0x01 | ||
169 | #define BDADDR_LE_RANDOM 0x02 | ||
170 | |||
166 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) | 171 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) |
167 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) | 172 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) |
168 | 173 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ef6e6541aa2a..6777432ca61e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -963,16 +963,12 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb); | |||
963 | void hci_sock_dev_event(struct hci_dev *hdev, int event); | 963 | void hci_sock_dev_event(struct hci_dev *hdev, int event); |
964 | 964 | ||
965 | /* Management interface */ | 965 | /* Management interface */ |
966 | #define MGMT_ADDR_BREDR 0x00 | 966 | #define DISCOV_TYPE_BREDR (BIT(BDADDR_BREDR)) |
967 | #define MGMT_ADDR_LE_PUBLIC 0x01 | 967 | #define DISCOV_TYPE_LE (BIT(BDADDR_LE_PUBLIC) | \ |
968 | #define MGMT_ADDR_LE_RANDOM 0x02 | 968 | BIT(BDADDR_LE_RANDOM)) |
969 | 969 | #define DISCOV_TYPE_INTERLEAVED (BIT(BDADDR_BREDR) | \ | |
970 | #define DISCOV_TYPE_BREDR (BIT(MGMT_ADDR_BREDR)) | 970 | BIT(BDADDR_LE_PUBLIC) | \ |
971 | #define DISCOV_TYPE_LE (BIT(MGMT_ADDR_LE_PUBLIC) | \ | 971 | BIT(BDADDR_LE_RANDOM)) |
972 | BIT(MGMT_ADDR_LE_RANDOM)) | ||
973 | #define DISCOV_TYPE_INTERLEAVED (BIT(MGMT_ADDR_BREDR) | \ | ||
974 | BIT(MGMT_ADDR_LE_PUBLIC) | \ | ||
975 | BIT(MGMT_ADDR_LE_RANDOM)) | ||
976 | 972 | ||
977 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); | 973 | int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len); |
978 | int mgmt_index_added(struct hci_dev *hdev); | 974 | int mgmt_index_added(struct hci_dev *hdev); |