aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMat Martineau <mathewm@codeaurora.org>2012-05-14 17:49:27 -0400
committerGustavo Padovan <gustavo@padovan.org>2012-05-15 19:28:16 -0400
commitd34c34fb2592bd5231a153ad1676c3ded175410a (patch)
tree95ebddd3134b9003335932b6c55622890affe436 /net
parent577cfaeb864874011386a05ab4f5580a6a2aeb11 (diff)
Bluetooth: Initialize the transmit queue for L2CAP streaming mode
Commit 105bdf9ec19e729bacdb33861c74fcf3eb39eb37 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: Mat Martineau <mathewm@codeaurora.org> Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 869beb30f480..7adfcecf7a5e 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2349,6 +2349,8 @@ static inline int l2cap_ertm_init(struct l2cap_chan *chan)
2349 chan->sdu_last_frag = NULL; 2349 chan->sdu_last_frag = NULL;
2350 chan->sdu_len = 0; 2350 chan->sdu_len = 0;
2351 2351
2352 skb_queue_head_init(&chan->tx_q);
2353
2352 if (chan->mode != L2CAP_MODE_ERTM) 2354 if (chan->mode != L2CAP_MODE_ERTM)
2353 return 0; 2355 return 0;
2354 2356
@@ -2360,7 +2362,6 @@ static inline int l2cap_ertm_init(struct l2cap_chan *chan)
2360 INIT_DELAYED_WORK(&chan->ack_timer, l2cap_ack_timeout); 2362 INIT_DELAYED_WORK(&chan->ack_timer, l2cap_ack_timeout);
2361 2363
2362 skb_queue_head_init(&chan->srej_q); 2364 skb_queue_head_init(&chan->srej_q);
2363 skb_queue_head_init(&chan->tx_q);
2364 2365
2365 INIT_LIST_HEAD(&chan->srej_l); 2366 INIT_LIST_HEAD(&chan->srej_l);
2366 err = l2cap_seq_list_init(&chan->srej_list, chan->tx_win); 2367 err = l2cap_seq_list_init(&chan->srej_list, chan->tx_win);