From 8a310097811717fdeb5853095c2a9c01d82f36f2 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Thu, 21 Nov 2024 23:19:39 +0000 Subject: [PATCH] pw_bluetooth: Add DISCONNECTION_REQ to l2cap definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: b/360929142 Change-Id: I2b3a4a1ba6dbfeccfbe58e5d0c5a24380e9644bf Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/249712 Reviewed-by: Ben Lawson Commit-Queue: Austin Foxley Reviewed-by: David Rees Pigweed-Auto-Submit: Austin Foxley Docs-Not-Needed: Ben Lawson Commit-Queue: Auto-Submit Lint: Lint 🤖 --- .../public/pw_bluetooth/l2cap_frames.emb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pw_bluetooth/public/pw_bluetooth/l2cap_frames.emb b/pw_bluetooth/public/pw_bluetooth/l2cap_frames.emb index c2caf4a3d..7f3247c46 100644 --- a/pw_bluetooth/public/pw_bluetooth/l2cap_frames.emb +++ b/pw_bluetooth/public/pw_bluetooth/l2cap_frames.emb @@ -262,6 +262,22 @@ struct L2capConnectionRsp: -- The status of the connection. +struct L2capDisconnectionReq: + -- Section 4.6 + -- Once an L2CAP_DISCONNECTION_REQ packet is issued, all incoming data in + -- transit on this L2CAP channel shall be discarded and any new additional + -- outgoing data shall be discarded. + [requires: command_header.code == L2capSignalingPacketCode.DISCONNECTION_REQ] + 0 [+L2capSignalingCommandHeader.$size_in_bytes] L2capSignalingCommandHeader command_header + $next [+2] UInt destination_cid + -- The endpoint of the channel to be disconnected on the device receiving + -- this request. + + $next [+2] UInt source_cid + -- The endpoint of the channel to be disconnected on the device sending this + -- request. + + struct L2capDisconnectionRsp: -- Section 4.7 -- L2CAP_DISCONNECTION_RSP packets shall be sent in response to each valid