diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 8acc19ed9c4d..400efa26ddba 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1368,7 +1368,6 @@ static int l2cap_ertm_send(struct sock *sk) | |||
1368 | 1368 | ||
1369 | while ((skb = sk->sk_send_head) && (!l2cap_tx_window_full(sk)) && | 1369 | while ((skb = sk->sk_send_head) && (!l2cap_tx_window_full(sk)) && |
1370 | !(pi->conn_state & L2CAP_CONN_REMOTE_BUSY)) { | 1370 | !(pi->conn_state & L2CAP_CONN_REMOTE_BUSY)) { |
1371 | tx_skb = skb_clone(skb, GFP_ATOMIC); | ||
1372 | 1371 | ||
1373 | if (pi->remote_max_tx && | 1372 | if (pi->remote_max_tx && |
1374 | bt_cb(skb)->retries == pi->remote_max_tx) { | 1373 | bt_cb(skb)->retries == pi->remote_max_tx) { |
@@ -1376,6 +1375,8 @@ static int l2cap_ertm_send(struct sock *sk) | |||
1376 | break; | 1375 | break; |
1377 | } | 1376 | } |
1378 | 1377 | ||
1378 | tx_skb = skb_clone(skb, GFP_ATOMIC); | ||
1379 | |||
1379 | bt_cb(skb)->retries++; | 1380 | bt_cb(skb)->retries++; |
1380 | 1381 | ||
1381 | control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); | 1382 | control = get_unaligned_le16(tx_skb->data + L2CAP_HDR_SIZE); |