From 43cc23cd9d0986ae370f5839aa952c6e3eb196d0 Mon Sep 17 00:00:00 2001 From: Arthur GUYADER Date: Thu, 12 Dec 2019 18:12:01 +0100 Subject: j1939: Follow updates of the kernel This commit patch j1939 feature after the update of the kernel from linux-can-next to mainline. Now promisc option removes filter of the bind. The option is now a parameter in the event_filter. The feature recv_own isn't available, you can't receive on the same socket an emit frame from you. Not a big problem because receive and send method use two different sockets in the implementation. Change-Id: I5ac410177c1512090827870300b8aa1679477b84 Signed-off-by: Arthur GUYADER Signed-off-by: Romain Forlot --- low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp') diff --git a/low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp b/low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp index 08c13752..2be275d9 100644 --- a/low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp +++ b/low-can-binding/utils/socketcan-j1939/socketcan-j1939-data.cpp @@ -31,15 +31,7 @@ namespace utils */ int socketcan_j1939_data_t::open(std::string device_name, pgn_t pgn) { - int ret = socketcan_j1939_t::open(device_name, htole64(J1939_NAME_ECU), pgn, J1939_NO_ADDR); - if(ret >= 0) - { - if(tx_address_.can_addr.j1939.pgn != J1939_NO_PGN) - add_filter(J1939_NO_NAME, tx_address_.can_addr.j1939.pgn, J1939_NO_ADDR, J1939_NO_NAME, J1939_NO_PGN, J1939_NO_ADDR); - - define_opt(); - } - return ret; + return socketcan_j1939_t::open(device_name, htole64(J1939_NAME_ECU), pgn, J1939_NO_ADDR); } /** -- cgit 1.2.3-korg