Bluetooth: Move tx queue to struct l2cap_chan
tx_q is the queue used by ERTM mode.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 16a223b..b2bfa1e 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -764,10 +764,10 @@
err = PTR_ERR(skb);
goto done;
}
- __skb_queue_tail(TX_QUEUE(sk), skb);
+ __skb_queue_tail(&pi->chan->tx_q, skb);
- if (sk->sk_send_head == NULL)
- sk->sk_send_head = skb;
+ if (pi->chan->tx_send_head == NULL)
+ pi->chan->tx_send_head = skb;
} else {
/* Segment SDU into multiples PDUs */
@@ -1017,7 +1017,6 @@
/* Default config options */
pi->flush_to = L2CAP_DEFAULT_FLUSH_TO;
- skb_queue_head_init(TX_QUEUE(sk));
}
static struct proto l2cap_proto = {