Skip to content

Commit

Permalink
can: gs_usb: gs_make_candev(): set netdev->dev_id
Browse files Browse the repository at this point in the history
The gs_usb driver supports USB devices with more than 1 CAN channel.
Set the "netdev->dev_id" to distinguish between channels in user
space.

Link: https://lore.kernel.org/all/20221007075418.213403-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Oct 20, 2022
1 parent b1419cb commit acff76f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/can/usb/gs_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,7 @@ static struct gs_can *gs_make_candev(unsigned int channel,
netdev->ethtool_ops = &gs_usb_ethtool_ops;

netdev->flags |= IFF_ECHO; /* we support full roundtrip echo */
netdev->dev_id = channel;

/* dev setup */
strcpy(dev->bt_const.name, KBUILD_MODNAME);
Expand Down

0 comments on commit acff76f

Please sign in to comment.