All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] can: j1939: do not wait 250ms if the same addr was already claimed
@ 2022-05-09 17:03 Devid Antonio Filoni
  2022-05-09 19:04 ` Kurt Van Dijck
  0 siblings, 1 reply; 28+ messages in thread
From: Devid Antonio Filoni @ 2022-05-09 17:03 UTC (permalink / raw)
  To: Robin van der Gracht, Oleksij Rempel
  Cc: kernel, linux-can, Oleksij Rempel, Oliver Hartkopp,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski, Paolo Abeni,
	Maxime Jayat, kbuild test robot, netdev, linux-kernel,
	Devid Antonio Filoni

This is not explicitly stated in SAE J1939-21 and some tools used for
ISO-11783 certification do not expect this wait.

Fixes: 9d71dd0 ("can: add support of SAE J1939 protocol")
Signed-off-by: Devid Antonio Filoni <devid.filoni@egluetechnologies.com>
---
 net/can/j1939/address-claim.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/can/j1939/address-claim.c b/net/can/j1939/address-claim.c
index f33c47327927..1d070c08edf1 100644
--- a/net/can/j1939/address-claim.c
+++ b/net/can/j1939/address-claim.c
@@ -165,6 +165,12 @@ static void j1939_ac_process(struct j1939_priv *priv, struct sk_buff *skb)
 	 * leaving this function.
 	 */
 	ecu = j1939_ecu_get_by_name_locked(priv, name);
+
+	if (ecu && ecu->addr == skcb->addr.sa) {
+		/* the address was already claimed with the same name, nothing to do */
+		goto out_ecu_put;
+	}
+
 	if (!ecu && j1939_address_is_unicast(skcb->addr.sa))
 		ecu = j1939_ecu_create_locked(priv, name);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-02-07 14:06 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 17:03 [PATCH RESEND] can: j1939: do not wait 250ms if the same addr was already claimed Devid Antonio Filoni
2022-05-09 19:04 ` Kurt Van Dijck
2022-05-10  4:26   ` Oleksij Rempel
2022-05-10 11:00     ` Devid Antonio Filoni
2022-05-11  8:47       ` Oleksij Rempel
2022-05-11  9:06         ` David Jander
2022-05-11 12:55           ` Devid Antonio Filoni
2022-05-11 14:22             ` David Jander
2022-05-13  9:46               ` Devid Antonio Filoni
2022-11-17 14:08                 ` Devid Antonio Filoni
2022-11-17 15:22                   ` David Jander
2022-11-18  6:06                     ` Oleksij Rempel
2022-11-18 10:25                       ` Devid Antonio Filoni
2022-11-18 12:30                         ` Oleksij Rempel
2022-11-18 12:41                           ` Devid Antonio Filoni
2022-11-18 13:44                             ` Oleksij Rempel
2022-11-18 15:12                               ` Devid Antonio Filoni
2022-11-19 10:12                                 ` Oleksij Rempel
2022-11-20  0:11                                   ` Devid Antonio Filoni
2022-11-20  8:45                                     ` Oleksij Rempel
2022-11-20 19:18                                       ` Devid Antonio Filoni
2022-11-21  5:19                                         ` Oleksij Rempel
2022-11-23 20:39                                           ` Devid Antonio Filoni
2022-11-24  5:16                                             ` Oleksij Rempel
2022-11-25 17:04                                               ` [PATCH v2] can: j1939: do not wait 250 ms " Devid Antonio Filoni
2022-11-26 10:28                                                 ` Oleksij Rempel
2023-02-07 13:50                                                   ` Devid Antonio Filoni
2023-02-07 14:05                                                     ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.