aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorIlia Kolomisnky <iliak@ti.com>2011-07-10 01:47:44 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-07-11 00:43:25 -0400
commite2fd318e3a9208245ee1041f6d413c8593fba29d (patch)
tree09eb380881b2c82922f69cdf5dced58143e6695e /include/net
parent8f360119243c214eb5c5549c61981d51a276154a (diff)
Bluetooth: Fixes l2cap "command reject" reply according to spec
There can 3 reasons for the "command reject" reply produced by the stack. Each such reply should be accompanied by the relevand data ( as defined in spec. ). Currently there is one instance of "command reject" reply with reason "invalid cid" wich is fixed. Also, added clean-up definitions related to the "command reject" replies. Signed-off-by: Ilia Kolomisnky <iliak@ti.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/l2cap.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 578545a2a492..4f34ad25e75c 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -129,6 +129,12 @@ struct l2cap_conninfo {
129#define L2CAP_SDU_END 0x8000 129#define L2CAP_SDU_END 0x8000
130#define L2CAP_SDU_CONTINUE 0xC000 130#define L2CAP_SDU_CONTINUE 0xC000
131 131
132/* L2CAP Command rej. reasons */
133#define L2CAP_REJ_NOT_UNDERSTOOD 0x0000
134#define L2CAP_REJ_MTU_EXCEEDED 0x0001
135#define L2CAP_REJ_INVALID_CID 0x0002
136
137
132/* L2CAP structures */ 138/* L2CAP structures */
133struct l2cap_hdr { 139struct l2cap_hdr {
134 __le16 len; 140 __le16 len;
@@ -143,8 +149,19 @@ struct l2cap_cmd_hdr {
143} __packed; 149} __packed;
144#define L2CAP_CMD_HDR_SIZE 4 150#define L2CAP_CMD_HDR_SIZE 4
145 151
146struct l2cap_cmd_rej { 152struct l2cap_cmd_rej_unk {
153 __le16 reason;
154} __packed;
155
156struct l2cap_cmd_rej_mtu {
147 __le16 reason; 157 __le16 reason;
158 __le16 max_mtu;
159} __packed;
160
161struct l2cap_cmd_rej_cid {
162 __le16 reason;
163 __le16 scid;
164 __le16 dcid;
148} __packed; 165} __packed;
149 166
150struct l2cap_conn_req { 167struct l2cap_conn_req {