diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-05-29 06:59:05 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-06-04 23:34:12 -0400 |
commit | b9058fb67c42851b4f852d90b11f43279586aae9 (patch) | |
tree | 15f68f63524738a267f10692236f77dc760a34aa /include | |
parent | 46d5c9088fbcc8a570bc271f77940973d9cae074 (diff) |
Bluetooth: A2MP: Definitions for A2MP commands
Define A2MP command IDs and packet structures.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/a2mp.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/include/net/bluetooth/a2mp.h b/include/net/bluetooth/a2mp.h index 654df60cfd6d..7cbeb911fbd1 100644 --- a/include/net/bluetooth/a2mp.h +++ b/include/net/bluetooth/a2mp.h | |||
@@ -31,6 +31,79 @@ struct a2mp_cmd { | |||
31 | __u8 data[0]; | 31 | __u8 data[0]; |
32 | } __packed; | 32 | } __packed; |
33 | 33 | ||
34 | /* A2MP command codes */ | ||
35 | #define A2MP_COMMAND_REJ 0x01 | ||
36 | struct a2mp_cmd_rej { | ||
37 | __le16 reason; | ||
38 | __u8 data[0]; | ||
39 | } __packed; | ||
40 | |||
41 | #define A2MP_DISCOVER_REQ 0x02 | ||
42 | struct a2mp_discov_req { | ||
43 | __le16 mtu; | ||
44 | __le16 ext_feat; | ||
45 | } __packed; | ||
46 | |||
47 | struct a2mp_cl { | ||
48 | __u8 id; | ||
49 | __u8 type; | ||
50 | __u8 status; | ||
51 | } __packed; | ||
52 | |||
53 | #define A2MP_DISCOVER_RSP 0x03 | ||
54 | struct a2mp_discov_rsp { | ||
55 | __le16 mtu; | ||
56 | __le16 ext_feat; | ||
57 | struct a2mp_cl cl[0]; | ||
58 | } __packed; | ||
59 | |||
60 | #define A2MP_CHANGE_NOTIFY 0x04 | ||
61 | #define A2MP_CHANGE_RSP 0x05 | ||
62 | |||
63 | #define A2MP_GETINFO_REQ 0x06 | ||
64 | struct a2mp_info_req { | ||
65 | __u8 id; | ||
66 | } __packed; | ||
67 | |||
68 | #define A2MP_GETINFO_RSP 0x07 | ||
69 | struct a2mp_info_rsp { | ||
70 | __u8 id; | ||
71 | __u8 status; | ||
72 | __le32 total_bw; | ||
73 | __le32 max_bw; | ||
74 | __le32 min_latency; | ||
75 | __le16 pal_cap; | ||
76 | __le16 assoc_size; | ||
77 | } __packed; | ||
78 | |||
79 | #define A2MP_GETAMPASSOC_REQ 0x08 | ||
80 | struct a2mp_amp_assoc_req { | ||
81 | __u8 id; | ||
82 | } __packed; | ||
83 | |||
84 | #define A2MP_GETAMPASSOC_RSP 0x09 | ||
85 | struct a2mp_amp_assoc_rsp { | ||
86 | __u8 id; | ||
87 | __u8 status; | ||
88 | __u8 amp_assoc[0]; | ||
89 | } __packed; | ||
90 | |||
91 | #define A2MP_CREATEPHYSLINK_REQ 0x0A | ||
92 | #define A2MP_DISCONNPHYSLINK_REQ 0x0C | ||
93 | struct a2mp_physlink_req { | ||
94 | __u8 local_id; | ||
95 | __u8 remote_id; | ||
96 | __u8 amp_assoc[0]; | ||
97 | } __packed; | ||
98 | |||
99 | #define A2MP_CREATEPHYSLINK_RSP 0x0B | ||
100 | #define A2MP_DISCONNPHYSLINK_RSP 0x0D | ||
101 | struct a2mp_physlink_rsp { | ||
102 | __u8 local_id; | ||
103 | __u8 remote_id; | ||
104 | __u8 status; | ||
105 | } __packed; | ||
106 | |||
34 | void amp_mgr_get(struct amp_mgr *mgr); | 107 | void amp_mgr_get(struct amp_mgr *mgr); |
35 | int amp_mgr_put(struct amp_mgr *mgr); | 108 | int amp_mgr_put(struct amp_mgr *mgr); |
36 | 109 | ||