Tutorial or Read-me file for Linux can API
Hi,
I am going through a can base network driver for MCP-2515
https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/net/can/mcp251x.c
Please suggest where i can find the description of the function, :-- alloc_candevopen_candevalloc_can_skbcan_dropped_invalid_skballoc_can_err_skb
etc .....
Is there some read-me file or some tutorial ?
Please suggest.
//Katoch
Quoted 5 lines · Katoch
Hi,
I am going through a can base network driver for MCP-2515
https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/net/can/mcp251x.c
Quoted 8 lines
Please suggest where i can find the description of the function, :--
alloc_candevopen_candevalloc_can_skbcan_dropped_invalid_skballoc_can_err_skb
etc .....
The mcp251x driver uses the Linux CAN driver infrastructure, e.g. to be able to set bitrates and other settings with the ip tool from the iproute2 package.
See:
http://lxr.linux.no/#linux+v3.8.5/Documentation/networking/can.txt#L746
You can find the according header files and implementations in:
linux/include/linux/can/dev.h
and
linux/drivers/net/can/dev.c
Please take care that CONFIG_CAN_DEV and CONFIG_CAN_CALC_BITTIMING are enabled in your Linux kernel configuration, see:
http://lxr.linux.no/#linux+v3.8.5/drivers/net/can/Kconfig#L33
Regards,
Oliver