]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: j1939: add rxtimer for multipacket broadcast session
authorZhang Changzhong <zhangchangzhong@huawei.com>
Wed, 5 Aug 2020 03:50:25 +0000 (11:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:42:17 +0000 (11:42 +0200)
commitca244335a011e8cbe60e227c4c8f4025929ae07c
tree0f12cdd3ae620a17a04d971353c59701f9711a58
parent755f72bf48700b2302eb9a8c3e91fb1f5117190e
can: j1939: add rxtimer for multipacket broadcast session

[ Upstream commit 0ae18a82686f9b9965a8ce0dd81371871b306ffe ]

According to SAE J1939/21 (Chapter 5.12.3 and APPENDIX C), for transmit side
the required time interval between packets of a multipacket broadcast message
is 50 to 200 ms, the responder shall use a timeout of 250ms (provides margin
allowing for the maximumm spacing of 200ms). For receive side a timeout will
occur when a time of greater than 750 ms elapsed between two message packets
when more packets were expected.

So this patch fix and add rxtimer for multipacket broadcast session.

Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1596599425-5534-5-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>
net/can/j1939/transport.c