From: Gustavo Padovan <gustavo@padovan.org>
To: linux-bluetooth@vger.kernel.org
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: [PATCH 1/3] Bluetooth: Add L2CAP channel to skb private data
Date: Mon, 21 Oct 2013 18:22:24 -0200 [thread overview]
Message-ID: <1382386946-19797-1-git-send-email-gustavo@padovan.org> (raw)
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Adding the channel to the skb private data makes possible to us know which
channel the skb we have came from.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk
---
include/net/bluetooth/bluetooth.h | 1 +
net/bluetooth/l2cap_sock.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index bf2ddff..a707a02 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -282,6 +282,7 @@ struct bt_skb_cb {
__u8 incoming;
__u16 expect;
__u8 force_active;
+ struct l2cap_chan *chan;
struct l2cap_ctrl control;
struct hci_req_ctrl req;
bdaddr_t bdaddr;
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index a159b0e..cba3162 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1174,6 +1174,8 @@ static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
if (!skb)
return ERR_PTR(err);
+ bt_cb(skb)->chan = chan;
+
return skb;
}
--
1.8.3.1
next reply other threads:[~2013-10-21 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 20:22 Gustavo Padovan [this message]
2013-10-21 20:22 ` [PATCH 2/3] Bluetooth: Use bt_cb(skb)->chan to send raw data back Gustavo Padovan
2013-10-21 20:22 ` [PATCH 3/3] Bluetooth: Remove sk member from struct l2cap_chan Gustavo Padovan
2013-10-21 20:53 ` [PATCH 1/3] Bluetooth: Add L2CAP channel to skb private data Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382386946-19797-1-git-send-email-gustavo@padovan.org \
--to=gustavo@padovan.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox