net: can: mttcan: Fix build for Linux v5.14

Building the mttcan driver currently fails for Linux v5.14 with the
following error ...

 drivers/net/can/mttcan/native/m_ttcan_linux.c:1535:2: error: unknown
 field 'ndo_eth_ioctl' specified in initializer
  .ndo_eth_ioctl = mttcan_ioctl,

Fix this by using the appropriate field name for Linux v5.14.

Bug 3820317
Bug 3896592

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I822d988b097350538fbf4a568181e9fde9928ea3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2836716
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-01-03 17:33:16 +00:00
committed by mobile promotions
parent c86c642f5b
commit 4cf27b4441

View File

@@ -1532,7 +1532,11 @@ static const struct net_device_ops mttcan_netdev_ops = {
.ndo_stop = mttcan_close,
.ndo_start_xmit = mttcan_start_xmit,
.ndo_change_mtu = mttcan_change_mtu,
#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE
.ndo_eth_ioctl = mttcan_ioctl,
#else
.ndo_do_ioctl = mttcan_ioctl,
#endif
};
static int register_mttcan_dev(struct net_device *dev)