diff mbox series

[5/7] backports: Add extra parameter to dev_open()

Message ID 20190126220033.27634-6-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show
Series backport: update to Linux 5.0-rc3 | expand

Commit Message

Hauke Mehrtens Jan. 26, 2019, 10 p.m. UTC
dev_open() got the extra parameter extack in Linux commit 00f54e68924e
("net: core: dev: Add extack argument to dev_open()"), just ignore it on
older kernel versions. This is used by the hostap driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/netdevice.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 44319331..c3e91a0c 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -358,4 +358,12 @@  static inline int _bp_netdev_upper_dev_link(struct net_device *dev,
 	macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__)
 #endif
 
+#if LINUX_VERSION_IS_LESS(5,0,0)
+static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_ack *extack)
+{
+	return dev_open(dev);
+}
+#define dev_open LINUX_BACKPORT(dev_open)
+#endif
+
 #endif /* __BACKPORT_NETDEVICE_H */