diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c index 305dd72c844c..c9b446c60e8c 100644 --- a/net/can/j1939/socket.c +++ b/net/can/j1939/socket.c @@ -1161,6 +1161,7 @@ static int j1939_sk_send_loop(struct j1939_priv *priv, struct sock *sk, * fist in the queue */ if (!j1939_session_activate(session)) { + printk("1skb: %p, todo_size: %lu, seg size: %lu, %s\n", skb, todo_size, segment_size, __func__); j1939_tp_schedule_txtimer(session, 0); } else { ret = -EBUSY; @@ -1170,10 +1171,10 @@ static int j1939_sk_send_loop(struct j1939_priv *priv, struct sock *sk, break; } } - } else { - skcb->offset = session->total_queued_size; - j1939_session_skb_queue(session, skb); } + skcb->offset = session->total_queued_size; + j1939_session_skb_queue(session, skb); + printk("2skb: %p, todo_size: %lu, seg size: %lu, %s\n", skb, todo_size, segment_size, __func__); todo_size -= segment_size; session->total_queued_size += segment_size; diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c index 4be73de5033c..dd503bc3adb5 100644 --- a/net/can/j1939/transport.c +++ b/net/can/j1939/transport.c @@ -1505,7 +1505,6 @@ static struct j1939_session *j1939_session_new(struct j1939_priv *priv, session->state = J1939_SESSION_NEW; skb_queue_head_init(&session->skb_queue); - skb_queue_tail(&session->skb_queue, skb); skcb = j1939_skb_to_cb(skb); memcpy(&session->skcb, skcb, sizeof(session->skcb)); @@ -1548,6 +1547,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv, kfree_skb(skb); return NULL; } + j1939_session_skb_queue(session, skb); /* alloc data area */ skb_put(skb, size);