提交 00e3112c 编写于 作者: M Mat Martineau 提交者: Gustavo Padovan

Bluetooth: Add a structure to carry ERTM data in skb control blocks

Every field from ERTM control headers is now carried in the control
block so it only has to be parsed or generated once, and can be
efficiently accessed throughout the ERTM code.
Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
上级 d5f7ac38
......@@ -215,6 +215,18 @@ void bt_accept_unlink(struct sock *sk);
struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
/* Skb helpers */
struct l2cap_ctrl {
unsigned int sframe : 1,
poll : 1,
final : 1,
fcs : 1,
sar : 2,
super : 2;
__u16 reqseq;
__u16 txseq;
__u8 retries;
};
struct bt_skb_cb {
__u8 pkt_type;
__u8 incoming;
......@@ -223,6 +235,7 @@ struct bt_skb_cb {
__u8 retries;
__u8 sar;
__u8 force_active;
struct l2cap_ctrl control;
};
#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册