Lines Matching refs:can
15 #include <linux/can.h>
16 #include <linux/can/dev.h>
17 #include <linux/can/skb.h>
18 #include <linux/can/error.h>
149 * Copied from drivers/net/can/sja1000/sja1000.h
216 struct can_priv can;
778 struct can_bittiming *bt = &mod->can.bittiming;
783 /* This algorithm was stolen from drivers/net/can/sja1000/sja1000.c */
789 if (mod->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
808 /* can-on/off request */
816 /* bittiming + can-on/off request */
954 if (mod->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
1030 * drivers/net/can/sja1000/sja1000.c file, and adapted as necessary
1036 enum can_state state = mod->can.state;
1041 /* we can only handle the SJA1000 part */
1092 if (!(mod->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
1115 mod->can.can_stats.bus_off++;
1129 mod->can.can_stats.bus_error++;
1154 if (state != mod->can.state && (state == CAN_STATE_ERROR_WARNING ||
1158 mod->can.can_stats.error_warning++;
1163 mod->can.can_stats.error_passive++;
1173 mod->can.state = state;
1317 * On these devices, this function can be used to compare a received skb
1318 * with the saved echo skbs so that the hardware echo skb can be dropped.
1582 /* re-enable interrupts so we can send messages */
1653 mod->can.state = CAN_STATE_ERROR_ACTIVE;
1666 mod->can.state = CAN_STATE_STOPPED;
1696 /* check that we can actually transmit */
1714 * emulate it the best we can using ECHO skbs. Add the skb to the ECHO
1757 /* This structure was stolen from drivers/net/can/sja1000/sja1000.c */
1786 mod->can.state = CAN_STATE_ERROR_ACTIVE;
1928 mod->can.clock.freq = ICAN3_CAN_CLOCK;
1929 mod->can.bittiming_const = &ican3_bittiming_const;
1930 mod->can.do_set_mode = ican3_set_mode;
1931 mod->can.do_get_berr_counter = ican3_get_berr_counter;
1932 mod->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES