}
break;
default:
- /* Don't emit an error frame if we're unsure */
- return;
+ /* Something else has happened.
+ * Maybe garbage on the UART line.
+ * Emit a generic error frame.
+ */
+ break;
}
elm327_feed_frame_to_netdev(elm, &frame);
/* The line is likely garbled anyway, so bail.
* The main code will restart listening.
*/
- elm327_kick_into_cmd_mode(elm);
return -ENODATA;
}
/* Dummy needed to use bitrate_const */
static int elmcan_do_set_bittiming(struct net_device *netdev)
{
- (void)netdev;
-
return 0;
}
{
int status;
- pr_info("ELM327 based best effort CAN interface driver\n");
- pr_info("This device is severely limited as a CAN interface, see documentation.\n");
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0)
status = tty_register_ldisc(N_ELMCAN, &elmcan_ldisc);
#else