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>
This commit is contained in:
committed by
Gustavo F. Padovan
parent
8f36011924
commit
e2fd318e3a
@@ -129,6 +129,12 @@ struct l2cap_conninfo {
|
||||
#define L2CAP_SDU_END 0x8000
|
||||
#define L2CAP_SDU_CONTINUE 0xC000
|
||||
|
||||
/* L2CAP Command rej. reasons */
|
||||
#define L2CAP_REJ_NOT_UNDERSTOOD 0x0000
|
||||
#define L2CAP_REJ_MTU_EXCEEDED 0x0001
|
||||
#define L2CAP_REJ_INVALID_CID 0x0002
|
||||
|
||||
|
||||
/* L2CAP structures */
|
||||
struct l2cap_hdr {
|
||||
__le16 len;
|
||||
@@ -143,10 +149,21 @@ struct l2cap_cmd_hdr {
|
||||
} __packed;
|
||||
#define L2CAP_CMD_HDR_SIZE 4
|
||||
|
||||
struct l2cap_cmd_rej {
|
||||
struct l2cap_cmd_rej_unk {
|
||||
__le16 reason;
|
||||
} __packed;
|
||||
|
||||
struct l2cap_cmd_rej_mtu {
|
||||
__le16 reason;
|
||||
__le16 max_mtu;
|
||||
} __packed;
|
||||
|
||||
struct l2cap_cmd_rej_cid {
|
||||
__le16 reason;
|
||||
__le16 scid;
|
||||
__le16 dcid;
|
||||
} __packed;
|
||||
|
||||
struct l2cap_conn_req {
|
||||
__le16 psm;
|
||||
__le16 scid;
|
||||
|
||||
Reference in New Issue
Block a user