aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOliver Hartkopp <[email protected]>2022-09-12 19:07:24 +0200
committerMarc Kleine-Budde <[email protected]>2022-09-15 09:08:09 +0200
commitebf87fc728502244550eaf8819fc785e2014b2ad (patch)
treed4336c9933ea1856ec06126c09e33d749414308d /include/linux
parentfb08cba12b52cba4366e858932307649dc5304e2 (diff)
can: dev: add CAN XL support to virtual CAN
Make use of new can_skb_get_data_len() helper. Add support for variable CANXL MTU using the new can_is_canxl_dev_mtu(). Acked-by: Vincent Mailhol <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/can/dev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index c3e50e537e39..58f5431a5559 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -147,6 +147,11 @@ static inline u32 can_get_static_ctrlmode(struct can_priv *priv)
return priv->ctrlmode & ~priv->ctrlmode_supported;
}
+static inline bool can_is_canxl_dev_mtu(unsigned int mtu)
+{
+ return (mtu >= CANXL_MIN_MTU && mtu <= CANXL_MAX_MTU);
+}
+
void can_setup(struct net_device *dev);
struct net_device *alloc_candev_mqs(int sizeof_priv, unsigned int echo_skb_max,