From: Gustavo Padovan Date: Mon, 21 Oct 2013 20:22:24 +0000 (-0200) Subject: Bluetooth: Add L2CAP channel to skb private data X-Git-Tag: firefly_0821_release~176^2~4570^2~3^2^2~307^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0e790c64f37a1a43c147720bdfa03b7c5538e24a;p=firefly-linux-kernel-4.4.55.git Bluetooth: Add L2CAP channel to skb private data 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 --- diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index bf2ddffdae2d..a707a0209df4 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 a159b0e05202..cba3162dc33d 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; }