提交 ee556f66 编写于 作者: G Gustavo Padovan 提交者: Johan Hedberg

Bluetooth: Do not purge queue in Basic Mode

chan->tx_q is only initialized if we use ERTM or Streaming mode.
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 d1de6d46
......@@ -549,9 +549,11 @@ static void l2cap_chan_del(struct l2cap_chan *chan, int err)
if (test_bit(CONF_NOT_COMPLETE, &chan->conf_state))
return;
skb_queue_purge(&chan->tx_q);
switch(chan->mode) {
case L2CAP_MODE_BASIC:
break;
if (chan->mode == L2CAP_MODE_ERTM) {
case L2CAP_MODE_ERTM:
__clear_retrans_timer(chan);
__clear_monitor_timer(chan);
__clear_ack_timer(chan);
......@@ -560,7 +562,15 @@ static void l2cap_chan_del(struct l2cap_chan *chan, int err)
l2cap_seq_list_free(&chan->srej_list);
l2cap_seq_list_free(&chan->retrans_list);
/* fall through */
case L2CAP_MODE_STREAMING:
skb_queue_purge(&chan->tx_q);
break;
}
return;
}
static void l2cap_chan_cleanup_listen(struct sock *parent)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册