Lines Matching refs:can
6 * This driver is inspired by the 4.6.2 version of net/can/usb/usb_8dev.c
10 #include <linux/can.h>
11 #include <linux/can/dev.h>
12 #include <linux/can/error.h>
67 bool can;
72 struct can_priv can; /* must be the first member */
189 ctx->can = true;
191 ctx->can = false;
232 if (ctx->can) {
471 priv->can.termination = MCBA_TERMINATION_ENABLED;
473 priv->can.termination = MCBA_TERMINATION_DISABLED;
501 if (bitrate != priv->can.bittiming.bitrate)
505 bitrate, priv->can.bittiming.bitrate);
512 priv->can.state = CAN_STATE_BUS_OFF;
516 priv->can.state = CAN_STATE_ERROR_PASSIVE;
520 priv->can.state = CAN_STATE_ERROR_WARNING;
702 priv->can.state = CAN_STATE_ERROR_ACTIVE;
727 priv->can.state = CAN_STATE_STOPPED;
777 const u16 bitrate_kbps = priv->can.bittiming.bitrate / 1000;
836 priv->can.state = CAN_STATE_STOPPED;
837 priv->can.termination_const = mcba_termination;
838 priv->can.termination_const_cnt = ARRAY_SIZE(mcba_termination);
839 priv->can.bitrate_const = mcba_bitrate;
840 priv->can.bitrate_const_cnt = ARRAY_SIZE(mcba_bitrate);
842 priv->can.do_set_termination = mcba_set_termination;
843 priv->can.do_set_mode = mcba_net_set_mode;
844 priv->can.do_get_berr_counter = mcba_net_get_berr_counter;
845 priv->can.do_set_bittiming = mcba_net_set_bittiming;