All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Guillaume Picquet <guillaume@picquet.fr>,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org
Subject: Re: Setting bitrate from user-space application
Date: Wed, 23 Dec 2015 15:10:55 +0100	[thread overview]
Message-ID: <567AAB6F.4040609@pengutronix.de> (raw)
In-Reply-To: <567AA9AB.9010500@picquet.fr>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

On 12/23/2015 03:03 PM, Guillaume Picquet wrote:
> A status update, thanks to libsocketcan I am able to get and set bitrate.

\o/

> remarks:
> Before setting bitrate a stop must be performed.

Yes - this way you can be sure that the new frames are send with the new
bitrate. Also think of a multi application CAN environment.

> I use poll() on CAN socket and it returns and set errno to ENETDOWN 
> during the stop but sockets stay valid. (no need to close and reopen).
> I Suppose it is normal behaviour, right ?

ENETDOWN is expected behaviour. That you don't need to close and reopen
the socket is.....nice, isn't it :) Let's say it's implementation
defined behaviour. Better close and reopen the socket.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2015-12-23 14:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 14:02 Setting bitrate from user-space application Guillaume Picquet
2015-11-25 14:24 ` Misra Pankaj Kumar (RBEI/EEA2)
2015-11-25 14:58 ` Marc Kleine-Budde
2015-11-25 16:04   ` Oliver Hartkopp
2015-11-25 16:10     ` Marc Kleine-Budde
2015-11-25 16:17     ` Guillaume Picquet
2015-11-28  2:28       ` Tom Evans
2015-12-23 12:07         ` Holger Schurig
2015-12-23 14:03       ` Guillaume Picquet
2015-12-23 14:10         ` Marc Kleine-Budde [this message]

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=567AAB6F.4040609@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=guillaume@picquet.fr \
    --cc=linux-can@vger.kernel.org \
    --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 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.