aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorMat Martineau <mathewm@codeaurora.org>2012-03-23 19:56:56 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-08 23:41:35 -0400
commit00e3112c5a90963bb7b56e0648d22fc51ed17d23 (patch)
tree97707023c5e51df24adf574cb727e9a28f569289 /include/net/bluetooth/bluetooth.h
parentd5f7ac38102c12069de247890cfdd357bf845a77 (diff)
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: Mat Martineau <mathewm@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r--include/net/bluetooth/bluetooth.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 262ebd1747d4..f2c8bdf08061 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -215,6 +215,18 @@ void bt_accept_unlink(struct sock *sk);
215struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); 215struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock);
216 216
217/* Skb helpers */ 217/* Skb helpers */
218struct l2cap_ctrl {
219 unsigned int sframe : 1,
220 poll : 1,
221 final : 1,
222 fcs : 1,
223 sar : 2,
224 super : 2;
225 __u16 reqseq;
226 __u16 txseq;
227 __u8 retries;
228};
229
218struct bt_skb_cb { 230struct bt_skb_cb {
219 __u8 pkt_type; 231 __u8 pkt_type;
220 __u8 incoming; 232 __u8 incoming;
@@ -223,6 +235,7 @@ struct bt_skb_cb {
223 __u8 retries; 235 __u8 retries;
224 __u8 sar; 236 __u8 sar;
225 __u8 force_active; 237 __u8 force_active;
238 struct l2cap_ctrl control;
226}; 239};
227#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) 240#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
228 241