|
@@ -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,
|
|
|
unsigned long len, int nb)
|
|
|
{
|
|
|
+ struct sock *sk = chan->data;
|
|
|
struct sk_buff *skb;
|
|
|
int err;
|
|
|
|
|
|
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);
|
|
|
|
|
|
if (!skb)
|