From: Zhang Changzhong <zhangchangzhong@huawei.com>
To: <robin@protonic.nl>, <linux@rempel-privat.de>,
<kernel@pengutronix.de>, <socketcan@hartkopp.net>,
<mkl@pengutronix.de>, <davem@davemloft.net>, <kuba@kernel.org>
Cc: <linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net 2/4] can: j1939: cancel rxtimer on multipacket broadcast session complete
Date: Wed, 5 Aug 2020 11:50:23 +0800 [thread overview]
Message-ID: <1596599425-5534-3-git-send-email-zhangchangzhong@huawei.com> (raw)
In-Reply-To: <1596599425-5534-1-git-send-email-zhangchangzhong@huawei.com>
If j1939_xtp_rx_dat_one() receive last frame of multipacket broadcast
message, j1939_session_timers_cancel() should be called to cancel
rxtimer.
Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
net/can/j1939/transport.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index e5188ac..dd6a120 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -1788,6 +1788,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);
--
2.9.5
next prev parent reply other threads:[~2020-08-05 3:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 3:50 [PATCH net 0/4] support multipacket broadcast message Zhang Changzhong
2020-08-05 3:50 ` [PATCH net 1/4] can: j1939: fix support for " Zhang Changzhong
2020-08-05 3:50 ` Zhang Changzhong [this message]
2020-08-05 3:50 ` [PATCH net 3/4] can: j1939: abort multipacket broadcast session when timeout occurs Zhang Changzhong
2020-08-05 3:50 ` [PATCH net 4/4] can: j1939: add rxtimer for multipacket broadcast session Zhang Changzhong
2020-08-06 16:10 ` [PATCH net 0/4] support multipacket broadcast message Oleksij Rempel
2020-08-07 9:36 ` Zhang Changzhong
2020-08-07 13:15 ` Oleksij Rempel
2020-08-14 11:01 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1596599425-5534-3-git-send-email-zhangchangzhong@huawei.com \
--to=zhangchangzhong@huawei.com \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=robin@protonic.nl \
--cc=socketcan@hartkopp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).