candev: add/update helpers for CAN FD
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 13 Jun 2012 18:48:21 +0000 (20:48 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 19 Jun 2012 19:40:14 +0000 (21:40 +0200)
commit1e0625facab2e871472472b7df87d8fbe6caf75a
tree831d0adba939e1d19e33d59b73508b5d306ed412
parente2d265d3b587f5f6f8febc0222aace93302ff0be
candev: add/update helpers for CAN FD

- update sanity checks
- add DLC to length conversion helpers
  - can_dlc2len() - get data length from can_dlc with sanitized can_dlc
  - can_len2dlc() - map the sanitized data length to an appropriate DLC

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c
include/linux/can/dev.h