Bluetooth: Assign L2CAP socket priority when allocating SKB
The SKB for L2CAP sockets are all allocated in a central callback in the socket support. Instead of having to pass around the socket priority all the time, assign it to skb->priority when actually allocating the SKB. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
@@ -964,7 +964,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
|
||||
return err;
|
||||
|
||||
l2cap_chan_lock(chan);
|
||||
err = l2cap_chan_send(chan, msg, len, sk->sk_priority);
|
||||
err = l2cap_chan_send(chan, msg, len);
|
||||
l2cap_chan_unlock(chan);
|
||||
|
||||
return err;
|
||||
@@ -1305,6 +1305,8 @@ static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
|
||||
if (!skb)
|
||||
return ERR_PTR(err);
|
||||
|
||||
skb->priority = sk->sk_priority;
|
||||
|
||||
bt_cb(skb)->chan = chan;
|
||||
|
||||
return skb;
|
||||
|
Reference in New Issue
Block a user