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>
This commit is contained in:
committed by
Gustavo Padovan
parent
2bbf2968e5
commit
591f47f31b
@@ -163,6 +163,11 @@ typedef struct {
|
||||
__u8 b[6];
|
||||
} __packed bdaddr_t;
|
||||
|
||||
/* BD Address type */
|
||||
#define BDADDR_BREDR 0x00
|
||||
#define BDADDR_LE_PUBLIC 0x01
|
||||
#define BDADDR_LE_RANDOM 0x02
|
||||
|
||||
#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
|
||||
#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
|
||||
|
||||
|
||||
@@ -963,16 +963,12 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb);
|
||||
void hci_sock_dev_event(struct hci_dev *hdev, int event);
|
||||
|
||||
/* Management interface */
|
||||
#define MGMT_ADDR_BREDR 0x00
|
||||
#define MGMT_ADDR_LE_PUBLIC 0x01
|
||||
#define MGMT_ADDR_LE_RANDOM 0x02
|
||||
|
||||
#define DISCOV_TYPE_BREDR (BIT(MGMT_ADDR_BREDR))
|
||||
#define DISCOV_TYPE_LE (BIT(MGMT_ADDR_LE_PUBLIC) | \
|
||||
BIT(MGMT_ADDR_LE_RANDOM))
|
||||
#define DISCOV_TYPE_INTERLEAVED (BIT(MGMT_ADDR_BREDR) | \
|
||||
BIT(MGMT_ADDR_LE_PUBLIC) | \
|
||||
BIT(MGMT_ADDR_LE_RANDOM))
|
||||
#define DISCOV_TYPE_BREDR (BIT(BDADDR_BREDR))
|
||||
#define DISCOV_TYPE_LE (BIT(BDADDR_LE_PUBLIC) | \
|
||||
BIT(BDADDR_LE_RANDOM))
|
||||
#define DISCOV_TYPE_INTERLEAVED (BIT(BDADDR_BREDR) | \
|
||||
BIT(BDADDR_LE_PUBLIC) | \
|
||||
BIT(BDADDR_LE_RANDOM))
|
||||
|
||||
int mgmt_control(struct sock *sk, struct msghdr *msg, size_t len);
|
||||
int mgmt_index_added(struct hci_dev *hdev);
|
||||
|
||||
Reference in New Issue
Block a user