Lines Matching refs:can
21 * This program is free software; you can redistribute it and/or modify
61 #include <linux/can/core.h>
62 #include <linux/can/dev.h>
63 #include <linux/can/platform/mcp251x.h>
226 struct can_priv can;
491 priv->can.state = CAN_STATE_ERROR_ACTIVE;
493 if (priv->can.restart_ms == 0)
514 if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK) {
517 } else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) {
535 priv->can.state = CAN_STATE_ERROR_ACTIVE;
542 struct can_bittiming *bt = &priv->can.bittiming;
548 (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES ?
663 priv->can.state = CAN_STATE_STOPPED;
696 if (priv->can.state == CAN_STATE_BUS_OFF) {
776 /* Update can state */
800 /* Update can state statistics */
801 switch (priv->can.state) {
805 priv->can.can_stats.error_warning++;
809 priv->can.can_stats.error_passive++;
814 priv->can.state = new_state;
829 if (priv->can.state == CAN_STATE_BUS_OFF) {
830 if (priv->can.restart_ms == 0) {
934 /* Allocate can/net device */
945 priv->can.bittiming_const = &mcp251x_bittiming_const;
946 priv->can.do_set_mode = mcp251x_do_set_mode;
947 priv->can.clock.freq = pdata->oscillator_frequency / 2;
948 priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |