From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Schurig Subject: Re: Setting bitrate from user-space application Date: Wed, 23 Dec 2015 13:07:50 +0100 Message-ID: <87mvt1e5bd.wl-holgerschurig@gmail.com> References: <5655BF6D.3000701@picquet.fr> <5655CC8D.70508@pengutronix.de> <5655DC22.4000302@hartkopp.net> <5655DF32.5090505@picquet.fr> <5659113C.20000@optusnet.com.au> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mail-wm0-f46.google.com ([74.125.82.46]:37495 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbbLWMH6 (ORCPT ); Wed, 23 Dec 2015 07:07:58 -0500 Received: by mail-wm0-f46.google.com with SMTP id p187so146029699wmp.0 for ; Wed, 23 Dec 2015 04:07:57 -0800 (PST) In-Reply-To: <5659113C.20000@optusnet.com.au> Sender: linux-can-owner@vger.kernel.org List-ID: To: Tom Evans Cc: Guillaume Picquet , Oliver Hartkopp , Marc Kleine-Budde , linux-can@vger.kernel.org > Or if using Freescale's 2.6.35 driver, "ifconfig can0 down/up" and > "echo 500000 > /sys/class/devices/platform/FlexCAN.0/bitrate" in the > above "system()" call. > > I realise the above may be horrible, but I'd like some more > information on why it might be bad. a) it will only work with this specific FlexCAN driver from this proprietary kernel b) if you ever are forced to upgrade to, say, 4.4, it won't work Whereas "ip link set can0 type can bitrate 500000" will work with any card (even USB dongles that you might use as test equipment), and with any kernel. As an added bonus, it can even set things like "restart-ms" :-)