aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-10-21 12:21:38 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-10-21 15:58:16 -0400
commit0f2c6153746f270cf28559aa81a4da27847bd395 (patch)
tree653d9741766d442a64b60c81a8f7766f759110dd /net
parentd42970f319f8a1d7cfe8196097f62e5b3885e449 (diff)
Bluetooth: Do not access chan->sk directly
In the process of removing socket usage from L2CAP we now access the L2CAP socket from the data member of struct l2cap_chan. For the L2CAP socket user the data member points to the L2CAP socket. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_sock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 1f326d9d9132..a0b31db1246e 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1159,11 +1159,12 @@ static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
1159static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, 1159static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
1160 unsigned long len, int nb) 1160 unsigned long len, int nb)
1161{ 1161{
1162 struct sock *sk = chan->data;
1162 struct sk_buff *skb; 1163 struct sk_buff *skb;
1163 int err; 1164 int err;
1164 1165
1165 l2cap_chan_unlock(chan); 1166 l2cap_chan_unlock(chan);
1166 skb = bt_skb_send_alloc(chan->sk, len, nb, &err); 1167 skb = bt_skb_send_alloc(sk, len, nb, &err);
1167 l2cap_chan_lock(chan); 1168 l2cap_chan_lock(chan);
1168 1169
1169 if (!skb) 1170 if (!skb)