]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
candev: allow SJW user setting for bittiming calculation
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 28 Sep 2011 02:50:11 +0000 (02:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Sep 2011 17:41:51 +0000 (13:41 -0400)
commit2e1143742789463c00ed5e7f9bf471f2b707b493
treee0b3aa72bccbbf8aa5e5236a5c310c6ee4eaeef3
parentd4fa0e35fdbd54acf791fa3793d6d17f7795f7ae
candev: allow SJW user setting for bittiming calculation

This patch adds support for SJW user settings to not set the synchronization
jump width (SJW) to 1 in any case when using the in-kernel bittiming
calculation.

The ip-tool from iproute2 already supports to pass the user defined SJW
value. The given SJW value is sanitized with the controller specific sjw_max
and the calculated tseg2 value. As the SJW can have values up to 4 providing
this value will lead to the maximum possible SJW automatically. A higher SJW
allows higher controller oscillator tolerances.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/dev.c