Hi!

I am trying to write a network device driver for using multiple
CAN-channels.
I have a network-device-driver-module "can". I use the command "ip link add
dev canX type can" to create can0 to can3.

In an example application, I can connect to each of these devices with a
socket by setting "ifr_name" for ioctrl accordingly. So far so good.

What I just don't get is how I can distinguish the four devices in the "can"
module. E.g., the "can_transmit()" [=net_device_ops.ndo_start_xmit()]
function is called with the respective net_device parameter for the calling
socket. However, I need to know which CHANNEL is calling (i.e., can0, can1,
...) to forward the message to the correct mailbox.

Also, if I call "ip link add can0 type can", the init function
[=rtnl_link_ops.setup()] is called. The name-field of the net_device
parameter, however, is NOT can0, as I would have expected. So I am missing
the link between the "ip link add" command and the device-module.

I guess I'm missing something really important and fundamental here...

Regards, and thanks for your answer in advance,
Markus
-- 
View this message in context: 
http://old.nabble.com/Use-multiple-CAN-Channels-tp26724996p26724996.html
Sent from the Socket-CAN Users mailing list archive at Nabble.com.

_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to