Skip to content

Commit

Permalink
can: j1939: cancel rxtimer on multipacket broadcast session complete
Browse files Browse the repository at this point in the history
[ Upstream commit e8b1765 ]

If j1939_xtp_rx_dat_one() receive last frame of multipacket broadcast message,
j1939_session_timers_cancel() should be called to cancel rxtimer.

Fixes: 9d71dd0 ("can: add support of SAE J1939 protocol")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1596599425-5534-3-git-send-email-zhangchangzhong@huawei.com
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhang Changzhong authored and gregkh committed Aug 26, 2020
1 parent 5159a0a commit d0dc3d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/can/j1939/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,7 @@ static void j1939_xtp_rx_dat_one(struct j1939_session *session,
}

if (final) {
j1939_session_timers_cancel(session);
j1939_session_completed(session);
} else if (do_cts_eoma) {
j1939_tp_set_rxtimeout(session, 1250);
Expand Down

0 comments on commit d0dc3d2

Please sign in to comment.