Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/3] Bluetooth: Add L2CAP channel to skb private data
@ 2013-10-21 20:22 Gustavo Padovan
  2013-10-21 20:22 ` [PATCH 2/3] Bluetooth: Use bt_cb(skb)->chan to send raw data back Gustavo Padovan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gustavo Padovan @ 2013-10-21 20:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo Padovan

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-21 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 20:22 [PATCH 1/3] Bluetooth: Add L2CAP channel to skb private data Gustavo Padovan
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox