提交 d34c34fb 编写于 作者: M Mat Martineau 提交者: Gustavo Padovan

Bluetooth: Initialize the transmit queue for L2CAP streaming mode

Commit 105bdf9e introduced a
regression in L2CAP streaming mode due to rearranged initialization
code that is shared between ERTM and streaming mode.  This change
makes sure the transmit queue is initialized in both modes.
Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
Acked-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: NGustavo Padovan <gustavo@padovan.org>
上级 577cfaeb
......@@ -2349,6 +2349,8 @@ static inline int l2cap_ertm_init(struct l2cap_chan *chan)
chan->sdu_last_frag = NULL;
chan->sdu_len = 0;
skb_queue_head_init(&chan->tx_q);
if (chan->mode != L2CAP_MODE_ERTM)
return 0;
......@@ -2360,7 +2362,6 @@ static inline int l2cap_ertm_init(struct l2cap_chan *chan)
INIT_DELAYED_WORK(&chan->ack_timer, l2cap_ack_timeout);
skb_queue_head_init(&chan->srej_q);
skb_queue_head_init(&chan->tx_q);
INIT_LIST_HEAD(&chan->srej_l);
err = l2cap_seq_list_init(&chan->srej_list, chan->tx_win);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册