Commit 0f2c6153 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Marcel Holtmann

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: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent d42970f3
...@@ -1159,11 +1159,12 @@ static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state, ...@@ -1159,11 +1159,12 @@ static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan, static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
unsigned long len, int nb) unsigned long len, int nb)
{ {
struct sock *sk = chan->data;
struct sk_buff *skb; struct sk_buff *skb;
int err; int err;
l2cap_chan_unlock(chan); l2cap_chan_unlock(chan);
skb = bt_skb_send_alloc(chan->sk, len, nb, &err); skb = bt_skb_send_alloc(sk, len, nb, &err);
l2cap_chan_lock(chan); l2cap_chan_lock(chan);
if (!skb) if (!skb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment