diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2011-11-07 16:13:39 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-11-08 10:05:57 -0500 |
commit | 4c659c3976e81f9def48993cd00988d53d7379f2 (patch) | |
tree | 57cdd17455a2b71ab545bcb609baa4990afa8dda /include | |
parent | 86742e1eca319069490f6f20c2892baafc2a6922 (diff) |
Bluetooth: Add address type fields to mgmt messages that need them
This patch adds address type info (typically BR/EDR vs LE) to management
messages that need this. This also ensures conformance to the latest
management API specification.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 10 | ||||
-rw-r--r-- | include/net/bluetooth/mgmt.h | 23 |
2 files changed, 18 insertions, 15 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4ebc882385f9..e6071d0ea20f 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -912,10 +912,10 @@ int mgmt_discoverable(u16 index, u8 discoverable); | |||
912 | int mgmt_connectable(u16 index, u8 connectable); | 912 | int mgmt_connectable(u16 index, u8 connectable); |
913 | int mgmt_write_scan_failed(u16 index, u8 scan, u8 status); | 913 | int mgmt_write_scan_failed(u16 index, u8 scan, u8 status); |
914 | int mgmt_new_link_key(u16 index, struct link_key *key, u8 persistent); | 914 | int mgmt_new_link_key(u16 index, struct link_key *key, u8 persistent); |
915 | int mgmt_connected(u16 index, bdaddr_t *bdaddr, u8 link_type); | 915 | int mgmt_connected(u16 index, bdaddr_t *bdaddr, u8 type); |
916 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr); | 916 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr, u8 type); |
917 | int mgmt_disconnect_failed(u16 index); | 917 | int mgmt_disconnect_failed(u16 index); |
918 | int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status); | 918 | int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 type, u8 status); |
919 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr, u8 secure); | 919 | int mgmt_pin_code_request(u16 index, bdaddr_t *bdaddr, u8 secure); |
920 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 920 | int mgmt_pin_code_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
921 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | 921 | int mgmt_pin_code_neg_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); |
@@ -928,8 +928,8 @@ int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); | |||
928 | int mgmt_set_local_name_complete(u16 index, u8 *name, u8 status); | 928 | int mgmt_set_local_name_complete(u16 index, u8 *name, u8 status); |
929 | int mgmt_read_local_oob_data_reply_complete(u16 index, u8 *hash, u8 *randomizer, | 929 | int mgmt_read_local_oob_data_reply_complete(u16 index, u8 *hash, u8 *randomizer, |
930 | u8 status); | 930 | u8 status); |
931 | int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 *dev_class, s8 rssi, | 931 | int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 type, u8 *dev_class, |
932 | u8 *eir); | 932 | s8 rssi, u8 *eir); |
933 | int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name); | 933 | int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name); |
934 | int mgmt_inquiry_failed(u16 index, u8 status); | 934 | int mgmt_inquiry_failed(u16 index, u8 status); |
935 | int mgmt_discovering(u16 index, u8 discovering); | 935 | int mgmt_discovering(u16 index, u8 discovering); |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index fa33bc6c485f..3e320c9cae8f 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -128,10 +128,20 @@ struct mgmt_rp_disconnect { | |||
128 | bdaddr_t bdaddr; | 128 | bdaddr_t bdaddr; |
129 | } __packed; | 129 | } __packed; |
130 | 130 | ||
131 | #define MGMT_ADDR_BREDR 0x00 | ||
132 | #define MGMT_ADDR_LE 0x01 | ||
133 | #define MGMT_ADDR_BREDR_LE 0x02 | ||
134 | #define MGMT_ADDR_INVALID 0xff | ||
135 | |||
136 | struct mgmt_addr_info { | ||
137 | bdaddr_t bdaddr; | ||
138 | __u8 type; | ||
139 | } __packed; | ||
140 | |||
131 | #define MGMT_OP_GET_CONNECTIONS 0x0010 | 141 | #define MGMT_OP_GET_CONNECTIONS 0x0010 |
132 | struct mgmt_rp_get_connections { | 142 | struct mgmt_rp_get_connections { |
133 | __le16 conn_count; | 143 | __le16 conn_count; |
134 | bdaddr_t conn[0]; | 144 | struct mgmt_addr_info addr[0]; |
135 | } __packed; | 145 | } __packed; |
136 | 146 | ||
137 | #define MGMT_OP_PIN_CODE_REPLY 0x0011 | 147 | #define MGMT_OP_PIN_CODE_REPLY 0x0011 |
@@ -254,19 +264,12 @@ struct mgmt_ev_new_link_key { | |||
254 | } __packed; | 264 | } __packed; |
255 | 265 | ||
256 | #define MGMT_EV_CONNECTED 0x000B | 266 | #define MGMT_EV_CONNECTED 0x000B |
257 | struct mgmt_ev_connected { | ||
258 | bdaddr_t bdaddr; | ||
259 | __u8 link_type; | ||
260 | } __packed; | ||
261 | 267 | ||
262 | #define MGMT_EV_DISCONNECTED 0x000C | 268 | #define MGMT_EV_DISCONNECTED 0x000C |
263 | struct mgmt_ev_disconnected { | ||
264 | bdaddr_t bdaddr; | ||
265 | } __packed; | ||
266 | 269 | ||
267 | #define MGMT_EV_CONNECT_FAILED 0x000D | 270 | #define MGMT_EV_CONNECT_FAILED 0x000D |
268 | struct mgmt_ev_connect_failed { | 271 | struct mgmt_ev_connect_failed { |
269 | bdaddr_t bdaddr; | 272 | struct mgmt_addr_info addr; |
270 | __u8 status; | 273 | __u8 status; |
271 | } __packed; | 274 | } __packed; |
272 | 275 | ||
@@ -296,7 +299,7 @@ struct mgmt_ev_local_name_changed { | |||
296 | 299 | ||
297 | #define MGMT_EV_DEVICE_FOUND 0x0012 | 300 | #define MGMT_EV_DEVICE_FOUND 0x0012 |
298 | struct mgmt_ev_device_found { | 301 | struct mgmt_ev_device_found { |
299 | bdaddr_t bdaddr; | 302 | struct mgmt_addr_info addr; |
300 | __u8 dev_class[3]; | 303 | __u8 dev_class[3]; |
301 | __s8 rssi; | 304 | __s8 rssi; |
302 | __u8 eir[HCI_MAX_EIR_LENGTH]; | 305 | __u8 eir[HCI_MAX_EIR_LENGTH]; |