From 4eceba17200c03a2678edbdcff5d800aded607be Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Thu, 14 Feb 2019 13:40:45 -0800 Subject: ethtool: add compat for flash update If driver does not support ethtool flash update operation call into devlink. Signed-off-by: Jakub Kicinski Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- include/net/devlink.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/net/devlink.h') diff --git a/include/net/devlink.h b/include/net/devlink.h index 18d7a051f412..a2da49dd9147 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1195,11 +1195,18 @@ devlink_health_report(struct devlink_health_reporter *reporter, #if IS_REACHABLE(CONFIG_NET_DEVLINK) void devlink_compat_running_version(struct net_device *dev, char *buf, size_t len); +int devlink_compat_flash_update(struct net_device *dev, const char *file_name); #else static inline void devlink_compat_running_version(struct net_device *dev, char *buf, size_t len) { } + +static inline int +devlink_compat_flash_update(struct net_device *dev, const char *file_name) +{ + return -EOPNOTSUPP; +} #endif #endif /* _NET_DEVLINK_H_ */ -- cgit