kni: fix build for dev_open in Linux 5.0
Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
build error:
.../build/build/kernel/linux/kni/ixgbe_ethtool.c:1746:4:
error: too few arguments to function ‘dev_open’
dev_open(netdev);
^~~~~~~~
In file included from .../build/kernel/linux/kni/ixgbe_ethtool.c:18:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
^~~~~~~~
.../build/build/kernel/linux/kni/igb_ethtool.c:1812:4:
error: too few arguments to function ‘dev_open’
dev_open(netdev);
^~~~~~~~
In file included from .../build/build/kernel/linux/kni/igb_ethtool.c:15:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
^~~~~~~~
dev_open() is changed in Linux kernel version 5.0 and now requires
a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by defining dev_open as macro when kernel version >= 5.0
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>