History

can: dev: add CAN interface API for fixed bitrates

Some CAN interfaces only support fixed fixed bitrates. This patch adds a netlink interface to get the list of the CAN interface's fixed bitrates and data bitrates. Inside the driver arrays of supported data- bitrate values are defined. const u32 drvname_bitrate[] = { 20000, 50000, 100000 }; const u32 drvname_data_bitrate[] = { 200000, 500000, 1000000 }; struct drvname_priv *priv; priv = netdev_priv(dev); priv->bitrate_const = drvname_bitrate; priv->bitrate_const_cnt = ARRAY_SIZE(drvname_bitrate); priv->data_bitrate_const = drvname_data_bitrate; priv->data_bitrate_const_cnt = ARRAY_SIZE(drvname_data_bitrate);

Marc Kleine-Budde committed 9 years ago

Commit 431af771 parent c3606d43 files · +71 −16Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/can/netlink.h+2−0
@@ -129,6 +129,8 @@ enum { · 128 unmodified lines
129129 IFLA_CAN_DATA_BITTIMING_CONST,
130130 IFLA_CAN_TERMINATION,
131131 IFLA_CAN_TERMINATION_CONST,
132+ IFLA_CAN_BITRATE_CONST,
133+ IFLA_CAN_DATA_BITRATE_CONST,
132134 __IFLA_CAN_MAX
133135 };
134136